Skip to main content

Generate Travel Address

Generate a new Travel Address for receiving cryptocurrency transactions with embedded Travel Rule compliance information.

Endpoint

POST https://api.trpcontinuum.com/trp/travel-address

Authentication

Requires API key and secret key authentication.

Headers

HeaderTypeRequiredDescription
x-api-keystringYesYour API key for authentication
x-secret-keystringYesYour secret key for authentication

Request Body

FieldTypeRequiredDescription
userIdstringYesUser ID for the beneficiary
labelstringYesLabel or description for the travel address
emailstringYesEmail address associated with the beneficiary

Example Request

{
"userId": "{{userId}}",
"label": "Travel Address for Transaction",
"email": "user@example.com"
}

Response

Success (200 OK)

{
"success": true,
"data": {
"id": "cf7d27fb-75f9-4ea1-b65a-bd9050bba9db",
"travelAddress": "taN2raFk3zy7RvbLqAmHJ2kDTbSFrDoMhwLdPPzysxhXnGRqgnsfbqktRpoTssSVBXa9XS7nMjGA2Xqb8AH7eGTZx9cyr85KxZr"
},
"message": "Travel address generated successfully"
}

Error (400 Bad Request)

{
"success": false,
"error": "Invalid request data",
"code": "VALIDATION_ERROR",
"details": {
"beneficiaryVaspId": "VASP ID is required",
"walletAddress": "Invalid wallet address format",
"currency": "Unsupported currency for specified network"
}
}

Error (401 Unauthorized)

{
"success": false,
"error": "Authentication required",
"code": "AUTH_REQUIRED"
}

Error (403 Forbidden)

{
"success": false,
"error": "Insufficient permissions to generate travel addresses",
"code": "INSUFFICIENT_PERMISSIONS"
}

Error (422 Unprocessable Entity)

{
"success": false,
"error": "VASP not found or not enabled for Travel Rule compliance",
"code": "VASP_NOT_ELIGIBLE"
}

Error (500 Internal Server Error)

{
"success": false,
"error": "Failed to generate travel address",
"code": "GENERATION_FAILED"
}

Travel Address Format

Travel Addresses follow the bech32 encoding format:

  • Prefix: ta1 (Travel Address version 1)
  • Length: 104 characters
  • Contains embedded beneficiary VASP information
  • Includes checksum for validation

Status Values

StatusDescription
activeAddress is active and can receive transactions
expiredAddress has passed its expiration time
usedAddress has been used for a transaction
revokedAddress has been manually revoked

QR Code

The response includes a base64-encoded PNG QR code image containing the travel address for easy sharing and scanning.

Usage Example

curl -X POST "{{baseUrl}}/trp/travel-address" \
-H "x-api-key: {your-api-key}" \
-H "x-secret-key: {your-secret-key}" \
-H "Content-Type: application/json" \
-d '{
"userId": "{{userId}}",
"label": "Travel Address for Transaction",
"email": "user@example.com"
}'

Best Practices

  1. Address Reuse: Generate unique addresses for each transaction
  2. Expiration: Set appropriate expiration times based on use case
  3. Validation: Always validate wallet addresses before generation
  4. Storage: Store travel address mappings for audit purposes
  5. Monitoring: Track address usage and expiration status