FrameCheckoutClientSecret

class FrameCheckoutClientSecret(var clientSecret: String, var expiresAt: Long, var amountCents: Int? = null, var amountCurrency: String? = null)

A short-lived chk_sess_ token that checkout uses to read a name, email, and saved cards.

Mint it on the host backend with POST /v1/checkout_sessions. Checkout refreshes it with the secret key when expiresAt has passed or the API rejects it as expired.

Constructors

Link copied to clipboard
constructor(clientSecret: String, expiresAt: Long, amountCents: Int? = null, amountCurrency: String? = null)

Properties

Link copied to clipboard

Locked charge amount, in the smallest currency unit. Refresh replays it.

Link copied to clipboard

ISO 4217 code for amountCents.

Link copied to clipboard

The chk_sess_… bearer token.

Link copied to clipboard

When the token stops being accepted, as a Unix timestamp in seconds.

Functions

Link copied to clipboard
fun isExpired(nowSeconds: Long = System.currentTimeMillis() / 1000): Boolean

true when expiresAt is now or earlier.

Link copied to clipboard
fun recordLockedAmountIfMissing(cents: Int, currency: String)

Keeps a later refresh transfer-capable when the host passed only the token and expiry.