Corrections
Approve, reject and reopen receipts, attach and detach deposits, record a transfer by hand and clear the review queue, from the dashboard or the API.
Your team always has the last word. Every correction is built from two moves, attach a deposit to a payment and detach it, and the payment's amounts and status are recomputed from its deposits afterwards. Approving a receipt attaches a deposit too. Nothing is adjusted by hand, so a correction can never leave a total wrong.
Each correction is recorded in your account's audit log with who made it and why, and appears in the payment's evidence pack.
The tools
| Action (where in the dashboard) | API | Use it when |
|---|---|---|
| Approve a receipt (Receipts or the payment page) | POST / | The money on the receipt reached you, in full or in part. |
| Reject a receipt (Receipts or the payment page) | POST /v1/receipts/:id/reject | The money did not arrive, or the receipt cannot be trusted. |
| Put a receipt back in review (Back to review on the receipt's page) | dashboard only | A rejected receipt should be reviewed again. |
| Add a receipt (the payment page) | POST / | The customer sent the receipt on a messenger or in person. |
| Attach a deposit (the payment page or the Review and fix inbox) | POST / | A transfer arrived but was not matched (no SMS clue, two candidates, a typo). |
| Link a deposit to a receipt (Review and fix) | dashboard only | An unmatched bank deposit is the transfer a receipt shows. |
| Detach a deposit (the payment page) | POST / | A deposit was attached to the wrong payment, or an approval was a mistake. |
| Approve a payment (the payment page) | POST / | You accept the payment as paid without the full amount, or without a receipt. |
| Accept the shortfall (the payment page) | dashboard only | A partly paid payment should close as paid with what arrived. |
| Reject a payment (the payment page) | dashboard only | A payment in review should not succeed. |
| Top up (the payment page) | POST /v1/payments/:id/topup | Ask for the rest with a fresh unique amount and a new expiry. |
| Extend (the payment page) | dashboard only | Give the customer more time on the same amount. |
| Cancel (the payment page) | POST /v1/payments/:id/cancel | The order is off. |
| Record a deposit by hand (Review and fix → New deposit) | POST /v1/deposits | You see a transfer in your bank app that no receipt or SMS brought in. |
| Ignore / restore a deposit (Review and fix) | POST /v1/deposits/:id/ignore, /restore | A transfer that is not a customer payment (a salary, a refund to you). |
Everything that decides about money (receipts, attach, detach, approve, accept the shortfall, reject, resolving an overpayment) needs the corrections permission: owner, admin and support members. Top up, extend and cancel need the write permission, which developers have too. In the dashboard detach, approve, accept the shortfall, reject and cancel ask for a reason of 3 to 500 characters.
Receipts
- Approve puts exactly one deposit behind the receipt and recomputes the payment. Receipts and review has the amount rules.
- Reject never touches deposits. The payment waits for the customer again when it has no other pending receipt.
- Back to review puts a rejected receipt back to pending and the payment back to Awaiting approval
processing. - An approved receipt is undone by detaching its deposit. The receipt goes back to pending and its deposit of source
receiptbecomes Reversedreversed(it stood for nothing but the approval). Approve it again and a new deposit is made. - A receipt deposit replaced by the bank SMS is stored as
reversedtoo, but the dashboard and the evidence pack label it Replaced by the bank SMS, beside the SMS deposit that took its place. Nothing to do: the money is counted once. - Link to receipt says that an unmatched bank deposit is the transfer a receipt shows, for an SMS the engine could not place for sure (two receipts of the same amount, say). A pending receipt is approved on that deposit; an approved receipt standing on its own receipt deposit has it replaced by the SMS deposit, at the bank's amount. The deposit must be on the payment's card or account. When that adds more than the payment still asks for, the link shows that overpayment and asks you to confirm it first.
Attach and detach
curl https://a.bezanbecard.com/v1/payments/pay_…/attach_deposit \
-H "Authorization: Bearer sk_test_…" \
-H "Idempotency-Key: attach-dep_…" \
-H "Content-Type: application/json" \
-d '{"deposit":"dep_…"}'- Attaching a deposit that is already on a payment is refused with
deposit_already_matched: detach it there first. - Attaching a bank SMS by hand to a payment that holds a receipt deposit of the same transfer replaces that deposit instead of adding money; when two or more receipt deposits there could be that transfer, it replaces the oldest.
- A detached deposit goes back to unmatched and through matching again, but never back to the payment it left. In the dashboard you can keep it unmatched instead. A receipt's own deposit is reversed instead, as above.
- If a payment that had succeeded loses all its deposits, it goes to review with the reason
detached.
Approve a payment
Approving a payment closes it as Succeededsucceeded with what arrived; the difference is recorded as amount_shortfall. The API requires a reason. To approve the money on a receipt, approve the receipt instead.
await bezanbecard.payments.approve('pay_…', { reason: 'Customer paid the rest in cash' });Recording a deposit by hand
When you see a transfer in your bank app that nothing brought in, record it. card and amount are required; add channel (card, pol, paya, satna or internal), payer_last4, the bank's trace number in bank_reference and occurred_at (unix seconds) when you have them. The same card or account and trace number twice is one deposit, so a transfer you record that later also arrives by SMS with the same trace number is not counted twice.
const deposit = await bezanbecard.deposits.create({ card: 'card_…', amount: 12_500_470, bank_reference: '402911' });The new deposit goes through matching like any other. In the dashboard you can attach a photo of your bank's record as well. When the customer's receipt is already in your queue, approving the receipt is simpler: it records the deposit for you.
Clearing the review queue
review.reason | Usually |
|---|---|
no_sms (only claims from before receipts) | Check your bank app. If the money is there, record or attach the deposit; if not, ask the customer for the receipt or reject. |
amount_mismatch | Confirm the suggested deposit with one click, or attach another. |
payer_mismatch | Someone else's card paid. Approve if you recognise the payer, otherwise detach. |
expired_partial | Top up, approve with the shortfall, or cancel. |
partial_disabled | Accept the short transfer, ask for the rest, or cancel and refund. |
auto_disabled | Check the attached deposit against your bank account, then approve the payment or its receipt. |
detached | Attach the right deposit, or cancel. |
Every correction emits the usual events (receipt.approved, payment.succeeded, deposit.matched, deposit.unmatched and so on), so your systems hear about a fix made in the dashboard just as they hear about one made through the API.