Payment Methods API

    Get started processing the different types of payment methods available on Stripe.

    Transitioning to the Payment Methods API

    The Payment Methods API, which replaces the existing Tokens and Sources APIs, is now the recommended way for integrations to collect and store payment information. It works with the Payment Intents API to create payments for a wide range of payment methods.

    The main difference between the Payment Methods API and the Sources API is that Sources describe transaction state through the status property, which means that each Source object must be transitioned to a chargeable state before it can be used for a payment. In contrast, PaymentMethods are stateless, relying on the PaymentIntent object to represent the transaction state of a given payment.

    We plan to eventually support all payment methods on the Payment Methods API. In the meantime, the Sources API may be right for cases where a particular payment method is not yet supported on the Payment Methods API.

    Flows Payment Methods with
    Payment Intents API
    Tokens or Sources with
    Charges API
    Cards Supported Supported on Tokens
    Not recommended on Sources
    Dynamic 3D Secure Supported Not supported
    Card present Supported Not supported
    Alipay Planned Supported
    ACH Debit Planned Supported on Tokens
    Not supported on Sources
    ACH Credit Transfer Planned Beta
    Bancontact Planned Supported
    EPS Planned Beta
    Giropay Planned Supported
    iDEAL Planned Supported
    Multibanco Planned Beta
    Przelewy24 Planned Beta
    SEPA Direct Debit Planned Supported
    SOFORT Planned Supported
    WeChat Pay Planned Beta

    If your integration currently uses the Sources or Tokens API, follow the migration guide to transition to the Payment Intents and Payment Methods APIs.

    When you have chosen the API you wish to integrate against, our guide to payment methods may help you determine the right payment method types to support for your customers. This guide includes detailed descriptions of each payment method and describes the differences in the customer-facing flows, along with the geographic regions where they are most relevant. You can enable any payment method available to you within the Dashboard. Activation is generally instantaneous and does not require additional contracts nor include a lengthy process.

    Compatibility with Sources and Cards

    If you’ve previously collected customer card details with Stripe using Cards or Sources, you can start using the Payment Methods API immediately without migrating any payment information.

    All Cards and all card Sources that have been saved to a Customer are usable in any API that accepts a PaymentMethod object. For example, you can use a saved Card as a PaymentMethod when creating a PaymentIntent:

    curl https://api.stripe.com/v1/payment_intents \
      -u sk_test_4eC39HqLyjWDarjtT1zdp7dc: \
      -d payment_method_types[]=card \
      -d amount=1099 \
      -d currency=usd \
      -d customer=cus_FgdP926CGV4uUJ \
      -d payment_method=card_1FBGAo2eZvKYlo2C8Cyw8m96
    
    # Set your secret key: remember to change this to your live secret key in production
    # See your keys here: https://dashboard.stripe.com/account/apikeys
    Stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc'
    
    Stripe::PaymentIntent.create({
        payment_method_types: ['card'],
        amount: 1099,
        currency: 'usd',
        customer: 'cus_FgdP926CGV4uUJ',
        payment_method: 'card_1FBGAo2eZvKYlo2C8Cyw8m96',
    })
    
    # Set your secret key: remember to change this to your live secret key in production
    # See your keys here: https://dashboard.stripe.com/account/apikeys
    stripe.api_key = 'sk_test_4eC39HqLyjWDarjtT1zdp7dc'
    
    stripe.PaymentIntent.create(
      payment_method_types=['card'],
      amount=1099,
      currency='usd',
      customer='cus_FgdP926CGV4uUJ',
      payment_method='card_1FBGAo2eZvKYlo2C8Cyw8m96',
    )
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    \Stripe\Stripe::setApiKey('sk_test_4eC39HqLyjWDarjtT1zdp7dc');
    
    \Stripe\PaymentIntent::create([
        'payment_method_types' => ['card'],
        'amount' => 1099,
        'currency' => 'usd',
        'customer' => 'cus_FgdP926CGV4uUJ',
        'payment_method' => 'card_1FBGAo2eZvKYlo2C8Cyw8m96',
    ]);
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    Stripe.apiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc";
    
    Map<String, Object> paymentintentParams = new HashMap<String, Object>();
    paymentintentParams.put("amount", 1099);
    paymentintentParams.put("currency", "usd");
    ArrayList payment_method_types = new ArrayList();
    payment_method_types.add("card");
    paymentintentParams.put("payment_method_types", payment_method_types);
    
    paymentintentParams.put("customer", "cus_FgdP926CGV4uUJ")
    paymentintentParams.put("payment_method", "card_1FBGAo2eZvKYlo2C8Cyw8m96")
    
    PaymentIntent.create(paymentintentParams);
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    const stripe = require('stripe')('sk_test_4eC39HqLyjWDarjtT1zdp7dc');
    
    (async () => {
      const paymentIntent = await stripe.paymentIntents.create({
        payment_method_types: ['card'],
        amount: 1099,
        currency: 'usd',
        customer: 'cus_FgdP926CGV4uUJ',
        payment_method: 'card_1FBGAo2eZvKYlo2C8Cyw8m96'
      });
    })();
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    stripe.Key = "sk_test_4eC39HqLyjWDarjtT1zdp7dc"
    
    params := &stripe.PaymentIntentParams{
      PaymentMethodTypes: stripe.StringSlice([]string{
        "card",
      }),
      Amount: stripe.Int64(1099),
      Currency: stripe.String(string(stripe.CurrencyUSD)),
      Customer: stripe.String("cus_FgdP926CGV4uUJ"),
      PaymentMethod: stripe.String("card_1FBGAo2eZvKYlo2C8Cyw8m96"),
    }
    paymentintent.New(params)
    
    // Set your secret key: remember to change this to your live secret key in production
    // See your keys here: https://dashboard.stripe.com/account/apikeys
    StripeConfiguration.ApiKey = "sk_test_4eC39HqLyjWDarjtT1zdp7dc";
    
    var service = new PaymentIntentService();
    var options = new PaymentIntentCreateOptions
    {
        PaymentMethodTypes = new List<string> { "card" },
        Amount = 1099,
        Currency = "usd",
        Customer = "cus_FgdP926CGV4uUJ",
        PaymentMethod = "card_1FBGAo2eZvKYlo2C8Cyw8m96"
    };
    service.Create(options);
    

    Remember to provide the Customer to which your Card or card Source is saved when attaching the object to a PaymentIntent.

    All saved Cards and card Sources may also be retrieved through the PaymentMethod API.

    {
      "id": "card_1EBXBSDuWL9wT9brGOaALeD2",
      "object": "card",
      "address_city": "San Francisco",
      "address_country": "US",
      "address_line1": "1234 Fake Street",
      "address_line1_check": null,
      "address_line2": null,
      "address_state": null,
      "address_zip": null,
    See all 26 lines "address_zip_check": null, "brand": "Visa", "country": "US", "customer": "#{customer_id}", "cvc_check": null, "dynamic_last4": null, "exp_month": 8, "exp_year": 2024, "fingerprint": "53v265akSHAnIk1X", "funding": "credit", "last4": "4242", "metadata": { }, "name": null, "tokenization_method": null }
    {
      "id": "card_1EBXBSDuWL9wT9brGOaALeD2",
      "object": "payment_method",
      "billing_details": {
        "address": {
          "city": "San Francisco",
          "country": "US",
          "line1": "1234 Fake Street",
          "line2": null,
          "postal_code": null,
    See all 41 lines "state": null }, "name": null, "phone": null, "email": null }, "card": { "brand": "visa", "checks": { "address_line1_check": null, "address_postal_code_check": null, "cvc_check": null }, "country": "US", "exp_month": 8, "exp_year": 2024, "fingerprint": "53v265akSHAnIk1X", "funding": "credit", "last4": "4242", "three_d_secure_usage": { "supported": true }, "wallet": null }, "created": 123456789, "customer": "cus_EepWxEKrgMaywv", "livemode": false, "metadata": { }, "type": "card" }
    {
      "id": "src_1AhIN74iJb0CbkEwmbRYPsd4",
      "object": "source",
      "amount": null,
      "client_secret": "src_client_secret_sSPHZ17iQG6j9uKFdAYqPErO",
      "created": 1500471469,
      "currency": null,
      "flow": "none",
      "livemode": false,
      "metadata": {
    See all 46 lines }, "owner": { "address": { "city": "Berlin", "country": "DE", "line1": "Nollendorfstraße 27", "line2": null, "postal_code": "10777", "state": null }, "email": "jenny.rosen@example.com", "name": "Jenny Rosen", "phone": null, "verified_address": null, "verified_email": null, "verified_name": null, "verified_phone": null }, "status": "chargeable", "type": "card", "usage": "reusable", "card": { "exp_month": 4, "exp_year": 2024, "address_line1_check": "unchecked", "address_zip_check": "unchecked", "brand": "Visa", "country": "US", "cvc_check": "unchecked", "funding": "credit", "last4": "4242", "three_d_secure": "optional", "tokenization_method": null, "dynamic_last4": null } }
    {
      "id": "card_1EBXBSDuWL9wT9brGOaALeD2",
      "object": "payment_method",
      "billing_details": {
        "address": {
          "city": "Berlin",
          "country": "DE",
          "line1": "Nollendorfstraße 27",
          "line2": null,
          "postal_code": "10777",
    See all 41 lines "state": null }, "name": "Jenny Rosen", "phone": null, "email": "jenny.rosen@example.com" }, "card": { "brand": "visa", "checks": { "address_line1_check": null, "address_postal_code_check": null, "cvc_check": null }, "country": "US", "exp_month": 4, "exp_year": 2024, "fingerprint": "53v265akSHAnIk1X", "funding": "credit", "last4": "4242", "three_d_secure_usage": { "supported": true }, "wallet": null }, "created": 1500471469, "customer": "#{customer_id}", "livemode": false, "metadata": { }, "type": "card" }

    Note that with this compatibility, no new objects are created; the PaymentMethod APIs provide a different view of the same underlying object. For example, updates to a Card or card Source through the Payment Methods API will be visible through the Sources API, and vice versa.

    Next steps

    Was this page helpful? Yes No

    Send

    Thank you for helping improve Stripe's documentation. If you need help or have any questions, please consider contacting support.

    Questions?

    We're always happy to help with code or other questions you might have. Search our documentation, contact support, or connect with our sales team. You can also chat live with other developers in #stripe on freenode.

    On this page