List transactions#
curl https://api.niripay.com/api/v1/merchant/crypto/transactions \
-H "Authorization: Bearer YOUR_API_KEY"Returns merchant receipts and payouts in data. The current history implementation returns at most 1,000 records; it is not a paginated archival export.
Get transaction status#
GET /api/v1/merchant/crypto/transactions/{encoded-id}
const transactionId = "EXACT_ID_FROM_API_RESPONSE";
const response = await fetch(
`https://api.niripay.com/api/v1/merchant/crypto/transactions/${encodeURIComponent(transactionId)}`,
{ headers: { Authorization: `Bearer ${process.env.NIRIPAY_API_KEY}` } }
);
const result = await response.json();
if (!response.ok || result.status !== "success") {
throw new Error(result.message || "Transaction lookup failed");
}Use the exact API ID, URL-encoded in the path. Do not substitute dashboard display references.
Transaction fields#
Fields depend on whether the transaction is a receipt or payout.
| Field | Meaning |
|---|---|
id / type | Transaction identity and kind |
purpose / provider | Address purpose and provider key |
customer_id | Associated customer, when present |
address / txid | Address and blockchain transaction reference, when available |
transfer_index | Transfer index, where provided |
gross / fee / net | Receipt amounts as decimal strings |
amount / charge | Payout recipient amount and additional charge |
state | Current transaction state |
currency / network | USDT / TRON |
created_at | Creation timestamp |
Callback envelope#
Crypto events contain event_id, event, and transaction. Event names reflect the transaction kind and state, such as crypto.receipt.available.
Verify the signature against the raw body using the webhook signing contract. Deduplicate by event_id and apply each ledger effect once. A valid timestamp alone does not prevent repeated processing.
Receipt accounting#
Two transfers of the same amount from one customer produce separate receipts. Credit depends on actual received funds and the receipt’s saved fee. Deposit fees are snapshotted at first observation, rounded down to one micro-USDT, and are not repriced by callback retries.
Unfreezing a receipt moves it through confirmation, collection, or availability without creating a second credit.