Create a credit pack checkout link

View as Markdown

Creates a 24-hour checkout link for an existing subscription and credit pack. The credit pack must belong to the subscription plan.

Authentication

AuthorizationBearer
API key obtained from the Grant dashboard

Request

This endpoint expects an object.
subscription_idstringRequiredformat: "cuid"
Subscription that will receive the credits
credit_pack_idstringRequiredformat: "cuid"
Credit pack to purchase
quantitydouble or nullOptional
Fixed quantity to purchase. Omit or pass null to let the customer choose.
success_urlstring or nullOptionalformat: "uri"
HTTP or HTTPS URL to redirect to after a successful purchase
back_urlstring or nullOptionalformat: "uri"
HTTP or HTTPS URL used when the customer leaves checkout

Response

Checkout link created
successboolean
request_idstring

Errors

400
Bad Request Error
401
Unauthorized Error
404
Not Found Error
500
Internal Server Error