OxaPay Docs
Legacy
Legacy
  • Introduction
  • Getting Started
  • Integrations
    • Payment Links
    • Donations
    • Merchant API
    • Payout API
    • Plugins
      • WooCommerce
      • WISECP
      • Clientexec
      • Blesta
      • WHMCS
      • PrestaShop
      • Easy Digital Downloads
      • Paid Memberships Pro
      • Gravity Forms
      • Restrict Content Pro
      • VirtueMart
    • Merchant and Payout Service with API
  • API Reference
    • Creating an Invoice
    • Creating White-Label Payment
    • Creating Static Wallet
    • Revoking Static Wallet
    • Static Wallets List
    • Payment Information
    • Payment History
    • Accepted Coins
    • Price
    • Creating Payout
    • Payout Information
    • Payout History
    • Account Balance
    • Exchange Rate
    • Exchange Calculate
    • Exchange Pairs
    • Exchange Request
    • Exchange History
    • Supported Currencies
    • Supported Fiat Currencies
    • Supported Networks
    • System Status
    • Result code table
    • Merchant status table
    • Payout status table
  • Webhook
  • Use Cases
  • Troubleshooting
Powered by GitBook
On this page
  • Example codes
  • Allowed IPs for Transfers
  1. API Reference

Creating Payout

This resource allows users to submit cryptocurrency payouts to active recipients. It caters to various use cases such as offering cryptocurrency withdrawals to clients, facilitating payouts for marketplaces or affiliate networks, or managing payroll by creating multiple payouts at a time.

POST https://api.oxapay.com/api/send

To use this endpoint, you need to make a POST request to the specified URL with the required parameters. The typical parameters for this request include:

Request Body

Name
Type
Description

key*

string

Your payout API key for authentication and authorization.

callbackUrl

string

The URL where payment information and status updates will be sent. You can include additional parameters in the URL if needed.

network

string

memo

string

currency*

string

amount*

decimal

The amount of cryptocurrency to be sent as the payout.

address*

string

The cryptocurrency address of the recipient where the payout will be sent.

description

string

Provide payout details or any additional information that will be shown in different reports.

{
  "result": integer, // The result code indicates the success or failure of the request.
  "message": string, // A message providing additional information about the result.
  "trackId": string, // The unique identifier for the payout request in the OxaPay payment gateway. 
  "status": string // The current status of the payout (Processing, Sending, Complete, or Rejected).
}

Please ensure that you provide the necessary parameters accurately in the request to create a payout successfully. Additionally, handle the response accordingly based on the `result` and `status` fields to track the progress and status of your payouts.

Please note that a successful request will return a result code 100. In case of any issues or validation problems, refer to the corresponding result codes for further details.

Example codes

curl -X POST https://api.oxapay.com/api/send \
-d '{
  "key": "YOUR_PAYOUT_API_KEY",
  "address": "RECEIVER_CRYPTO_ADDRESS",
  "amount": 0.5,
  "currency": "BTC",
  "callbackUrl": "https://example.com/callback"
}'
<?php

$url = 'https://api.oxapay.com/api/send';

$data = array(
  'key' => 'YOUR_PAYOUT_API_KEY',
  'address' => 'RECEIVER_CRYPTO_ADDRESS',
  'amount' => 0.5,
  'currency' => 'BTC',
  'callbackUrl' => 'https://example.com/callback'
);

$options = array(
    'http' => array(
        'header' => 'Content-Type: application/json',
        'method'  => 'POST',
        'content' => json_encode($data),
    ),
);

$context  = stream_context_create($options);
$response = file_get_contents($url, false, $context);
$result = json_decode($response);
var_dump($result);
?>
const axios = require('axios');
const url = 'https://api.oxapay.com/api/send';
const data = {
  key: 'YOUR_PAYOUT_API_KEY',
  address: 'RECEIVER_CRYPTO_ADDRESS',
  amount: 0.5,
  currency: 'BTC',
  callbackUrl: 'https://example.com/callback'
};

axios.post(url, data)
  .then(response => {
    console.log(response.data);
  })
  .catch(error => {
    console.error(error.response.data);
  });
import requests
import json

url = 'https://api.oxapay.com/api/send'
data = {
  'key': 'YOUR_PAYOUT_API_KEY',
  'address': 'RECEIVER_CRYPTO_ADDRESS',
  'amount': 0.5,
  'currency': 'BTC',
  'callbackUrl': 'https://example.com/callback'
}
response = requests.post(url, data=json.dumps(data))
result = response.json()
print(result)

Replace YOUR_PAYOUT_API_KEY with your actual payout API key, and RECEIVER_CRYPTO_ADDRESS with the recipient's cryptocurrency address for the payout.

Allowed IPs for Transfers

To enhance security, you can configure allowed IPs to control who can initiate payout requests. If you set this restriction, only requests coming from the specified IPs will be permitted. Any transfer requests from other IPs will be failed.

To use this feature, you can receive your server's IP address by using the following endpoint:

GET https://api.oxapay.com/api/myip

To determine which IP version works with the OxaPay endpoint, you can use the API provided.

PreviousPriceNextPayout Information

Last updated 6 months ago

The blockchain to be used for the payout. The field is required for external payment

You can set a memo for that support this option.

The to be sent (e.g., BTC, ETH, LTC, etc.).

network
networks
symbol of the cryptocurrency