Roesmi
Roesmi

Reputation: 508

How to use bank transfer as payment for subscriptions in Stripe

For users that subscribes using card as a payment method, I am creating a checkout session using the following parameters:

PaymentMethodTypes = ["card"] 
Mode = "subscription"

The session then allows the user to insert address, name, tax id and card details. After the user clicks "Subscribe" the Stripe customer and the subscription are created. Alright until here.

I would like to have the same process for the users that wants to pay by bank transfer so I create the checkout session using the following parameters:

PaymentMethodTypes = ["customer_balance"]
Mode = "subscription" 

But I get the following error:

'The payment method `customer_balance` cannot be used in `subscription` mode.'

I know how to create the customer and the subscription with payment method as bank transfer using the API, it is described here and it works, but that means that I need to handle the customer creation on my own and I want to avoid collecting billing address, tax id...

Would would be the correct approach to handle this using stripe hosted pages?

If there is no way to create a checkout session for subscriptions using bank transfers, is it possible somehow to create a checkout session page to create a Stripe customer?

Basically my goal is to create the stripe customer used for the subscription using a hosted page.

Upvotes: 0

Views: 635

Answers (1)

pgs
pgs

Reputation: 1181

The payment method customer_balance is not supported in Checkout subscription mode as the error message suggests.

As the guide you’ve share on how Subscription works with bank-transfers, you’d need to create a customer by using the ‘Create a customer’ API first. There is not a stand alone Stripe hosted page for just creating a customer and collecting customer details. You’d need to build this on your end.

Upvotes: 0

Related Questions