API Docs
Payments
API ReferencePayments

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:

curl -X POST 'https://api.v2.paychtec.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": "2028",      "card_cvc": "123"    }  }}'

Payment Object

{
  "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": "2028"
    }
  },
  "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

MethodEndpointDescription
POST/paymentsCreate Payment
POST/payments/:idUpdate Payment
POST/payments/:id/confirmConfirm Payment
GET/payments/:idRetrieve Payment
GET/payments/listList Payments

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 was unsuccessful
cancelledPayment was cancelled

Capture Methods

MethodDescription
automaticPayment is captured immediately upon authorization (default)
manualPayment is authorized first, then captured separately. Use for two-step payment flows.

Manual Capture: When using manual capture, authorized payments must be captured within 7 days or the authorization will expire.