#Red-Subscription
1 messages · Page 1 of 1 (latest)
Hi there, you should listen to invoice.paid webhook events to get notified when the invoice is paid successfully.
Do you know what I should do when the payment is pending customer action? I thought I would need to return the SDK JS file that comes in the response for the payment intent but it’s a bit long winded and slow.
I’m using a custom checkout flow created using php. I’ve previously taken one off payments by just creating a payment intent and the response gives you a URL to embed into an iFrame where people can confirm their payments.
You should also listen to invoice.payment_action_required (https://stripe.com/docs/api/events/types#event_types-invoice.payment_action_required) and get notified when an invoice's payment intent is in requires_action status. From there you can notify your customer and bring them back to your application to authenticate the payment
On your application, you can just call stripe.confirmPayment https://stripe.com/docs/js/payment_intents/confirm_payment, and the SDK will attempt to complete any required actions, such as authenticating your user by displaying a 3DS dialog or redirecting them to a bank authorization page.
Ah okay thank you for that I’ll look into that second link then as that’s my ideal scenario is get them to verify during the checkout flow. Thank you.
No problem 🙂
You can also use the card_country Radar rule (https://stripe.com/docs/radar/rules/reference) to block transactions involving non-EU cards.