Checkout
Open a hosted checkout session
Needs the checkout:write scope, or a full-access key. About scopes
POST
/
api/v1/checkout-sessionsAuthorization
AuthorizationRequiredBearer <token>
An API key: gpy_test_… or gpy_live_… (or an agent key, agk_…).
In: header
Request Body
application/jsonOptionalcustomer_idstring
Format:
"uuid"customer_external_idstring
Minimum length:
1Maximum length: 200modestring
Value in:
"subscription" | "setup"itemsarray<object>
plan_idstring
Format:
"uuid"plan_codestring
Minimum length:
1Maximum length: 200seatsinteger
Minimum:
1Maximum: 100000promotion_codestring
Minimum length:
1Maximum length: 100allow_promotion_codesboolean
Default true.
lock_itemsboolean
Default false. True: plan, seats, interval and items are fixed. The page shows them read-only, and the hosted quote and confirm refuse any change (422 items_locked).
trial_daysinteger
Minimum:
0Maximum: 730success_urlRequiredstring
Format:
"uri"cancel_urlRequiredstring
Format:
"uri"metadataobject
At most 50 keys (each ≤ 40 characters); copied onto the subscription.
The session; send the payer to url (valid 24 hours).