Skip to main content
This guide explains how to integrate Mavapay’s payout functionality for sending money to South African bank accounts.

Overview

The ZAR payout process involves the following steps:
  1. Get the list of supported South African banks
  2. Create a quote for the amount you want to pay out
  3. Pay the generated lightning invoice
  4. Receive webhook notifications for payment status

Prerequisites

Before you begin, ensure you have:
  1. Created a Mavapay account
  2. Obtained your API key
  3. Set up your webhook endpoint
  4. Verified your business account

Authentication

All API requests must include your API key in the header:

Getting Bank List

First, retrieve the list of supported South African banks:

Creating a Quote

Important Notes:
  • All amounts are in cents (1 ZAR = 100 cents)
  • To send 3,000 ZAR, use amount = 300000 cents
  • The minimum amount for ZAR payouts is $2
Sample response:

Understanding the Quote Response

  • usdToTargetCurrencyRate: Price of 1 USD in ZAR
  • exchangeRate: Price of 1 BTC in ZAR
  • amountInSourceCurrency: Total amount in SATS to be paid (including fees)
  • amountInTargetCurrency: Total amount in cents to be sent to recipient
  • transactionFeesInSourceCurrency: Fees in SATS (included in amountInSourceCurrency)
  • transactionFeesInTargetCurrency: Fees in cents
  • expiry: Invoice validity (5 minutes)
  • customerInternalFee: Currently disabled for ZAR payments

Webhook Events

You’ll receive two webhook events:
  1. payment.received - When the lightning payment is received
  2. payment.sent - When the money is sent to the recipient’s bank account

payment.received Event

payment.sent Event

Checking Transaction Status

You can query transactions using the payment hash, orderId, or transaction ID:

Getting Price Rates

To get current ZAR rates:
Sample response:

Testing

Use our staging environment for testing:
Test bank account details:
  • Account Number: 1352900000
  • Bank: CAPITEC BANK
  • Account Holder: Ricki Tester
Note: All test environment invoices are signet invoices.

Support

If you need help with integration: