Skip to main content

Overview

Payment is the write half of Bill Payment. You take one billId from a READY discovery, submit it, and the same transaction carries the payment through to a final state. This is the call that moves money, so the order of operations matters more here than anywhere else in the integration: write your own record first, send once, then poll.
The 200 from pay means the payment was accepted and is in flight. It does not mean the bill was paid. The outcome only ever appears in the transaction’s status.

Choosing a bill

bills[] on a READY transaction may hold several entries. Pick one — a payment pays exactly one bill.
To pay several bills for one account, pay the first, wait for it to reach a final state, then run a fresh discovery. Two payments in flight for the same account are refused with 409 PAYMENT_IN_PROGRESS.

What your customer pays

The fee is a percentage of the amount, clamped between a minimum and a maximum, and it is set per biller: SEAAL and AADL are currently unavailable, so no fee is published for them. Worked through, for ADE and SONELGAZ:
The percentage only starts to matter on large bills. For ADE and SONELGAZ every bill up to 6,000 DZD is charged the 30 DZD minimum, and nothing is ever charged more than 60 DZD. For Algérie Télécom the equivalent thresholds are 2,000 DZD and 10,000 DZD.
Read fee from the response. The percentage and the clamps are configuration, not constants — a fee you calculate yourself will eventually disagree with the one you are charged.

Before you send

1

Persist your own record

Write the order — customer, transactionId, billId, amount, fee, total, and the ref you are about to use — before the request leaves your process. If the response is lost, that row is how you find the payment again.
2

Confirm the total with your customer

Show amount and fee separately, and the total you will charge. Never show an estimate.
3

Send once

One call, with a ref that is new for this biller.
4

Poll to a final state

SUCCESS, FAILED or REFUNDED.Step 4: Status polling

Submitting the payment

Three fields, all required.
Use a new ref, different from the discovery’s. Reusing the discovery ref here answers 403 DUPLICATED_REF. The transaction keeps its original discovery ref — that is what the response echoes back and what by-ref looks up.

The three guards

Three rules stop the same money moving twice. All three answer before anything is charged.
None of these is a reason to retry with a different ref. Each one means the work is either already done or already running. Retrying around a guard is how a customer gets charged twice.
The right response to all three is the same: read the transaction and continue from its state.

When the response never arrives

A timeout tells you nothing about whether the payment happened. Read the transaction before you do anything else.
Never resend a payment because a request timed out. A transaction still on READY is the only state that proves the payment did not start.

Errors you will meet

Best practices

Write before you send

Persist the order and its ref first. A lost response is then always recoverable.

One ref per call

disc- for the discovery, pay- for the payment, both derived from your order id.

Charge the returned total

Debit your customer the total the API produced, never a figure you computed.

Treat a guard as an answer

403 and 409 mean the work is done or running. Look it up rather than working around it.

Next step

Step 4: Status polling

Follow the payment to a final state, and handle UNKNOWN correctly

Pay a Bill

The endpoint reference

Get Transaction by ID

The transaction object in full

Discovering Bills

Where billId comes from

Receipts and Reconciliation

What to keep after a success