#lucid_api

1 messages ¡ Page 1 of 1 (latest)

soft fossilBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1259880373114896404

📝 Have more to share? Add details, code, screenshots, videos, etc. below.

half maple
#

is anyone around?

cursive gulchBOT
royal oak
#

Hello
When you say you subscribe a customer after payment is successful, are you calling /v1/subscriptions API?

#

That might explain why you're seeing two charges

half maple
#

yes

royal oak
#

Subscriptions API charges the payment method on its own. You don't need a separate PaymentIntent to charge the payment method prior to creating the subscription

half maple
#

ok. here is a question. i set the products up in the 'products catalog' dash, they are set to be recurring. Does a single purchase of that product automatically set up a subscription?

royal oak
#

What do you mean by single purchase in this context? What API would you use for that?

half maple
#

honestly, i was hoping you could help me figure that out

#

i can't seem to add a product to the intent, nor to the customer, so what is the process? don't do the intent and just set up the customer?

#

and then assign the subscription?

royal oak
#

So what's the exact usecase? PaymentIntents API do not support line items (products created from dashboard). PaymentIntents API supports just passing an amount.

Is your goal to create the subscription after payment has been made?

#

And do you want to use your own UI for payment or any Stripe hosted UI works?

half maple
#

this is the problem. when i used my own UI i got the error telling me that sending card info was insecure, and it suggested using a stripe-based form - i switched to elements, but that sucks too because getting it to collect email and phone was a PITA.

royal oak
#

I see. We don't allow using your own forms to accept card details for security concerns. You'd also need PCI compliance to do that.

So, I meant integrating something like PaymentElement in your web page which can securely collect the PaymentMethod details for you (which I think is what you're using right now)
https://docs.stripe.com/payments/payment-element

You could techinically add your own text fields to the page to collect the email and phone number & send it over when you call confirmPayment function..

An easier alternative would be to use Checkout Sessions API and let stripe handle mostly everything for you.
https://docs.stripe.com/billing/subscriptions/build-subscriptions

half maple
#

ok, but confirmPayment is confirming the card was charged, correct? that charge has no product and no customer attached to it

royal oak