#CallMeLaNN

1 messages · Page 1 of 1 (latest)

dim tigerBOT
cinder horizon
dim tigerBOT
safe cedar
#

ooh, That is the part I have to focus. I've seen the pending_setup_intent before. I believe I have to fetch it since it is not expandable, just an ID form the created subscription payload.

silver badger
#

Correct, would need to be expanded (like latest_invoice)

#

You can pass the expand parameter in your Subscription creation

safe cedar
#

So I think I have to handle both pending_setup_intent.client_secret and latest_invoice.payment_intent.client_secret see which one is available isn't it?

safe cedar
silver badger
#

There'd only ever be one of pending_setup_intent or latest_invoice[payment_intent]

safe cedar
silver badger
#

Basically whenever there's no initial payment (i.e. trial, 100% coupon, etc) then it'll be a pending_setup_intent

#

You'd just need to check for the presence of the pending_setup_intent field in your create response

safe cedar
#

Ok then. So once this one work, will Stripe send invoice for $0?

silver badger
#

Well we don't send any emails in test mode

safe cedar
silver badger
#

I believe we don't send the $0 amount invoices no. You'd need to manually send those (they do exist, we just don't email them)

safe cedar
#

One last thing. Once the trial and coupon ends, customer credit card will be automatically deducted?

silver badger
#

It should be yep, assuming you collected one and confirmed the Setup Intent correctly

safe cedar
#

Thank you for your prompt answer. Much appreciated.