#sahil04-charges-api

1 messages · Page 1 of 1 (latest)

clear flume
#

It depends really. The Charge object itself isn't deprecated, but depending on the API call itself you might have a legacy integration

round raven
#

Thanks for the help, Ill look into the ref you provided

clear flume
#

Yeah we don't recommend creating payments with the Charges API now – you should using Payment Intents

round raven
#

Understood

clear flume
#

But the actual Charge object is still relevant, Payment Intents create a Charge

round raven
#

So just the endpoint changed, but the flow is the same?

clear flume
round raven
#

Okay, really appreciate the help.
Just one more thing, can you provide me the documentation link where i can study the flow of charges api?

clear flume
round raven
#

So please correct me if im wrong --
The charges api enabled our backend server to deduct some amount from the customer's bank -- this was authorized by exchanging a token which was generated from their bank/credit card details and sent to our server.

the new flow handles deductions on stripe's end and relies on webhook events to update the merchant's backend?

clear flume
#

The same principles apply, but with the caveat of using async webhooks to fulfil orders on successful payment as there's no guarantee a customer will return to your site after a successful 3DS authentication

#
  • They click buy.
  • Bank requests 3DS for the payment.
  • Stripe.js handles this and your customer is directed accordingly to auth the transaction.
  • At this point, the payment will be processed/successful, and user redirected back to your site.
  • However there's no guarantee they ever make it back successfully – they could close the browser or whatever.
#

Your integration shouldn’t attempt to handle order fulfillment on the client side because it is possible for customers to leave the page after payment is complete but before the fulfillment process initiates. Instead, use webhooks to monitor the payment_intent.succeeded event and handle its completion asynchronously instead of attempting to initiate fulfillment on the client side.
https://stripe.com/docs/payments/payment-intents/verifying-status#webhooks

Monitor and verify payment status, so that you can respond to successful and failing payments.

round raven
#

Thanks a ton. This was really helpful