#Min.K
1 messages · Page 1 of 1 (latest)
Hello Min.K, we'll be with you shortly! Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
• https://discord.com/channels/841573134531821608/1161601269119590481, 7 days ago, 8 messages
hello! you'll use the event id to check for duplicate events
Thank you so much!
Hello.
What is the difference between the total field and amount_paid in the invoice.paid webhook event?
I'm trying to initiate a subscription and payment session through the Checkout Session API.
At this time, I'm trying to extract how much the customer actually paid, and I'm wondering which of the two fields above I should use.
{
"id": "evt_1O29EPH7t32LLKQxBMybAV3C",
"object": "event",
"api_version": "2023-08-16",
"created": 1697533588,
"data": {
"object": {
"id": "in_1O29EMH7t32LLKQxV3pQMRzx",
"object": "invoice",
"amount_due": 1000,
"amount_paid": 1000,
"amount_remaining": 0,
"amount_shipping": 0,
....
"total": 1000,
"total_discount_amounts": [
],
"total_excluding_tax": 1000,
"total_tax_amounts": [
],
"transfer_data": null,
"webhooks_delivered_at": null
}
},
"livemode": false,
"type": "invoice.paid"
}
@onyx ibex
taking a look, give me a while
Thank you alex!
you should use amount_paid - https://stripe.com/docs/api/invoices/object#invoice_object-amount_paid
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
total means Total after discounts and taxes. : https://stripe.com/docs/api/invoices/object#invoice_object-total
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
however, the amount that the customer has to pay (or paid), may not necessarily be the total. It could be less if they have funds in their customer balance for example
What if there is a balance on the customer's balance?