Update Payment
Update the properties of an existing payment resource.
POST
https://api.uprails.com/payments/:payment_idUpdates a Payment resource. This may include attaching a payment method, or attaching customer object or metadata fields after the Payment is created.
Path Parameters
| Parameter | Type | Description |
|---|---|---|
payment_id | string | Required. The ID of the payment to update. |
Body Parameters
amountintegerThe updated amount for the payment.
currencystringThe three-letter ISO 4217 currency code.
descriptionstringAn arbitrary string attached to the payment.
metadataobjectSet of key-value pairs for storing additional information.
customer_idstringThe 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": {}
}