dev02
dev02

Reputation: 1856

Stripe: Subscriptions without charging

In our app we have requirement to charge customers later on based on some conditions of app itself. I can easily do this for single payments by specifying capture to false when making a charge but I don't see any such option for subscriptions and customer gets charged initially which we want to avoid.

Is there a way to not charge the customer when creating a subscription ?

Upvotes: 2

Views: 2308

Answers (1)

Michael Rambeau
Michael Rambeau

Reputation: 589

2 options:

As @Zico said in the comments, in the subscriptions options, you could define a "trial period".

See the documentation here: https://stripe.com/docs/subscriptions/trials

When creating a subscription with a trial period, no payment method is required for the customer. An immediate invoice is still created, but for $0.

A more powerful way to address your requirement would be to set the subscription amount to 0 and then use webhooks to bill whatever you want, adding invoice items at the end of every billing cycle. You could use the invoice.created event to perform some business logic and add items to the invoice if you want to bill something. If you don't add any item, nothing will be charged since the subscription amount is 0.

More details here https://stripe.com/docs/subscriptions/invoices

When Stripe automatically generates an invoice for a recurring payment, your site is notified via webhooks (an invoice.created event). Stripe waits approximately an hour before attempting to pay that invoice. In that time, you can add invoice items to the recently-created invoice so that the forthcoming payment covers it.

Upvotes: 3

Related Questions