Integration quickstart
This guide walks through a basic CashXChain integration.
1. Get sandbox access
Create a sandbox account and generate a sandbox API key in the dashboard.
export CXC_API_KEY=cx_sandbox_...
2. Configure webhooks
Create a webhook endpoint in your backend and register it in the dashboard.
Your endpoint should:
- Use HTTPS.
- Verify signatures.
- Store event IDs.
- Process events asynchronously.
3. Create a beneficiary
curl -X POST https://api.sandbox.cashxchain.com/v1/beneficiaries \
-H "Authorization: Bearer $CXC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"type": "business",
"name": "Example Supplier Ltd",
"country": "US",
"currency": "USD",
"bank_account": {
"account_number": "000123456789",
"routing_number": "021000021"
}
}'
4. Request a quote
curl -X POST https://api.sandbox.cashxchain.com/v1/fx/quotes \
-H "Authorization: Bearer $CXC_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"source_currency": "EUR",
"target_currency": "USD",
"source_amount": "1000.00",
"beneficiary_country": "US"
}'
5. Create a payment
curl -X POST https://api.sandbox.cashxchain.com/v1/payments \
-H "Authorization: Bearer $CXC_API_KEY" \
-H "X-Idempotency-Key: quickstart-001" \
-H "Content-Type: application/json" \
-d '{
"source_account_id": "acct_sandbox_123",
"beneficiary_id": "bnf_sandbox_123",
"quote_id": "fxq_sandbox_123",
"amount": "1000.00",
"currency": "EUR",
"purpose": "supplier_payment",
"reference": "QS-001"
}'
6. Reconcile
Listen for payment.completed and download statements to match payments against your internal records.
Production
Production access requires business verification, use-case review, partner enablement, and security validation.