Uprails
Payments/Update

Update Payment

Update the properties of an existing payment resource.

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

Updates a Payment resource. This may include attaching a payment method, or attaching customer object or metadata fields after the Payment is created.

Path Parameters

ParameterTypeDescription
payment_idstringRequired. The ID of the payment to update.

Body Parameters

amountinteger

The updated amount for the payment.

currencystring

The three-letter ISO 4217 currency code.

descriptionstring

An arbitrary string attached to the payment.

metadataobject

Set of key-value pairs for storing additional information.

customer_idstring

The identifier for the customer.

Request Example

Update Payment
curl -X POST https://api.uprails.com/payments/pay_mbabizu24mvu3mela5njyhpit4 \
  -H "Content-Type: application/json" \
  -H "api-key: snd_YOUR_API_KEY" \
  -d '{
    "amount": 7654
  }'

Response

200OK
{
  "payment_id": "pay_mbabizu24mvu3mela5njyhpit4",
  "status": "requires_confirmation",
  "amount": 7654,
  "currency": "USD",
  "client_secret": "pay_U42c409qyHwOkWo3vK60_secret_el9ksDkiB8hi6j9N78yo",
  "created": "2024-01-22T10:11:12Z",
  "modified_at": "2024-01-22T10:15:00Z",
  "customer_id": "cus_y3oqhf46pyzuxjbcn2giaqnb44",
  "description": "Updated payment description",
  "metadata": {}
}