Uprails
Payments/Confirm

Confirm Payment

Confirm a payment intent to finalize the transaction.

POSThttps://api.uprails.com/payments/:payment_id/confirm

Confirms a payment intent that was previously created with confirm: false. This action attempts to authorize the payment with the payment processor.

Path Parameters

ParameterTypeDescription
payment_idstringRequired. The ID of the payment to confirm.

Body Parameters

payment_method_dataobject

The payment method information provided for making a payment.

cardobject

Card details

card_numberstringrequired

Card number

card_exp_monthstringrequired

Expiry month

card_exp_yearstringrequired

Expiry year

card_cvcstringrequired

CVC code

card_holder_namestring

Card holder name

payment_methodstring

Indicates the type of payment method (e.g., 'card', 'wallet').

payment_method_typestring

Indicates the sub type of payment method (e.g., 'credit', 'debit').

customer_acceptanceobject

Details of customer acceptance for the payment.

Request Example

Confirm Payment
curl -X POST https://api.uprails.com/payments/pay_mbabizu24mvu3mela5njyhpit4/confirm \
  -H "Content-Type: application/json" \
  -H "api-key: snd_YOUR_API_KEY" \
  -d '{
    "payment_method": "card",
    "payment_method_data": {
      "card": {
        "card_number": "4242424242424242",
        "card_exp_month": "12",
        "card_exp_year": "2025",
        "card_cvc": "123"
      }
    }
  }'

Response

200OK
{
  "payment_id": "pay_mbabizu24mvu3mela5njyhpit4",
  "status": "succeeded",
  "amount": 6540,
  "currency": "USD",
  "payment_method": "card",
  "client_secret": "pay_U42c409qyHwOkWo3vK60_secret_el9ksDkiB8hi6j9N78yo",
  "created": "2024-01-22T10:11:12Z",
  "modified_at": "2024-01-22T10:20:00Z",
  "customer_id": "cus_y3oqhf46pyzuxjbcn2giaqnb44"
}