#dam-invoice-paymentmethod

1 messages ยท Page 1 of 1 (latest)

lunar shadowBOT
celest heath
#

a checkpout session in type "setup"

slow ice
celest heath
#

yes, thank you, but in checkout.session.complete response i dont' have one,

#

this one is a checkout session in type "setup"

slow ice
#

Apologies, that is expected. The Payment Method is not stored directly on the Checkout Session, but is rather stored on the associated intent. Since your Checkout Session was created with mode set to setup, then the information that you're looking for will be on the associated Setup Intent.

You can find the related Setup Intent in the setup_intent field on the Checkout Session:
https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-setup_intent

You can then retrieve that Setup Intent by its ID:
https://stripe.com/docs/api/setup_intents/retrieve

And then find the ID of the related Payment Method in the payment_method field:
https://stripe.com/docs/api/setup_intents/object#setup_intent_object-payment_method

celest heath
#

a ok, now i understand, i'll try right now, thank you ๐Ÿ™‚

river linden
#

dam-invoice-paymentmethod

celest heath
#

ok, the invoice will attempt the payment by 1 hour...in the meantime i was thinking...is it possible to know the id of the subscription that will be created, i mean, when i created a scheduleSubscriton I have a
"id": "sub_sched_1Lmg7lGoNCcKF08Jor2JPq74",
so the id of this will be this id without sched_:
sub_1Lmg7lGoNCcKF08Jor2JPq74? @slow ice thank you again

river linden
#

no

celest heath
#

a ok, Perfect! thank you

#

but if the subscritprion does not exist yet this filed is empty? Because i'm having this issue, thank you

river linden
#

if the Subscription hasn't been created yet it's empty, and there's no way to know the id the subscription will have until after it's created.