Skip to main content
Upcoming. These docs cover unreleased development, ahead of any published release. Use the channel picker at the top of the sidebar for the docs of a published release.
In development, not yet part of a stable release. A resource in the Payments group — a live SDK object minted from the namespace itself, nothing mounted: whop.payments.paymentRequest.create({ … }) (vanilla) or useWhop().payments.paymentRequest.create({ … }) (React). The minted instance carries the methods and on<Event> subscriptions below.

Options

Pass these to whop.payments.paymentRequest.create({ … }).
string
required
The seller account (biz_…) every client-side call is scoped to.
string
required
ISO currency the sheet charges in.
number
required
Charge amount in minor units.
"off_session" | "on_session"
Attest save-consent was displayed; rides onto the confirmation token.
boolean
Ask the sheet for the payer’s email — the confirmation token requires one. Defaults to true.
boolean
Ask the sheet for a shipping address (and offer shippingOptions when given). Defaults to false.
string
The merchant’s ISO 3166 country for the Apple Pay sheet. Omit it and the sheet uses the registration country the method matrix publishes on the seller’s merchant row; set it only to override that (falls back to ‘US’ when neither exists).
PaymentRequestLineItem[]
Line items the sheet lists under the total.
PaymentRequestShippingOption[]
Shipping options the sheet offers when requestShipping is set. Display-only — update amount from your change handler.

Methods

Call these on the minted instance.
show must be called synchronously inside the user’s click/tap handler — browsers revoke the activation across async hops; await any prerequisites beforehand.

canMakePayment

Per wallet: the account’s matrix advertises it ∩ this device can pay ∩ (Google) this origin is cleared. Also primes the vendor material show() needs — always await it before show(). Signature: () => Promise<WalletAvailability>

show

Open the wallet sheet, with canMakePayment() already awaited — Apple refuses a session constructed outside the gesture stack. USER GESTURE REQUIRED: call this synchronously inside the user’s click/tap handler — browsers revoke the activation across async hops; await any prerequisites beforehand. Signature: (type: "apple_pay" | "google_pay") => Promise<PaymentRequestResult>

Events

Subscribe on the minted instance — each on<Event>(handler) returns its unsubscribe function.
onShippingAddressChange handlers must call updateWith(…) exactly once per event; onShippingOptionChange handlers must call updateWith(…) exactly once per event — the flow stalls until the vendor’s own timeout otherwise.

onShippingAddressChange

The sheet’s shipping address changed (redacted pre-authorization: city/state/postal/country only). MUST REPLY EXACTLY ONCE: the handler must call updateWith(…) once per event, or the flow stalls until the vendor’s own timeout. Returns the unsubscribe function. Signature: (handler: (ev: ShippingAddressChangeEvent) => void) => () => void

onShippingOptionChange

The buyer picked a shipping option. Amount-only contract: updateWith carries amount/lineItems/shippingOptions/errors. MUST REPLY EXACTLY ONCE: the handler must call updateWith(…) once per event, or the flow stalls until the vendor’s own timeout. Returns the unsubscribe function. Signature: (handler: (ev: ShippingOptionChangeEvent) => void) => () => void

onConfirmationToken

A confirmation token was minted from the sheet (the same result show() resolves with). Returns the unsubscribe function. Signature: (handler: (ev: PaymentRequestResult) => void) => () => void

onCancel

The buyer dismissed the sheet. Returns the unsubscribe function. Signature: (handler: () => void) => () => void