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

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.

Last updated