Create an itemised checkout
POST /v1/checkout. Partners must send an Idempotency-Key.
line_items are optional. When you send them, they must follow these rules, or the request is refused with 400 line_items_invalid:
- The sum of quantity ×
unit_amountmust equalamountexactly, to the kobo. quantitymust be between 1 and 10,000.- Amounts have at most 2 decimals.
- Each line needs a non-empty
partner_line_referencethat is unique within the checkout. - There can be at most 100 lines.
success_url and cancel_url must be https on a host Platnova has registered for you. Subdomains count. Any other URL is refused with 400 redirect_url_not_allowed. Send us your hosts to register them.
The answer is the checkout, including id, url (https://pay.platnova.com/<id>), status, partner_reference, line_items and payment_options. Send the payer to url.
Read a checkout
GET /v1/checkout/{checkout_id}: public. Includespartner_reference,line_itemsandstatus.GET /v1/partner/checkouts/{partner_reference}: needs your API key.object_refis the checkout id;statusiscreatedorpaid.
checkout.paid webhook. It carries partner_reference and line_items.
Refund by line
POST /v1/checkout/{checkout_id}/refund. You can pass the checkout id or the payment reference.
- The amount is the sum of
lines.amountis optional; if you send it, it must agree with that sum. - Partner refunds must state
amountorlines, and they count against your refund limits. - A line can never be refunded beyond what it was paid, less earlier refunds that did not fail. The check runs under a lock, so two refunds sent at the same moment cannot overspend a line.
A refund by bank transfer is a payout, and its fee follows the payout minimum. Bank transfer, Pay with Bank, USSD and OPay refunds are paid out to a bank account. Their payout fee is charged to your wallet and is never below the transfer’s cost: the greater of cost + 3% and cost + ₦50, plus VAT (see Payouts: fees). The refunded amount itself is never more than the payment was.
The refund carries
lines and partner_reference. Its webhooks are checkout.refunded and checkout.refund_failed, and they also carry checkout_partner_reference.
