# Overpaid

### Criteria

`paid_amount` is greater than `pay_amount`

### Callbacks to be sent in this scenario

<table><thead><tr><th width="204">Callback event</th><th>Invoice status</th><th>Invoice status context</th><th>Description</th></tr></thead><tbody><tr><td><code>transaction_created</code></td><td><code>new</code></td><td><code>null</code></td><td>A customer has just broadcas their transaction on the network but <code>paid_amount</code> is greater than <code>pay_amount</code></td></tr><tr><td><code>transaction_confirmed</code></td><td><code>new</code></td><td><code>null</code></td><td>The transaction has been confirmed on the network</td></tr><tr><td><code>status_changed</code></td><td><code>unresolved</code></td><td><code>overpaid</code></td><td>The invoice needs to be resolved</td></tr><tr><td><code>status_changed</code></td><td><code>completed</code></td><td><code>null</code></td><td><p>The transaction amount was exchanged at the new exchange rate. The final invoice amount may be different from the original one.</p><p></p><p>OR</p><p></p><p>The original invoice amount is added to the merchant's account balance and the overage is refunded</p></td></tr></tbody></table>

### API auto settings and status flow

| API Auto Settings                                                            | Payment Flow                                                                              |
| ---------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- |
| Do nothing, I will handle them myself                                        | `new` → txn sent → txn confirmed → `unresolved:overpaid`                                  |
| Settle the invoice and automatically refund the overage to my crypto account | `new` → txn sent → txn confirmed → `unresolved:overpaid` → overage refunded → `completed` |
| Automatically recalculate at a new exchange rate and settle                  | `new` → txn sent → txn confirmed → `unresolved:overpaid` → tx recalculated → `completed`  |
