# Integrate Ozow payments

> Integration guides, API reference and working code for accepting payments, issuing refunds and sending payouts in South Africa.

Source: https://hub.ozow.com/

**New to Ozow?** Start with [How Ozow works](https://hub.ozow.com/getting-started.md): payins and
payouts, settlement, and how the pieces fit together.

**Ready to build?** Pick a starting point:

- **[Accept a payment](https://hub.ozow.com/integration-methods/apis/payin.md)**: Redirect
  to Ozow or embed the checkout in your own page - one integration, every payment method.
- **[Send a payout](https://hub.ozow.com/integration-methods/apis/payout/send-a-payout.md)**: Pay money into a bank
  account from your own system, with no incoming payment required.
- **[Install a plugin](https://hub.ozow.com/integration-methods/plugins-and-platforms.md)**:
  Shopify, WooCommerce, Magento and seven more, with no code to write.
- **[Read the API reference](https://hub.ozow.com/api-reference.md)**: Endpoints, fields, parameters and error
  responses for every Ozow API.

Not sure which route suits you? [How to integrate with
Ozow](https://hub.ozow.com/integration-methods.md) compares no-code, plugins and building against
the APIs.

> ℹ️ **Note**: You need an Ozow merchant account before you can integrate. Not set up yet? Start
> with [Prerequisites and onboarding](https://hub.ozow.com/getting-started/prerequisites-and-onboarding.md), [join our
> merchant family](https://ozow.com/merchants) or speak to your account manager to get set up.

## Your first payment request

This is the call that starts a payment. It returns a URL you send your customer to, and Ozow tells
your webhook how it ended.

```endpoint
POST https://one.ozow.com/v1/payments
Authorization: Bearer YOUR_ACCESS_TOKEN
Content-Type: application/json
```

**cURL**

```bash
curl -X POST "https://one.ozow.com/v1/payments" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "siteCode": "YOUR_SITE_CODE",
    "amount": {
      "currency": "ZAR",
      "value": 100.00
    },
    "merchantReference": "ORDER-001",
    "expireAt": "2026-12-31T23:59:59Z",
    "returnUrl": "https://yourstore.com/order-complete"
  }'
```

**C#**

```csharp
var client = new HttpClient();
client.DefaultRequestHeaders.Authorization = new AuthenticationHeaderValue(
    "Bearer",
    "YOUR_ACCESS_TOKEN"
);

var payload = new
{
    siteCode = "YOUR_SITE_CODE",
    amount = new { currency = "ZAR", value = 100.00 },
    merchantReference = "ORDER-001",
    expireAt = "2026-12-31T23:59:59Z",
    returnUrl = "https://yourstore.com/order-complete",
};

var response = await client.PostAsync(
    "https://one.ozow.com/v1/payments",
    new StringContent(JsonSerializer.Serialize(payload), Encoding.UTF8, "application/json")
);
var result = await response.Content.ReadAsStringAsync();
Console.WriteLine(result);
```

**PHP**

```php
<?php
$curl = curl_init();
curl_setopt_array($curl, [
    CURLOPT_URL => "https://one.ozow.com/v1/payments",
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST => true,
    CURLOPT_POSTFIELDS => json_encode([
        "siteCode" => "YOUR_SITE_CODE",
        "amount" => ["currency" => "ZAR", "value" => 100.0],
        "merchantReference" => "ORDER-001",
        "expireAt" => "2026-12-31T23:59:59Z",
        "returnUrl" => "https://yourstore.com/order-complete",
    ]),
    CURLOPT_HTTPHEADER => [
        "Authorization: Bearer YOUR_ACCESS_TOKEN",
        "Content-Type: application/json",
    ],
]);
$response = curl_exec($curl);
curl_close($curl);
echo $response;
?>
```

**JavaScript**

```javascript
const response = await fetch("https://one.ozow.com/v1/payments", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_ACCESS_TOKEN",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    siteCode: "YOUR_SITE_CODE",
    amount: { currency: "ZAR", value: 100.0 },
    merchantReference: "ORDER-001",
    expireAt: "2026-12-31T23:59:59Z",
    returnUrl: "https://yourstore.com/order-complete",
  }),
});
const data = await response.json();
console.log(data);
```

**Python**

```python
import requests

response = requests.post(
    "https://one.ozow.com/v1/payments",
    headers={
        "Authorization": "Bearer YOUR_ACCESS_TOKEN",
        "Content-Type": "application/json",
    },
    json={
        "siteCode": "YOUR_SITE_CODE",
        "amount": {"currency": "ZAR", "value": 100.00},
        "merchantReference": "ORDER-001",
        "expireAt": "2026-12-31T23:59:59Z",
        "returnUrl": "https://yourstore.com/order-complete",
    },
)
print(response.json())
```

The `Authorization` header carries an access token you exchange your client ID
and secret for. [Quick start](https://hub.ozow.com/getting-started/quick-start.md) covers that
exchange and takes this request through to a confirmed payment.

## Not writing code?

You don't need a developer to get paid with Ozow.

- **[Payment requests](https://hub.ozow.com/integration-methods/no-code/payment-requests.md)**: create a link or upload a
  batch, send by email, SMS or WhatsApp
- **[Refunds](https://hub.ozow.com/integration-methods/no-code/refunds.md)**: refund a transaction from the Dashboard
- **[Bulk payouts](https://hub.ozow.com/integration-methods/no-code/bulk-payouts.md)**: upload a CSV of payouts for approval
- **[Plugins and Platforms](https://hub.ozow.com/integration-methods/plugins-and-platforms.md)**:
  install and configure, nothing to build