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

NameTypeDescription

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

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

currency*

string

The symbol of the cryptocurrency to be sent (e.g., BTC, ETH, LTC, etc.).

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).
}

Payout Status

StatusDescription

Processing

The payout is being processed and prepared for sending.

Sending

The payout is being sent to the recipient.

Complete

The payout has been successfully completed, and the cryptocurrency has been sent to the recipient.

Rejected

The payout has been rejected or encountered an error.

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"
}'

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

Last updated