#sunshinelenorp
1 messages · Page 1 of 1 (latest)
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?
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?
Can you maybe share the req_xxx from Stripe that doesn't contain the data you expect?
Not overly familair with Cashier methods
Balance is:
$this->asStripeCustomer()->balance
// asStripeCustomer request on : '/v1/customers/%s', $id
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 ?
Ok, and where are you incrementing the customer balance?
Yes
I didn't!
Alright, and there is an option or something like that to do this automatically ?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Or I need to do this manually ?
Correct, manually
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.
Receive a webhook when?
Yes, we will always fire a checkout.session.completed event
Alright! So it will redirect the user on success_url, and then, it send a webhook.