0

I need only one Payment Method (AliPay). But I can't disable default payment method with Stripe Checkout (Credit Card). Of course, I read documentation, but I don't have any idea how I can make that.

This is My code.

var handler = StripeCheckout.configure({
    key: 'public_key',
    alipay: true,
    locale: false,
    currency: "usd",
    token: function(token) {
        // Use the token to create the charge with a server-side script.
        // You can access the token ID with `token.id`
    }
});

handler.open({
    name: 'example.com',
    description: 'AliPay Payment',
    amount: 10000
});

Thanks!

lanycrost
  • 18
  • 1
  • 5

1 Answers1

0

It's not possible to disable the default (card) area of Checkout.

If you're looking for greater customizability of your payment form I'd have a look at Stripe.js/Elements and the Sources API. You can use the Sources to generate an AliPay source, redirect a user to AliPay to authorize a payment, and then return them to your site, https://stripe.com/docs/sources/alipay

duck
  • 5,240
  • 1
  • 15
  • 15