PaybytokenDocs
Payment Intents
API reference · Payment Intents

Update a Payment Intent

Update merchant-authored description or metadata before completion.

PATCH /api/v1/payment_intents/:id

curl https://api-prod.paybytoken.io/api/v1/payment_intents/pay_t24b28nbodnk4icGMyE7 \
  -X PATCH \
  -H "Authorization: Bearer $PAYBYTOKEN_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "Updated order 123",
    "metadata": { "order_id": "order_123", "source": "support" }
  }'

Request body

At least one field is required.

ParameterTypeDescription
descriptionstring or nullReplacement description.
metadataobjectReplacement metadata object.

Updates are accepted while the Payment Intent is requires_payment_method or requires_confirmation. The response is the updated PaymentIntent object.

On this page

API Workbench

Full Explorer

Open in new tab