#_sidharth
1 messages · Page 1 of 1 (latest)
Could you please share the PaymentIntent id ?
Its not reaching till generation of PaymentIntent
How the Apple pay is displayed without PaymentIntent
What Stripe Product are you using ?
Stripe ExpressCheckout
Can you share your webiste so that we can test ?
1.Pls go to - staging.paperhack.com
2.Log in with the following creds - email-paperhackstripe@mailinator.com password-Password@123
3. From My Papers pls select an existing paper.
4. Then click on Need more words and try purchasing it
NB: We are using Stripe in test mode
Thanks!
This doesn't seems like Stripe Express Checkout
You shoul dbe seeing something like this
and not
we have disabled Pay with Link and PayPal
are u able to see any logs in the browser on clicking the Apple Pay button?
Okay
Is it possible to cancel my pro subscription so I try signing up again?
Did you try using Apple pay?
Or test cards?
And I can provide you with another set of creds, where you can try it out
Give me a sec
I used card this time. I want to check with apple pay now. Thanks
Understood.
Please try logging in again with this cred:
email: sean3@mailinator.com
password: @fricanM00se
You can click on a paper, and select the "need more words" option, where youll be prompted to use Apple Pay
Ok, it's stuck at processing too.
It might be that you're missing the confirm step: https://stripe.com/docs/elements/express-checkout-element/accept-a-payment#submit-the-payment
Before confirming the payment, we are trying to create a paymentInent. Even this is not being created.
This is the code snippet that we are trying out
We are using React.js
I see this error in the console:
Im also wondering if there are any additional configurations to be done to enable Apple Pay. So far, we have added the apple-developer-merchant-id-domain-association file as specified in the stripe doc.
Are you following this guide? https://stripe.com/docs/elements/express-checkout-element/accept-a-payment
Why do you use createPaymentMethod?
ohh. That is really helpful. Let us try with that. Do you see any other errors.
That would be to get the payment method id, which is what we use to create a paymentIntent
Apple Pay is fine, otherwise it wouldn't show up. But I would recommend to follow the guide closely to fix your integration.
Yes
That's not the recommended way, and not what the guide suggests to do.
The guide suggests an optional section where we create a PaymentMethod. We use this approach for Cards. In the section "Create a PaymentIntent" in the guide, the payment intent creation, has no reference on the Payment method used, which was confusing. That's why we went ahead to create the payment intent with the payment method id as parameter as well
Do you have any specific need to create a Payment Method prior to creating a PaymentIntent?
post("/create-intent", (request, response) -> {
PaymentIntentCreateParams params =
PaymentIntentCreateParams
.builder()
.setAmount(1099L)
.setCurrency("usd")
// In the latest version of the API, specifying the automatic_payment_methods parameter is optional because Stripe enables its functionality by default.
.setAutomaticPaymentMethods(
PaymentIntentCreateParams.AutomaticPaymentMethods.builder().setEnabled(true).build()
)
.build();
PaymentIntent paymentIntent = PaymentIntent.create(params);
This is the code snippet in the guide that we referred. Here in the payment intent create params, there is no mention of a payment method
We are using ChargeBee to handle our subscriptions, and we send a subscription request to chargeBee with the Payment Intent we create using Stripe. The capture is done after this.
If you follow the guide you will see that you don't need to create and send the Payment Method to the backend.
Since we are not specifying a payment method, we were confused as to how Stripe will identify that the payment is done via apple pay.
If you need to be notified when the payment was processed successfully, it's best to listen to webhook events: https://stripe.com/docs/webhooks
You will use the created client_secret to confirm the payment on the frontend: https://stripe.com/docs/elements/express-checkout-element/accept-a-payment#submit-the-payment
There you provide the elements instance that will determine that Apple Pay was used, you don't need to worry about it.
Got it. But since we have the requirement to confirm the payment via Stripe, through a middleware called ChargeBee, we are required to pass the created PaymentIntent to Chargebee APIs.
We could be wrong about this implementation. We will try out the method provided in the guide, and see if there is any way to integrate ChargeBee.
Thank you for your guidance, its much appreciated.
Also, just confirming, the error you mentioned was the only error you could find in the browser right? Was there any logs before or after that?
You can listen to payment_intent.succeeded event and get the PI ID from there to send to ChargeBee. However, I don't know how ChargeBee works so I can't advice further. I would also suggest looking at Stripe Billing to handle subscriptions: https://stripe.com/docs/recurring-payments
Nothing else.
The payment intent status is in succeeded state, after the capture is performed right?
Yes
In our current workflow, we are creating the payment intent in the uncaptured state, and the middleware(chargeBee) is sending a request to Stripe, which completes the transaction. We were able to successfuly implement that for cards.
I don't know how ChargeBee works so it's hard for me to advice.
Maybe you could reach out to them to see how they expect this to be implemented.
Yes, we will try that too. Will we be able to reopen this chat if there is any more queries regarding this issue?
I will have to close this soon, but you can write in #dev-help and my colleagues will help you.
Thanks,that works
Happy to help.