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
| Header | Description |
|---|---|
X-Timestamp | A UNIX timestamp for the request. Used for generating a secure signature. |
X-Client-Id | Your unique client ID is provided by Saber Money. |
X-Request-Id | A unique identifier for the request (optional but recommended). |
X-User-Id | The unique ID of the user whose transactions are being fetched. |
X-Secret-Key | Your API secret key for authenticating the request. |
Response Fields
| Field | Description |
|---|---|
id | Unique identifier of the transaction. |
transaction_type | Type of transaction (e.g., EXTERNAL_BUY). |
status | Current status of the transaction (e.g., ONRAMP_COMPLETED, FAILED). |
amount | The total amount involved in the transaction. |
created_at | Timestamp when the transaction was created. |
updated_at | Timestamp when the transaction was last updated. |
failure_code | Error code for failed transactions (if applicable). |
failure_desc | Description of why the transaction failed (if applicable). |
fiat_amount | The amount in fiat currency (if applicable). |
crypto_amount | The amount in cryptocurrency (if applicable). |
total_fee | Total fees applied to the transaction. |
fee_breakup | Detailed 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
-
Transaction Tracking:
- Retrieve all transactions for a user to monitor their history and status.
-
Error Analysis:
- Use
failure_codeandfailure_descto analyze and debug failed transactions.
- Use
-
Financial Reporting:
- Aggregate and analyze transaction data for reporting or reconciliation purposes.
Notes
- 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.
Updated 12 months ago
Did this page help you?