ZovoHub Partner API Docs
Merchant API Get API keys

Code examples

The same request — push an order — in a few common languages. Swap in your own key and order data.

cURL

curl -X POST https://zovopay.com/api/partner/v1/orders \
  -H "X-Client-Id: $ZOVO_CLIENT_ID" \
  -H "X-Client-Secret: $ZOVO_SECRET" \
  -H "Content-Type: application/json" \
  -d '{"partner_order_ref":"D-1001","payment_source":"zovopay","total_amount":25.0,"currency":"USD","splits":[{"beneficiary_type":"merchant","beneficiary_ref":12,"amount":20},{"beneficiary_type":"courier","beneficiary_ref":34,"amount":3},{"beneficiary_type":"partner","amount":2}]}'

PHP

$ch = curl_init('https://zovopay.com/api/partner/v1/orders');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => [
        'X-Client-Id: ' . getenv('ZOVO_CLIENT_ID'),
        'X-Client-Secret: ' . getenv('ZOVO_SECRET'),
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => json_encode([
        'partner_order_ref' => 'D-1001',
        'payment_source'    => 'zovopay',
        'total_amount'      => 25.00,
        'currency'          => 'USD',
        'splits' => [
            ['beneficiary_type' => 'merchant', 'beneficiary_ref' => 12, 'amount' => 20.00],
            ['beneficiary_type' => 'courier',  'beneficiary_ref' => 34, 'amount' => 3.00],
            ['beneficiary_type' => 'partner',  'amount' => 2.00],
        ],
    ]),
]);
$response = curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);

Node.js

const res = await fetch('https://zovopay.com/api/partner/v1/orders', {
  method: 'POST',
  headers: {
    'X-Client-Id': process.env.ZOVO_CLIENT_ID,
    'X-Client-Secret': process.env.ZOVO_SECRET,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    partner_order_ref: 'D-1001',
    payment_source: 'zovopay',
    total_amount: 25.0,
    currency: 'USD',
    splits: [
      { beneficiary_type: 'merchant', beneficiary_ref: 12, amount: 20 },
      { beneficiary_type: 'courier',  beneficiary_ref: 34, amount: 3 },
      { beneficiary_type: 'partner',  amount: 2 },
    ],
  }),
});
const data = await res.json();

Python

import os, requests

requests.post(
    "https://zovopay.com/api/partner/v1/orders",
    headers={
        "X-Client-Id": os.environ["ZOVO_CLIENT_ID"],
        "X-Client-Secret": os.environ["ZOVO_SECRET"],
    },
    json={
        "partner_order_ref": "D-1001",
        "payment_source": "zovopay",
        "total_amount": 25.0,
        "currency": "USD",
        "splits": [
            {"beneficiary_type": "merchant", "beneficiary_ref": 12, "amount": 20},
            {"beneficiary_type": "courier",  "beneficiary_ref": 34, "amount": 3},
            {"beneficiary_type": "partner",  "amount": 2},
        ],
    },
)