#Min.K

1 messages · Page 1 of 1 (latest)

weary sorrelBOT
#

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

onyx ibex
#

hello! you'll use the event id to check for duplicate events

hollow walrus
#

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

onyx ibex
#

taking a look, give me a while

hollow walrus
#

Thank you alex!

onyx ibex
#

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

hollow walrus
#

What if there is a balance on the customer's balance?

onyx ibex
#

then theamount_paid will be less than the total

#

you can try it out yourself by adding funds to the customer balance on the customer's page on your Stripe Dashboard