Uprails

Payments

Accept and process payments from customers around the world with our global processing infrastructure.

Overview

The Payments API allows you to create, confirm, capture, and manage payments. Uprails supports multiple payment methods including cards, bank transfers, and digital wallets.

Quick Start

Create your first payment with just a few lines of code:

Create Payment
curl -X POST https://api.uprails.com/payments \
  -H "Content-Type: application/json" \
  -H "api-key: snd_YOUR_API_KEY" \
  -d '{
    "amount": 1000,
    "currency": "USD",
    "profile_id": "YOUR_PROFILE_ID",
    "confirm": true,
    "payment_method": "card",
    "payment_method_data": {
      "card": {
        "card_number": "4242424242424242",
        "card_exp_month": "12",
        "card_exp_year": "2025",
        "card_cvc": "123"
      }
    }
  }'

Payment Object

Payment Objectjson
{
  "payment_id": "pay_1234567890abcdef",
  "merchant_id": "mer_abcdef123456",
  "status": "succeeded",
  "amount": 1000,
  "amount_received": 1000,
  "amount_capturable": 0,
  "currency": "USD",
  "capture_method": "automatic",
  "payment_method": "card",
  "payment_method_data": {
    "card": {
      "last4": "4242",
      "brand": "visa",
      "exp_month": "12",
      "exp_year": "2025"
    }
  },
  "customer_id": "cus_xyz789",
  "email": "customer@example.com",
  "description": "Order #12345",
  "statement_descriptor": "UPRAILS",
  "metadata": {
    "order_id": "12345"
  },
  "created": "2024-01-15T10:30:00Z",
  "modified_at": "2024-01-15T10:30:05Z"
}

API Endpoints

Payment Status

A payment can be in one of the following statuses:

StatusDescription
requires_payment_methodPayment needs a payment method to be attached
requires_confirmationPayment method attached, awaiting confirmation
requires_actionAdditional action required (e.g., 3DS authentication)
processingPayment is being processed by the payment processor
requires_capturePayment authorized, awaiting capture (manual capture only)
succeededPayment completed successfully
failedPayment failed
cancelledPayment was cancelled

Capture Methods

When creating a payment, you can specify how funds should be captured:

MethodDescription
automaticFunds are captured automatically when the payment is confirmed (default)
manualAuthorize now, capture later. Useful for orders that need fulfillment before charging
scheduledCapture at a specific time in the future
Authorization Hold
With manual capture, authorized funds are held for up to 7 days. Make sure to capture before the authorization expires.

Next Steps