Create a payment capture
How to create a payment capture via API
To create a new payment capture, send a POST request to the /api/2026-05/payment_captures endpoint, passing the resource arguments in the request body.
Request
POST https://yourdomain.commercelayer.io/api/2026-05/payment_captures
Arguments
type
string
Required
attributes._internal_version
string
Optional
attributes.amount_cents
integer
Optional
attributes.options
object
Optional
attributes.reference
string
Optional
attributes.reference_origin
string
Optional
attributes.metadata
object
Optional
relationships.payment_session
object
Required
relationships.payment_authorization
object
Required
Example
The following request creates a new payment capture:
curl -g -X POST \
'https://yourdomain.commercelayer.io/api/2026-05/payment_captures' \
-H 'Accept: application/vnd.api+json' \
-H 'Authorization: Bearer your-access-token' \
-H 'Content-Type: application/vnd.api+json' \
-d '{
"data": {
"type": "payment_captures",
"relationships": {
"payment_session": {
"data": {
"type": "payment_sessions",
"id": "ABCRtyUpBa"
}
},
"payment_authorization": {
"data": {
"type": "payment_authorizations",
"id": "BCDRtyUpBa"
}
}
}
}
}'On success, the API responds with a 201 Created status code, returning the created resource object:
Last updated