Skip to main content

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-Token header
  • all eight routes
  • the response envelope, requestId and the X-Request-Id header
  • the seven statuses and the asynchronous lifecycle
  • polling, ref idempotency and the 403 / 409 guards
  • the error codes and their HTTP statuses
Switching to production changes your key. It does not change a line of your integration.

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/partners returns a fixed map rather than live availability.
  • Sandbox bills are returned with fee: 0, so total equals amount. Read fee and total from 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 UNKNOWN scenario deliberately holds for about 60 seconds so you can exercise your review path.
Sandbox is not a load test and not an availability test. A biller that is ACTIVE in the sandbox map may be down in production — handle 503 PARTNER_UNAVAILABLE regardless of what sandbox told you.

Business-flow scenarios

Send the identifier in the account 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.
The full object forms, for copying:

Authentication and control scenarios

Exercise all three. The 403 DUPLICATED_REF path in particular is the one your recovery logic depends on — if reusing a ref surprises your code in sandbox, it will surprise it in production with money attached.

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.
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:
The review scenario is the most important test in this table. It is the only cheap way to prove that your code does not refund a customer whose bill was actually paid.

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 Key
3

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.

Validate API Key

Prove which environment a key belongs to

Bill Payment Overview

The five-step map

Status Polling

Handling UNKNOWN and REFUNDED

Error Handling

Every error code in one place