Embedded Wallets
SDK
Javascript
How to
On Ramp
List Transaction

List All On Ramp Transactions

List On-Ramp Transactions

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

Method Signature

async transactions(params: XellarOnRampTransactionListParams): Promise<XellarOnRampTransactionListResponse>

Parameters

params: XellarOnRampTransactionListParams - An object with the following properties:

  • limit: number (optional) - Limit the number of on-ramp transactions returned.
  • page: number (optional) - Specify the page number of the on-ramp transactions to retrieve.
  • sort: string (optional) - Sort the on-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 on-ramp transaction by name or email.
  • status: string (optional) - Filter on-ramp transactions by status (pending, processed, completed, or failed).
  • reason: string (optional) - Filter on-ramp transactions by reason.
  • minInputAmount: number (optional) - Filter on-ramp transactions by minimum input amount.
  • maxInputAmount: number (optional) - Filter on-ramp transactions by maximum input amount.
  • minOutputAmount: number (optional) - Filter on-ramp transactions by minimum output amount.
  • maxOutputAmount: number (optional) - Filter on-ramp transactions by maximum output amount.
  • organizationId: string (optional) - Filter on-ramp transactions by organization id.
  • organizationName: string (optional) - Filter on-ramp transactions by organization name.
  • blockchain: string (optional) - Filter on-ramp transactions by blockchain.
  • receiverName: string (optional) - Filter on-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<XellarOnRampTransactionListResponse> - An object containing the paginated list of on-ramp transactions and metadata.

Example Usage

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

Response Example

{
  "docs": [
    {
      "feeDetail": {
        "rate_amount": 15676.51352,
        "total_fee_amount": 224.5397227839727,
        "total_fee_amount_in_currency": 3520000.0000000005
      },
      "receiver": {
        "id": "64914aXXXXXX6d801de2e35b",
        "name": "Vicking",
        "email": "vicking@gmail.com",
        "phoneNumber": "",
        "walletAddress": "0x9E79cDXXXXXX7F66451FXXXX77b6Fd732EXXXX"
      },
      "onrampId": "d3112216-897a-XXXX-XXXX-f5d5c9f0c644",
      "acceptanceMethod": "virtual_account_mandiri",
      "inputAmount": 10000,
      "inputAmountExact": 10000,
      "inputCurrency": "IDR",
      "outputCurrency": "usdt",
      "outputAmount": 0.6351903920125651,
      "outputAmountExact": 0.4954485057698008,
      "reason": "",
      "description": "",
      "status": "expired",
      "organizationId": "648XXfbf0a0XXXXee4XX2afc",
      "organizationName": "Some Organisation",
      "blockchain": "polygon",
      "externalOrderId": "1706273065XXXX6568",
      "expiredDate": "2024-01-26T12:54:25.707Z",
      "cryptoId": "usdt-polygon",
      "useSmartContract": false,
      "blockchainType": "EVM",
      "createdAt": "2024-01-26T12:44:25.724Z",
      "updatedAt": "2024-01-26T12:54:26.074Z",
      "id": "65b3a929b6b4XXXXXXX7f3dd0"
    }
    // ... more transactions
  ],
  "totalDocs": 11,
  "offset": 0,
  "limit": 10,
  "totalPages": 2,
  "page": 1,
  "pagingCounter": 1,
  "hasPrevPage": false,
  "hasNextPage": true,
  "prevPage": null,
  "nextPage": 2
}
}
ℹ️

By default, a maximum of ten on-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, 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 On-Ramp List Transactions API Documentation (opens in a new tab).