Knox Docs Sign in

API reference

Test mode. Use your secret key on your server; live processing is currently disabled.

https://api.knoxapi.com

Send form-encoded requests with Authorization: Bearer sk_test_....

Complete OpenAPI specification · Integration guide

Operations and schemas are based on the pinned Stripe OpenAPI specification (MIT). Nested object definitions and enums are available in the complete specification.

GET /v1/payment_methods

List PaymentMethods

Returns a list of all PaymentMethods.

Request parameters

ParameterLocationTypeDescription
allow_redisplayquerystringThis field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow.
customerquerystringThe ID of the customer whose PaymentMethods will be retrieved.
customer_accountquerystringThe ID of the Account whose PaymentMethods will be retrieved.
ending_beforequerystringA cursor for use in pagination. `ending_before` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, starting with `obj_bar`, your subsequent call can include `ending_before=obj_bar` in order to fetch the previous page of the list.
expandqueryarray of stringSpecifies which fields in the response should be expanded.
limitqueryintegerA limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
starting_afterquerystringA cursor for use in pagination. `starting_after` is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with `obj_foo`, your subsequent call can include `starting_after=obj_foo` in order to fetch the next page of the list.
typequerystringFilters the list by the object `type` field. Unfiltered, the list returns all payment method types except `custom`. If your integration expects only one type of payment method in the response, specify that type value in the request to reduce your payload.

object. See the OpenAPI specification for the complete schema.

Responses

HTTP 200: Successful response.
FieldTypeDescription
data requiredarray of payment_method
has_more requiredbooleanTrue if this list has another page of items after this one that can be fetched.
object requiredstringString representing the object's type. Objects of the same type share the same value. Always has the value `list`.
url requiredstringThe URL where this list can be accessed.
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
POST /v1/payment_methods

Create a PaymentMethod

Creates a PaymentMethod object. Read the Stripe.js reference to learn how to create PaymentMethods via Stripe.js. Instead of creating a PaymentMethod directly, we recommend using the PaymentIntents API to accept a payment immediately or the SetupIntent API to collect payment method details ahead of a future payment.

Request parameters

FieldTypeDescription
acss_debitobjectIf this is an `acss_debit` PaymentMethod, this hash contains details about the ACSS Debit payment method.
affirmobjectIf this is an `affirm` PaymentMethod, this hash contains details about the Affirm payment method.
afterpay_clearpayobjectIf this is an `AfterpayClearpay` PaymentMethod, this hash contains details about the AfterpayClearpay payment method.
alipayobjectIf this is an `Alipay` PaymentMethod, this hash contains details about the Alipay payment method.
allow_redisplaystringThis field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`.
almaobjectIf this is a Alma PaymentMethod, this hash contains details about the Alma payment method.
amazon_payobjectIf this is a AmazonPay PaymentMethod, this hash contains details about the AmazonPay payment method.
au_becs_debitobjectIf this is an `au_becs_debit` PaymentMethod, this hash contains details about the bank account.
bacs_debitobjectIf this is a `bacs_debit` PaymentMethod, this hash contains details about the Bacs Direct Debit bank account.
bancontactobjectIf this is a `bancontact` PaymentMethod, this hash contains details about the Bancontact payment method.
billieobjectIf this is a `billie` PaymentMethod, this hash contains details about the Billie payment method.
billing_detailsobjectBilling information associated with the PaymentMethod that may be used or required by particular types of payment methods.
bizumobjectIf this is a `bizum` PaymentMethod, this hash contains details about the Bizum payment method.
blikobjectIf this is a `blik` PaymentMethod, this hash contains details about the BLIK payment method.
boletoobjectIf this is a `boleto` PaymentMethod, this hash contains details about the Boleto payment method.
cardone of multiple schemasIf this is a `card` PaymentMethod, this hash contains the user's card details. For backwards compatibility, you can alternatively provide a Stripe token (e.g., for Apple Pay, Amex Express Checkout, or legacy Checkout) into the card hash with format `card: {token: "tok_visa"}`. When providing a card number, you must meet the requirements for [PCI compliance](https://stripe.com/docs/security#validating-pci-compliance). We strongly recommend using Stripe.js instead of interacting with this API directly.
cashappobjectIf this is a `cashapp` PaymentMethod, this hash contains details about the Cash App Pay payment method.
cryptoobjectIf this is a Crypto PaymentMethod, this hash contains details about the Crypto payment method.
customobjectIf this is a `custom` PaymentMethod, this hash contains details about the Custom payment method.
customerstringThe `Customer` to whom the original PaymentMethod is attached.
customer_balanceobjectIf this is a `customer_balance` PaymentMethod, this hash contains details about the CustomerBalance payment method.
epsobjectIf this is an `eps` PaymentMethod, this hash contains details about the EPS payment method.
expandarray of stringSpecifies which fields in the response should be expanded.
fpxobjectIf this is an `fpx` PaymentMethod, this hash contains details about the FPX payment method.
giropayobjectIf this is a `giropay` PaymentMethod, this hash contains details about the Giropay payment method.
grabpayobjectIf this is a `grabpay` PaymentMethod, this hash contains details about the GrabPay payment method.
idealobjectIf this is an `ideal` PaymentMethod, this hash contains details about the iDEAL payment method.
interac_presentobjectIf this is an `interac_present` PaymentMethod, this hash contains details about the Interac Present payment method.
kakao_payobjectIf this is a `kakao_pay` PaymentMethod, this hash contains details about the Kakao Pay payment method.
klarnaobjectIf this is a `klarna` PaymentMethod, this hash contains details about the Klarna payment method.
konbiniobjectIf this is a `konbini` PaymentMethod, this hash contains details about the Konbini payment method.
kr_cardobjectIf this is a `kr_card` PaymentMethod, this hash contains details about the Korean Card payment method.
linkobjectIf this is an `Link` PaymentMethod, this hash contains details about the Link payment method (Link is also known as Onelink in the UK).
mb_wayobjectIf this is a MB WAY PaymentMethod, this hash contains details about the MB WAY payment method.
metadataobjectSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
mobilepayobjectIf this is a `mobilepay` PaymentMethod, this hash contains details about the MobilePay payment method.
multibancoobjectIf this is a `multibanco` PaymentMethod, this hash contains details about the Multibanco payment method.
naver_payobjectIf this is a `naver_pay` PaymentMethod, this hash contains details about the Naver Pay payment method.
nz_bank_accountobjectIf this is an nz_bank_account PaymentMethod, this hash contains details about the nz_bank_account payment method.
oxxoobjectIf this is an `oxxo` PaymentMethod, this hash contains details about the OXXO payment method.
p24objectIf this is a `p24` PaymentMethod, this hash contains details about the P24 payment method.
pay_by_bankobjectIf this is a `pay_by_bank` PaymentMethod, this hash contains details about the PayByBank payment method.
paycoobjectIf this is a `payco` PaymentMethod, this hash contains details about the PAYCO payment method.
payment_methodstringThe PaymentMethod to share.
paynowobjectIf this is a `paynow` PaymentMethod, this hash contains details about the PayNow payment method.
paypalobjectIf this is a `paypal` PaymentMethod, this hash contains details about the PayPal payment method.
paytoobjectIf this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method.
pixobjectIf this is a `pix` PaymentMethod, this hash contains details about the Pix payment method.
promptpayobjectIf this is a `promptpay` PaymentMethod, this hash contains details about the PromptPay payment method.
radar_optionsobjectOptions to configure Radar. See [Radar Session](https://docs.stripe.com/radar/radar-session) for more information.
revolut_payobjectIf this is a `revolut_pay` PaymentMethod, this hash contains details about the Revolut Pay payment method.
samsung_payobjectIf this is a `samsung_pay` PaymentMethod, this hash contains details about the SamsungPay payment method.
satispayobjectIf this is a `satispay` PaymentMethod, this hash contains details about the Satispay payment method.
scalapayobjectIf this is a Scalapay PaymentMethod, this hash contains details about the Scalapay payment method.
sepa_debitobjectIf this is a `sepa_debit` PaymentMethod, this hash contains details about the SEPA debit bank account.
sofortobjectIf this is a `sofort` PaymentMethod, this hash contains details about the SOFORT payment method.
sunbitobjectIf this is a `sunbit` PaymentMethod, this hash contains details about the Sunbit payment method.
swishobjectIf this is a `swish` PaymentMethod, this hash contains details about the Swish payment method.
twintobjectIf this is a TWINT PaymentMethod, this hash contains details about the TWINT payment method.
typestringThe type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
upiobjectIf this is a `upi` PaymentMethod, this hash contains details about the UPI payment method.
us_bank_accountobjectIf this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.
wechat_payobjectIf this is an `wechat_pay` PaymentMethod, this hash contains details about the wechat_pay payment method.
zipobjectIf this is a `zip` PaymentMethod, this hash contains details about the Zip payment method.

Responses

HTTP 200: Successful response.
FieldTypeDescription
acss_debitpayment_method_acss_debit
affirmpayment_method_affirm
afterpay_clearpaypayment_method_afterpay_clearpay
alipaypayment_flows_private_payment_methods_alipay
allow_redisplaystringThis field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.
almapayment_method_alma
amazon_paypayment_method_amazon_pay
au_becs_debitpayment_method_au_becs_debit
bacs_debitpayment_method_bacs_debit
bancontactpayment_method_bancontact
billiepayment_method_billie
billing_details requiredbilling_details
bizumpayment_method_bizum
blikpayment_method_blik
boletopayment_method_boleto
cardpayment_method_card
card_presentpayment_method_card_present
cashapppayment_method_cashapp
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
cryptopayment_method_crypto
custompayment_method_custom
customerone of multiple schemasThe ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer.
customer_accountstring
customer_balancepayment_method_customer_balance
epspayment_method_eps
fpxpayment_method_fpx
giropaypayment_method_giropay
grabpaypayment_method_grabpay
id requiredstringUnique identifier for the object.
idealpayment_method_ideal
interac_presentpayment_method_interac_present
kakao_paypayment_method_kakao_pay
klarnapayment_method_klarna
konbinipayment_method_konbini
kr_cardpayment_method_kr_card
linkpayment_method_link
livemode requiredbooleanIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
mb_waypayment_method_mb_way
metadataobjectSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
mobilepaypayment_method_mobilepay
multibancopayment_method_multibanco
naver_paypayment_method_naver_pay
nz_bank_accountpayment_method_nz_bank_account
object requiredstringString representing the object's type. Objects of the same type share the same value.
oxxopayment_method_oxxo
p24payment_method_p24
pay_by_bankpayment_method_pay_by_bank
paycopayment_method_payco
paynowpayment_method_paynow
paypalpayment_method_paypal
paytopayment_method_payto
pixpayment_method_pix
promptpaypayment_method_promptpay
radar_optionsradar_radar_options
revolut_paypayment_method_revolut_pay
samsung_paypayment_method_samsung_pay
satispaypayment_method_satispay
scalapaypayment_method_scalapay
sepa_debitpayment_method_sepa_debit
sofortpayment_method_sofort
sunbitpayment_method_sunbit
swishpayment_method_swish
twintpayment_method_twint
type requiredstringThe type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
upipayment_method_upi
us_bank_accountpayment_method_us_bank_account
wechat_paypayment_method_wechat_pay
zippayment_method_zip
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
GET /v1/payment_methods/{payment_method}

Retrieve a PaymentMethod

Retrieves a PaymentMethod object attached to the StripeAccount. To retrieve a payment method attached to a Customer, you should use Retrieve a Customer’s PaymentMethods

Request parameters

ParameterLocationTypeDescription
expandqueryarray of stringSpecifies which fields in the response should be expanded.
payment_methodpathstring

object. See the OpenAPI specification for the complete schema.

Responses

HTTP 200: Successful response.
FieldTypeDescription
acss_debitpayment_method_acss_debit
affirmpayment_method_affirm
afterpay_clearpaypayment_method_afterpay_clearpay
alipaypayment_flows_private_payment_methods_alipay
allow_redisplaystringThis field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.
almapayment_method_alma
amazon_paypayment_method_amazon_pay
au_becs_debitpayment_method_au_becs_debit
bacs_debitpayment_method_bacs_debit
bancontactpayment_method_bancontact
billiepayment_method_billie
billing_details requiredbilling_details
bizumpayment_method_bizum
blikpayment_method_blik
boletopayment_method_boleto
cardpayment_method_card
card_presentpayment_method_card_present
cashapppayment_method_cashapp
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
cryptopayment_method_crypto
custompayment_method_custom
customerone of multiple schemasThe ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer.
customer_accountstring
customer_balancepayment_method_customer_balance
epspayment_method_eps
fpxpayment_method_fpx
giropaypayment_method_giropay
grabpaypayment_method_grabpay
id requiredstringUnique identifier for the object.
idealpayment_method_ideal
interac_presentpayment_method_interac_present
kakao_paypayment_method_kakao_pay
klarnapayment_method_klarna
konbinipayment_method_konbini
kr_cardpayment_method_kr_card
linkpayment_method_link
livemode requiredbooleanIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
mb_waypayment_method_mb_way
metadataobjectSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
mobilepaypayment_method_mobilepay
multibancopayment_method_multibanco
naver_paypayment_method_naver_pay
nz_bank_accountpayment_method_nz_bank_account
object requiredstringString representing the object's type. Objects of the same type share the same value.
oxxopayment_method_oxxo
p24payment_method_p24
pay_by_bankpayment_method_pay_by_bank
paycopayment_method_payco
paynowpayment_method_paynow
paypalpayment_method_paypal
paytopayment_method_payto
pixpayment_method_pix
promptpaypayment_method_promptpay
radar_optionsradar_radar_options
revolut_paypayment_method_revolut_pay
samsung_paypayment_method_samsung_pay
satispaypayment_method_satispay
scalapaypayment_method_scalapay
sepa_debitpayment_method_sepa_debit
sofortpayment_method_sofort
sunbitpayment_method_sunbit
swishpayment_method_swish
twintpayment_method_twint
type requiredstringThe type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
upipayment_method_upi
us_bank_accountpayment_method_us_bank_account
wechat_paypayment_method_wechat_pay
zippayment_method_zip
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
POST /v1/payment_methods/{payment_method}

Update a PaymentMethod

Updates a PaymentMethod object. A PaymentMethod must be attached to a customer to be updated.

Request parameters

ParameterLocationTypeDescription
payment_methodpathstring
FieldTypeDescription
allow_redisplaystringThis field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to `unspecified`.
billing_detailsobjectBilling information associated with the PaymentMethod that may be used or required by particular types of payment methods.
cardobjectIf this is a `card` PaymentMethod, this hash contains the user's card details.
expandarray of stringSpecifies which fields in the response should be expanded.
metadataone of multiple schemasSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format. Individual keys can be unset by posting an empty value to them. All keys can be unset by posting an empty value to `metadata`.
paytoobjectIf this is a `payto` PaymentMethod, this hash contains details about the PayTo payment method.
us_bank_accountobjectIf this is an `us_bank_account` PaymentMethod, this hash contains details about the US bank account payment method.

Responses

HTTP 200: Successful response.
FieldTypeDescription
acss_debitpayment_method_acss_debit
affirmpayment_method_affirm
afterpay_clearpaypayment_method_afterpay_clearpay
alipaypayment_flows_private_payment_methods_alipay
allow_redisplaystringThis field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.
almapayment_method_alma
amazon_paypayment_method_amazon_pay
au_becs_debitpayment_method_au_becs_debit
bacs_debitpayment_method_bacs_debit
bancontactpayment_method_bancontact
billiepayment_method_billie
billing_details requiredbilling_details
bizumpayment_method_bizum
blikpayment_method_blik
boletopayment_method_boleto
cardpayment_method_card
card_presentpayment_method_card_present
cashapppayment_method_cashapp
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
cryptopayment_method_crypto
custompayment_method_custom
customerone of multiple schemasThe ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer.
customer_accountstring
customer_balancepayment_method_customer_balance
epspayment_method_eps
fpxpayment_method_fpx
giropaypayment_method_giropay
grabpaypayment_method_grabpay
id requiredstringUnique identifier for the object.
idealpayment_method_ideal
interac_presentpayment_method_interac_present
kakao_paypayment_method_kakao_pay
klarnapayment_method_klarna
konbinipayment_method_konbini
kr_cardpayment_method_kr_card
linkpayment_method_link
livemode requiredbooleanIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
mb_waypayment_method_mb_way
metadataobjectSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
mobilepaypayment_method_mobilepay
multibancopayment_method_multibanco
naver_paypayment_method_naver_pay
nz_bank_accountpayment_method_nz_bank_account
object requiredstringString representing the object's type. Objects of the same type share the same value.
oxxopayment_method_oxxo
p24payment_method_p24
pay_by_bankpayment_method_pay_by_bank
paycopayment_method_payco
paynowpayment_method_paynow
paypalpayment_method_paypal
paytopayment_method_payto
pixpayment_method_pix
promptpaypayment_method_promptpay
radar_optionsradar_radar_options
revolut_paypayment_method_revolut_pay
samsung_paypayment_method_samsung_pay
satispaypayment_method_satispay
scalapaypayment_method_scalapay
sepa_debitpayment_method_sepa_debit
sofortpayment_method_sofort
sunbitpayment_method_sunbit
swishpayment_method_swish
twintpayment_method_twint
type requiredstringThe type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
upipayment_method_upi
us_bank_accountpayment_method_us_bank_account
wechat_paypayment_method_wechat_pay
zippayment_method_zip
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
POST /v1/payment_methods/{payment_method}/attach

Attach a PaymentMethod to a Customer

Attaches a PaymentMethod object to a Customer. To attach a new PaymentMethod to a customer for future payments, we recommend you use a SetupIntent or a PaymentIntent with setup_future_usage. These approaches will perform any necessary steps to set up the PaymentMethod for future payments. Using the /v1/payment_methods/:id/attach endpoint without first using a SetupIntent or PaymentIntent with setup_future_usage does not optimize the PaymentMethod for future use, which makes later declines and payment friction more likely. See Optimizing cards for future payments for more information about setting up future payments. To use this PaymentMethod as the default for invoice or subscription payments, set invoice_settings.default_payment_method, on the Customer to the PaymentMethod’s ID.

Request parameters

ParameterLocationTypeDescription
payment_methodpathstring
FieldTypeDescription
customerstringThe ID of the customer to which to attach the PaymentMethod.
customer_accountstringThe ID of the Account representing the customer to which to attach the PaymentMethod.
expandarray of stringSpecifies which fields in the response should be expanded.

Responses

HTTP 200: Successful response.
FieldTypeDescription
acss_debitpayment_method_acss_debit
affirmpayment_method_affirm
afterpay_clearpaypayment_method_afterpay_clearpay
alipaypayment_flows_private_payment_methods_alipay
allow_redisplaystringThis field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.
almapayment_method_alma
amazon_paypayment_method_amazon_pay
au_becs_debitpayment_method_au_becs_debit
bacs_debitpayment_method_bacs_debit
bancontactpayment_method_bancontact
billiepayment_method_billie
billing_details requiredbilling_details
bizumpayment_method_bizum
blikpayment_method_blik
boletopayment_method_boleto
cardpayment_method_card
card_presentpayment_method_card_present
cashapppayment_method_cashapp
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
cryptopayment_method_crypto
custompayment_method_custom
customerone of multiple schemasThe ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer.
customer_accountstring
customer_balancepayment_method_customer_balance
epspayment_method_eps
fpxpayment_method_fpx
giropaypayment_method_giropay
grabpaypayment_method_grabpay
id requiredstringUnique identifier for the object.
idealpayment_method_ideal
interac_presentpayment_method_interac_present
kakao_paypayment_method_kakao_pay
klarnapayment_method_klarna
konbinipayment_method_konbini
kr_cardpayment_method_kr_card
linkpayment_method_link
livemode requiredbooleanIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
mb_waypayment_method_mb_way
metadataobjectSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
mobilepaypayment_method_mobilepay
multibancopayment_method_multibanco
naver_paypayment_method_naver_pay
nz_bank_accountpayment_method_nz_bank_account
object requiredstringString representing the object's type. Objects of the same type share the same value.
oxxopayment_method_oxxo
p24payment_method_p24
pay_by_bankpayment_method_pay_by_bank
paycopayment_method_payco
paynowpayment_method_paynow
paypalpayment_method_paypal
paytopayment_method_payto
pixpayment_method_pix
promptpaypayment_method_promptpay
radar_optionsradar_radar_options
revolut_paypayment_method_revolut_pay
samsung_paypayment_method_samsung_pay
satispaypayment_method_satispay
scalapaypayment_method_scalapay
sepa_debitpayment_method_sepa_debit
sofortpayment_method_sofort
sunbitpayment_method_sunbit
swishpayment_method_swish
twintpayment_method_twint
type requiredstringThe type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
upipayment_method_upi
us_bank_accountpayment_method_us_bank_account
wechat_paypayment_method_wechat_pay
zippayment_method_zip
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors
POST /v1/payment_methods/{payment_method}/detach

Detach a PaymentMethod from a Customer

Detaches a PaymentMethod object from a Customer. Detachment is permanent and irreversible — once detached, a PaymentMethod can no longer be used for payments or re-attached to a Customer.

Request parameters

ParameterLocationTypeDescription
payment_methodpathstring
FieldTypeDescription
expandarray of stringSpecifies which fields in the response should be expanded.

Responses

HTTP 200: Successful response.
FieldTypeDescription
acss_debitpayment_method_acss_debit
affirmpayment_method_affirm
afterpay_clearpaypayment_method_afterpay_clearpay
alipaypayment_flows_private_payment_methods_alipay
allow_redisplaystringThis field indicates whether this payment method can be shown again to its customer in a checkout flow. Stripe products such as Checkout and Elements use this field to determine whether a payment method can be shown as a saved payment method in a checkout flow. The field defaults to “unspecified”.
almapayment_method_alma
amazon_paypayment_method_amazon_pay
au_becs_debitpayment_method_au_becs_debit
bacs_debitpayment_method_bacs_debit
bancontactpayment_method_bancontact
billiepayment_method_billie
billing_details requiredbilling_details
bizumpayment_method_bizum
blikpayment_method_blik
boletopayment_method_boleto
cardpayment_method_card
card_presentpayment_method_card_present
cashapppayment_method_cashapp
created requiredintegerTime at which the object was created. Measured in seconds since the Unix epoch.
cryptopayment_method_crypto
custompayment_method_custom
customerone of multiple schemasThe ID of the Customer to which this PaymentMethod is saved. This will not be set when the PaymentMethod has not been saved to a Customer.
customer_accountstring
customer_balancepayment_method_customer_balance
epspayment_method_eps
fpxpayment_method_fpx
giropaypayment_method_giropay
grabpaypayment_method_grabpay
id requiredstringUnique identifier for the object.
idealpayment_method_ideal
interac_presentpayment_method_interac_present
kakao_paypayment_method_kakao_pay
klarnapayment_method_klarna
konbinipayment_method_konbini
kr_cardpayment_method_kr_card
linkpayment_method_link
livemode requiredbooleanIf the object exists in live mode, the value is `true`. If the object exists in test mode, the value is `false`.
mb_waypayment_method_mb_way
metadataobjectSet of [key-value pairs](https://docs.stripe.com/api/metadata) that you can attach to an object. This can be useful for storing additional information about the object in a structured format.
mobilepaypayment_method_mobilepay
multibancopayment_method_multibanco
naver_paypayment_method_naver_pay
nz_bank_accountpayment_method_nz_bank_account
object requiredstringString representing the object's type. Objects of the same type share the same value.
oxxopayment_method_oxxo
p24payment_method_p24
pay_by_bankpayment_method_pay_by_bank
paycopayment_method_payco
paynowpayment_method_paynow
paypalpayment_method_paypal
paytopayment_method_payto
pixpayment_method_pix
promptpaypayment_method_promptpay
radar_optionsradar_radar_options
revolut_paypayment_method_revolut_pay
samsung_paypayment_method_samsung_pay
satispaypayment_method_satispay
scalapaypayment_method_scalapay
sepa_debitpayment_method_sepa_debit
sofortpayment_method_sofort
sunbitpayment_method_sunbit
swishpayment_method_swish
twintpayment_method_twint
type requiredstringThe type of the PaymentMethod. An additional hash is included on the PaymentMethod with a name matching this value. It contains additional information specific to the PaymentMethod type.
upipayment_method_upi
us_bank_accountpayment_method_us_bank_account
wechat_paypayment_method_wechat_pay
zippayment_method_zip
HTTP default: Error response.
FieldTypeDescription
error requiredapi_errors