Overview
Sandbox is where you prove your integration handles a decline, a refund and an unconfirmed payment — outcomes you cannot produce on demand with real money. The account identifier you send chooses the outcome. Every scenario below is deterministic: the same identifier always produces the same result.Sandbox uses the same host, the same routes and the same key header as production. The only thing that changes is the key. Call Validate API Key and read
key.type to confirm which environment you are in.What is the same
Everything that matters to your code:- the base URL,
https://billapi.oneclickdz.com - the
X-Access-Tokenheader - all eight routes
- the response envelope,
requestIdand theX-Request-Idheader - the seven statuses and the asynchronous lifecycle
- polling,
refidempotency and the403/409guards - the error codes and their HTTP statuses
What differs
- A sandbox request never reaches a biller and never moves money.
- Outcomes are chosen by the account identifier, not by what an account really owes.
GET /v3/partnersreturns a fixed map rather than live availability.- Sandbox bills are returned with
fee: 0, sototalequalsamount. Readfeeandtotalfrom the response — in production they will not be zero. - Transitions are fast: a discovery settles in well under a second, a payment in about half a second. The
UNKNOWNscenario deliberately holds for about 60 seconds so you can exercise your review path.
Business-flow scenarios
Send the identifier in theaccount object for the partner shown. “Discovery” is what the transaction reaches after POST /v3/bills/discover; “Payment” is what it reaches after POST /v3/bills/pay.
The two SEAAL rows and the AADL row.
SEAAL and AADL are currently switched off in both environments, and that check runs before the sandbox scenario is chosen — so those three identifiers answer 503 PARTNER_UNAVAILABLE rather than the outcome their scenario describes. They are listed here because they become reachable the moment those billers are switched back on. To test “no bills due” and “invalid account” today, use the ADE rows.Authentication and control scenarios
An end-to-end sandbox run
The ADE happy path, from discovery to receipt. Every value below is real and reproducible.Use a fresh
ref on every run, or the second run answers 403 DUPLICATED_REF. Suffixing the ref with your own test-run counter is the simplest approach.Recommended integration validation
Three checks that prove the contract before you go further:1
Verify the /v3/validate shape
account.id, account.status, account.currency and key.type are all present, and key.type is SANDBOX.2
Confirm the /v3/partners map
Five keys, each with a
status of ACTIVE or UNAVAILABLE, including Algérie Télécom with its accents.3
Run one full round trip
Discovery, payment and a lookup by
ref — proving that your ref resolves back to the transaction you created.Scenarios worth automating
Beyond the happy path, these four are the ones that catch real bugs:Going live
1
Swap the key, change nothing else
Same base URL, same header, same routes. Only the key value changes.
2
Assert the environment at start-up
Call
/v3/validate and fail your boot sequence if key.type is not what that deployment expects.→ Validate API Key3
Re-read fee and total from the response
Sandbox returns
fee: 0. Production does not. If anything in your code assumed the fee was zero, it breaks here.4
Confirm your poller handles UNKNOWN
In production this state is rare and expensive to get wrong. Prove the branch exists before you need it.
5
Check your reconciliation job runs
It should have been running against sandbox already, finding nothing. On the first production day it is your safety net.→ Receipts and reconciliation
6
Keep the sandbox key
Every future change gets tested against these scenarios before it reaches production.
Go-live checklist
Best practices
Automate the four hard scenarios
Empty bills, decline, refund and review. They are deterministic, so they belong in your test suite.
Never assume sandbox availability
The sandbox partner map is fixed. Production availability is live and changes.
Vary the ref per run
Otherwise the second run of your test suite fails on
DUPLICATED_REF.Keep testing after go-live
Sandbox costs nothing. Run the suite on every release.
Related pages
Validate API Key
Prove which environment a key belongs to
Bill Payment Overview
The five-step map
Status Polling
Handling
UNKNOWN and REFUNDEDError Handling
Every error code in one place

