#chozboots
1 messages · Page 1 of 1 (latest)
hello! if you want the user to be charged on a later date, then typically you would use a Subscription Schedule : https://stripe.com/docs/billing/subscriptions/subscription-schedules
Checkout Sessions don't support Subscription Schedules though.
The only workaround I can think of would be to use a trial
So would I likely have to create a customized form if I want users to be charged at a later date?
yep, that's correct
Would I have to manually implement microdeposit and instant verification as well?
Sorry for all the follow-up questions, my client's request is very strange (at least to me lol)
They essentially want to start collecting member's payments now, but they don't want to charge them until September, and then they want to just set them up on a monthly subscription afterwards.
hrm, i think what you can consider doing is to use the Checkout Page to collect the Payment Method before hand : https://stripe.com/docs/payments/save-and-reuse. Then create a Subscription Schedule using that saved payment method. Does that make sense?
Ah, I think it does. Like, use the Stripe Checkout page to register them as a customer and collect their banking information and then create a separate script for creating a new subscription for each customer?
correct!
So would I essentially just be charging the customer for a $0.00 monthly subscription and then immediately cancelling it to create the scheduled subscription or is there a way to stop that initial subscription from being made?
you would create a Subscription Schedule with the saved payment method : https://stripe.com/docs/api/subscription_schedules/create. That Subscription Schedule would create a Subscription when the scheduled time comes around. You don't have to create a separate Subscription
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
I think I understand, but let me make sure.
So I could just change the mode to 'setup' and that would make the Checkout Session simply gather the customer's payment information for later? And then I can use that payment information to create a subscription when it's needed?
yes - changing the mode to setup would make the Checkout Session save the customer's payment information for later. Subsequently, you would use the payment information to immediately create a Subscription Schedule. A Subscription Schedule allows you to start a subscription in the future : https://stripe.com/docs/billing/subscriptions/subscription-schedules/use-cases#start-subscription-future
Ah! Okay, that's perfect!
Would I need to have some sort of task running to detect when new banking information is detected?
can you elaborate more? do you mean in case the customer wants to change their default payment method?
Like, I'm just wondering what exactly would be triggering this snippet of code. Because, wouldn't it encounter issues if I run it immediately after a customer uses the Checkout form?
import stripe
stripe.api_key =
"sk_test_51NSphtLiP4WqYbBviE8mxlyMlhoNJDzDN4uwA9xaKn6Dqzw6582pY2NGvLQJM60yUwPivcJwGyY2atNjeEK1pXXv00ERnsKFb9"
stripe.SubscriptionSchedule.create(
customer='{{CUSTOMER_ID}}'
,
start_date=1690873200,
end_behavior="release",
phases=[{"items": [{"price": "{{PRICE_PRINT}}", "quantity": 1}], "iterations": 12}],
)
(That api key is a placeholder value btw ^)
I guess the reason I'm wondering this is since if a customer is using microdeposit verification, it could potentially take a couple of days for it to be ready to make a subscription. I'm just wondering how this is/would be handled.
I can try to elaborate more if needed btw
Hi @vapid fulcrum I'm taking over this thread
Okee dokee.
Is your question about what happen if the ACH payment fails for the subscription?
Yes, but also, what event would my script that creates the new scheduled subscription have to be listening for?
I assume I can just use error handling and webhooks for this scenario, right? Maybe send a notice to the customer to update the information (with a new checkout link?) Unless some of this is done automatically.
Ohhhhh. I could just use payment_status in the Checkout session object, right?
you can listen to invoice.payment_failed webhook event, and you can just send the link of hosted invoice page to the customer so that they can pay again with a different payment method.
Ah, okay. So I wouldn't have to precheck their balances or anything either? We'll only be processing about 1000 payments a month, currently.
I can figure that stuff out later though.
I guess there's one last thing I'm curious about, and that's how microdeposits would be handled in this scenario.
https://stripe.com/docs/financial-connections/use-cases#optimize-ach-direct-debit you can consider using fnancial connection to check the customer's account balance before payment
Like, with instant verifcation, I understand that I can simply retrieve the Session object, then get the SetupIntent object, and go from there, but I'm wondering how the 1-2 day delays with microdeposits would be handled.
Ah, okay. I'll look into this one.
Actually, I think I found the right documentation for this one. I'm gonna try everything out before I ask any follow up questions.