Appearance
Get Transaction Data
POST
/v5/offramp/crypto-to-card/transaction-data
Build ready-to-broadcast transaction data for a crypto-to-card offramp.
Authorizations
ApiKeyAuth
Type
API Key (header: X-Api-Key)
Request Body
application/json
JSON
{
"amountType": "string",
"eurAmount": "string",
"tokenAmount": "string",
"fromToken": {
"address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"decimals": 6
},
"fromAddress": "string",
"network": "ethereum",
"tagHash": "string"
}
Responses
OK
application/json
JSON
{
"status": "ok",
"payload": {
"transactionData": {
"to": "string",
"data": "string",
"value": "string",
"allowanceTarget": "string"
},
"tokenAmount": "string",
"EURAmount": "string"
}
}
Code examples
bash
curl -X POST https://api.brrr.network/v5/offramp/crypto-to-card/transaction-data \
-H "X-Api-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amountType": "eur",
"eurAmount": "100.00",
"fromToken": {
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"decimals": 6
},
"fromAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"network": "ethereum",
"tagHash": "0xabc123def456"
}'javascript
const response = await fetch('https://api.brrr.network/v5/offramp/crypto-to-card/transaction-data', {
method: 'POST',
headers: {
'X-Api-Key': process.env.BRRR_API_KEY,
'Content-Type': 'application/json',
},
body: JSON.stringify({
'amountType': 'eur',
'eurAmount': '100.00',
'fromToken': {
'address': '0xdac17f958d2ee523a2206206994597c13d831ec7',
'decimals': 6
},
'fromAddress': '0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb',
'network': 'ethereum',
'tagHash': '0xabc123def456'
}),
});
if (!response.ok) {
const error = await response.json();
throw new Error(`Request failed: ${error.errorCode}`);
}
const data = await response.json();
console.log(data.payload);python
import os
import httpx
response = httpx.post(
'https://api.brrr.network/v5/offramp/crypto-to-card/transaction-data',
headers={
'X-Api-Key': os.environ['BRRR_API_KEY'],
'Content-Type': 'application/json',
},
json={
"amountType": "eur",
"eurAmount": "100.00",
"fromToken": {
"address": "0xdac17f958d2ee523a2206206994597c13d831ec7",
"decimals": 6
},
"fromAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb",
"network": "ethereum",
"tagHash": "0xabc123def456"
},
)
response.raise_for_status()
print(response.json()['payload'])