Uprails
Payments/Retrieve

Retrieve Payment

Retrieve details of an existing payment by its ID.

GEThttps://api.uprails.com/payments/:payment_id

Retrieves the details of a payment that has previously been created. Supply the unique payment ID that was returned from your previous request, and Uprails will return the corresponding payment information.

Path Parameters

ParameterTypeDescription
payment_idstringRequired. The ID of the payment to retrieve.

Request Example

Retrieve Payment
curl https://api.uprails.com/payments/pay_1234567890abcdef \
  -H "api-key: snd_YOUR_API_KEY"

Response

200OK
{
  "payment_id": "pay_1234567890abcdef",
  "merchant_id": "mer_abcdef123456",
  "status": "succeeded",
  "amount": 5000,
  "amount_received": 5000,
  "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",
  "created": "2024-01-15T10:30:00Z",
  "modified_at": "2024-01-15T10:30:05Z",
  "metadata": {
    "order_id": "12345"
  }
}