curl --request GET \
--url https://api.onswitch.xyz/status \
--header 'x-service-key: <api-key>'{
"success": true,
"message": "Payment status fetched successfully",
"timestamp": "2024-01-01T00:00:00.000Z",
"data": {
"id": "507f1f77bcf86cd799439011",
"status": "PENDING",
"type": "OFFRAMP",
"reference": "550e8400-e29b-41d4-a716-446655440000",
"rate": 1500.5,
"source": {
"amount": 100,
"currency": "USDC"
},
"destination": {
"amount": 150050,
"currency": "NGN"
},
"deposit": {
"bank_name": "Example Bank",
"bank_code": "058",
"account_name": "John Doe",
"account_number": "0123456789"
},
"confirmed": false,
"finalized": false,
"hash": null,
"explorer_url": null,
"meta": null,
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-01-01T00:00:00.000Z"
}
}Retrieve the current status and details of a transaction using its reference identifier.
curl --request GET \
--url https://api.onswitch.xyz/status \
--header 'x-service-key: <api-key>'{
"success": true,
"message": "Payment status fetched successfully",
"timestamp": "2024-01-01T00:00:00.000Z",
"data": {
"id": "507f1f77bcf86cd799439011",
"status": "PENDING",
"type": "OFFRAMP",
"reference": "550e8400-e29b-41d4-a716-446655440000",
"rate": 1500.5,
"source": {
"amount": 100,
"currency": "USDC"
},
"destination": {
"amount": 150050,
"currency": "NGN"
},
"deposit": {
"bank_name": "Example Bank",
"bank_code": "058",
"account_name": "John Doe",
"account_number": "0123456789"
},
"confirmed": false,
"finalized": false,
"hash": null,
"explorer_url": null,
"meta": null,
"created_at": "2024-01-01T00:00:00.000Z",
"updated_at": "2024-01-01T00:00:00.000Z"
}
}Service key for API authentication
The unique transaction reference identifier
Successfully retrieved transaction status
Hide child attributes
AWAITING_DEPOSIT, PENDING, PROCESSING, SENT, COMPLETED, CANCELLED, FAILED, REFUNDED, SCHEDULED, IN_REVIEW OFFRAMP, ONRAMP, SWAP Exchange rate used for the transaction
Blockchain transaction hash
URL to view transaction on blockchain explorer
Additional metadata