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
| Header | Type | Required | Description |
|---|---|---|---|
x-api-key | string | Yes | Your API key for authentication |
x-secret-key | string | Yes | Your secret key for authentication |
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
travelAddress | string | Yes | Travel 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 validdecodedUrl: The full URL for making TRP inquiries to the beneficiary VASPtrpInquiryEndpoint: 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
- Transaction Preparation: Extract recipient details before sending funds
- Compliance Checks: Verify VASP compliance and requirements
- Risk Assessment: Evaluate transaction risk based on decoded information
- UI Display: Show recipient information in wallet interfaces
- 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