rememberPrimerCheckoutController().
Creation
Interface
Property
Methods
Idempotency key
Set theX-Idempotency-Key header from the beforePaymentCreate gate on
PrimerCheckoutSheet
or PrimerCheckoutHost.
The gate runs once per attempt — just before the SDK creates the payment — and
the value you pass to continuePaymentCreation(idempotencyKey) is sent on
POST /payments and every subsequent POST /payments/{id}/resume for that
attempt. A retry after failure runs the gate again, producing a fresh key.
Express Checkout shipping
The two shipping handlers price Google Pay shipping from the address the shopper enters in the Google Pay sheet. Register both before the Google Pay sheet opens. They aresuspend functions and run on the main thread. They share one 20 second budget per Google Pay callback, and the SDK cancels a handler when the budget runs out.
The three types are in the
io.primer.checkout.api.shipping package.
See Express Checkout shipping for the full flow, the client session patch your backend sends, and the failure modes.
Extension function
formatAmount
"$10.00", "10,00 EUR"). Once the checkout has reached Ready, it keeps working in every state, including Loading during refresh(), using the currency of the last Ready session.