---
title: Crypto Payout Server-Side API
slug: crypto/crypto-payout-server-side-api
docTags: 
createdAt: 2025-12-24T09:20:59.034Z
---

This document explains how to create a crypto payout order and process user withdrawals using a backend-only, server-to-server API without any user interface.

The [Create Crypto Payout Order](docId\:IEq0Z9YKfF9P0j4hQjrto) API creates a payout order and returns the parameters required to process the withdrawal.  When **mode=createExecute** is passed, no website URL or UI is generated. Instead, the API response includes the `token` and `requestId`, along with the `estimatedFees` and `estimatedNetAmount` for the payout.

Once you receive these parameters, your backend can call the [Execute Crypto Payout Order](docId\:x09Tjd60sMXVAu8WEBuCN) API to complete the withdrawal. This final API asyncronously submits the transaction to blockchain.

Pay3 backend sends events to your backend service with real-time updates on the payout status. When you receive an event, you may call the [Get Crypto Order Details](docId\:K0ei093RNpNlzJ1V6lN43) API to fetch the latest payout information.
**Note**: Refer to the `receivedAmount` field to verify the paid sum.

## Steps

### Step 1: Get Access Token&#x20;

To generate the Access Token, you will call the API with the api-secret and client-id. Please refer to the [Access Token](docId\:HcCaKrQI4shqRFFPCBoiR).&#x20;

### Step 2: Create a Signature with Parameters

The payout request requires a signature in the header. This can be generated using the javascript code snippet here [Signature Generation](docId\:IEq0Z9YKfF9P0j4hQjrto).

### Step 3: Call [Create Crypto Payout Order](docId\:IEq0Z9YKfF9P0j4hQjrto) API

Send the required parameters and ensure mode = 'createEstimate' is enable&#x64;**.&#x20;**&#x54;he response will include: `token`**,&#x20;**`requestId`**,&#x20;**`currency`**,&#x20;**`address`**,&#x20;**`estimatedFees`**,&#x20;**`estimatedNetAmount`**.&#x20;**

Sample Payload

```javascript
const payloadCryptoPayout = {
 "requestId": "a1d4a50e-5577-4581-a980-98b03bc76260", // TODO: Application’s Order Id, send unique id for every order (preferably UUID)
 "address": "tb1.....", // TODO: add your address to receive the USDT
 "currency": "btc_bitcointestnet", // Please reach out to Pay3 team for enabled currencies in your clientId 
 "amount": "0.001", // Amout of Bitcoin (in this case)
 "clientId":"....",// TODO: your clientId
 "payerEmail": "user@email.com",  //pass the email of the user (uniqueId)
 "mode": "createEstimate"
}

```

Sample response

```javascript
{
    "token": "a003d60c-d0ae-40e5-a7cb-2634ab607253",
    "requestId": "a1d4a50e-5577-4581-a980-98b03bc76260",
    "currency": "btc_bitcointestnet",
    "address": "tb1q7sqtxktz3jle8evmfnnhv45s0maudwdtknmdqu",
    "warning": "The btc_bitcointestnet balance (0.0031) is below the configured threshold (100.0000).",
    "estimatedFees": "0.000066",
    "estimatedNetAmount": "0.000034"
}
```

### Step 4: Call the [Execute Crypto Payout Order](docId\:x09Tjd60sMXVAu8WEBuCN) API.

Using the `clientId`, `token`**,&#x20;**`requestId` call this API. This API processes the payout and returns the final payout result.

Sample Payload

```javascript
const payloadCryptoPayout = {
    "token":"a003d60c-d0ae-40e5-a7cb-2634ab607253",
    "requestId":"a1d4a50e-5577-4581-a980-98b03bc76260",
    "clientId":"...."
}
```

Sample Response

```javascript
{
    "txnHash": "...",
    "orderType": "PAYOUT",
    "orderId": "3b5a941c-efef-4125-9237-3216ddd6f607",
    "requestId": "a1d4a50e-5577-4581-a980-98b03bc76260",
    "status": "ORDER_PAYMENT_PROCESSING"
}
```

### Step 5: Listen for Webhook Events&#x20;

Pay3 backend sends webhook notifications with status updates.
Upon receiving an event, you may call the [Get Crypto Order Details](docId\:K0ei093RNpNlzJ1V6lN43) to retrieve the latest payout details.

***

