Collect a deposit online: one link with the quote, one for the balance
Collect a deposit online with a single-use payment link sent with the quote, then the balance on delivery: link both, offer cash and handle cancellations.
To collect a deposit online, you use two payment links: a first, single-use link sent with the quote for the deposit amount, then a second one, for the balance, sent when the work is delivered. Your customer pays each link on a page hosted by ChariPay, by card with 3-D Secure — or in cash at an agency, on a link created without an expiry — and you see each link turn "Paid" in the portal. This guide details both steps, the right timing for your trade, how to tie both payments to the same quote, cancellations and the accounting trail.
Collecting a deposit online: the two-link principle
Architect, caterer, photographer, craftsman, agency: when a job is prepared weeks in advance, you commit time, and sometimes purchases, before being paid. A deposit secures that start. With ChariPay, the setup comes down to two single-use links:
- 1Quote accepted: you send the deposit link.
- 2Work delivered: you send the balance link.
A payment link is an amount and a description; the customer pays on a page hosted by ChariPay. ChariPay is a Moroccan payment platform, a PSP operated by Chari Money, a payment institution licensed by Bank Al-Maghrib. You need neither a website nor a terminal: the link goes out by email, WhatsApp or any other channel you already use with your customers. The full offer is presented on the payment links page.
This guide only covers collection. The legal classification of the sum paid in advance — deposit, earnest money or something else — and what happens to it if either party withdraws depend on your contract and the applicable law: only your advisor can give an opinion. Write your terms into the quote before you send any link.
Two neighboring cases have their own guide: after the job, when you issue an invoice to be paid, read about getting invoices paid online; for a slot or a seat paid in full at booking, see taking payment for online bookings.
Step 1: the deposit link, sent with the quote
The deposit link is created when the customer says yes to the quote, and goes out with it. Four settings matter:
- Single-use, for the deposit amount: one job, one customer, one amount. The link is consumed after one successful payment, so the customer cannot pay twice.
- A description carrying the quote number: "Deposit — quote D-2026-118". The customer knows what they are paying for, and you find the job in the portal.
- An expiry aligned with the quote's validity: 24 hours, 7 days, 30 days or an exact date. A quote valid for a month calls for a link that expires on the same date; once it passes, the page tells the customer the offer is no longer available, no payment can go through, and you decide whether or not to renew your offer. This expiry applies to a link to be paid by card: for a customer who pays in cash, create the link with "Agency payment", without an expiry.
- A saved customer: their details will serve you again for the balance link.
The link turning "Paid" becomes your signal: the quote is confirmed, you start the job. Write this rule into the quote, so the customer knows the date or the order is only reserved once the deposit is received. Every setting of the link is detailed in our guide to creating a payment link.
As soon as a payment succeeds — a card authenticated with 3-D Secure or a reference paid in cash at an agency — the amount is available in your ChariPay payment account and usable right away: transfers, bills, top-ups. The deposit can thus go toward paying the supplier of the job's materials by transfer, without waiting for a payout to your bank.
Before you send your first real deposit link, look at what your customer will receive. Test mode opens as soon as your account is activated, with no approval to wait for: Start in test mode — three fields (name, work email, company), an activation link received by email to choose your password, then the portal, where you create your own test key after re-authenticating; the full key is shown only once. Create the deposit link for a real quote and pay it with the test card 4918 9141 0719 5005, CVV 123, any future expiry date, 3-D Secure code 555: only this card is accepted, and no real money moves. Your business verification (KYB) runs in parallel and only gates the move to production.
Step 2: the balance link, on delivery
When you hand over the work, create a second single-use link for the remaining amount, with the same quote number in the description: "Balance — quote D-2026-118". Send it at the time agreed in your terms, through the same channel as the first.
In the message, restate the calculation in one line — quote total, deposit already paid, balance due — so the customer can check for themselves that the amount on the page is right. If options or an amendment changed the total, this is where they show up: the deposit link, already paid, no longer moves, and the balance link carries the updated amount.
Like the first, this link is paid by card, with a shorter expiry than the quote's, for example 7 days, so the balance does not stay open indefinitely; for a customer who pays in cash, create it with "Agency payment", without an expiry.
Architects, caterers, photographers, craftsmen, agencies: when to send each link
The timing depends on the rhythm of your trade. The table below offers reference points; the deposit amount itself remains a business decision that your quote sets.
| Trade | The deposit link goes out with… | The balance link goes out at… |
|---|---|---|
| Architect, engineering firm | The signed fee proposal | Hand-over of the agreed phase |
| Caterer | The signed event quote | The day before the event, or at its end, per your terms |
| Photographer, videographer | The date booking | Delivery of the files or the album |
| Craftsman (carpentry, aluminum, upholstery) | Approval of measurements and quote | Installation or delivery |
| Agency (communications, web, events) | The signed purchase order | Delivery of the project, or of each stage |
For a long assignment, nothing stops you from splitting further: one single-use link per billed stage, each with the quote number and the name of the stage. The logic stays the same: one link, one amount, one moment. A medical or dental practice applies the same principle to a treatment quote: see online payments for clinics.
Tying the deposit and the balance to the same job
Two payments for a single quote: you need to be able to find them together, six months from now as well as tomorrow.
In the portal, the shared description does the work: the quote number, present in both links, lets you find them side by side. Through the API, two fields take care of it:
- A distinct `externalId` per link — for example
quote-d-2026-118-depositthenquote-d-2026-118-balance. It is unique per account and per environment: using the sameexternalIdfor both links would return the first one instead of creating the second. - The same `metadata`, a flat object carrying the quote number (
quoteId) and the part concerned. It comes back verbatim when you read the link and in the payment event.
curl -X POST 'https://api-psp.charipay.ma/v1/payment-links' \
-H 'X-CHARI-PAY-API-KEY: chari_sk_test_...' \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: quote-d-2026-118-deposit' \
-d '{
"amount": 3000.00,
"description": "Acompte devis D-2026-118",
"singleUse": true,
"expiresAt": "2026-10-31T23:59:59Z",
"externalId": "quote-d-2026-118-deposit",
"customerEmail": "amine.bennani@example.com",
"customerPhone": "+212600000000",
"metadata": { "quoteId": "D-2026-118", "part": "deposit" }
}'The balance link repeats the same call with its own amount, its own externalId and its own Idempotency-Key, and "part": "balance". When a card payment comes in, your system reads metadata.quoteId to find the job and metadata.part to know which part has been paid. For a cash payment, read the link's state with GET /v1/payment-links/{reference}.
The customer without a card: a deposit paid in cash
Some customers prefer to pay a deposit in cash, others have no card open to online payment. The single-use link welcomes them with no extra step on your side. On the page of a single-use payment link, your customer chooses cash, receives a reference, pays it at an agency of the Chari network, and you are notified as soon as the network confirms the deposit. Cash payment at an agency always relies on a single-use link — one reference per deposit. In the portal, turning on "Agency payment" on a link disables its expiry: the link stays payable with no time limit. A link with an expiry date is therefore presented as a link to be paid by card; for a customer who pays in cash, create a link with "Agency payment", without an expiry.
As soon as the network confirms the deposit, the link turns "Paid" and you are notified in the portal; on the server side, read the link's state with GET /v1/payment-links/{reference}. The amount is available in your account the moment the cash is deposited, exactly as with a card payment. If you go through the API, paymentMethod: "CASH" preselects cash on the page. ChariPay is the only payment gateway in Morocco that also collects cash at agencies.
Cancellation: cancel the link or refund the deposit
It all depends on when the job stops.
- The deposit link has not been paid: cancel it, from the portal or with
POST /v1/payment-links/{reference}/cancel. A canceled link can no longer be paid; this way, no customer pays for an abandoned quote. - The balance link has not been paid yet: same move, cancel it if the job does not go through to the end.
- The deposit was paid by card: refund a customer, in full or partially, from the portal or through the API. Refunds are free; the amount is deducted from your available balance, and if the balance is not enough, the operation is blocked rather than creating an overdraft. A refund is not instantaneous on the bank side. The full procedure is in our guide to refunding a customer.
As for whether the deposit should be refunded, in full or in part, the answer lies in your written terms and the applicable law: only your advisor can give an opinion. Let the customer know before any refund, telling them the amount refunded and the reason.
In the books: two collections, one job
For your accountant, a quote with a deposit produces two separate collections, tied to the same job. ChariPay keeps that trail for you. Every account movement carries the reference of the sale, refund or payout that explains it; the portal separates amount paid, fees and net, and the CSV export keeps those references — from the portal or with GET /v1/transactions/export.csv (up to 10,000 rows; beyond that, split by period with from/to). Timestamps are in UTC; Morocco is UTC+1: your reconciliation tool must convert.
Three habits make reconciliation trivial:
- The quote number in every link description, and in your final invoice.
- Both payments matched to the same accounting document, not treated as two independent sales.
- Any refund tracked as a separate movement, linked to the original payment.
The day-to-day method is detailed in reconciling your collections, and the list of points to check in our accounting checklist for collections. How the deposit is treated in your accounts is a matter for your accountant.
Frequently asked questions
How do I ask a customer for a deposit online?
In the ChariPay portal, create a single-use link for the deposit amount, with the quote number in the description and an expiry aligned with the quote, then send it with the quote. The customer pays by card and the link turns "Paid"; for a customer who pays in cash, create the link with "Agency payment", without an expiry. On delivery, a second link collects the balance.
How much should I ask for as a deposit?
That is a business decision, specific to your trade and your terms, and we recommend no percentage. The payment link simply carries the exact amount your quote sets. How that sum is classified and what happens to it if someone withdraws depend on your contract and the applicable law: only your advisor can give an opinion.
Can I collect a deposit in cash?
Yes, with a single-use link created with "Agency payment", without an expiry. On its page, the customer chooses cash, receives a reference and pays it at an agency of the Chari network. As soon as the network confirms the deposit, the link turns "Paid" and you are notified in the portal. The amount is available in your payment account the moment the cash is deposited, just as with a card.
Can the deposit link expire along with the quote?
Yes, for a link to be paid by card. When you create the link, choose an expiry of 24 hours, 7 days, 30 days, or an exact date: the date the quote stops being valid. Once it passes, the page tells the customer the offer is no longer available, and no payment can go through. If the customer comes back later and you stand by your offer, create a new link, with a new externalId through the API.
How do I find the deposit and the balance of the same quote?
Put the quote number in the description of both links: you find them side by side in the portal and in the CSV export. Through the API, give each link its own externalId and the same metadata, for example quoteId, which comes back verbatim in the payment event. Your system then ties each payment to the right quote.
How do I refund a deposit if the customer cancels?
If the deposit was paid by card, refund it in full or partially from the portal or through the API. Refunds are free, deducted from your available balance, and blocked if the balance is not enough; they are not instantaneous on the bank side. The amount to return depends on your written terms and the applicable law, on which only your advisor can give an opinion.
Is the deposit available right away in the account?
Yes. As soon as a payment succeeds — a card authenticated with 3-D Secure or a reference paid in cash at an agency — the amount is available in your ChariPay payment account and usable right away. It is not an instant bank transfer: the payout to your bank remains a separate operation. Your payment account is held by Chari Money. It complements your bank; it does not replace it.
Next step
In test mode, prepare the deposit and balance pair for a real quote, pay both links with the test card, then find both movements in the export: Start in test mode. For the rest of the customer relationship, read about getting invoices paid online, and set up every field of your links with our guide to creating a payment link.
Written by ChariPay team.