Payout final-state rule
Mandatory. Breaking this rule can pay a beneficiary twice, or mark a paid-out order as failed.
Mark a payout successful or failed only when both of these are true:
- The HTTP status is
200, and - The body has
code = 0and a final status:orderStatus = 4(success) or5(failed).
Anything else is processing / unknown, and the order must not move to a final state. That includes a non-200 status, a timeout, a network error, an error code, and statuses 1–3.
What to do when the outcome is unknown
- Confirm with Query payout. Combine three sources: active queries, the callback, and scheduled reconciliation.
- If you retry
create, use the samemchOrderNo. You get10011411(already exists), which means the original payout is in progress. Query it. - Never create a new
mchOrderNofor the same payout intent while the first one's outcome is unknown.
How LintasPay handles an unknown create
If LintasPay can't get a definitive answer from the payment channel while creating your payout, it still returns code = 0 with orderStatus = 1. Your payout is accepted, with the outcome pending. LintasPay keeps checking with the channel. You'll receive a callback with 4 or 5 once it's final.
Statuses
orderStatus | Meaning | Final? |
|---|---|---|
| 1 | Created | No |
| 2 | Routing | No |
| 3 | Processing | No |
| 4 | Success | Yes |
| 5 | Failed | Yes |