#culture7410

1 messages · Page 1 of 1 (latest)

agile whaleBOT
sharp bough
#

If you remove payment_method_types from the Subscription creation request, it'll use automatic payment methods

quartz blade
#

The thing is that I don't use payment_method_types when creating my subscription, but when I analyze the Subscription object that is created automatic is null and payment_method_types is not null and contains card

sharp bough
#

Can you share an example subscription ID (sub_xxx), so that I can take a look how your integration works?

quartz blade
#

Hm I'm not sure what you need, you want the full object json?

sharp bough
#

I just need the Subscription ID (sub_xxx), not the full object

quartz blade
#

Alright

#

sub_1OcOIEGSweb1VpkG8aSzKG8q

sharp bough
#

What are the payment methods you expect to see?

quartz blade
#

These ones:

#

and these ones as well:

#

The documentation says that automatic_payment_methods is on by default, but for some reasons that's not the case for me

#

The thing is my payment element uses automatic_payment_methods, so when I get the payment intent ClientSecret there is a conflict because the payment intent uses payment_method_types instead

sharp bough
#

Not all payment methods support subscription or the currency

#

Which specific payment method do you expect to see in your subscription, so that I can check the limitations for you?

quartz blade
#

I'd like Paypal, WeChat and Alipay at least, the other are secondary

sharp bough
#

PayPal is returned in the subscription. WeChat Pay and Alipay doesn't support subscription

quartz blade
#

Ok I get it
But for example when I try using a card (which is supported for subscription), the payment fails because of the conflict between my payment element and the payment intent

#

Here is the error message I get when doing elements.confirmPayment on the client:
The provided setup_future_usage (off_session) does not match the expected setup_future_usage (null). Try confirming with a Payment Intent that is configured to use the same parameters as Stripe Elements.

sharp bough
#

What is the error you're facing? Can you share the request ID (req_xxx) with the error? Here’s how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request

quartz blade
#

req_jBJwZ6zvxBWWFT

#

Oops sorry, not this one

sharp bough
#

In any case, your above request was confirmed in the deferred intent flow. Can you share your client code on how you create the Elements and Payment Elements?

quartz blade
quartz blade
sharp bough
#

Only client secret is needed

quartz blade
#

I create the client secret only after, when the client click on "Pay"

#

Pay button calls the server (which create the subscription and send back the client secret), then the pay function proceed with confirmPayment

#

I've been working with the Card elements for the past months, it was working well like this. But now I'm trying to migrate to payment element

fresh obsidian
#

hi! I'm taking over this thread.

quartz blade
#

Hey!

#

So your colleague answered my question for subscription (not all payment methods are supported for recurring fees), but I still got the same problem for a one time payment:

  • my payment element use automatic_payment_methods by default (that's what I want)
  • my invoice is created with payment_method_types by default, which creates a conflict with the payment element. And I can't find how to change this default behavior in my code

Invoice created on the server: in_1OcOznGSweb1VpkGI95OyFyz

Conflict with the payment element:
req_Xsru4dLXEinUWk

lunar sandal
quartz blade
lunar sandal
#

ok I see now it's about a one-time Invoice

quartz blade
#

Yes

lunar sandal
#

as far as I know this just doesn't work, because of the exact issue you're facing, we haven't made it work yet.

Billing/Subscription/Invoices don't actually use that whole automatic payment methods system, they use their own parallel settings controlled in https://dashboard.stripe.com/settings/billing/invoice and the problem you're facing is due to that incompatibility

quartz blade
#

Alright, it was driving me crazy ahah
So a workaround would be to specify payment_method_types in my payment element with the full list of the types I want?

quartz blade
#

Ok I'll try it that way