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 thex-edgekit-site-idheader. - No
offerId: CheckoutRequestBody.offerToken names the offer. - No
userId: a body carrying one is a403. The buyer is anonymous, andemailis how the purchase finds the user. - No coupon or other field passed on to the billing provider.
Properties
Section titled “Properties”country?
Section titled “country?”
optionalcountry?:string
Where the buyer is taxed: a two-letter country code such as de.
Required for a token from a checkout page that charges tax, and ignored
for any other. Under Recurly, put the same country in the Recurly.js
form: Recurly taxes the address on the card token.
currency?
Section titled “currency?”
optionalcurrency?:string
The currency to charge in, as a three-letter ISO 4217 code such as eur.
Send the currency the page showed. Without it, the site’s own currency
applies. An offer with no price in the currency is refused with
offer_not_priced_in_currency; checkout never charges another currency
instead.
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.
firstName?
Section titled “firstName?”
optionalfirstName?: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.
lastName?
Section titled “lastName?”
optionallastName?:string
offerToken
Section titled “offerToken”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.
paymentMethod?
Section titled “paymentMethod?”
optionalpaymentMethod?:"card"|"apple_pay"|"google_pay"|"paypal"|"link"
What the buyer pays with. Without it, card. Under Stripe the
subscription then takes that method only, so mount the same one in
Stripe.js: card for a typed card, Apple Pay and Google Pay alike,
paypal, or link. link is refused under Recurly. After PayPal sends
the buyer back to your return_url, call checkout again with the same
offerToken until it answers granted.
postalCode?
Section titled “postalCode?”
optionalpostalCode?:string
The buyer’s postal code, beside country: needed in the United States and Canada.
recurlyTokenId?
Section titled “recurlyTokenId?”
optionalrecurlyTokenId?:string
The card token Recurly.js created on your page. Required when the site
sells through Recurly; refused when it sells through Stripe, where the
card is confirmed in Stripe.js after this call answers
requires_confirmation.
threeDSecureActionResultTokenId?
Section titled “threeDSecureActionResultTokenId?”
optionalthreeDSecureActionResultTokenId?: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.