Service access: payouts and refunds by API
For a platform that pays out to its sellers and refunds its buyers from its own servers, within limits rafiqPay sets, with no person approving each one.
What it is and how it is switched on
An ordinary API key cannot pay out or refund. A business with service access can, through /v1/service, and only inside limits that rafiqPay staff set for it: the largest single payout, the most a business may pay out in a day, the most any one payee may receive in a day, and the largest single refund and the most refunded in a day. Days run from midnight in Lagos. Ask rafiqPay to switch it on, and tell us the volumes you expect so the limits fit.
Check your limits and what is left today with GET /v1/service/access.
Payees
A payout may go only to a registered payee. Register one with POST /v1/service/payees (label, bankName, accountNumber, expectedName). The bank is asked who owns the account and its name must match expectedName, so a mistyped or swapped account is refused before any money moves.
A new live payee can be paid only after 72 hours, and the business owners are emailed when one is added, so one added with a stolen key can be removed first. Removing a payee (DELETE /v1/service/payees/{id}) takes effect at once. Test payees are usable immediately.
Payouts and refunds
POST /v1/service/payouts takes payeeId, amount and your own merchantReference. Sending the same merchantReference again returns the same payout and pays nothing twice; using it for a different amount or payee is refused. payout.paid and payout.failed carry the merchantReference. Retrieve a payout by its id or your reference with GET /v1/service/payouts/{ref}.
POST /v1/service/refunds takes chargeId, amount, reason and your merchantReference, with the same repeat safety. A refund is pending until the payment provider has given the money back, and then refund.succeeded is sent. If the provider does not give it back, the money returns to your balance and refund.failed is sent. GET /v1/refunds lists them. A refund shows the share of the provider fee that is not recovered.
Pausing
The owner can pause service access from the dashboard at once with POST /v1/developers/service-access/pause. While paused, no payout or refund goes out through the API. rafiqPay also stops all service payouts for the day if the platform-wide ceiling is reached, and staff are alerted.