#davila7 - Subscriptions Error
1 messages · Page 1 of 1 (latest)
Hello! Can you give me the request ID showing that error? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
req_VjcmI8ryZb32j1
Thanks! Taking a look...
You've specified payment_settings.payment_method_options as an array containing a single string (card), but that argument takes a hash/associative array: https://stripe.com/docs/api/subscriptions/create#create_subscription-payment_settings-payment_method_options-card
What are you trying to do by specifying that?
I'm creating Products and Prices in another sections, and in this part I'm try to charge a subscription to the user with that price id
Okay, but why are you specifying payment_settings?
when I don't send the payment_settings I get this "This customer has no attached payment source or default payment method. Please consider adding a default payment method. For more information, visit https://stripe.com/docs/billing/subscriptions/payment-methods-setting#payment-method-priority.
You can't start a paid Subscription for a Customer who has no way to pay for that Subscription. Can you explain more about what you're trying to build? What does your desired payment flow look like?
ok
First I created a Product with a Price, then I need to send the user to the checkout page to subscribe to that price
When you say "the checkout page" do you mean your own custom checkout page or Stripe Checkout?
Stripe Checkout
If you're using Stripe Checkout you do not need to create a Subscription yourself, Stripe Checkout will do that for you. I recommend you follow this guide: https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=checkout
greate, so I don't have to create a customer either
Correct. Checkout will also create those for you (or you can specify an existing one when you create the Checkout Session).
I'm getting this error now "You can not pass payment_intent_data in subscription mode."
I'm trying to charge the application_fee_amount to the connect account
For Subscriptions you want subscription_data.application_fee_percent: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-subscription_data-application_fee_percent