#fdc8cd4cff2c19e0d1022e78481ddf36

1 messages · Page 1 of 1 (latest)

proven fieldBOT
neon agate
hallow plover
#

Whats the difference between providing the payment method and expand=["latest_invoice.payment_intent"] ?

#

Isnt it basically the same?

#

Since I would get the payment method from the latest checkout session -> payment intent -> payment method?

neon agate
#

payment method is the method used to pay the invoice (e.g. card, bank debit...) it is passed in the request creation (POST request). While expanding an API resource https://stripe.com/docs/api/expanding_objects is used when making GET requests

#

expand=["latest_invoice.payment_intent"] will fetch the related payment _intent of the Subscription's invoice.

hallow plover
#

so if I create a checkout session with payment_intent_data={
"setup_future_usage": "off_session",
}

wait till the user pays... after he pays I am creating a subscription for him with a trial. If I provide expand=["latest_invoice.payment_intent"] will it get his payment method from the checkout session?

#

or do I have to get the payment method from the latest checkout session -> payment intent -> payment method and supply it to the subscription while creation as a default payment method?

neon agate
#

If I provide expand=["latest_invoice.payment_intent"] will it get his payment method from the checkout session?
I think you are mixing the payment method and the payment intent. These are two different object.

#

or do I have to get the payment method from the latest checkout session -> payment intent -> payment method and supply it to the subscription while creation as a default payment method?
Correct.