#asifarub_api

1 messages ยท Page 1 of 1 (latest)

spare ermineBOT
#

๐Ÿ‘‹ 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/1349755911161380951

๐Ÿ“ 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.

shadow jetty
#

Hello there

#

How are you collecting the PaymentMethod here?

#

Have you confirmed that you are using the correct client secret here?

warped prism
#

hello

#

sorry what do you mean by client secret?

#

i received it after subscription, but i am not using it after

#

since i set confirm=True in setupIntent api

shadow jetty
#

Gotcha, you don't want to use the SetupIntents API at all here.

#

How are you collecting the PaymentMethod?

#

Are you using Payment Element?

warped prism
#

using expressCheckout

#

we are only accepting google pay and apple pay

shadow jetty
#

That will confirm the initial Invoice's PaymentIntent on the Subscription and move the Subscription to active.

warped prism
#

client secret will be the secret from subscription api

shadow jetty
#

Yes, you access it from latest_invoice.payment_intent.client_secret in the Subscription creation request's response

warped prism
#

IntegrationError: Element confirming payment is "expressCheckout", but stripe.confirmPayment() was not called within the "confirm" event. Please call stripe.confirmPayment() in the "confirm" event (

#

stripe.SetupIntent.create(confirm=True, customer=customer.third_party_id,
confirmation_token=data['card']['confirmation_token'])

this is my setupIntent before creating subscription

shadow jetty
#

You don't want to create a SetupIntent at all here

#

That's what I was saying above.

warped prism
#

ok sorry

shadow jetty
#

The Subscription creation creates a PaymentIntent for you

warped prism
#

let me remove that code then

shadow jetty
#

And you use that PaymentIntent to both collect the payment method and pay the initial Invoice

warped prism
#

previous support person said i dont need confirmPayment

#

one sec

shadow jetty
#

Correct

#

You use confirmPayment() on the frontend

warped prism
#

getting the same error

shadow jetty
#

Can you show me your relevant code?

warped prism
#

sure

shadow jetty
#

Ah okay no need to create a confirmationToken here.

warped prism
#

this is a recurring subscription

shadow jetty
#

Sure

#

That doesn't change anything here.

warped prism
#

this is the client secret created from subscription
ClientSecret: pi_3R2DOn4auD8P2Izr0C74hiYj_secret_yPX29Ld1aVFz859mOdX8gOTxp

error
ClientSecret pi_3R2DOn4auD8P2Izr0C74hiYj_secret_yPX29Ld1aVFz859mOdX8gOTxp

#

IntegrationError: You must pass in a clientSecret when calling stripe.confirmPayment().

#

subscription backend api, this is how i am retrieving the secret

client_secret = primary_subscription['latest_invoice']['payment_intent']['client_secret']

shadow jetty
#

Have you logged out the client secret on your frontend?

warped prism
#

yes, i printed client secrent on my frontend console

#

console.log("ClientSecret",clientSecretPurchase);

shadow jetty
#

and are you passing it as an object or directly as a string?

warped prism
#

as a string

#

quiestion, previously when i had intent everything went through fine. But my payment was incomplete because it is my actual credit card in google wallet. Do i have to add test card?

shadow jetty
#

Yeah it should be clientSecret: clientSecretPurchase in that case.

warped prism
#

let me try that

#

it is working now

#

thank you

shadow jetty
#

๐ŸŽ‰

warped prism
#

you can close this chat