Skip to content
Docs

Payments

POST/api/payments/{id}/captures

Capture a payment

Capture Authorized Payment.

Server-side request · headers mid + terminal-idTry it in Sandbox

Path parameters

FieldTypeDescription
idRequiredstring

Payment request Id, Transaction Id and Order Id

Request body

FieldTypeDescription
amountOptionalnumber

The amount to capture. If not specified, the full payment amount will be captured.

e.g. 100
referenceOptionalstring

A reference you can later use to identify this capture request.

e.g. ORD-5023-4E89
metadataOptionalobject

A set of key-value pairs that you can attach to the capture request. This can be useful for storing additional information in a structured format. Note that this object only allows one level of depth, so cannot accept non-primitive data types such as objects or arrays.

Headers

FieldTypeDescription
midRequiredstring

Your MID, starts with ul-mid.

e.g. ul-mid-696f12de-46d0-48c4-a7c8-bb*********5
terminal-idRequiredstring

Your terminal id, starts with ul-tid.

e.g. ul-tid-6208df4ad7329e*********e

Responses

StatusDescription
200 OKSuccess
400 Bad requestBad Request
401 UnauthorizedUnauthorized
402 Payment requiredCapture Failed
403 ForbiddenForbidden request
404 Not foundNot Found
POSThttps://sandbox.geturbanledger.com/api/payments/ID/captures
curl -X POST "https://sandbox.geturbanledger.com/api/payments/ID/captures" \
  -H "Content-Type: application/json" \
  -H "mid: sb-ul-mid-xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" \
  -H "terminal-id: ul-tid-xxxxxxxxxxxxxxxxxxxxxxxx" \
  -d '{
  "amount": 100,
  "reference": "ORD-5023-4E89",
  "metadata": {
    "channel": "web",
    "customer_ref": "CUST-10482"
  }
}'
Response
200 OK · Success
{
  "status": "Partially Captured",
  "message": "The payment was partially captured successfully",
  "reference": "ORD-10482"
}
Talk to ustalk-to-us