#arvindkgs

1 messages ยท Page 1 of 1 (latest)

shadow zodiacBOT
midnight seal
#

๐Ÿ‘‹ Looking into this now

stray notch
#

Invoking GET /invoices. api for above invoice shows

"amount_due": 250000,
  "amount_paid": 248000,
  "amount_remaining": 2000,

amount_paid should have been 250000

midnight seal
#

This bank fee is not charged by Stripe, but a note that added by your coworker

#

You won't be able to find such bank fee in balance transactions

stray notch
#

Understood thanks for the information. Now I display the billing info on my website and I listen to invoice.updated that says amount_remaining = $20 . But actually I want to say amount_remaining = $0. How do I reconcile amount remaining by considering this bank fee. Which api/event gives this info?

#

The last invoice.updated received - evt_1MK8gQBD6kZ350ZVs7lZywOy had

  "amount_paid": 248000,
  "amount_remaining": 2000,```
So I have no way to ascertain if bank fee was credited.
midnight seal
#

Since remaining amount is considered as bank fee on your side, Stripe won't be able to know that this is a bank fee. $20 credited due to bank fee is simply a note added on the invoice and Stripe doesn't have an API to retrieve invoice notes.

One way I can think of is to check the status of the invoice. If the invoice is paid and the amount_remaining is non-zero, it's likely a bank fee defined on your side unless you have other forgiven use cases

stray notch
#

So are you telling me there are no scenarios where amount_remaining is non-zero, due to customer consciously paying lesser amount

midnight seal
#

If the customer pay lesser amount, then the status won't be paid and will still be left as open unless the invoice is fully paid

#

Only when the request is set to forgive, then the invoice will then be considered as paid

stray notch
#

when can a invoice payment be flagged forgiven , after payment is made?

midnight seal
stray notch
#

And I assume /pay is invoked when client is paying, not something my me or my coworker can control

midnight seal
#

In the same page, Origin section also indicated that the request was made via Dashboard (not API)

stray notch
#

Okay, so flow is -

  1. Invoice sent to customer
  2. Customer attempts payment from link in invoice
  3. Payment intent reported in Stripe dashboard
  4. I can go and set forgive for specific payment intent.
  5. Invoice set as paid

Correct?

#

@midnight seal

midnight seal
#

Just a minor correction at Step 4. The forgiven fund is on Invoice, not Payment Intent

stray notch
#

okay thank you

#

I wish forgiven flag was also captured on invoice

midnight seal
#

No problem! Happy to help ๐Ÿ˜„ Unfortunately forgiven flag is not reflected in Invoice object