const url = 'https://example.com/api/Checkout/sessions/resolve';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"d":"example","s":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/Checkout/sessions/resolve \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "d": "example", "s": "example" }'Verifies the HMAC signature on a checkout deep link, creates a CheckoutSession, and returns a short-lived JWT the browser uses for subsequent endpoints. Anonymous.
An enrolment link names exactly one of plan (a single-plan checkout) or items (a multi-plan
“family” checkout of 1 to 10 lines, each { "plan": uuid, "ref": string?, "label": string? }).
Authorizations
Section titled “Authorizations ”Request Body
Section titled “Request Body ”object
Example generated
{ "d": "example", "s": "example"}object
Example generated
{ "d": "example", "s": "example"}object
Example generated
{ "d": "example", "s": "example"}Responses
Section titled “ Responses ”Session created; use the returned token for the rest of the flow.
object
Example
{ "outcome": "Ok"}The enrolment lines are malformed: both or neither of plan and items, an empty or over-long items (max 10), a ref over 200 or label over 60 characters, or two lines with the same plan and the same ref.
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}The signature does not verify, or the payload merchant does not match the key.
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}The API key is unknown or revoked, or a line’s plan is not an active plan of the merchant.
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}The link’s nonce has already been used.
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}The link has expired.
object
Example generated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example"}