> For the complete documentation index, see [llms.txt](https://sonic-payment-gateway.gitbook.io/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sonic-payment-gateway.gitbook.io/home/payouts/crypto-payouts.md).

# Crypto Payouts

## Introduction

Sonic Payment Gateway allows merchants to send crypto from their Sonic Payment Gateway account to an external wallet using our APIs. This feature can be useful for businesses that want to payout their earnings in crypto to customers or vendors.

## Create Crypto Payout&#x20;

To create a crypto payout, make a POST request to the following endpoint: [https://api.sonicpay.org/api/v1/payouts/crypto](https://api.sonicpay.engineering/api/v1/payouts/crypto)&#x20;

Include the following information in the request body:

| Property           | Type   | Description                                      |
| ------------------ | ------ | ------------------------------------------------ |
| recipient\_address | string | The crypto address of the recipient              |
| crypto\_currency   | string | The cryptocurrency to send (e.g. BTC, ETH, LTC)  |
| amount             | number | The amount of crypto to send                     |
| memo               | string | An optional memo to include with the transaction |

Example curl request:

```
curl -X POST https://api.sonicpay.org/api/v1/payouts/crypto \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-d '{
  "recipient_address": "1BvBMSEYstWetqTFn5Au4m4GFg7xJaNVN2",
  "crypto_currency": "BTC",
  "amount": 0.1,
  "memo": "Payment for services rendered"
}'

```

## Get all Crypto Payouts

To retrieve a list of all crypto payouts, make a GET request to the following endpoint: [https://api.sonicpay.org/api/v1/payouts/crypto](https://api.sonicpay.engineering/api/v1/payouts/crypto)

The API will return a 200 OK response if the request is successful, with an array of crypto payout objects in the response body. Each object will have the following properties:

| Property           | Type   | Description                                                                  |
| ------------------ | ------ | ---------------------------------------------------------------------------- |
| id                 | string | The unique identifier for the crypto payout                                  |
| transaction\_id    | string | The transaction ID for the crypto payout                                     |
| amount             | number | The amount of crypto sent in the payout                                      |
| crypto\_currency   | string | The cryptocurrency sent in the payout                                        |
| recipient\_address | string | The crypto address of the recipient                                          |
| memo               | string | An optional memo included with the transaction                               |
| status             | string | The status of the crypto payout (e.g. succeeded, failed)                     |
| metadata           | object | Additional information associated with the crypto payout, in key-value pairs |
| created\_at        | string | The date and time the crypto payout was created, in ISO 8601 format          |

## Delete Crypto Payout

To delete a crypto payout, make a DELETE request to the following endpoint: [https://api.sonicpay.org/api/v1/payouts/crypto/:id](https://api.sonicpay.engineering/api/v1/payouts/crypto/:id)

Example curl request:

```
curl -X DELETE https://api.sonicpay.org/api/v1/payouts/crypto/:id \
-H 'Authorization: Bearer YOUR_API_KEY'

```

The API will return a 204 No Content response if the request is successful.

## Send crypto from Sonic Payment Gateway to an external wallet using our APIs

This feature allows merchants to send cryptocurrency to an external wallet using our APIs. This can be done by creating a new crypto payout using the Create Crypto Payout endpoint. Once the payout is created, the cryptocurrency will be transferred to the specified recipient address.

## Crypto Transfer API

The Crypto Transfer API is a set of endpoints that enable merchants to create, view, update, and delete crypto payouts. This includes the ability to send cryptocurrency to an external wallet, view the status of a crypto payout, and view all crypto payouts associated with an account. The endpoints include Create Crypto Payout, Get Crypto Payout, Get All Crypto Payouts, Update Crypto Payout, and Delete Crypto Payout.

To send crypto from your Sonic Payment Gateway account to an external wallet, you can use the Crypto Transfer API.

First, you'll need to make a POST request to the following endpoint: [https://api.sonicpay.org/api/v1/payouts/crypto](https://api.sonicpay.engineering/api/v1/payouts/crypto)

In the request body, include the following information:

* recipient\_address (string): The crypto address of the recipient
* crypto\_currency (string): The cryptocurrency to send (e.g. BTC, ETH, LTC)
* amount (number): The amount of crypto to send
* memo (string): An optional memo to include with the transaction

Example curl request:

```
curl -X POST https://api.sonicpay.org/api/v1/payouts/crypto \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "recipient_address": "0x742d35Cc6634C0532925a3b844Bc454e4438f44e",
    "crypto_currency": "ETH",
    "amount": "0.5",
    "memo": "Payout for services rendered"
  }'

```

If the request is successful, the API will return a 200 OK response with the details of the crypto payout in the response body. This will include a unique id for the payout, as well as information such as the transaction id, amount, crypto currency, recipient address, and status of the payout.

You can also view all crypto payouts made from your account by making a GET request to the following endpoint: [https://api.sonicpay.org/api/v1/payouts/crypto](https://api.sonicpay.engineering/api/v1/payouts/crypto)

The API will return a 200 OK response with an array of crypto payout objects in the response body. Each object will have the properties as mentioned above in the table.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sonic-payment-gateway.gitbook.io/home/payouts/crypto-payouts.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
