Stripe SDK in Flutter | Stripe in Flutter | Using Stripe in Flutter | Payments@aseemwangoo​#flutter

preview_player
Показать описание
This video shows the use of Stripe SDK with flutter for payment, adding a card, listing all payments and refunding.

* Stripe SDK in Flutter | Stripe in Flutter *
For starting communication with Stripe, you need to have a token…(which Stripe recommends generating from the Client-side using its libraries)…

In our case, the flutter package handles it internally (when we add a card)…
Here, you receive the token, which you need to pass/store for successive transactions with Stripe…
Stripe Call 1 :
When you create a new card, you must specify a customer or recipient on which to create it.
where token: from above image, customer: your authenticated customer (we are using Firebase Auth by Google)
Stripe Call 2 :

To charge a credit card or other payment source, you create a Charge object.
charge = { amount, currency, customer, description };
If your API key is in test mode, the supplied payment source (e.g., card) won’t actually be charged
The API supports idempotency for safely retrying requests without accidentally performing the same operation twice. For example, if a request to create a charge fails due to a network connection error, you can retry the request with the same idempotency key to guarantee that only a single charge is created.
For more info on the idempotency refer link.

Stripe Call 3 :

Returns a list of charges you’ve previously created. The charges are returned in sorted order, with the most recent charges appearing first.
where cust_id is the same as the one in Stripe call 1…..

In case, this helped, pass me a coffee!! 😊😊

#Stripe #FlatteredWithFlutter #Flutter
Рекомендации по теме
Комментарии
Автор

Very interesting and instructive with the example. Please continue with more.

gilmcglory
Автор

Hi Aseem, I checked code..how you are calling cloud function..I am able to save only token on backend not source.

shaneee
Автор

Can you update code as this code didn't work on new version of stripe

nimitpatel
Автор

With new version of stripe this code is not working

nil
welcome to shbcf.ru