Complete a session
Completes a session by posting the following request to the callback URL. This step is optional and only applies to non-hosted sessions:
{
"session_id": "sid_llraltf4jlwu5dxdtprcv7ba5i",
"amount" : 6540,
"currency": "USD",
"status": "approved",
"authentication_type": "regular",
"authentication_category": "payment",
"reference": "ORD-5023-4E89",
"approved": true,
"protocol_version": "2.2.0",
"response_code": "Y",
"response_status_reason": "01",
"cryptogram": "MTIzNDU2Nzg5MDA5ODc2NTQzMjE=",
"eci": "05",
"xid": "XSUErNftqkiTdlkpSk8p32GWOFA",
"cardholder_info": "Card declined. Please contact your issuing bank.",
"challenged": true
}
The fields of the above are the same as they would be in a GET session response. If the callback URL fails, we recommend that you use a GET call as a fallback.
Path Parameters
- Type: stringidrequired
Session ID
Responses
- 204
Session completed successfully
- 401
Unauthorized
- application/json
- application/json
Request Example for post/sessions/{id}/complete
curl 'https://{prefix}.api.sandbox.checkout.com/sessions/{id}/complete' \
--request POST \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN'
No Body