Create Payment
Changed onCharges a buyer for one or more variants with a payment method already on file (member_id and payment_method_id), or with a confirmation_token for a method the buyer just supplied. Collection runs in the background, so the response is the payment as created, not its outcome: poll Retrieve payment status for how far it has got and what the buyer must still do.
Request
- Base URLhttps://api.whop.com/api/v1
- AuthHTTP bearer
Headers
Pins the request to a dated API version.
A unique key that makes this request safe to retry. See Idempotent requests.
Request body
The code an affiliate link carries, which is the affiliate's username. The affiliate is credited for this payment as on a checkout session. A code naming no one eligible to earn on the product is ignored, and the payment goes ahead. A promo code with its own affiliate takes precedence. No affiliate is credited on a variant without a product or on a purchase of several variants. At most 255 characters. Not supported with a card_present payment_method.
Adds the account's card surcharge, set in card_surcharge on the account's preferences, when the card is a credit card. Send it only after you have shown the buyer the surcharge. Whop calculates the amount. You cannot send an amount. With a confirmation_token, the surcharge is a line of its own, calculated on the purchase after discounts and before tax. With a card_present payment_method, the surcharge is added after the reader reads the card, with POST /payments/{id}/apply_surcharge. A debit or prepaid card, or an account that cannot surcharge, pays no surcharge. The payment still goes ahead. Only for a one-time purchase, and not with quote_id. Defaults to false.
Minutes after authorization at which Whop captures the hold automatically unless it has been voided. Requires capture: false. Between 5 and 5760 (4 days), or 5 and 1440 (1 day) for card_present.
The buyer's billing address, returned on the payment as billing_address and used to calculate tax when Whop calculates it for the account. Only with a paypal payment_method. Only the keys you supply are kept.
Whether to capture a card payment immediately. Defaults to true. Pass false to place an authorization hold that must be captured in full within five days via the capture endpoint, or automatically after auto_capture_after_minutes. With a card_present payment_method, false holds the sale so its line items can change after the tap with PATCH /payments/{id}. Capture it for its total, or Whop captures it after auto_capture_after_minutes (10 by default).
A confirmation token describing a payment method the buyer just supplied. Provide this instead of member_id and payment_method_id; the buyer is resolved from the token's billing email, or from email. The buyer may still have a step to complete — poll the payment's status for what to do next.
The buyer's email, resolving or creating the user the payment belongs to. With confirmation_token it overrides the email the token carries, and is ignored when the token was created by a signed-in buyer; with a card_present payment_method it names a buyer the point of sale already knows, otherwise the sale belongs to a guest until a buyer is attached; with a paypal payment_method it names the buyer, and when it and member_id are both omitted the buyer is the PayPal account that approves the payment. Ignored with member_id.
The buyer's IPv4 or IPv6 address, used to assess the charge's risk and passed to the processor. Ignored unless a saved payment method is charged with off_session set to false.
What the buyer is purchasing. Each entry takes exactly one of variant_id or an inline variant. One entry charges that variant; several entries form a cart, which requires every variant to be compatible, belong to this account, and use the same currency. Mutually exclusive with variant_id and variant.
The member to charge, prefixed mber_. Required with payment_method_id unless confirmation_token is provided. With a paypal payment_method it names the buyer instead of email, and must belong to a user; omit both to take the buyer from the PayPal account that approves.
Custom metadata to attach to the payment.
Whether the buyer is absent from your checkout and can't authenticate. Pass true when you charge the card without the buyer, such as a renewal on your own schedule. Pass false when the buyer is present, such as a one-click upsell right after checkout: the charge is processed as a customer-initiated card-on-file payment, and if the issuer asks the buyer to authenticate, the payment's status is requires_action with a next_action to send them to, after which they return to return_url. From API version 2026-10-07-1 it defaults to false when return_url is provided and to true otherwise; before that version it defaults to true. A saved Apple Pay, Google Pay or PayPal payment method is always charged with off_session true. Ignored unless member_id and payment_method_id are provided.
A payment method named on this call rather than described by a confirmation token. type names it and the member named after it carries its details. Nothing is collected on this call: the payment is created first and the buyer or device then acts on the next_action the status endpoint serves. card_present (Tap to Pay): the reader collects the payment with the client_secret from the collect_card_present next_action. paypal: the buyer approves on PayPal's page, reached through a redirect next_action, then returns to return_url. member_id or email names the buyer. Mutually exclusive with confirmation_token and payment_method_id, and with member_id except for paypal.
The stored payment method to charge, prefixed payt_. It must belong to the member. Required unless confirmation_token is provided. With a card saved from a tap, Whop treats an inline variant as the sale's tip. It files the tip as a one-time Tip under a hidden Tip product, from the variant's currency and initial_price alone. Charging it needs only payment:charge.
A payment quote from POST /payment_quotes, prefixed pq_. The payment charges exactly the quote: its purchase (its variants and quantities, or the variant it priced), which this body may then omit, its promo code, and its tax, the quote's tax_amount rather than a figure calculated now. Omit it, or send null, to have tax calculated when the payment is charged. The quote must belong to account_id. A purchase field you omit or send as null takes the quote's value; the buyer's email, the addresses and the payment method are this request's own, never the quote's. Whatever you do send must describe the quoted purchase: the same variants, quantities and promo code. A quote that priced variant takes only the same variant you sent to POST /payment_quotes (or omit the purchase to take the quoted one), never variant_id or line_items, and a quote that priced variants by id never takes variant. Unless the quote located no buyer (located_by is null), the address the payment carries (its shipping address, else its billing address) must put the buyer where the quote priced tax, by country, state and postal code; otherwise the payment is refused with 400 before the payment method is used. A quote located by IP address or by the country the buyer chose (located_by is ip_address or presentment_country) is a preview and cannot be paid. A quote is consumed by one payment: a declined payment keeps it and can be retried; a new payment needs a new quote. A quote cannot be charged by a processor that doesn't take quotes, such as a seller's own connected PayPal account; such a payment is refused before the payment method is used. A quote priced in a presentment_currency is charged in that currency at the quote's exchange_rate. A payment refused over its quote carries an error code. quote_expired: the quote has expired; quote again. quote_tax_unavailable: the quote could not price tax; quote again, or omit quote_id. quote_preview_only: the quote was located by IP address or by the country the buyer chose; quote again with the buyer's address. quote_in_use (409): another payment holds the quote. quote_mismatch: the purchase or the buyer's address is not the one quoted. quote_rate_expired: the exchange rate the quote was priced at has moved too far to charge; quote again. payment_method_currency_unsupported: the payment method cannot pay in the quote's currency; use another method, or quote again in another currency. quote_processor_unsupported: the payment would be processed by a processor that doesn't take quotes, such as a seller's own connected PayPal account; use another method, or omit quote_id to have tax calculated when the payment is charged.
Where the buyer continues after completing an off-site step such as 3D Secure. An absolute https URL without credentials, at most 2,048 characters. Required when a saved payment method is charged with off_session false; otherwise ignored unless confirmation_token or a paypal payment_method is provided.
Attests that the buyer was told the payment method will be saved for later charges. A paypal method is saved once the buyer approves on PayPal's page, and can then be charged with member_id and payment_method_id. A card_present method saves the tapped card when the reader collects it. The payment's payment_method_id then names the saved card. The reader must also record the buyer's consent to save the card. Omit it for a one-time payment that saves nothing. Other payment methods ignore it.
Where physical goods ship, returned on the payment as shipping_address. Only the keys you supply are kept; omit it for digital goods.
Overrides the text on the buyer's card statement for this payment only. Takes precedence over the product's and account's custom descriptors, and changes neither. Must start with WHOP* unless the business processes as the merchant of record. For a business processing as the merchant of record, Whop removes a WHOP* prefix when at least 5 characters, including a letter, remain. Must be 5-22 characters, contain at least one letter, and use only Latin letters, numbers, spaces, underscores, hyphens, or asterisks.
Example request
{
"account_id": "biz_xxxxxxxxxxxxxx",
"promo_code": "SHINE20",
"promo_code_id": "promo_xxxxxxxxxxxxxx",
"variant": {
"application_fee_amount": 2,
"billing_type": "one_time",
"currency": "usd",
"initial_price": 31,
"override_tax_type": "inclusive",
"product": {
"collect_shipping_address": true,
"custom_statement_descriptor": "WHOP*INLINE",
"description": "Two-stage paint correction with a three-year ceramic coating.",
"external_identifier": "quoted-again",
"global_affiliate_status": "enabled",
"headline": "A showroom finish that lasts three years",
"redirect_purchase_url": "https://shinetime.example/thanks",
"title": "Ceramic Coating Package",
"visibility": "visible"
},
"product_id": "prod_xxxxxxxxxxxxxx",
"visibility": "visible"
},
"variant_id": "plan_xxxxxxxxxxxxxx",
"affiliate_code": "priyaraman",
"apply_surcharge": true,
"auto_capture_after_minutes": 60,
"billing_address": {
"country": "US",
"line1": "1 Market St",
"name": "Dana Whitfield",
"postal_code": "94105"
},
"confirmation_token": "ctok_xxxxxxxxxxxxxx",
"discount": {
"percentage": 10,
"type": "percentage"
},
"email": "dana@shinetime.example",
"ip_address": "203.0.113.24",
"line_items": [
{
"quantity": 1,
"variant_id": "plan_xxxxxxxxxxxxxx"
}
],
"member_id": "mber_xxxxxxxxxxxxxx",
"metadata": {
"register": "front"
},
"off_session": true,
"payment_method": {
"card_present": {
"platform": "ios",
"reader": "bluetooth_reader"
},
"paypal": {
"request_shipping": true
},
"type": "paypal"
},
"payment_method_id": "payt_xxxxxxxxxxxxxx",
"quote_id": "pq_xxxxxxxxxxxxxxx",
"return_url": "https://shinetime.example/checkout/done",
"setup_future_usage": "off_session",
"shipping_address": {
"city": "Austin",
"country": "US",
"line1": "1114 Bouldin Ave",
"line2": "Unit B",
"name": "Dana Whitfield",
"postal_code": "78704",
"state": "TX"
},
"statement_descriptor": "WHOP*SHINETIME"
}Response
payment created from a stored payment method
The account that received the payment, prefixed biz_.
What the buyer is charged for this payment: the total plus any buyer fees, in the currency the buyer pays in. Refunds do not reduce it; presentment_refunded_amount states them in the same currency.
When Whop will capture this authorized card payment automatically unless it is voided first, as an ISO 8601 timestamp. Null when no automatic capture was requested.
True when Whop refunded the payment automatically, for example on a dispute alert.
The reason why a specific payment was billed
When the hold on this authorized card payment expires if it is not captured first, as an ISO 8601 timestamp. Null when the payment was not created for later capture.
The checkout configuration the buyer paid through, prefixed ch_, or null.
The scheme and host of the website where the buyer opened the checkout, such as https://store.example.com. Use it to tell apart payments from different websites on one account. Null when the website was not recorded, including for payments made without the buyer present.
The checkout experience that produced this payment, such as embedded_checkout for a checkout on the account's own website or off_session for a subscription renewal. Null when the checkout was not recorded.
The credential a buyer's surface presents to poll this payment, set its return URL and resume it when the bank asked the customer to authenticate. Only on payments created from a confirmation token or waiting on that authentication, null when you read the payment as its buyer, and always null in list responses — retrieve the payment for it.
When the payment was created, as an ISO 8601 timestamp.
The currency the payment settles in, lowercase ISO 4217. Every money field below is stated in it unless it says otherwise.
The buyer's email address. Null without member:email:read on the account or when the buyer has no assigned email.
The phone number the buyer gave at checkout, when one was collected.
The reason a payment was declined.
When an issuer warned that this payment will be disputed, or null.
When the most recent dispute on this payment was opened, as an ISO 8601 timestamp. Null when the payment was never disputed, or without the payment:dispute:read permission.
Why the most recent attempt failed, in plain words, or null.
For installment methods, how many payments the charge splits into.
Payment ID, prefixed pay_.
True when the Whop Dispute Insurance Program covers fraud disputes on this payment. False when the account is in the program but this payment is not covered. Null when the account is not in the program, and when you read the payment as its buyer.
IP address that Whop captured from the buyer's browser at checkout. Null when the buyer was not present at checkout, for example a subscription renewal or a charge made without the buyer. Also null when you read the payment as its buyer.
When the most recent charge attempt ran, or null.
The buyer's member record on the account, prefixed mber_. Null without the member:basic:read permission, unless you are the buyer.
The membership this payment is billed against, prefixed mem_. Null for one-off purchases, or without the member:basic:read permission unless you are the buyer.
Your own key-value data attached when the payment was created. Null when you read the payment as its buyer.
True for a paid payment with a shipping address, no shipment, and no full refund. Null without the shipment:basic:read permission.
True when funds are held until the order ships and no tracking number has been added yet. Null without the shipment:basic:read permission.
When the next automatic retry is scheduled, or null.
When the money was collected, or null while it has not been.
The stored payment method that was charged, prefixed payt_. Null when the method was not saved.
The different types of payment methods that can be used.
How many charge attempts have failed on this payment.
The product the variant belongs to, prefixed prod_. Null for a variant with no product.
The promo code applied at checkout, prefixed promo_, or null.
The payment quote this payment charged, prefixed pq_: its purchase, promo code and tax_amount are the quote's. Null when the payment named no quote and tax was calculated at charge time.
Whop-hosted URL where the buyer can sign in and complete 3D Secure for an off-session charge the bank challenged — a subscription renewal or a saved-card payment. Null when recovery is unavailable, you lack member:basic:read, or in list responses. Retrieve the payment for it.
True when the payment is paid, not yet fully refunded, and its processor supports refunds.
When the payment was refunded, or null.
Why the buyer cannot open a Resolution Center case on this payment with POST /resolution_center_cases, or null when they can. already_opened: a case is already open or was decided (a withdrawn case does not count). unsupported_payment_processor: the payment method does not support cases. out_of_date: the window to open a case has passed. not_paid: the payment is not paid. free: nothing was charged. already_refunded: some of it has been refunded.
When the earliest response is due on a dispute or Resolution Center case awaiting the account's response, as an ISO 8601 timestamp. Null when nothing awaits a response, or without the permission to read that dispute or case.
True when the payment can be retried by hand with POST /payments/{id}/retry. The payment must be open and not paid through an invoice payment link. Its membership must be active, trialing, or past_due, or the payment must be a failed first payment on a drafted membership. Its one manual retry must not be used up. A retry can still be refused when the account cannot currently accept payments.
Whop's published risk index from 0 (lowest) to 100 (highest), including enforced decision floors. This is not a fraud probability. Null when no score is available or you read the payment as its buyer.
Deprecated. Risk score explanations are no longer provided; always null. DEPRECATED: Risk score explanations are no longer provided. Always null.
When the portion not listed in holds posts to the account's available balance, at midnight UTC. The financial_activity.funds_available webhook's posted_at carries the same value when the settlement that clears it posts. Null until the payment is paid or when you read the payment as its buyer, and always null in list responses — retrieve the payment for it.
The shipment fulfilling this payment, prefixed ship_. Null when nothing ships or without the shipment:basic:read permission.
The text the buyer's bank or card statement shows for this payment. Null when the processor did not report one.
The lifecycle state of the charge: open while collection is outstanding, paid once the money moved, pending while a settlement rail clears, void/uncollectible when it ended without collecting.
The dashboard's finer-grained reading of the payment, folding in refunds, disputes and Resolution Center cases.
The type of tax inclusivity applied to the receipt, for determining whether the tax is included in the final price, or paid on top.
How much of the collected tax has been returned to the buyer so far. Zero when the payment carried no tax, or when nothing has been refunded.
True when the buyer completed 3D Secure for this payment.
When the payment last changed, as an ISO 8601 timestamp.
The buyer's browser user agent at checkout. Null when the buyer was not present at checkout, such as a subscription renewal, or without the member:basic:read permission.
The variant that was charged, prefixed plan_.
True when the payment can be voided or canceled. The request is rejected if the payment is no longer eligible — see POST /payments/{id}/void.
The Whop pixel's visitor ID for the buyer's browser at checkout, prefixed wuid_. Null when the checkout page had no Whop pixel, when the buyer was not present at checkout, or without the member:basic:read permission.
Example response
{
"account_id": "biz_xxxxxxxxxxxxxx",
"amount_after_fees": {
"amount": "-1234.56",
"currency": "usd",
"decimals": 2,
"display_decimals": 2
},
"amount_charged": {
"amount": "-1234.56",
"currency": "usd",
"decimals": 2,
"display_decimals": 2
},
"billing_address": {
"city": "Austin",
"country": "US",
"line1": "1114 Bouldin Ave",
"line2": "Unit B",
"name": "Dana Whitfield",
"postal_code": "78704",
"state": "TX"
},
"billing_reason": "subscription_create",
"checkout_surface": "custom_checkout",
"client_secret": "pay_xxxxxxxxxxxxxx_secret_vdefault_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
"created_at": "2026-01-01T12:00:00.000Z",
"currency": "usd",
"customer_email": "marcus@shinetime.example",
"customer_phone": "+xxxxxxxxxxx",
"decline_code": "insufficient_funds",
"financing_max_qualified_amount": {
"amount": "-1234.56",
"currency": "usd",
"decimals": 2,
"display_decimals": 2
},
"holds": [
{
"amount": {
"amount": "-1234.56",
"currency": "usd",
"decimals": 2,
"display_decimals": 2
},
"type": "reserve"
}
],
"id": "pay_xxxxxxxxxxxxxx",
"line_items": [
{
"discount_amount": {
"amount": "-1234.56",
"currency": "usd",
"decimals": 2,
"display_decimals": 2
},
"id": "li_xxxxxxxxxxxxxx",
"label": "Credit card surcharge",
"product_id": "prod_xxxxxxxxxxxxxx",
"product_title": "Credit card surcharge",
"quantity": 1,
"subtotal": {
"amount": "-1234.56",
"currency": "usd",
"decimals": 2,
"display_decimals": 2
},
"variant_id": "plan_xxxxxxxxxxxxxx",
"variant_title": "Credit card surcharge"
}
],
"member_id": "mber_xxxxxxxxxxxxxx",
"membership_id": "mem_xxxxxxxxxxxxxx",
"metadata": {
"order_ref": "SHINE-4417"
},
"paid_at": "2026-01-01T12:00:00.000Z",
"payment_instrument": {
"card": {
"brand": "visa",
"exp_month": 10,
"exp_year": 2031,
"issuer_identification_number": "41111111",
"last4": "4242",
"network_transaction_id": "016153570198200"
},
"crypto": {
"token": "eyJhbGciOiJFUzI1NiJ9.xxxxxxxxxxxxxxxxxxxxxxxx.xxxxxxxxxxxxxxxxxxxxxxxx"
},
"display_name": "Visa •••• 4242",
"icons": {
"card": {
"dark": {
"png_1x": "https://content.whop.com/payment_methods/card/icons/card_dark_30.png",
"png_2x": "https://content.whop.com/payment_methods/card/icons/card_dark_60.png",
"png_4x": "https://content.whop.com/payment_methods/card/icons/card_dark_120.png",
"svg": "https://content.whop.com/payment_methods/card/icons/card_dark.svg"
},
"light": {
"png_1x": "https://content.whop.com/payment_methods/card/icons/card_dark_30.png",
"png_2x": "https://content.whop.com/payment_methods/card/icons/card_dark_60.png",
"png_4x": "https://content.whop.com/payment_methods/card/icons/card_dark_120.png",
"svg": "https://content.whop.com/payment_methods/card/icons/card_dark.svg"
}
},
"square": {
"dark": {
"png_1x": "https://content.whop.com/payment_methods/card/icons/card_dark_30.png",
"png_2x": "https://content.whop.com/payment_methods/card/icons/card_dark_60.png",
"png_4x": "https://content.whop.com/payment_methods/card/icons/card_dark_120.png",
"svg": "https://content.whop.com/payment_methods/card/icons/card_dark.svg"
},
"light": {
"png_1x": "https://content.whop.com/payment_methods/card/icons/card_dark_30.png",
"png_2x": "https://content.whop.com/payment_methods/card/icons/card_dark_60.png",
"png_4x": "https://content.whop.com/payment_methods/card/icons/card_dark_120.png",
"svg": "https://content.whop.com/payment_methods/card/icons/card_dark.svg"
}
}
},
"payment_method_type": "card"
},
"payment_method_id": "payt_xxxxxxxxxxxxxx",
"payment_method_type": "acss_debit",
"payment_rule_matches": [
{
"action": "allow"
}
],
"presentment_refunded_amount": {
"amount": "-1234.56",
"currency": "usd",
"decimals": 2,
"display_decimals": 2
},
"presentment_tax_amount": {
"amount": "-1234.56",
"currency": "usd",
"decimals": 2,
"display_decimals": 2
},
"presentment_total": {
"amount": "-1234.56",
"currency": "usd",
"decimals": 2,
"display_decimals": 2
},
"product_id": "prod_xxxxxxxxxxxxxx",
"refunded_amount": {
"amount": "-1234.56",
"currency": "usd",
"decimals": 2,
"display_decimals": 2
},
"resolution_center_ineligible_reason": "not_paid",
"retryable": true,
"shipping_address": {
"city": "Austin",
"country": "US",
"line1": "1114 Bouldin Ave",
"line2": "Unit B",
"name": "Dana Whitfield",
"postal_code": "78704",
"state": "TX"
},
"status": "draft",
"substatus": "succeeded",
"subtotal": {
"amount": "-1234.56",
"currency": "usd",
"decimals": 2,
"display_decimals": 2
},
"surcharge": {
"amount": "-1234.56",
"currency": "usd",
"decimals": 2,
"display_decimals": 2
},
"tax_amount": {
"amount": "-1234.56",
"currency": "usd",
"decimals": 2,
"display_decimals": 2
},
"tax_behavior": "exclusive",
"tax_refunded_amount": {
"amount": "-1234.56",
"currency": "usd",
"decimals": 2,
"display_decimals": 2
},
"total": {
"amount": "-1234.56",
"currency": "usd",
"decimals": 2,
"display_decimals": 2
},
"updated_at": "2026-01-01T12:00:00.000Z",
"usd_total": {
"amount": "-1234.56",
"currency": "usd",
"decimals": 2,
"display_decimals": 2
},
"user": {
"badges": [
{
"type": "verified_partner"
}
],
"id": "user_xxxxxxxxxxxxxx",
"name": "Dana Whitfield",
"profile_picture": {
"url": "https://ui-avatars.com/api/"
},
"username": "danawhitfield"
},
"variant_id": "plan_xxxxxxxxxxxxxx",
"verification_checks": {
"address_line1": "PASS",
"arn": "74123456789",
"authorization_code": "A1B2C3",
"card_holder_name": "PASS",
"card_security_code": "PASS",
"zip_code": "PASS"
}
}Changes
- info
added the required property
insuredto the response with the status
- info
- warning
added the new
card_not_activatedenum value to thedecline_code/oneOf[#/components/schemas/PaymentDeclineCodes]response property for the response status
- warning