Skip to main content
POST
Create payment
This page documents the Legacy API. For new integrations, use Create Payment in the Current API.
Required permissions:
  • payment:charge
  • plan:create
  • access_pass:create
  • access_pass:update
  • plan:basic:read
  • access_pass:basic:read
  • member:email:read
  • member:basic:read
  • member:phone:read
  • promo_code:basic:read
  • shipment:basic:read
  • payment:dispute:read
  • payment:resolution_center_case:read

Autorisationer

Authorization
string
header
påkrævet

An Account API key, account-scoped JWT, App API key, or user OAuth token. Prepend the key or token with Bearer, for example Bearer ***************************.

Scopes

payment:charge
plan:create
access_pass:create
access_pass:update
plan:basic:read
access_pass:basic:read
member:email:read
member:basic:read
member:phone:read
promo_code:basic:read
shipment:basic:read
payment:dispute:read
payment:resolution_center_case:read

Krop

application/json

Autogenerated input type of CreatePayment

account_id
string
påkrævet

The ID of the company to create the payment for.

Eksempel:

"biz_xxxxxxxxxxxxxx"

confirmation_token
string
påkrævet

A confirmation token ID (ctok_) describing a payment method the buyer just supplied. Provide this INSTEAD of member_id and payment_method_id to charge a method that is not yet on file — the buyer is resolved from the token's billing email, or from email. The buyer may still have a step to complete (3DS, a redirect, linking a bank); poll the payment's status endpoint for what to do next.

plan
object
påkrævet

Pass this object to create a new plan for this payment

capture
boolean | null

Whether to capture the card payment immediately. Pass false to place an authorization hold that must be captured in full within five days.

email
string | null

Overrides the buyer email carried on the confirmation token, resolving or creating the Whop user the payment belongs to. Ignored when the confirmation token was created by a signed-in buyer, and unless confirmation_token is provided.

Eksempel:

"buyer@example.com"

metadata
object | null

Custom metadata to attach to the payment.

payment_method_id
string | null

The ID of the payment method to use for the payment. It must be connected to the Member being charged. Required unless confirmation_token is provided.

Eksempel:

"pmt_xxxxxxxxxxxxxx"

promo_code_id
string | null

The ID of an active promo code to apply to this payment. The promo code must belong to the company and be valid for the plan being purchased. The plan must be attached to a product — promo codes are not eligible for one-off purchases.

Eksempel:

"promo_xxxxxxxxxxxx"

return_url
string | null

Where the buyer continues after completing an off-site step. Must be an absolute https URL without credentials (http is allowed for localhost), at most 2,048 characters. Editable until they return — see the payment's update endpoint. Ignored unless confirmation_token is provided.

Eksempel:

"https://example.com/path"

Svar

A successful response

A payment represents a completed or attempted charge. Payments track the amount, status, currency, and payment method used.

amount_after_fees
number
påkrævet

How much the payment is for after fees

Eksempel:

6.9

application_fee
object | null
påkrævet

The application fee charged on this payment.

auto_refunded
boolean
påkrævet

Whether this payment was auto refunded or not

billing_address
object | null
påkrævet

The address of the user who made the payment.

billing_reason
enum<string> | null
påkrævet

The machine-readable reason this charge was created, such as initial subscription purchase, renewal cycle, or one-time payment.

Tilgængelige muligheder:
subscription_create,
subscription_cycle,
subscription_update,
one_time,
manual,
subscription
card_brand
enum<string> | null
påkrævet

Card network reported by the processor (e.g., 'visa', 'mastercard', 'amex'). Present only when the payment method type is 'card'.

Tilgængelige muligheder:
mastercard,
visa,
amex,
discover,
unionpay,
jcb,
diners,
link,
troy,
visadankort,
visabancontact,
china_union_pay,
rupay,
jcbrupay,
elo,
maestro,
tarjeta_naranja,
cirrus,
nspk_mir,
verve,
ebt,
private_label,
local_brand,
uatp,
wexcard,
uzcard,
meeza,
hrg_store_card,
girocard,
fuel_card,
dankort,
carnet,
atm_card,
china_union_payuzcard,
codensa,
cabal,
hipercard,
jcblankapay,
cmi,
aura,
accel,
culiance,
nyce,
pulse,
star,
eftpos,
alelo,
edenred,
sodexo,
unknown
card_exp_month
integer | null
påkrævet

The expiration month (1-12) of the card used for this payment. Falls back to the declined card on failed payments with no saved card. Null when the payment was not made with a card or the expiry is unavailable.

Eksempel:

6

card_exp_year
integer | null
påkrævet

The four-digit expiration year of the card used for this payment. Falls back to the declined card on failed payments with no saved card. Null when the payment was not made with a card or the expiry is unavailable.

Eksempel:

2027

card_last4
string | null
påkrævet

The last four digits of the card used to make this payment. Null if the payment was not made with a card.

Eksempel:

"4242"

checkout_configuration_id
string | null
påkrævet

The ID of the checkout session/configuration that produced this payment, if any. Use this to map payments back to the checkout configuration that created them.

Eksempel:

"ch_xxxxxxxxxxxxxxx"

company
object | null
påkrævet

The company for the payment.

created_at
string<date-time>
påkrævet

The datetime the payment was created.

Eksempel:

"2023-12-01T05:00:00.401Z"

currency
enum<string>
påkrævet

The three-letter ISO currency code for this payment (e.g., 'usd', 'eur').

Tilgængelige muligheder:
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,
hnl
customer_phone
string | null
påkrævet

Phone number the customer provided at checkout, or their verified phone number when your checkout requires phone verification. null when no phone number was collected.

decline_code
enum<string> | null
påkrævet

The reason the payment was declined. Null if the payment did not fail.

Tilgængelige muligheder:
insufficient_funds,
lost_card,
stolen_card,
expired_card,
suspected_fraud,
invalid_card_number,
invalid_cvc,
invalid_cvc_or_expiration,
incorrect_pin,
authentication_required,
card_not_supported,
currency_not_supported,
duplicate_transaction,
generic_decline,
invalid_account,
invalid_amount,
processing_error,
restricted_card,
card_velocity_exceeded,
contact_issuer,
card_declined_by_issuer,
bank_declined,
regulatory_blocked,
transaction_not_permitted,
transaction_stopped,
card_type_not_supported,
issuer_not_found,
closed_account,
issuer_unavailable,
invalid_zip,
invalid_expiry_month,
invalid_expiry_year,
invalid_expiry,
invalid_transaction,
cannot_authorize,
pin_required,
pin_try_exceeded,
provider_declined,
high_risk,
test_mode_decline,
merchant_blacklist,
reenter_transaction,
invalid_pin,
pin_required_as,
withdrawal_count_limit_exceeded,
invalid_country,
issuer_error,
invalid_card_holder_name,
no_accounts,
transaction_cancelled,
three_d_secure_success,
three_d_secure_canceled,
three_d_secure_invalid_card_number,
three_d_secure_generic_error,
three_d_secure_timeout,
three_d_secure_failed,
three_d_secure_card_not_enrolled,
three_d_secure_fraud,
three_d_secure_too_many_attempts,
three_d_secure_rejected_by_bank,
three_d_secure_reported_lost_or_stolen,
blocked_by_cardholder,
test_mode_test_card,
try_again_later,
transaction_not_allowed,
bank_insufficient_funds,
bank_account_not_found,
bank_account_closed,
bank_account_frozen,
bank_invalid_routing_number,
bank_non_transaction_account,
bank_authorization_revoked,
bank_payment_stopped,
bank_not_authorized,
bank_account_holder_deceased,
bank_duplicate,
bank_amount_error,
bank_regulatory_blocked,
bank_details_invalid,
bank_processing_error,
bank_generic_decline,
sepa_invalid_iban,
sepa_no_mandate,
sepa_mandate_data_invalid,
sepa_disputed,
sepa_refused_by_customer,
sepa_generic_decline
dispute_alerted_at
string<date-time> | null
påkrævet

When an alert came in that this transaction will be disputed

Eksempel:

"2023-12-01T05:00:00.401Z"

disputes
object[] | null
påkrævet

The disputes attached to this payment. Null if the actor in context does not have the payment:dispute:read permission.

failure_message
string | null
påkrævet

If the payment failed, the reason for the failure.

fees
object[]
påkrævet

The fees associated with this specific payment.

financing_installments_count
integer | null
påkrævet

The number of financing installments for the payment. Present if the payment is a financing payment (e.g. Splitit, Klarna, etc.).

Eksempel:

42

financing_transactions
object[]
påkrævet

The financing transactions attached to this payment. Present if the payment is a financing payment (e.g. Splitit, Klarna, etc.).

id
string
påkrævet

The unique identifier for the payment.

Eksempel:

"pay_xxxxxxxxxxxxxx"

last_payment_attempt
string<date-time> | null
påkrævet

The time of the last payment attempt.

Eksempel:

"2023-12-01T05:00:00.401Z"

member
object | null
påkrævet

The member attached to this payment.

membership
object | null
påkrævet

The membership attached to this payment.

metadata
object | null
påkrævet

The custom metadata stored on this payment. This will be copied over to the checkout configuration for which this payment was made

needs_tracking
boolean | null
påkrævet

Whether this payment is holding funds until the order ships and has no tracking number yet.

next_payment_attempt
string<date-time> | null
påkrævet

The time of the next schedule payment retry.

Eksempel:

"2023-12-01T05:00:00.401Z"

paid_at
string<date-time> | null
påkrævet

The time at which this payment was successfully collected. Null if the payment has not yet succeeded. As a Unix timestamp.

Eksempel:

"2023-12-01T05:00:00.401Z"

payment_instrument
object | null
påkrævet

The instrument this payment was made with, shaped for display: the method type, a buyer-facing name, the standard icon set, and the card facts when it was a card. Null when the receipt names no payment method.

payment_method
object | null
påkrævet

The tokenized payment method reference used for this payment. Null if no token was used.

payment_method_type
enum<string> | null
påkrævet

The type of payment instrument used for this payment (e.g., card, Cash App, iDEAL, Klarna, crypto). Null when the processor does not supply a type.

Tilgængelige muligheder:
acss_debit,
addi,
affirm,
afterpay_clearpay,
alipay,
alipayhk,
alma,
amazon_pay,
apple,
apple_pay,
au_bank_transfer,
au_becs_debit,
bacs_debit,
bancolombia,
bancontact,
bank_wire,
billie,
blik,
boleto,
bre_b,
ca_bank_transfer,
capchase_pay,
card,
card_present,
card_installments_three,
card_installments_six,
card_installments_twelve,
cashapp,
claritypay,
coinbase,
crypto,
crypto_subscription,
custom,
customer_balance,
demo_pay,
duitnow_qr,
efecty,
eps,
eu_bank_transfer,
fpx,
flex_pay,
gb_bank_transfer,
gcash,
giropay,
google_pay,
gopay,
grabpay,
id_bank_transfer,
ideal,
interac,
international_bank_wire,
kakao_pay,
klarna,
klarna_pay_now,
konbini,
kr_card,
kr_market,
kriya,
kueski,
link,
mb_way,
m_pesa,
mercado_pago,
mercado_pago_ar,
mercado_pago_mx,
mobilepay,
modo,
mondu,
multibanco,
naver_pay,
nequi,
netbanking,
ng_bank,
ng_bank_transfer,
ng_card,
ng_market,
ng_ussd,
ng_wallet,
nupay,
nz_bank_account,
oney,
oney_3x,
oney_4x,
opay,
oxxo,
p24,
pago_efectivo,
pse,
pay_by_bank,
payco,
paynow,
paypal,
paypal_express,
paypay,
payto,
payto_email,
payto_phone,
payto_bank_account,
pix,
pix_automatico,
platform_balance,
promptpay,
qris,
rapipago,
rechnung,
revolut_pay,
samsung_pay,
satispay,
scalapay,
sencillito,
sepa_debit,
sequra,
servipag,
sezzle,
shop_pay,
shopeepay,
sofort,
south_korea_market,
spei,
splitit,
sunbit,
swish,
tabby,
tamara,
touch_n_go,
twint,
upi,
us_bank_account,
us_bank_transfer,
venmo,
verve,
vipps,
webpay,
wechat_pay,
whop_pay,
yape,
zip,
coinflow,
unknown
payments_failed
integer | null
påkrævet

The number of failed payment attempts for the payment.

Eksempel:

42

plan
object | null
påkrævet

The plan attached to this payment.

product
object | null
påkrævet

The product this payment was made for

promo_code
object | null
påkrævet

The promo code used for this payment.

recovery_url
string | null
påkrævet

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 or you lack member:basic:read.

refundable
boolean
påkrævet

True only for payments that are paid, have not been fully refunded, and were processed by a payment processor that allows refunds.

refunded_amount
number | null
påkrævet

The payment refund amount(if applicable).

Eksempel:

6.9

refunded_at
string<date-time> | null
påkrævet

When the payment was refunded (if applicable).

Eksempel:

"2023-12-01T05:00:00.401Z"

refunds
object[]
påkrævet

The refunds issued against this payment, newest first, including failed and canceled refund attempts. Limited to the 100 most recent.

resolutions
object[] | null
påkrævet

The resolution center cases opened by the customer on this payment. Null if the actor in context does not have the payment:resolution_center_case:read permission.

retryable
boolean
påkrævet

True when the payment is open, its processor can be charged again, its membership is active, trialing, or past_due (or it is a failed initial payment on a drafted membership), it is not paid through an invoice link, and its one manual retry is not used up. Used to decide if the payment can be retried by hand. A retry can still be refused when the company cannot accept payments.

risk_score
integer | null
påkrævet

Whop's in-house fraud risk score for this payment, from 0 (lowest risk) to 100 (highest risk). Null when the payment has not been scored or scoring has not yet completed.

Eksempel:

42

risk_signals
object | null
påkrævet

Deprecated. Always null.

settlement_amount
number
påkrævet

The total amount charged to the customer for this payment, including taxes and after any discounts. In the currency specified by the currency field.

Eksempel:

6.9

settlement_currency
enum<string>
påkrævet

The three-letter ISO currency code for this payment (e.g., 'usd', 'eur').

Tilgængelige muligheder:
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,
hnl
settlement_exchange_rate
number | null
påkrævet

Deprecated. Always returns null.

Eksempel:

6.9

settlement_time_at
string<date-time> | null
påkrævet

When this payment's funds post to the company's available balance, at midnight UTC. Known at payment time and never changes. The financial_activity.funds_available webhook's posted_at carries the same value when the settlement that clears it posts — match them to know these funds are now withdrawable.

Eksempel:

"2023-12-01T05:00:00.401Z"

shipment
object | null
påkrævet

The shipment attached to this payment.

shipping_address
object | null
påkrævet

The shipping address provided by the customer for physical goods. Null if no shipping address was collected.

sku
string | null
påkrævet

The stock keeping unit of the variant this payment charged for (the first item, on a cart), as set by the seller. Accounts with billing-reason SKU suffixes enabled receive it stamped with why the charge happened: -S for a first subscription charge, -R for a renewal, -C for a one-time purchase, -U when the payment's own metadata carries upsell: true, -F when nothing was charged. Other billing reasons carry the bare SKU. Null when the variant has no SKU.

status
enum<string> | null
påkrævet

The current lifecycle state of this payment (e.g., 'draft', 'open', 'paid', 'void').

Tilgængelige muligheder:
draft,
open,
authorized,
paid,
pending,
uncollectible,
unresolved,
void
substatus
enum<string>
påkrævet

The friendly status of the payment.

Tilgængelige muligheder:
succeeded,
requires_capture,
pending,
failed,
blocked,
past_due,
canceled,
price_too_low,
uncollectible,
refunded,
auto_refunded,
partially_refunded,
dispute_warning,
dispute_needs_response,
dispute_warning_needs_response,
resolution_needs_response,
dispute_under_review,
dispute_warning_under_review,
resolution_under_review,
dispute_won,
dispute_warning_closed,
resolution_won,
dispute_lost,
dispute_closed,
resolution_lost,
drafted,
incomplete,
unresolved,
open_dispute,
open_resolution
subtotal
number | null
påkrævet

The subtotal to show to the creator (excluding buyer fees).

Eksempel:

6.9

tax_amount
number | null
påkrævet

The calculated amount of the sales/VAT tax (if applicable).

Eksempel:

6.9

tax_behavior
enum<string> | null
påkrævet

The type of tax inclusivity applied to the payment, for determining whether the tax is included in the final price, or paid on top.

Tilgængelige muligheder:
exclusive,
inclusive,
unspecified,
unable_to_collect
tax_refunded_amount
number | null
påkrævet

The amount of tax that has been refunded (if applicable).

Eksempel:

6.9

three_ds_verified
boolean
påkrævet

Whether 3D Secure authentication was completed for this payment.

total
number | null
påkrævet

The total to show to the creator (excluding buyer fees).

Eksempel:

6.9

updated_at
string<date-time>
påkrævet

The datetime the payment was last updated.

Eksempel:

"2023-12-01T05:00:00.401Z"

usd_total
number | null
påkrævet

The total in USD to show to the creator (excluding buyer fees).

Eksempel:

6.9

user
object | null
påkrævet

The user that made this payment.

verification_checks
object | null
påkrævet

The issuer's address and card security code check results for this payment. Null when the processor returned none.

voidable
boolean
påkrævet

True when the payment can be voided or canceled. The request is rejected if the payment is no longer eligible.

client_secret
string | null
påkrævet

The credential the buyer's surface presents to poll this payment and set its return URL. Returned when a payment created from a confirmation token is created or retrieved by a caller with the payment:charge permission. Null for payments created from a stored payment method or callers without payment:charge. It unlocks this payment and nothing else; treat it like a password for that one attempt.

Eksempel:

"pay_xxxxxxxxxxxxxx_secret_v1_xxxx"