Marketplace Escrow API v1

Secure Escrow for Your Marketplace

Integrate Posteering's battle-tested escrow infrastructure into your platform in under an hour. Protect buyers, guarantee sellers, and earn trust โ€” without building payment infrastructure from scratch.

๐Ÿ‡ณ๐Ÿ‡ฌ Nigeria-first โšก REST API ๐Ÿ”’ Paystack powered ๐Ÿฆ Auto bank payout ๐Ÿ“ก Webhooks 2.5% fee

How It Works

Your platform creates an escrow deal via API. The buyer pays via a Paystack payment link. Funds are held securely until your platform confirms delivery and releases payment to the seller โ€” who receives an automatic bank transfer.

โœ…
The entire flow is API-driven. You control the UX on your platform โ€” Posteering handles the money, compliance, and payouts.

Base URL

Base URL
https://api.posteering.com/api/v1

Quickstart

Get a deal live in 5 minutes. Contact dev@posteering.com to get your API key.

Step 1 โ€” Create a Deal

cURL
curl -X POST https://api.posteering.com/api/v1/marketplace/deals \
  -H "X-Api-Key: pst_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "partnerDealRef": "ORD-12345",
    "title": "iPhone 15 Pro Max 256GB",
    "amount": 45000000,
    "buyerEmail": "buyer@email.com",
    "buyerName": "John Doe",
    "sellerBankName": "Guaranty Trust Bank",
    "sellerAccountNumber": "0123456789",
    "sellerAccountName": "Jane Smith"
  }'

Step 2 โ€” Redirect Buyer to Payment

The response includes a payment.authorizationUrl. Redirect your buyer there or use the accessCode with Paystack inline popup on your frontend.

Response
{
  "dealRef": "MPD-MMFYGGZ8-D8FA58",
  "status": "created",
  "amount": 45000000,
  "feeAmount": 1125000,
  "totalCharge": 46125000,
  "totalChargeNaira": "โ‚ฆ461,250.00",
  "sellerPayoutNaira": "โ‚ฆ450,000.00",
  "payment": {
    "authorizationUrl": "https://checkout.paystack.com/xxxx",
    "accessCode": "xxxx",
    "reference": "MPD-1234567890-abc123"
  },
  "expiresAt": "2026-03-08T06:41:30.138Z"
}

Step 3 โ€” Verify Payment (via Webhook or Manual)

cURL
curl -X POST https://api.posteering.com/api/v1/marketplace/deals/MPD-MMFYGGZ8-D8FA58/verify \
  -H "X-Api-Key: pst_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"paymentReference": "MPD-1234567890-abc123"}'

Step 4 โ€” Mark as Delivered

cURL
curl -X POST https://api.posteering.com/api/v1/marketplace/deals/MPD-MMFYGGZ8-D8FA58/deliver \
  -H "X-Api-Key: pst_live_your_key_here"

Step 5 โ€” Release Funds to Seller

cURL
curl -X POST https://api.posteering.com/api/v1/marketplace/deals/MPD-MMFYGGZ8-D8FA58/release \
  -H "X-Api-Key: pst_live_your_key_here"
๐Ÿ’ธ
Seller receives an automatic Paystack bank transfer to the account number you provided at deal creation. No manual payout required.

Authentication

All API requests require your partner API key passed in the X-Api-Key header.

Header
X-Api-Key: pst_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
โš ๏ธ
Your API key is shown only once at registration. Store it securely โ€” in an environment variable, never in client-side code or version control.

API keys start with pst_live_ and are 56 characters long. Contact dev@posteering.com to register your platform and receive your key.

Deal Lifecycle

created
Deal created, awaiting payment
funded
Payment verified, funds in escrow
delivered
Seller marked as delivered
completed
Funds released, seller paid

A deal can also move to cancelled from the created state if payment was never made.

Endpoints

POST /marketplace/deals Create an escrow deal

Creates a new escrow deal and returns a Paystack payment URL for the buyer.

Request Body

FieldTypeRequiredDescription
partnerDealRefstringrequiredYour internal order/deal reference. Must be unique per partner.
titlestringrequiredDescription of what is being sold (max 255 chars)
amountintegerrequiredAmount in kobo (โ‚ฆ1 = 100 kobo). Minimum: 100000 (โ‚ฆ1,000)
buyerEmailstringrequiredBuyer's email address โ€” used for Paystack payment
buyerNamestringoptionalBuyer's full name
buyerPhonestringoptionalBuyer's phone number
sellerEmailstringoptionalSeller's email (for notifications)
sellerNamestringoptionalSeller's full name
sellerBankNamestringoptional*Seller's bank name (required for auto payout)
sellerAccountNumberstringoptional*Seller's account number (required for auto payout)
sellerAccountNamestringoptional*Seller's account name (required for auto payout)
descriptionstringoptionalDetailed description of the item/service
metadataobjectoptionalAny additional data you want to store with the deal
โ„น๏ธ
*Seller bank details are optional at deal creation but required for automatic payout on release. If not provided, you will need to handle seller payment manually.
GET /marketplace/deals List your deals

Query Parameters

ParameterTypeDescription
statusstringFilter by: created, funded, delivered, completed, cancelled
pageintegerPage number (default: 1)
limitintegerResults per page (default: 20, max: 100)
GET /marketplace/deals/:ref Get a single deal

Use the dealRef returned at deal creation (e.g. MPD-MMFYGGZ8-D8FA58).

POST /marketplace/deals/:ref/verify Verify payment and fund escrow

Call this after the buyer completes payment on Paystack. Pass the payment reference to verify and move the deal to funded.

FieldTypeDescription
paymentReferencestringrequired โ€” Paystack transaction reference
POST /marketplace/deals/:ref/deliver Mark deal as delivered

Call this when the seller has shipped/delivered the goods or service. Moves deal to delivered. Optional body:

FieldTypeDescription
notestringOptional delivery note or tracking info
POST /marketplace/deals/:ref/release Release funds to seller

Releases escrowed funds to the seller. Triggers automatic Paystack bank transfer if seller bank details were provided. Deal moves to completed.

โš ๏ธ
This action is irreversible. Ensure the buyer has confirmed receipt before calling this endpoint.
POST /marketplace/deals/:ref/cancel Cancel an unfunded deal

Cancels a deal that has not yet been funded. Cannot cancel a deal that has already received payment โ€” contact support for refunds on funded deals.

GET /marketplace/account Get your partner account stats

Returns your partner profile including total deals processed, total volume, and account status.

Webhooks

Posteering sends HTTP POST requests to your webhookUrl when deal status changes. Register your webhook URL when getting your API key.

Events

deal.fundedPayment verified โ€” funds held in escrow
deal.deliveredSeller marked deal as delivered
deal.completedFunds released โ€” seller payout initiated
deal.cancelledDeal cancelled before funding

Verifying Webhook Signatures

Every webhook includes an X-Posteering-Signature header. Verify it to ensure the request came from Posteering.

Node.js
const crypto = require('crypto');

function verifyWebhook(payload, signature, secret) {
  const expected = crypto
    .createHmac('sha256', secret)
    .update(payload)
    .digest('hex');
  return expected === signature;
}

// In your Express handler:
app.post('/webhooks/posteering', express.raw({type: 'application/json'}), (req, res) => {
  const sig = req.headers['x-posteering-signature'];
  if (!verifyWebhook(req.body, sig, process.env.POSTEERING_WEBHOOK_SECRET)) {
    return res.status(401).send('Invalid signature');
  }
  const event = JSON.parse(req.body);
  console.log('Event:', event.event, event.data.dealRef);
  res.status(200).send('OK');
});

Webhook Payload

JSON
{
  "event": "deal.funded",
  "timestamp": "2026-03-07T08:00:00.000Z",
  "data": {
    "dealRef": "MPD-MMFYGGZ8-D8FA58",
    "partnerDealRef": "ORD-12345",
    "status": "funded",
    "amount": 45000000,
    "totalCharge": 46125000,
    "amountNaira": "โ‚ฆ450,000.00",
    "fundedAt": "2026-03-07T08:00:00.000Z"
  }
}

Fee Model

ItemValue
Escrow fee2.5% of deal amount
Who paysBuyer (added on top of deal amount)
Seller receives100% of the deal amount
Example โ€” โ‚ฆ450,000 dealBuyer pays โ‚ฆ461,250 | Fee: โ‚ฆ11,250 | Seller gets โ‚ฆ450,000
Minimum deal amountโ‚ฆ1,000 (100,000 kobo)
Payout methodAutomatic Paystack bank transfer

Error Codes

StatusCodeMeaning
400Bad RequestInvalid request body or deal already exists with same partnerDealRef
401UnauthorizedMissing or invalid X-Api-Key header
403ForbiddenDeal does not belong to your account
404Not FoundDeal reference not found
409ConflictDuplicate partnerDealRef for your account
500Server ErrorUnexpected error โ€” contact support

All errors return JSON: {"statusCode": 400, "message": "Descriptive error message"}

Testing

Use Paystack test cards to simulate payments in development. No real money is charged.

FieldValue
Card Number4084 0840 8408 4081
ExpiryAny future date
CVV408
OTP123456
PIN0000
โ„น๏ธ
Test deals are clearly marked in your account. Contact dev@posteering.com to switch to live mode when you are ready to process real transactions.

Support

Technical integration support: dev@posteering.com
Business enquiries: hello@posteering.com