# Underpaid

### Criteria

`paid_amount` is less 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 broadcasted their transaction on the network but <code>paid_amount</code> is less 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>underpaid</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>The transaction amount was exchanged at the new exchange rate. The final invoice amount may differ from the original one</td></tr><tr><td><code>status_changed</code></td><td><code>refunded</code></td><td><code>null</code></td><td>The whole transaction amount was refunded</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 → invoice expired → `unresolved:underpaid`                                  |
| Automatically refund to my crypto account                   | `new` → txn sent → txn confirmed → invoice expired → `unresolved:underpaid` → tx refunded → `refunded`       |
| Automatically recalculate at a new exchange rate and settle | `new` → txn → txn confirmation → invoice expiration → `unresolved:underpaid` → tx recalculated → `completed` |
