Skip to content

CheckoutRequestBody

CheckoutRequestBody = object

What a browser posts to buy an offer a decision returned. The body is checked strictly: any key not listed here is a 400, so raw card data is refused too.

  • No siteId: the client is pinned to one site and sends it in the x-edgekit-site-id header.
  • No offerId: CheckoutRequestBody.offerToken names the offer.
  • No userId: a body carrying one is a 403. The buyer is anonymous, and email is how the purchase finds the user.
  • No coupon or other field passed on to the billing provider.

email: string

The buyer’s email address, unverified. The grant goes to the user with this address, and a new user is created when there is none. A purchase never marks the address as verified.


optional firstName?: string

The buyer’s name as typed on the card form. Used only when the purchase creates a new user, and never applied to a user that already exists: the request is unauthenticated, so anyone who knows an address could otherwise rename that user. Optional, because your form decides which fields it collects.


optional lastName?: string


offerToken: string

The offer_token field of the outcome that offered the purchase. Opaque: it names one offer on one site and can be reused until it expires.


recurlyTokenId: string

The card token Recurly.js created on your page.


optional threeDSecureActionResultTokenId?: string

The 3-D Secure result token id from Recurly.js. Send it only to finish a purchase refused with three_d_secure_required, together with the same offerToken and recurlyTokenId as the first request.

The refusal’s details carry threeDSecureActionTokenId. Pass that to Recurly.js to run the challenge, then send the result token it returns here. Sending the action token instead starts the challenge again.