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

post

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.

Authorizations
Body
userIdstring · uuidRequired

ID of the user initiating the transaction

Example: 123e4567-e89b-12d3-a456-426614174001
amountnumber · floatRequired

Amount to send (must be a positive number)

Example: 0.5
tokenstring · enumRequired

Token to send

Example: USDTPossible values:
networkstring · enumRequired

Network to use for the transaction

Example: POLPossible values:
recipientPayIdstringOptional

PayID of the recipient (either recipientPayId or walletAddress is required, but not both)

Example: johndoe
walletAddressstringOptional

Wallet address of the recipient (either recipientPayId or walletAddress is required, but not both)

Example: 0xa1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0
messagestring · max: 280Optional

Optional message to include with the transaction (max 280 characters)

Example: Invoice payment #12345
Responses
200

Transaction initialized successfully

application/json
post
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 user transaction activities

get

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.

Authorizations
Path parameters
userIdstring · uuidRequired

ID of the user to get activities for

Query parameters
pageintegerOptional

Page number for pagination

Default: 1
pageSizeintegerOptional

Number of items per page

Default: 10
Responses
200

Transaction activities retrieved successfully

application/json
get
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?