---
title: "Complete a session"
method: POST
path: "/sessions/{id}/complete"
tags: ["Standalone"]
---

# Complete a session

`POST /sessions/{id}/complete`

## Request

- Base URL: `https://{prefix}.api.sandbox.checkout.com`
- URL: `https://{prefix}.api.sandbox.checkout.com/sessions/{id}/complete`
- Auth: one of:
  - OAuth 2
    - Client credentials
    - Token URL: `string` scopes: `sessions:app`, `sessions:browser`
  - API key in header `Authorization`
- TypeScript: <https://skmtc.dev/checkout/apis/checkout-com-api-reference/docs/sessions/:id/complete/post.ts> (a function with typed inputs; its response is checked against the schema)

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
}
```
<br/>
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

- `id` string, required

## Response `204`

Session completed successfully

## Other responses

- `401`: Unauthorized
- `403`: Forbidden
- `404`: Session not found

---

[API](https://skmtc.dev/checkout/apis/checkout-com-api-reference.md) - [All operations](https://skmtc.dev/checkout/apis/checkout-com-api-reference/llms.txt) - [OpenAPI document](https://skmtc.dev/checkout/apis/checkout-com-api-reference/revisions/0f1abdb1c3e9?raw)
