↘️GET All Payouts

In this section, you’ll learn how to retrieve all payout records from your PayRam server, including their details and current statuses.


URL Details

Before making the request, you’ll need the following parameters that define your PayRam environment and platform.

Parameter
Description

BASE_URL

Your PayRam server URL

API Endpoint

Full endpoint path for retrieving all payouts.

/api/v1/withdrawal/merchant

Query Parameters

Before making the request, you’ll need the following parameters that define your PayRam environment and platform.

Parameter
Description
Example

limit

Defines how many payout records to fetch per request. Optional but recommended for pagination.

10

offset

Specifies where to start fetching results (used for pagination). Optional.

0

order

Sorting order. Use ASC for ascending or DESC for descending.

DESC

sortBy

Field name to sort results by (e.g., createdAt, amount).

createdAt

Note: If you don’t include limit or offset, all payouts will be retrieved by default.

Headers

Headers are required for authenticating and defining the content type of your request.

Header
Description
Example

API-Key

Your unique PayRam API key generated from your dashboard.

be703fa47ebe07121102ee260fb3d5c0

Content-Type

Format of the data being sent.

application/json

Note : You can generate a unique API key for each project directly from the PayRam dashboard. This helps you manage and track payouts separately for every project.

curl Request

Before running the command, replace the placeholders with your actual details:

  • ${BASE_URL} → Your PayRam server URL

  • <API_KEY> → Your PayRam API key

curl --location --request GET '${BASE_URL}/api/v1/withdrawal' \
--header 'API-Key: <API_KEY>' \
--header 'Content-Type: application/json'

curl Response

This API returns an array of payout records. Each object in the array represents a single payout entry from your PayRam database.

[
  {
    "id": 101,
    "blockchainCode": "ETH",
    "currencyCode": "USDC",
    "amount": "50000",
    "priceInUSD": "1",
    "amountInUSD": "50000",
    "toAddress": "0x1234567890abcdef1234567890abcdef12345678",
    "recipientEmail": "[email protected]",
    "status": "sent",
    ...
  },
  {
    "id": 102,
    "blockchainCode": "TRX",
    "currencyCode": "USDT",
    "amount": "25000",
    "priceInUSD": "1",
    "amountInUSD": "25000",
    "toAddress": "TXYZ1234567890abcdefT1234567890abcd",
    "recipientEmail": "[email protected]",
    "status": "pending-approval",
    ...
  }
]

Last updated