Transactions
API endpoints for managing transactions in the PayID platform
These endpoints enable users to initiate transactions for sending tokens to PayID recipients or wallet addresses. Also they provide users with the ability to retrieve their transaction activity history.
Initialize a transaction for sending tokens to a PayID recipient or wallet address.
Token & Network Compatibility
Only specific token and network combinations are supported. Currently supported:
Tokens: USDT, USDC, ETH, BNB, POL
Networks: ETH, POL, OP, BNB, BASE
Unsupported combinations:
POL token on OP network
BNB token on OP network
USDT token on BASE network
BNB token on BASE network
POL token on BASE network
ERC20 Token Approvals
For ERC20 tokens (USDT, USDC), when the user has insufficient token allowance, an approveTx
will be included in the response.
The client must execute this approval transaction first, then execute the main transaction.
Native tokens (ETH, BNB, POL) do not require approval transactions.
Route and Swap Logic
When sending to a PayID that has routes configured, automatic token swapping may occur based on the route settings. In such cases, fee information will be included in the response.
ID of the user initiating the transaction
123e4567-e89b-12d3-a456-426614174001
Amount to send (must be a positive number)
0.5
Token to send
USDT
Possible values: Network to use for the transaction
POL
Possible values: PayID of the recipient (either recipientPayId or walletAddress is required, but not both)
johndoe
Wallet address of the recipient (either recipientPayId or walletAddress is required, but not both)
0xa1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0
Optional message to include with the transaction (max 280 characters)
Invoice payment #12345
Transaction initialized successfully
Invalid input data
Unauthorized
Recipient not found
Server error
POST /v1/transactions HTTP/1.1
Host: api.reveel.id
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 216
{
"userId": "123e4567-e89b-12d3-a456-426614174001",
"amount": 0.5,
"token": "USDT",
"network": "POL",
"recipientPayId": "johndoe",
"walletAddress": "0xa1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0",
"message": "Invoice payment #12345"
}
{
"success": true,
"data": {
"amount": 0.5,
"token": "USDT",
"network": "POL",
"tx": {
"to": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b",
"data": "0xa9059cbb000000000000000000000000a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b000000000000000000000000000000000000000000000000000000000007a120",
"value": "0",
"chainId": 137
},
"fees": {
"applicationFee": null,
"protocolFee": null,
"bridgeFee": null
},
"approveTx": {
"to": "0x1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d7e8f9a0b",
"data": "0x095ea7b3000000000000000000000000a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9bffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
"chainId": 137
}
},
"meta": {
"message": "Transaction initialized successfully"
}
}
Get transaction activities for a specific user with pagination.
This endpoint returns both incoming (RECEIVE) and outgoing (SEND) transactions for the specified user, sorted by creation date in descending order (newest first).
The response includes detailed information about each transaction, including amounts, fees, and related route information when applicable.
ID of the user to get activities for
Page number for pagination
1
Number of items per page
10
Transaction activities retrieved successfully
Invalid input parameters
Unauthorized
Forbidden - User does not have access to this data
User not found
Server error
GET /v1/transactions/users/{userId}/activities HTTP/1.1
Host: api.reveel.id
Authorization: Bearer JWT
Accept: */*
{
"success": true,
"data": {
"activities": [],
"pagination": {
"totalCount": 25,
"totalPages": 3,
"currentPage": 1,
"pageSize": 10
}
},
"meta": {}
}
Last updated
Was this helpful?