Skip to content

Complete Checkout

POST
/api/Checkout/sessions/me/complete
curl --request POST \
--url https://example.com/api/Checkout/sessions/me/complete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "sessionId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "providerToken": "example", "methodType": "Card" }'

Validates the gateway token, provisions member + payment method + one subscription per line of the checkout (all or nothing), fires the checkout.completed webhook. Setup fees of a multi-line checkout are taken as one combined charge. A member may hold only one live (non-cancelled) subscription per plan and partner ref, and each session completes at most once - concurrent submits of the same session are serialised, so only the first provisions.

object
sessionId
required
string format: uuid
providerToken
required
string
>= 1 characters
methodType
string
Allowed values: Card BankAccount

Checkout completed.

Media type application/json
object
status
string
Allowed values: Pending AwaitingPayment Completed Failed Expired
returnUrl
string
nullable
failureReason
string
nullable
Example
{
"status": "Pending"
}

The capture token was rejected; the session is marked Failed.

Media type application/json
object
status
string
Allowed values: Pending AwaitingPayment Completed Failed Expired
returnUrl
string
nullable
failureReason
string
nullable
Example
{
"status": "Pending"
}

The setup fee was declined; the session is marked Failed and checkout.failed is sent.

Media type application/json
object
status
string
Allowed values: Pending AwaitingPayment Completed Failed Expired
returnUrl
string
nullable
failureReason
string
nullable
Example
{
"status": "Pending"
}

The linked account does not own the member whose payment method this session updates. The session is unchanged.

Media type application/json
object
status
string
Allowed values: Pending AwaitingPayment Completed Failed Expired
returnUrl
string
nullable
failureReason
string
nullable
Example
{
"status": "Pending"
}

Either the session already ended (completed, failed or expired), or the member already has a live subscription matching one of the lines (same plan and ref). In the latter case the whole checkout is refused: the session is marked Failed, nothing is charged, the captured payment method is not stored, and checkout.failed carries existingSubscriptionId.

Media type application/json
object
status
string
Allowed values: Pending AwaitingPayment Completed Failed Expired
returnUrl
string
nullable
failureReason
string
nullable
Example
{
"status": "Pending"
}

A temporary failure (e.g. payment gateway unavailable, or a setup fee whose outcome at the gateway is unknown). Nothing was saved and the session is unchanged - retry; a fee already taken is reused rather than charged again.

Media type application/json
object
status
string
Allowed values: Pending AwaitingPayment Completed Failed Expired
returnUrl
string
nullable
failureReason
string
nullable
Example
{
"status": "Pending"
}