#sahil04-charges-api
1 messages · Page 1 of 1 (latest)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
It depends really. The Charge object itself isn't deprecated, but depending on the API call itself you might have a legacy integration
I see, i only wondered about it being deprecated because I can't find anything on charges on https://stripe.com/docs/payments/accept-a-payment
Thanks for the help, Ill look into the ref you provided
Yeah we don't recommend creating payments with the Charges API now – you should using Payment Intents
Understood
But the actual Charge object is still relevant, Payment Intents create a Charge
So just the endpoint changed, but the flow is the same?
Not really, no. The Payment Intent is a new object designed to facilitate SCA compliant (3DS) payments, to track the various states a payment might enter: https://stripe.com/docs/payments/payment-intents
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?
There's a comparison of the 2 here: https://stripe.com/docs/payments/charges-api
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?
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
Thanks a ton. This was really helpful