#koks_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1391796162062848162
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
Hello
We don't have a full end to end guide to use Express Checkout Element in a Subscription integration. However, you can follow this guide - https://docs.stripe.com/payments/accept-a-payment-deferred?platform=web&type=subscription
and instead of using Payment Element - you could use Express Checkout Element instead (follow till step 5) - https://docs.stripe.com/elements/express-checkout-element/accept-a-payment
did you refer to the doc I shared above and compare with your code? ๐
The first issue is you're using mode: 'payment'
The second is you're either creating a SetupIntent or PaymentIntent (?)
You need to use mode: 'subscription' and then create a Subscription when trying to confirm with the collected payment method details
ah ok, subscription is for recurring...my bad
i want to auto charge the card (google pay) like pay as you go. Like I want to collect the payment details and later charge the customer.
When you say "auto charge" and "later charge the customer", what do you mean exactly? The only way to charge a payment method automatically is through Subscriptions.
Are you trying to save the payment method and charge it later by making an API call?
Are you trying to save the payment method and charge it later by making an API call? Yes
In that case, you need to use a SetupIntent to save the Payment Method details. The instructions are the same. Combine this guide - https://docs.stripe.com/payments/accept-a-payment-deferred?platform=web&type=setup with https://docs.stripe.com/elements/express-checkout-element/accept-a-payment (till step 5)
What's not working though? Are you seeing any errors or something?
also what did you change in your code after looking at the docs I shared?
For example, for SetupIntents - you need to use mode: 'setup'
The log suggests you're trying to access id param from an object, where the object does not exist is undefined?
Can you double check your code to make sure you're accessing the right param?
Looking at your code:
payment_method: event.paymentMethod.id
}) ```
This does not make sense at all.
Please take some time to read through this doc - https://docs.stripe.com/payments/accept-a-payment-deferred?platform=web&type=setup
Step 6 in the guide above is what you need
After the SetupIntent is confirmed