Cancel and refund the buyer
Refunds the buyer every milestone not yet released; released milestones stay paid. Money only ever goes back to the account that paid. KetaPay’s buyer fee and VAT are not refunded once the escrow is funded, the same rule as in the KetaPay app.
- Seller’s token: any time (the seller gives up the rest of the deal).
- Buyer’s token: only before any milestone is delivered or released. After that the buyer reports a problem instead.
Refused while a dispute is open (the seller can refund through
POST /disputes/{id}/concede). Sends escrow.refunded, or escrow.completed if some
milestones were already released.
Authorizations
Authorization: Bearer <secret key>. Secret keys belong to your organisation, are shown
once when created in the dashboard, and are scoped (see x-required-scope on each
operation). Keep them on your server. Live keys are issued after your business is
verified. Publishable keys (pk_) are only for @ketapay/checkout and don't work here.
Proof that your customer approved this call, from POST /customer_sessions/{id}/verify.
Sent together with your secret key. Valid for 15 minutes, for that customer's escrows
only.
Headers
Unique key for this operation. Retries with the same key return the first result.
255"7f3e2a10-6c4d-4b8e-9a1f-2d5c8e7b6a40"
Path Parameters
Body
500Response
The updated escrow
"escrow"active: money held, milestones in progress. disputed: the buyer reported a problem;
KetaPay is handling it. completed: ended with at least one milestone paid to the
seller. refunded: ended with everything returned to the buyer. An escrow only exists
once the buyer has paid.
active, disputed, completed, refunded Amount in kobo
x >= 045000000
"NGN"Totals for the whole escrow, in kobo. buyer_total = amount + buyer_fee + buyer_vat and
seller_payout = amount - seller_fee - commission. Until everything is released these
are what will apply; each milestone shows its own share.
What kind of deal this is. KetaPay uses it for risk checks and dispute handling.
goods, services, property, vehicle, digital, other KetaPay's copies of the images sent at checkout; the first is the cover
Send either file (an id from POST /files with purpose agreement) or url (an HTTPS
link KetaPay copies). JPEG, PNG, HEIC or WebP. Responses carry KetaPay's own url plus a
small thumbnail_url.
- Option 1
- Option 2
KetaPay's copies of the documents sent at checkout
Send either file (an id from POST /files) or url (an HTTPS link KetaPay copies, so
it survives your copy being deleted). Responses always carry KetaPay's own url.
- Option 1
- Option 2
In order. One entry for a single payment.
The seller, or your business when you sell your own goods
- Option 1
- Option 2
The dispute currently open, if any. GET /escrows/{id}/disputes lists them all.
A card chargeback currently being contested, if any
Whether you have flagged this escrow
What happened, oldest first
Your own id for this object, for example your order or project id. Filterable.
255"proj_4471"
Your own key-value pairs. KetaPay stores them and never reads them.
When it became completed or refunded