Embedded Wallets
SDK
Javascript
How to
Off Ramp
List Transaction

List All Off-Ramp Transactions

List Off-Ramp Transactions

This method allows you to retrieve a paginated list of all your off-ramp transactions.

Method Signature

async transactions(params: XellarOffRampTransactionListParams): Promise<XellarOffRampTransactionListResponse>

Parameters

params: XellarOffRampTransactionListParams - An object with the following properties:

  • limit: number (optional) - Limit the number of off-ramp transactions returned.
  • page: number (optional) - Specify the page number of the off-ramp transactions to retrieve.
  • sort: string (optional) - Sort the off-ramp transactions by a specific field. You can sort by createdAt or updatedAt. By default, transactions are sorted by createdAt. Add a hyphen (-) before the field for reverse order.
  • search: string (optional) - Search for an off-ramp transaction by name or email.
  • status: string (optional) - Filter off-ramp transactions by status (pending, processed, completed, refund, or failed).
  • reason: string (optional) - Filter off-ramp transactions by reason.
  • minInputAmount: number (optional) - Filter off-ramp transactions by minimum input amount.
  • maxInputAmount: number (optional) - Filter off-ramp transactions by maximum input amount.
  • minOutputAmount: number (optional) - Filter off-ramp transactions by minimum output amount.
  • maxOutputAmount: number (optional) - Filter off-ramp transactions by maximum output amount.
  • organizationId: string (optional) - Filter off-ramp transactions by organization id.
  • organizationName: string (optional) - Filter off-ramp transactions by organization name.
  • blockchain: string (optional) - Filter off-ramp transactions by blockchain.
  • receiverName: string (optional) - Filter off-ramp transactions by receiver name.
  • rampableAccessToken: string (optional) - The Rampable access token
ℹ️

A rampableAccessToken is required if you want to use rampable operations and not setup HTTP Signature Authentication (Personal Token)

Returns

Promise<XellarOffRampTransactionListResponse> - An object containing the paginated list of off-ramp transactions and metadata.

Example Usage

const transactions = await sdk.offRamp.transactions({
   limit: 10,
   page: 1,
   status: 'completed',
   sort: '-createdAt',
   rampableAccessToken: 'your-rampable-access-token'
});
console.log(transactions);

Response Example

{
    "docs": [
        {
            "feeDetail": {
                "rate_amount": 15636.447900000001,
                "total_fee_amount": 0.3867141758923822,
                "total_fee_amount_in_currency": 6009.323667
            },
            "sender": {
                "id": "65857a1XXXXXX0f4005a817a",
                "name": "John Doe",
                "email": "john.doe@example.com",
                "walletAddress": "-"
            },
            "receiver": {
                "id": "64d344230277cbfe6XXXXXX2",
                "name": "Jane Smith",
                "email": "jane.smith@example.com",
                "accountNumber": "23123232123",
                "ifsc": "1",
                "achNumber": "1",
                "fedwireNumber": "",
                "ibanNumber": "1"
            },
            "offrampId": "f2672b92-XXXX-45fe-XXXX-f0c1279a3076",
            "inputAmount": 10,
            "inputAmountExact": 10,
            "inputCurrency": "usdc",
            "outputCurrency": "IDR",
            "outputAmount": 155394.45,
            "outputAmountExact": 149385.126333,
            "reason": "Salary",
            "description": "January 2024 Salary",
            "status": "completed",
            "organizationId": "-",
            "organizationName": "-",
            "blockchain": "polygon",
            "payOutWallet": "0xXXXXXXXXXXXXXXXX",
            "expiredDate": "2024-01-10T15:03:20.610Z",
            "cryptoId": "usdc-polygon",
            "useSmartContract": false,
            "blockchainType": "EVM",
            "createdAt": "2024-01-10T14:58:20.619Z",
            "updatedAt": "2024-01-10T15:04:00.233Z",
            "id": "659eb08cb58XXXXXX2f84e91"
        }
        // ... more transactions
    ],
    "totalDocs": 1,
    "offset": 0,
    "limit": 10,
    "totalPages": 1,
    "page": 1,
    "pagingCounter": 1,
    "hasPrevPage": false,
    "hasNextPage": false,
    "prevPage": null,
    "nextPage": null
}
ℹ️

By default, a maximum of ten off-ramp transactions are shown per page.

Additional Information

  • The sort parameter allows sorting by createdAt or updatedAt. Add a hyphen (-) before the field name for reverse order (e.g., -createdAt).
  • The status parameter can be used to filter transactions by their current state: pending, processed, completed, refund, or failed.
  • Use the search parameter to find transactions by name or email associated with the transaction.
  • The response includes pagination metadata to help navigate through large sets of transactions.

For more information, see the Rampable Off-Ramp List Transactions API Documentation (opens in a new tab).