Skip to main content

Decode Travel Address

Decode a Travel Address to extract embedded beneficiary information and transaction details.

Endpoint

POST https://api.trpcontinuum.com/trp/decode-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
travelAddressstringYesTravel address to decode

Example Request

{
"travelAddress": "{{travelAddress}}"
}

Response

Success (200 OK)

{
"success": true,
"data": {
"isValid": true,
"decodedUrl": "localhost:5001/trp/inquiry/cf7d27fb-75f9-4ea1-b65a-bd9050bba9db?t=i",
"trpInquiryEndpoint": "https://localhost:5001/trp/inquiry"
},
"message": "Travel address decoded successfully"
}

Error (400 Bad Request)

{
"success": false,
"error": "Invalid travel address format",
"code": "INVALID_FORMAT",
"details": {
"travelAddress": "Travel address format is invalid or corrupted"
}
}

Error (404 Not Found)

{
"success": false,
"error": "Travel address not found",
"code": "ADDRESS_NOT_FOUND"
}

Error (401 Unauthorized)

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

Error (403 Forbidden)

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

Error (410 Gone)

{
"success": false,
"error": "Travel address has expired and cannot be decoded",
"code": "ADDRESS_EXPIRED",
"details": {
"expiredAt": "2024-08-07T10:00:00Z"
}
}

Decoded Information

The response includes:

  • isValid: Boolean indicating if the travel address is valid
  • decodedUrl: The full URL for making TRP inquiries to the beneficiary VASP
  • trpInquiryEndpoint: The base endpoint URL for TRP inquiries

Usage Examples

Basic Decoding

curl -X POST "{{baseUrl}}/trp/decode-travel-address" \
-H "x-api-key: {your-api-key}" \
-H "x-secret-key: {your-secret-key}" \
-H "Content-Type: application/json" \
-d '{
"travelAddress": "{{travelAddress}}"
}'

Use Cases

  1. Transaction Preparation: Extract recipient details before sending funds
  2. Compliance Checks: Verify VASP compliance and requirements
  3. Risk Assessment: Evaluate transaction risk based on decoded information
  4. UI Display: Show recipient information in wallet interfaces
  5. Audit Trails: Record decoded information for compliance purposes

Security Considerations

  • Beneficiary personal details require elevated permissions
  • Decoded information should be handled according to privacy regulations
  • Cache decoded information appropriately to minimize API calls
  • Log access for audit purposes