#tonymx-Checkout-Sub
1 messages · Page 1 of 1 (latest)
Hi there! Can you explain a bit more exactly what you mean? A lot of the terminology used isn't Stripe lingo so having a hard time telling exactly what you want to accomplish.
I need to enter the "sepa_debit" for a checkout session but in the next few days.
To explain by step, the first day I'd like to create the checkout subcription and specify a date for the paiements.
And the second day, I'd like to save the SEPA for the next echeance.
Yes the date is in the future.
I don't want to use a trial but I just need to register the session for the next month.
The first month, the customer will pay by cash for exemple...
Do you already have the customer's SEPA Debit details? Or you want to use Stripe to collect those?
I want to use Stripe to collect them, but in the next days.
And when I will use the checkout to fill the SEPA, I need to send to Stripe the date of the next paiement.
I don't know if you understand (I'm french and I love StripeJS but this is my first problem) 🙂
No problem, thanks for talking it through, and I think I understand what you are after!
The main goal is to create a subscription with a date but not specify the paiement method, I'd like to specify the paiement method later.
Okay so I would start a Subscription with a $0 price when you first take payment outside of Stripe (or whenever you want to start the Sub for your customer). Then, when you are ready to charge them, you want to have a method to bring your Customer back on-session (back to your UI) and then you will upgrade the Subscription and pass the client_secret from the PaymentIntent that the Invoice creates to render the Payment Element. This allows you to collect a variety of PaymentMethods from your Customer based on what they prefer. Take a look at https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements for info on Payment Element if you haven't seen it yet.
Ok but if I use "checkout.sessions.create" with a price set to $0 the customer will not be redirected to the checkout ?
Yeah you wouldn't use a Checkout Session here.
You would just create the Subscription directly via https://stripe.com/docs/api/subscriptions/create
Ok
But is there a way to create the customer ?
In order to specify the customer id in the "stripe.subscriptions.create" function.
Yep! You want to basically follow the guide here which gives you a step by step of the above: https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements
Create and manage subscriptions to accept recurring payments.
And what's the best way to create the priceId with $0 ?
You can do it right in your Dashboard or via the API
Because I got "Error: The price parameter should be the ID of a price object, rather than the literal numerical price."
I got => "UnhandledPromiseRejectionWarning: Error: This customer has no attached payment source or default payment method."
Can you provide the request ID for that error?
(node:13340) UnhandledPromiseRejectionWarning: Error: This customer has no attached payment source or default payment method.
Sorry the request ID will look like req_xxxxx (https://stripe.com/docs/api/request_ids)
req_lzPRpuAlowlrj6
Okay so the price you are using is not a $0 price. Looks to be $100
Yes because that's the price of the initial product where the users can subscibes on the website (front-end).
But on my back-end office I want to use this product with a price of $0 for the first month.
Okay so in the Stripe API you would create a $0 price. You can still show the customer in your own UI whatever amount you want (like the amount you will eventually upgrade the customer to later on when you charge them through Stripe).
Ok I understand, thenk you for you advices.