#Nianio
1 messages · Page 1 of 1 (latest)
Hello! Let's take a step back, what exactly are you trying to do?
You mention recurring billing? How are you handling that?
Context : psychology app. Patient pays 60€/week
I created 1 product with 3 prices in the Stripe UI
I create a subscription using the API, through the node library :
this.stripe.subscriptions.create({
customer: patient.stripeCustomerId,
items: [
{
price: "price_xxx_yyy"
}
]
})
Then I get an error message because the associated customer does not have a default form of payment
Sure, ok so you need a UI to collect payment details from your users as a part of that flow. If you're using the Subscriptions API directly like that you'd generally use Elements to collect payment info: https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements#collect-payment
Alternatively you can use the Checkout to handle the Subscription creation and payment details collection: https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=embedded-form