Create setup intent
Save a buyer’s payment method for later without charging it. Provide a confirmation token for a method the buyer just supplied, or an existing payment method to re-verify. The buyer may still have a step to complete — 3D Secure, a hosted enrollment, linking a bank account — so poll the setup intent’s status endpoint for what to do next.
Required permissions:
payment:chargemember:basic:readmember:email:read
Authorizations
An Account API key, account-scoped JWT, App API key, or user OAuth token. Prepend the key or token with Bearer, for example Bearer ***************************.
Body
- CreateSetupIntentInputWithConfirmationToken
- CreateSetupIntentInputWithPaymentMethodId
Autogenerated input type of CreateSetupIntent
The ID of the company to save the payment method for.
"biz_xxxxxxxxxxxxxx"
A confirmation token ID (ctok_) describing a payment method the buyer just supplied. Provide this or payment_method_id, not both.
"ctok_xxxxxxxxxxxxxx"
The currency the saved payment method will be used with. Controls which currency-specific payment methods are available. Defaults to usd.
usd, sgd, inr, aud, brl, cad, dkk, eur, nok, gbp, sek, chf, hkd, huf, jpy, mxn, myr, pln, czk, nzd, aed, eth, ape, cop, ron, thb, bgn, idr, dop, php, try, krw, twd, vnd, pkr, clp, uyu, ars, zar, dzd, tnd, mad, kes, kwd, jod, all, xcd, amd, bsd, bhd, bob, bam, khr, crc, xof, egp, etb, gmd, ghs, gtq, gyd, ils, jmd, mop, mga, mur, mdl, mnt, nad, ngn, mkd, omr, pyg, pen, qar, rwf, sar, rsd, lkr, tzs, ttd, uzs, rub, btc, cny, usdt, kzt, awg, whop_usd, xau Overrides the buyer email carried on the confirmation token, resolving or creating the Whop user the method belongs to. Ignored when the confirmation token was created by a signed-in buyer, and unless confirmation_token is provided.
"buyer@example.com"
Custom metadata to attach to the setup intent.
Where the buyer continues after completing an off-site step. Must be an absolute https URL without credentials, at most 2,048 characters.
"https://example.com/path"
Response
A successful response
A setup intent allows a user to save a payment method for future use without making an immediate purchase.
The checkout session configuration associated with this setup intent. Null if no checkout session was used.
The company that initiated this setup intent. Null if the company has been deleted.
The datetime the setup intent was created.
"2023-12-01T05:00:00.401Z"
A human-readable error message explaining why the setup intent failed. Null if no error occurred.
"Your card was declined."
The unique identifier for the setup intent.
"sint_xxxxxxxxxxxxx"
The company member associated with this setup intent. Null if the user is not a member.
Custom key-value pairs attached to this setup intent. Null if no metadata was provided.
The saved payment method created by this setup intent. Null if the setup has not completed successfully.
The current status of the setup intent.
processing, succeeded, canceled, requires_action Whether 3D Secure authentication was completed when this payment method was set up.

