Checkout Sessions API
object CheckoutSessionsAPI
Mints and uses a checkout client secret (chk_sess_).
POST /v1/checkout_sessions is secret-key only. Production apps mint the token on their backend and pass FrameCheckoutClientSecret into checkout. Checkout calls the mint again only when that token is expired and a secret key is configured.
Functions
Link copied to clipboard
A live chk_sess_… for create and confirm. Refreshes secret in place when it is expired.
Link copied to clipboard
suspend fun createCheckoutSession(accountId: String, amount: TransferV2Money? = null): Pair<CheckoutSession?, NetworkingError?>
Mints a checkout client secret for accountId.
Link copied to clipboard
suspend fun loadAccount(accountId: String, secret: FrameCheckoutClientSecret): Pair<AccountObjects.Account?, NetworkingError?>
Reads the account checkout is allowed to see. Refreshes secret once when it is expired or the API rejects it.
Link copied to clipboard
suspend fun loadPaymentMethods(accountId: String, secret: FrameCheckoutClientSecret): Pair<List<FrameObjects.PaymentMethod>?, NetworkingError?>
Reads the saved cards checkout is allowed to list. Refreshes secret once when it is expired or the API rejects it.