Routes

API endpoints for managing Routes in the PayID platform.

Routes define how incoming payments are handled, including which networks and tokens are accepted, optional token swaps, and the destination wallet for final transfers.

When creating a route, consider these important factors:

  • Each route must have a unique combination of incoming networks and tokens per user.

  • Certain network-token combinations are not supported (see Unsupported Combinations section).

  • Users can have multiple routes with different configurations.

Create a new route

post

Create a new route for a specific user. A route defines how incoming payments should be processed. Routes must have a unique combination of incoming networks and tokens per user. Certain network-token combinations are not supported (see API description for details).

Authorizations
Body
userIdstring · uuidRequired

ID of the user this route belongs to

Example: 38acfa0a-74a6-4e37-9168-eeddacc36444
namestringRequired

Name of the route. Minimum length: 1 character.

Example: my first route ever
incomingWalletsstring[]Optional

List of incoming wallet addresses that can use this route. The system performs minimal validation - verify addresses are valid for the corresponding blockchain.

Example: ["0x9c02cBF68E61591A2d8f05dF3318e244768f7ec0","0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"]
swapNetworkstring · enum | nullableOptional

Network to swap on (optional). If provided, swapToken must also be specified.

Possible values:
swapTokenstring · enum | nullableOptional

Token to swap to (optional). If provided, swapNetwork must also be specified.

Possible values:
outgoingWalletstringRequired

Destination wallet address where funds will be sent. The system performs minimal validation - ensure you're providing a valid blockchain address for the corresponding network.

Example: 0x9c02cBF68E61591A2d8f05dF3318e244768f7ec0
Responses
201
Route created successfully
application/json
post
POST /v1/routes HTTP/1.1
Host: api.reveel.id
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 339

{
  "userId": "38acfa0a-74a6-4e37-9168-eeddacc36444",
  "name": "my first route ever",
  "incomingWallets": [
    "0x9c02cBF68E61591A2d8f05dF3318e244768f7ec0",
    "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
  ],
  "incomingNetworks": [
    "ETH"
  ],
  "incomingTokens": [
    "USDT"
  ],
  "swapNetwork": null,
  "swapToken": null,
  "outgoingWallet": "0x9c02cBF68E61591A2d8f05dF3318e244768f7ec0"
}
{
  "success": true,
  "data": {
    "route": {
      "id": "fbb5564f-7184-4e51-a434-e2cf3e45d3d1",
      "name": "my first route ever",
      "incomingWallets": [
        "0x9c02cBF68E61591A2d8f05dF3318e244768f7ec0",
        "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
      ],
      "incomingNetworks": [
        "ETH"
      ],
      "incomingTokens": [
        "USDT"
      ],
      "swapNetwork": null,
      "swapToken": null,
      "outgoingWallet": "0x9c02cBF68E61591A2d8f05dF3318e244768f7ec0",
      "userId": "38acfa0a-74a6-4e37-9168-eeddacc36444",
      "createdAt": "2025-04-14T03:39:12.630Z",
      "updatedAt": "2025-04-14T03:39:12.630Z"
    }
  },
  "meta": {
    "message": "Route created successfully"
  }
}

Unsupported Combinations

The following network - token combinations are not supported:

Network
Token

OP

POL

OP

BNB

BASE

USDT

BASE

BNB

BASE

POL

Get all routes for a user

get

Retrieve all routes for a specific user.

Authorizations
Path parameters
userIdstring · uuidRequired

ID of the user to get routes for

Responses
200
Routes retrieved successfully
application/json
get
GET /v1/routes/{userId} HTTP/1.1
Host: api.reveel.id
Authorization: Bearer JWT
Accept: */*
{
  "success": true,
  "data": {
    "routes": [
      {
        "id": "fbb5564f-7184-4e51-a434-e2cf3e45d3d1",
        "name": "my first route ever",
        "incomingWallets": [
          "0x9c02cBF68E61591A2d8f05dF3318e244768f7ec0",
          "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
        ],
        "incomingNetworks": [
          "ETH"
        ],
        "incomingTokens": [
          "USDT"
        ],
        "swapNetwork": null,
        "swapToken": null,
        "outgoingWallet": "0x9c02cBF68E61591A2d8f05dF3318e244768f7ec0",
        "userId": "38acfa0a-74a6-4e37-9168-eeddacc36444",
        "createdAt": "2025-04-14T03:39:12.630Z",
        "updatedAt": "2025-04-14T03:39:12.630Z"
      }
    ],
    "count": 2
  },
  "meta": {
    "message": "Found 2 route(s)"
  }
}

Update an existing route

put

Update an existing route by ID. Supports partial updates.

Authorizations
Path parameters
idstring · uuidRequired

ID of the route to update

Body
userIdstring · uuidRequired

ID of the user this route belongs to. This is required as an authorization check, not as a field to update.

Example: 38acfa0a-74a6-4e37-9168-eeddacc36444
namestringOptional

Name of the route. Minimum length: 1 character.

Example: my first route ever
incomingWalletsstring[]Optional

List of incoming wallet addresses

Example: ["0x9c02cBF68E61591A2d8f05dF3318e244768f7ec0","0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"]
swapNetworkstring · enum | nullableOptional

Network to swap on (optional)

Possible values:
swapTokenstring · enumOptional

Token to swap to (optional)

Example: ETHPossible values:
outgoingWalletstringOptional

Destination wallet address. Minimal validation is performed - ensure it's a valid address for the network.

Example: 0x9c02cBF68E61591A2d8f05dF3318e244768f7ec0
Responses
200
Route updated successfully
application/json
put
PUT /v1/routes/{id} HTTP/1.1
Host: api.reveel.id
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 340

{
  "userId": "38acfa0a-74a6-4e37-9168-eeddacc36444",
  "name": "my first route ever",
  "incomingWallets": [
    "0x9c02cBF68E61591A2d8f05dF3318e244768f7ec0",
    "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
  ],
  "incomingNetworks": [
    "ETH"
  ],
  "incomingTokens": [
    "USDT"
  ],
  "swapNetwork": null,
  "swapToken": "ETH",
  "outgoingWallet": "0x9c02cBF68E61591A2d8f05dF3318e244768f7ec0"
}
{
  "success": true,
  "data": {
    "route": {
      "id": "fbb5564f-7184-4e51-a434-e2cf3e45d3d1",
      "name": "my first route ever",
      "incomingWallets": [
        "0x9c02cBF68E61591A2d8f05dF3318e244768f7ec0",
        "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045"
      ],
      "incomingNetworks": [
        "ETH"
      ],
      "incomingTokens": [
        "USDT"
      ],
      "swapNetwork": null,
      "swapToken": null,
      "outgoingWallet": "0x9c02cBF68E61591A2d8f05dF3318e244768f7ec0",
      "userId": "38acfa0a-74a6-4e37-9168-eeddacc36444",
      "createdAt": "2025-04-14T03:39:12.630Z",
      "updatedAt": "2025-04-14T03:39:12.630Z"
    }
  },
  "meta": {
    "message": "Route updated successfully"
  }
}

Delete a route

delete

Delete a route by ID.

Authorizations
Path parameters
idstring · uuidRequired

ID of the route to delete

Body
userIdstring · uuidRequired

ID of the user this route belongs to

Example: 38acfa0a-74a6-4e37-9168-eeddacc36444
Responses
200
Route deleted successfully
application/json
delete
DELETE /v1/routes/{id} HTTP/1.1
Host: api.reveel.id
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 49

{
  "userId": "38acfa0a-74a6-4e37-9168-eeddacc36444"
}
{
  "success": true,
  "data": {},
  "meta": {
    "message": "Route deleted successfully"
  }
}

Last updated

Was this helpful?