Get List of Onramp Transactions

Overview

This API call retrieves a list of transactions for a user, filtered by onramp transactions. The response includes detailed information about each transaction, including status, amount, and associated metadata.


Endpoint

URL: https://mudrex.com/api/v2/wallet/transactions?transaction_type=ONRAMP_AND_WITHDRAW
Method: GET


Headers

HeaderDescription
X-TimestampA UNIX timestamp for the request. Used for generating a secure signature.
X-Client-IdYour unique client ID is provided by Saber Money.
X-Request-IdA unique identifier for the request (optional but recommended).
X-User-IdThe unique ID of the user whose transactions are being fetched.
X-Secret-KeyYour API secret key for authenticating the request.

Response Fields

FieldDescription
idUnique identifier of the transaction.
transaction_typeType of transaction (e.g., EXTERNAL_BUY).
statusCurrent status of the transaction (e.g., ONRAMP_COMPLETED, FAILED).
amountThe total amount involved in the transaction.
created_atTimestamp when the transaction was created.
updated_atTimestamp when the transaction was last updated.
failure_codeError code for failed transactions (if applicable).
failure_descDescription of why the transaction failed (if applicable).
fiat_amountThe amount in fiat currency (if applicable).
crypto_amountThe amount in cryptocurrency (if applicable).
total_feeTotal fees applied to the transaction.
fee_breakupDetailed breakdown of fees (e.g., platform, network, and client fees).

Sample API Call

curl --location 'https://mudrex.com/api/v2/wallet/transactions?transaction_type=ONRAMP_AND_WITHDRAW' \
--header 'X-Timestamp: 1705491300' \
--header 'X-Client-Id: CLIENT_ID_HERE' \
--header 'X-Request-Id: CC' \
--header 'X-User-Id: USER_ID_HERE' \
--header 'X-Secret-Key: SECRET_KEY_HERE'

Sample Response

{
  "success": true,
  "data": [
    {
      "id": "7f6d5dba-37ea-4cb3-92a8-4c3230bd2162",
      "transaction_type": "EXTERNAL_BUY",
      "status": "ONRAMP_COMPLETED",
      "amount": 1.084745,
      "created_at": 1726956980000,
      "updated_at": 1726957204000
    },
    {
      "id": "e255a814-ddac-465b-a061-eaf760f56ded",
      "transaction_type": "EXTERNAL_BUY",
      "status": "FAILED",
      "amount": 1.084745,
      "failure_code": "ONRAMP_FAILED",
      "failure_desc": "Payment not received from the user",
      "created_at": 1726956825000,
      "updated_at": 1727043307000
    }
  ]
}

Use Cases

  1. Transaction Tracking:

    • Retrieve all transactions for a user to monitor their history and status.
  2. Error Analysis:

    • Use failure_code and failure_desc to analyze and debug failed transactions.
  3. Financial Reporting:

    • Aggregate and analyze transaction data for reporting or reconciliation purposes.

Notes

  1. Real-Time Monitoring:
    • For the latest updates, combine this API with Saber Money’s webhook system for real-time notifications.

This API is critical for comprehensive transaction tracking and reconciliation in your application. Read more here


Check more details about this API endpoint here.


Did this page help you?