Payment Methods | Stripe API Reference

Payment Methods v1

PaymentMethod objects represent your customer’s payment instruments. You can use them with PaymentIntents to collect payments or save them to Customer objects to store instrument details for future payments.

Related guides: Payment Methods and More Payment Scenarios.

Was this section helpful?YesNo
Create a PaymentMethod
POST/v1/payment_methods
Update a PaymentMethod
POST/v1/payment_methods/:id
Retrieve a PaymentMethod
GET/v1/payment_methods/:id
Retrieve a Customer's PaymentMethod
GET/v1/customers/:id/payment_methods/:id
List PaymentMethods
GET/v1/payment_methods
List a Customer's PaymentMethods
GET/v1/customers/:id/payment_methods
Attach a PaymentMethod to a Customer
POST/v1/payment_methods/:id/attach
Detach a PaymentMethod from a Customer
POST/v1/payment_methods/:id/detach

The PaymentMethod object v1

Attributes

  • idstring

    Unique identifier for the object.

  • billing_detailsobject

    Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.

  • customernullable stringExpandable

    The 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.

  • metadatanullable map

    Set of key-value pairs that you can attach to an object. This can be useful for storing additional information about the object in a structured format.

  • typeenum

    The 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.

    Possible enum values

More attributes

  • objectstring, value is "payment_method"

  • acss_debitnullable object

  • affirmnullable object

  • afterpay_clearpaynullable object

  • alipaynullable object

  • allow_redisplaynullable enum

  • almanullable object

  • amazon_paynullable object

  • au_becs_debitnullable object

  • bacs_debitnullable object

  • bancontactnullable object

  • billienullable object

  • bizumnullable object

  • bliknullable object

  • boletonullable object

  • cardnullable object

  • card_presentnullable object

  • cashappnullable object

  • createdtimestamp

  • cryptonullable object

  • customnullable object

  • customer_balancenullable object

  • epsnullable object

  • fpxnullable object

  • giropaynullable object

  • grabpaynullable object

  • idealnullable object

  • interac_presentnullable objectPreview feature

  • kakao_paynullable object

  • klarnanullable object

  • konbininullable object

  • kr_cardnullable object

  • linknullable object

  • livemodeboolean

  • mb_waynullable object

  • mobilepaynullable object

  • multibanconullable object

  • naver_paynullable object

  • nz_bank_accountnullable object

  • oxxonullable object

  • p24nullable object

  • pay_by_banknullable object

  • payconullable object

  • paynownullable object

  • paypalnullable object

  • paypaynullable object

  • paytonullable object

  • pixnullable object

  • promptpaynullable object

  • radar_optionsnullable object

  • revolut_paynullable object

  • samsung_paynullable object

  • satispaynullable object

  • scalapaynullable object

  • sepa_debitnullable object

  • sequranullable objectPreview feature

  • sofortnullable object

  • sunbitnullable object

  • swishnullable object

  • twintnullable object

  • upinullable object

  • us_bank_accountnullable object

  • wechat_paynullable object

  • weronullable objectPreview feature

  • zipnullable object

The PaymentMethod object
{
"object": "payment_method",
"allow_redisplay": "unspecified",
"billing_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"email": null,
"name": "John Doe",
"phone": null
},
"created": 1726673582,
"customer": null,
"livemode": false,
"metadata": {},
"type": "us_bank_account",
"us_bank_account": {
"account_holder_type": "individual",
"account_type": "checking",
"bank_name": "STRIPE TEST BANK",
"financial_connections_account": null,
"fingerprint": "LstWJFsCK7P349Bg",
"last4": "6789",
"networks": {
"preferred": "ach",
"supported": [
"ach"
]
},
"routing_number": "110000000",
"status_details": {}
}
}

Create a PaymentMethod v1

POST /v1/payment_methods

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.

Parameters

  • typeenumRequired

    The 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.

    Possible enum values
  • billing_detailsobject

    Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods.

  • metadatamap

    Set of key-value pairs 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.

More parameters

  • acss_debitobject

  • affirmobject

  • afterpay_clearpayobject

  • alipayobject

  • allow_redisplayenum

  • almaobject

  • amazon_payobject

  • au_becs_debitobject

  • bacs_debitobject

  • bancontactobject

  • billieobject

  • bizumobject

  • blikobject

  • boletoobject

  • cardobject

  • cashappobject

  • cryptoobject

  • customobject

  • customer_balanceobject

  • epsobject

  • fpxobject

  • giropayobject

  • grabpayobject

  • idealobject

  • interac_presentobjectPreview feature

  • kakao_payobject

  • klarnaobject

  • konbiniobject

  • kr_cardobject

  • linkobject

  • mb_wayobject

  • mobilepayobject

  • multibancoobject

  • naver_payobject

  • nz_bank_accountobject

  • oxxoobject

  • p24object

  • pay_by_bankobject

  • paycoobject

  • paynowobject

  • paypalobject

  • paypayobject

  • paytoobject

  • pixobject

  • promptpayobject

  • radar_optionsobject

  • revolut_payobject

  • samsung_payobject

  • satispayobject

  • scalapayobject

  • sepa_debitobject

  • sequraobjectPreview feature

  • sofortobject

  • sunbitobject

  • swishobject

  • twintobject

  • upiobject

  • us_bank_accountobject

  • wechat_payobject

  • weroobjectPreview feature

  • zipobject

Returns

Returns a PaymentMethod object.

curl https://api.stripe.com/v1/payment_methods \
-u "sk_test_...sk_test_...:" \
-d type=us_bank_account \
-d "us_bank_account[account_holder_type]=individual" \
-d "us_bank_account[account_number]=000123456789" \
-d "us_bank_account[routing_number]=110000000" \
-d "billing_details[name]=John Doe"
Response
{
"object": "payment_method",
"allow_redisplay": "unspecified",
"billing_details": {
"address": {
"city": null,
"country": null,
"line1": null,
"line2": null,
"postal_code": null,
"state": null
},
"email": null,
"name": "John Doe",
"phone": null
},
"created": 1726673582,
"customer": null,
"livemode": false,
"metadata": {},
"type": "us_bank_account",
"us_bank_account": {
"account_holder_type": "individual",
"account_type": "checking",
"bank_name": "STRIPE TEST BANK",
"financial_connections_account": null,
"fingerprint": "LstWJFsCK7P349Bg",
"last4": "6789",
"networks": {
"preferred": "ach",
"supported": [
"ach"
]
},
"routing_number": "110000000",
"status_details": {}
}
}