Skip to content

Prepare a wallet one-click purchase

POST
/checkout/one_click_wallet_session
billing.funnelfox.com

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.

  1. Show Primer’s Apple Pay or Google Pay button with client_token.
  2. After the customer confirms in the wallet sheet, send the wallet’s token as payment_method_token with session_id to POST /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.

org_id
required
string

Organization ID

Media typeapplication/json
OneClickWalletSessionIn
object
external_id
required
Customer Id

Your unique identifier for the user

string
≤ 256 characters
pp_ident
required
price point ident

Unique identifier of the price point

string
≤ 256 characters · /^[-A-Za-z_0-9]{1,256}$/
client_metadata
object
Client Metadata

Custom metadata from your client application

Show 1 propertyHide property
key
additional properties
any

Example generated

{
"external_id": "example",
"pp_ident": "example",
"client_metadata": {}
}

200 Wallet session

Section titled “200”
Media typeapplication/json
OneClickWalletSessionOut
object
wallet
required
Wallet

The wallet to show the button for. null means no wallet confirmation for this customer and price point: use a regular one-click purchase.

string
nullable
one of APPLE_PAY GOOGLE_PAY
reason
Reason

Why wallet is null.

string
nullable
one of no_previous_order not_primer not_wallet unsupported_price_point
client_token
Client Token

Primer client token for the wallet button.

string
nullable
session_id
Session Id

Send it with the wallet’s token to POST /checkout/one_click.

string format: uuid
nullable
order_id
Order Id

The ID the order gets when the customer pays.

string format: uuid
nullable
amount
Amount

Amount in minor units shown in the wallet sheet and charged, tax included when collected.

integer
nullable
currency
Currency

Currency code in lower case (ISO 4217).

string
nullable
expires_at
Expires At

When the session expires (UTC). Call this endpoint again after it.

string format: date-time
nullable