Payment Flow — Edge Cases
Not every payment follows the happy path. This page covers non-standard outcomes — underpayment, overpayment, expiration, and failed on-chain transactions — including what Fluxis does internally, which webhooks you receive, and how to handle each scenario in your integration.
Overview
Code
| Scenario | Final status | Internal transaction | Webhook sent |
|---|---|---|---|
| Exact payment | completed → confirmed | Yes | processing, completed |
| Underpayment | underpaid | No | processing, underpaid |
| Overpayment | overpaid → confirmed | Yes (full received amount) | processing, overpaid |
| No payment in time | expired | No | No |
| On-chain tx reverts / fails | processing (stuck) | No | processing only |
Webhook delivery matrix
Fluxis sends account-level webhooks for these payment request status changes only:
| Status | Webhook delivered | Typical trigger |
|---|---|---|
processing | Yes | Cron detected on-chain transfer (hop 1) |
completed | Yes | Confirmed after finality; amount matches (hop 2) |
underpaid | Yes | Confirmed after finality; amount too low (hop 2) |
overpaid | Yes | Confirmed after finality; amount too high (hop 2) |
confirmed | No | Internal ledger transaction created (hop 3) |
expired | No | Expiration cron marks request as expired |
failed | No | Not currently set by the worker |
pending / created | No | Initial creation — poll or use your own UI state |
Poll for statuses without webhooks
Use GET /v1/pos/{posID}/payment-request/{paymentRequestID} to detect expired and confirmed states. Register webhooks at POST /v1/account/{accountID}/webhook or in the dashboard under Developers → Webhooks — see Webhooks.
Underpaid
An underpaid payment occurs when the customer sends less than the expected amount and the on-chain transaction is confirmed after finality.
What Fluxis does
Code
- Hop 2 compares
ReceivedAmount(from cron detection) againstExpectedAmount - Status is set to
underpaid - A webhook is sent with status
underpaid - The vault is released and removed from Redis cache
- Hop 3 is skipped — no internal
Transactionrecord is created, status does not reachconfirmed
No ledger transaction for underpaid
Because hop 3 only runs for completed and overpaid statuses, underpaid payments remain outside the standard settlement pipeline. Refunds are not available through the API: coordinate resolution with [email protected], including when you need to return funds to the customer.
Merchant handling
| Action | Recommendation |
|---|---|
| Do not fulfill the order automatically | Treat underpaid as a partial payment requiring manual review |
| Contact the customer | Request the remaining balance or agree on a partial fulfillment |
| Create a new payment request | For the outstanding difference, if the customer agrees to pay more |
| Return the funds | Refunds are not available through the API. Contact [email protected] with the payment request ID |
Overpaid
An overpaid payment occurs when the customer sends more than the expected amount.
What Fluxis does
Code
- Hop 2 sets status to
overpaidand records the full received amount - A webhook is sent with status
overpaid - Hop 3 creates an internal Transaction for the full received amount
- Status transitions to
confirmed(no additional webhook)
Merchant handling
| Action | Recommendation |
|---|---|
| Fulfill the order for the requested amount | The customer paid at least the expected price |
| Return the excess | Refunds are not available through the API. Contact [email protected] with the payment request ID |
Expired
A payment request expires when no on-chain payment is detected before the expiration timestamp.
Timing
| Setting | Value | Scope |
|---|---|---|
| Payment request expiration | 8 minutes | From vault assignment (created status) |
| Payment intention expiration | 5 minutes | Cashier PoS flow only, before PR creation |
| Expiration check interval | Every 30 seconds | Background cron job |
What Fluxis does
Code
- The expiration cron finds payment requests with
status = createdandexpiration < now - Updates status to
expired - No webhook is sent for expiration
- The vault is not immediately released — it is recycled when the vault pool reassigns it (expired vault overwrite logic)
Payments after expiration
Once a payment request is expired, Fluxis does not credit it. A transfer detected after that leaves the request expired, no webhook is sent, and the funds stay at the deposit address until support resolves them manually. The expiration check runs every 30 seconds, so a transfer detected within those seconds may still reach processing; do not rely on it. If a customer says they paid after the countdown ended, contact [email protected] with the payment request ID and the transaction hash.
Merchant handling
| Action | Recommendation |
|---|---|
| Show expiration in UI | Display a countdown based on the expiration field from the create response |
| Create a new payment request | Standard recovery — each request is single-use |
| Contact support for post-expiration payments | If a customer claims they paid after the countdown ended, contact [email protected] with the payment request ID and the transaction hash |
See Payment Requests — Timing for details.
Failed transaction stuck in processing
When an on-chain transaction fails or reverts after being detected, the worker logs the failure but does not update the payment request status.
What Fluxis does
In hop 2 (transaction_check_update_payment_request), when GetTransaction returns a failed status:
- The worker logs
"Blockchain Transaction Failed" - Returns without updating the payment request
- The payment request remains in
processingindefinitely - No additional webhook is sent beyond the initial
processingnotification
Code
Known behavior
This is current platform behavior. If a payment request is stuck in processing and the on-chain transaction has failed, contact [email protected] for manual resolution. Poll GET /v1/pos/{posID}/payment-request/{paymentRequestID} and verify the transaction hash on a block explorer.
Merchant handling
| Action | Recommendation |
|---|---|
| Verify on-chain | Look up the transaction hash (if available) on a block explorer |
| Do not fulfill | A stuck processing status does not guarantee payment |
| Contact support | Provide the payment request ID and transaction hash |
| Create a new payment request | If the original transaction definitively failed |
Integration checklist for edge cases
Use this checklist when building production integrations:
Code
- Handle all four webhook statuses —
processing,completed,underpaid,overpaid - Never fulfill on
processing— wait for a terminal amount outcome - Poll for
expiredandconfirmed— these do not trigger webhooks - Display the 8-minute countdown — reduce expired-payment support tickets
- Verify webhook signatures — see Webhook Signature Verification
- Contact support to return funds on overpaid/underpaid payments — refunds are not available through the API
- Monitor stuck
processing— check block explorer if status does not progress
Related documentation
- Payment Flow — Happy Path — Standard create → detect → confirm flow
- Payment Requests — State definitions and API examples
- Creating Payment Requests — Integration guide
- Webhooks — Registration and payload format
- Webhook Signature Verification — HMAC verification and test workflow
- FAQ — Payment Monitoring — Common questions