The flow
- Open the payment with
POST /quote/{id}/payand the Wave number that will pay. Only that number can confirm it. - Send
paymentUrlto the payer. It opens the payment in Wave. The payer has 30 minutes to confirm. - Follow the quote with
GET /quote/{id}/statusuntil the payment settles.
What the payer is charged
All in francs CFA.
Knowing when it is paid
Djigui does not notify your systems yet: pollGET /quote/{id}/status. Every few seconds is fine while you know the payer is confirming; slow down after a few minutes.
payment in the status response is the latest attempt, with its failureReason when it failed.
Wave usually confirms within seconds. If its confirmation is lost on the way, Djigui asks Wave directly after a couple of minutes, so a paid quote never stays payment_pending for long. A payment the payer has not confirmed after 30 minutes is closed and marked failed.
Failed payments
A failed payment can be followed by another: callPOST /quote/{id}/pay again, with the same number or another one.
If Wave cannot be reached when you open the payment, you get 502 payment_provider_unavailable. The attempt is recorded as failed and you can retry.
One payment at a time
A quote has at most one payment waiting or succeeded:- Paying while a payment is waiting answers
409 payment_in_progress, with thepaymentIdandpaymentUrlof the one waiting. Send that URL to the payer again. - Paying a paid quote answers
409 quote_already_paid.
Quotes that cannot be paid
- Start date passed. A quote can be paid until its
startDate, included. After that, it answers422 quote_start_date_passed: create a new quote with a new start date. - No policyholder phone. Quotes created before the phone became required answer
422 quote_incomplete: create a new quote.
When the contract starts
The contract covers the quote’sstartDate to the day before the same date duration months later. If the payment is confirmed after startDate (a payment opened the day before and confirmed after midnight), the contract starts on the day of payment, for the full duration paid for.