Prerequisites
Before you begin, make sure you have:- An active Hashrails account with API credentials
- A valid Bearer token, see Authentication for how to obtain one
Create a recipient
Create a recipient to specify where funds should be delivered.
Include an
X-Idempotency-Key header with a unique UUID to safely retry requests without creating duplicates. Learn more about idempotency.Create a transfer request
Submit a transfer request to move funds. Specify the source and destination currencies, amount, and the recipient created in the previous step.Request ExampleResponse Example
Listen for the rate
After creating a transfer request, Hashrails will provide you with our best exchange rate. You’ll receive the rate via a webhook event:
transfer_request.rate.received
Confirm or cancel the rate
The rate provided is typically valid for up to 30 minutes, though this may vary. The exact expiry time is included in the If you’d prefer not to proceed, use the Cancel Transfer endpoint to cancel the request.
rate.expires_at field of the webhook payload.To proceed with the transfer, send a request to the Confirm Rate endpoint and specify the amount you’d like to transfer. The response will include payment_instructions with the details needed to complete the payment:If the rate has expired, you can request a new one by using the Refresh Quote endpoint.
Confirm payment
Once payment has been made using the payment instructions, send a request to the Confirm Payment endpoint to acknowledge that the payment has been sent.Specify the Hashrails will verify the payment and notify you via webhook:
payment_type as either full or split, along with the amount paid.transfer_request.payment.received- payment has been received (for split payments)transfer_request.payment.completed- full payment has been confirmed and the transfer is being processed
Track settlement
Once payment is confirmed, Hashrails will process the transfer and send the funds to the recipient. You’ll be notified of the outcome via webhook:
transfer_request.completed- the transfer has been settled successfullytransfer_request.cancelled- the transfer was cancelled
Reconcile
Once the transfer is complete, you can verify the final state and settlement details using the Get Transactions endpoint.
What’s next?
You’ve completed your first transfer request. From here, you can:- Configure Webhooks to receive real-time status updates
- Review API Rules for rate limits, idempotency, and error handling