Prepare a wallet one-click purchase
Let a customer who paid with Apple Pay or Google Pay confirm a one-click upsell in the wallet sheet. Call it when the upsell page loads.
- Show Primer’s Apple Pay or Google Pay button with
client_token. - After the customer confirms in the wallet sheet, send the wallet’s token as
payment_method_tokenwithsession_idtoPOST /checkout/one_click.
If wallet is null, use a regular one-click purchase instead. This call creates no order, and a repeat call returns the same unused session.
Parameters
Section titled “Parameters”Organization ID
Request bodyrequired
Section titled “Request Bodyrequired”object
Your unique identifier for the user
Unique identifier of the price point
Custom metadata from your client application
Show 1 propertyHide property
Example generated
{ "external_id": "example", "pp_ident": "example", "client_metadata": {}}Responses
Section titled “Responses”200 Wallet session
Section titled “200”object
The wallet to show the button for. null means no wallet confirmation for this customer and price point: use a regular one-click purchase.
Why wallet is null.
Primer client token for the wallet button.
Send it with the wallet’s token to POST /checkout/one_click.
The ID the order gets when the customer pays.
Amount in minor units shown in the wallet sheet and charged, tax included when collected.
Currency code in lower case (ISO 4217).
When the session expires (UTC). Call this endpoint again after it.