Checkout/createCnpCheckoutSession
Create Checkout Session
Create an HPP, Elements, or Drop-in checkout session.
POST
/v1/cnp/checkout-sessionsCreate a checkout session tied to a payment intent. For HPP, redirect the browser to /checkout/{id}?client_secret=... For Elements or Drop-in, return the id and clientSecret to your frontend and call kepa.js.
Request body
application/json
merchantIdstringRequiredMerchant identifier.
paymentIntentIdstringRequiredPayment intent ID.
successUrlstringRequiredHTTPS redirect after success.
cancelUrlstringRequiredHTTPS redirect after cancel.
ttlSecondsintegerSession lifetime, 300–86400 seconds.
Response
application/json
idstringCheckout session ID.
paymentIntentIdstringLinked payment intent.
statusenumSession status.
OPENCOMPLETEDEXPIREDCANCELEDclientSecretstringBrowser client secret for this checkout session.
expiresAtstring · ISO 8601Expiry timestamp.
Good to know
- HPP URL shape: /checkout/{checkoutSessionId}?client_secret={clientSecret}
- Elements and Drop-in use the same session id and client secret with kepa.js.
createCnpCheckoutSession