Testing, reconciliation and readiness
Use a test account to create a Checkout, pay, retrieve its status and fulfill the order first, then enable additional capabilities according to availability. Exercise the scenarios below in your target test environment before choosing production dependencies.
| Collection scenario | Expected outcome |
|---|---|
| Normal creation and payment | Persist actual ID/URL and fulfill once after server confirmation |
| Same key and parameters | Replay the first result; retrieve current status separately |
| Same key with a changed amount | Parameter mismatch, without an extra successful operation |
| Lost creation response or restart | Recover the saved request rather than immediately using a new key |
| Two successful Checkouts for one order | One delivery; handle extra funds separately |
| Return URL, forged success or another user’s ID | Preserve local order authorization and server confirmation |
| Expiry, closure or late confirmation | Correctly handle failed sessions and late funds |
paidOver / paidPartial | Manage exceptions without rewriting payment facts |
| Rate limits, timeouts or invalid JSON | Retain unknown state and back off rather than marking unpaid |
After Webhook enablement
Confirm the header/raw-body algorithm against the signature rules. Test wrong secrets, old/future timestamps, modified bodies, duplicates, failed processing and delayed events. Persist receipt before acknowledgement; subsequent business failures require your own worker retries. Repeated or reordered events must not repeat fulfillment.
Notification remains pending. Passing the local verifier fixture is not a reason to disable query recovery.
After refund/settlement enablement
- Refunds: verify payment-item retrieval, finalized amounts, refundable balances, partial/full refunds, in-flight reservations, signing rejection and cancellation races.
- Settlements: confirm actual task creation and wallet execution support; exercise compatible item selection, idempotent creation, rejection, lost submission responses, state recovery and final confirmation.
- Use current
next_action, without rewritingfrom,to,dataorvalue; retain submission results and resume the original task.
Ongoing reconciliation
Record orders, Checkouts, payment items, refunds and settlements separately. Their states and amounts are not interchangeable ledger entries. Reconcile pending states and exceptions, retaining Request-Id and local operation IDs while excluding keys and private credentials from logs.
Before production, confirm target-environment access and account permission, and test each required funds workflow end to end.