cURL examples
Self-contained set of examples to experiment with the API straight from the terminal.
Suggested variables
export INFI_API_KEY="<YOUR_API_KEY>"
export BASE_URL="https://api.internationalfinance.com.br/v1"Create PIX charge
curl -X POST "$BASE_URL/pix" \
-H "Authorization: Bearer $INFI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amountCents": 1000,
"externalRef": "order-123",
"expiresInDays": 2,
"customer": {
"name": "Maria Silva",
"email": "maria@example.com",
"document": { "number": "12345678901", "type": "cpf" }
}
}'Initiate PIX withdrawal
curl -X POST "$BASE_URL/withdraw" \
-H "Authorization: Bearer $INFI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"amountCents": 5000,
"pixKey": "recipient@email.com",
"pixKeyType": "email"
}'Get balance
curl "$BASE_URL/balance" \
-H "Authorization: Bearer $INFI_API_KEY"List transactions
curl "$BASE_URL/transactions?type=pix_in&limit=20" \
-H "Authorization: Bearer $INFI_API_KEY"Get a transaction
curl "$BASE_URL/transactions/<TRANSACTION_ID>" \
-H "Authorization: Bearer $INFI_API_KEY"