#sunshinelenorp

1 messages · Page 1 of 1 (latest)

unkempt rootBOT
timber drum
#

Is it preferable to store the current balance of my customer in my database, or just get the balance from the API? Is there API calls limit?
I guess that depends on your integration and how often you plan or updating the balance and accessing it. Standard rate limits apply: https://stripe.com/docs/rate-limits

I have made a payment for a customer (in test mode), but when I get the balance it's 0.00€.. my customer just made a payment of 100.00€ (as you can see on the screenshot below - pm_1MqY6FIpRZHr64t0zWS6lDQC
What is 'the balance' in this instance?

Learn about API rate limits and how to work with them.

true moat
#

For the 1. I'm getting this balance from each requests on my website (because this information is located on the header of my website...)

For the 2. I'm using Laravel Cashier integration, then I have a methods ->balance(), do you know it or you want I investigate the code to tell you exactly what they return?

timber drum
#

Can you maybe share the req_xxx from Stripe that doesn't contain the data you expect?

#

Not overly familair with Cashier methods

true moat
#

But I think that payment =/= balance.
I think that I made a payment, and now when it's success, I need to increment the balance manually of my customer, no ?

timber drum
#

Ok, and where are you incrementing the customer balance?

true moat
#

Alright, and there is an option or something like that to do this automatically ?

timber drum
true moat
#

Or I need to do this manually ?

timber drum
#

Correct, manually

true moat
#

Alright, I do that now!
Thanks a lot for you reactivity ❤️

#

Oh. Scuz me. Last question.

#

I'm specifying a success_url and cancel_url to made the checkout charge. Do you know if I will receive a webhook anyway?

#

Or it will just return the user on success_url, without webhook?

#

@timber drum in case you leave.

timber drum
#

Receive a webhook when?

true moat
#

When the payment is done.

#

(to perform the balance incrementation)

timber drum
#

Yes, we will always fire a checkout.session.completed event

true moat
#

Alright! So it will redirect the user on success_url, and then, it send a webhook.

timber drum
#

Yep!

#

We recommend doing any fulfilment/logic in the webhook, not on success_url