get
https://api.neutron.me/api/v2/transaction/
Retrieve specified transaction
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
Retrieve the full details and current status of a specific transaction.
Example Request
curl https://api.neutron.me/api/v2/transaction/5e25d2f4-9bca-4b7a-a1ad-2cf056100cb6 \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"Example Response
{
"txnId": "5e25d2f4-9bca-4b7a-a1ad-2cf056100cb6",
"accountId": "ne01-abc123def456",
"extRefId": "order-12345",
"txnState": "completed",
"sourceReq": {
"ccy": "BTC",
"method": "lightning",
"amtRequested": 0.0001,
"amtSettled": 0.0001,
"neutronpayFees": 0,
"networkFees": 0,
"reqStatus": "2",
"createAt": 1770342000000,
"updatedAt": 1770342177000
},
"destReq": {
"ccy": "BTC",
"method": "neutronpay",
"amtRequested": 0.0001,
"amtSettled": 0.0001,
"reqStatus": "2"
},
"fxRate": 1,
"createdAt": 1770342000000
}Key Response Fields
| Field | Description |
|---|---|
txnState | Current state — see Transaction Status Types |
amtRequested | Amount originally requested |
amtSettled | Actual amount settled (populated after completion) |
neutronpayFees | Neutron service fee charged |
networkFees | Network/mining fee charged |
reqStatus | Request status: "0" = pending, "2" = completed |
fxRate | Exchange rate applied (1 for same-currency) |
extRefId | Your reference ID (if provided at creation) |
Polling for Status
If you're not using webhooks, you can poll this endpoint to track transaction progress:
async function waitForCompletion(txnId, token) {
const finalStates = ['completed', 'failed', 'expired', 'rejected', 'error', 'usercanceled'];
while (true) {
const res = await fetch(`https://api.neutron.me/api/v2/transaction/${txnId}`, {
headers: { 'Authorization': `Bearer ${token}` }
});
const txn = await res.json();
if (finalStates.includes(txn.txnState)) {
return txn;
}
await new Promise(r => setTimeout(r, 3000)); // Poll every 3 seconds
}
}
Webhooks are recommended over polling for production. See the Webhook Guide for setup.
Related
- List transactions — Query multiple transactions
- Transaction Status Types — All states explained
- Webhook Guide — Real-time status notifications
401Unauthorized - Invalid or missing authentication credentials
404Not Found - The requested transaction does not exist
