#rstupek-paymentintent-confirmation

1 messages · Page 1 of 1 (latest)

amber escarpBOT
unborn sorrel
#

I have the request id req_7t0BKx0A1mN46L of the request that was made

low plover
#

Did you set up a return_url?

#

It's required since that confirmation could go to next_action and then require the customer to take action

unborn sorrel
#

this is off session, customer isn't involved at this point

low plover
#

sure but they could be if a next action is needed

#

so really you need to account for it and pass the return url

#

or explicitly pass the payment method type in payment_method_types instead of autoPMs

unborn sorrel
#

I did pass a payment method directly in the request as per the example
curl https://api.stripe.com/v1/payment_intents
-u sk_test_51LXsCUK2YlBHWJlEStuB0bkKzZT8FQzNUa5Kp7AWelS8DnR52xj1ugrU2Mu6AW3Wyyo6Pa6r3crOC5jcjmQYWDN500TQN0GaIp:
-d amount=1099
-d currency=usd
-d "automatic_payment_methods[enabled]"=true
-d customer="{{CUSTOMER_ID}}"
-d payment_method="{{PAYMENT_METHOD_ID}}"
-d off_session=true
-d confirm=true

low plover
#

You are explicitly enabling autoPMs in your code this requires return_url

#

if you don't want to pass it, then you can't use autoPMs. You have to explicitly pass payment_method_types: ['xxxxx'] where xxxxx is the type of the pm_123 you are forcing

unborn sorrel
#

ok so the example said to include that setting... can I just omit automatic_payment_methods[enabled] entirely?

low plover
#

yes but you likely still need to pass payment_method_types like I explained above

unborn sorrel
#

ok so the example is incorrect?

low plover
#

yeah I'll get it fixed

unborn sorrel
#

thanks, I'll give payment_method_types a try

low plover
#

rstupek-paymentintent-confirmation

unborn sorrel
#

one last question, how do you represent the array type in the curl request

low plover
#

payment_method_types[]=xxxx

unborn sorrel
#

thanks... just fyi it appears that payment_method_types being left out of the request works?

low plover
#

yeah that works too