#chozboots

1 messages · Page 1 of 1 (latest)

hidden lavaBOT
shadow nexus
vapid fulcrum
#

So would I likely have to create a customized form if I want users to be charged at a later date?

shadow nexus
#

yep, that's correct

vapid fulcrum
#

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.

shadow nexus
vapid fulcrum
#

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?

shadow nexus
#

correct!

vapid fulcrum
#

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?

shadow nexus
vapid fulcrum
#

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?

shadow nexus
vapid fulcrum
#

Ah! Okay, that's perfect!

Would I need to have some sort of task running to detect when new banking information is detected?

shadow nexus
#

can you elaborate more? do you mean in case the customer wants to change their default payment method?

vapid fulcrum
#

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 ^)

vapid fulcrum
hidden lavaBOT
vapid fulcrum
#

I can try to elaborate more if needed btw

vague star
#

Hi @vapid fulcrum I'm taking over this thread

vapid fulcrum
#

Okee dokee.

vague star
#

Is your question about what happen if the ACH payment fails for the subscription?

vapid fulcrum
#

Yes, but also, what event would my script that creates the new scheduled subscription have to be listening for?

vapid fulcrum
#

Ohhhhh. I could just use payment_status in the Checkout session object, right?

vague star
#

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.

vapid fulcrum
#

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.

vague star
vapid fulcrum
#

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.

vapid fulcrum
vapid fulcrum