Authentication
All API requests require authentication using an API key in theAuthorization HTTP request header. To get API keys, send an email to [email protected].
Sandbox Testing
Some API endpoints accept a boolean sandbox URL parameter which can be used to create test transactions. Test transactions do not use real fiat and onramp/swap to tokens on testnet chains. For more details on how to submit test transactions using the API see Sandbox Transactions with the API.One Time Wallet (OTW)
Each unique payment begins with a new onchain address called a one-time wallet (OTW) also known as the deposit address. The OTW is always different from the payment destination address. The Payments SDK widget UI refers to this address as a one-time wallet in the delivery details section. Each onramp or swap will create a new OTW that is controlled only by the owner wallet address specified in the API call parameters. In the event a payment gets stuck or is funded after expiration, the owner address has the ability to sign transactions to recover the assets from the OTW or retry the payment. A payment can be initiated by simply funding the OTW from any address. For fiat onramps specifically, the onramp providers will be instructed to send tokens to the deposit address.Discovering Available Assets
Halliday Payments supports hundreds of crypto assets for fiat onramps from centralized exchanges and payment providers, as well as onchain swaps via bridges and DEXs. Before initalizing a payment, use this endpoint to see which crypto assets are supported.Get All Supported Assets
Get valid deposit routes
To verify conversion from a specific input to a desired output, query both assets together like in the following example. Get a list of assets that can be received as outputs for the given input assets and providers using/assets/available-outputs.
Each of the query parameters of inputs and outputs are both arrays of strings of asset IDs which are returned by /assets.
The /assets/available-outputs endpoint requires at least one input asset.
Additionally, onramp provider checks can be done by passing an onramps array of strings (moonpay, coinbase, et al). This filtering ensures a path from an input to an output can be achieved with a given onramp provider.
{} would indicate that there is no route currently supported.
Verify multiple routes in one request
The following is an example of providing more than one member to an array in the request query parameters.Fiat-to-Crypto Onramping with the API
Halliday Payments supports fiat onramp providers like Stripe, Moonpay, Transak and cryptocurrency exchanges (CEX) to enable users to compliantly onramp using fiat in their region with the best price available. This enables end users to pay with credit or debit card, Apple Pay, Google Pay, or a centralized exchange balance with one simple interface.Get a collection of quotes for an onramp
When a user is ready to onramp, make an API request to generate quotes based on the amount of fiat the user desires to spend. The Halliday API queries onramp providers to create quotes for the delivery of tokens onchain. The API intelligently surfaces providers based on the detected or provided IP address. Additional checks are performed to identify if bridge and DEX calls are necessary to deliver the desired output token. All quoted routes are returned to the client with fees included. This data can then be dispalyed in a UI so the user can select the their preferred provider and quote. All quotes can be requested through the unifiedPOST /payments/quotes endpoint.
Example: Quoting fiat-to-crypto onramp
Request a quote for purchasing USDC on Base with USD:Confirm and fund the onramp
Once the user selects a quote, the onramp payment needs to be confirmed with the API before the quote expires. Using thepayment_id and state_token returned in the quote, a request is made to confirm the quote and specify the owner and destination. The owner and destination wallet addresses can be different.
The private key of the owner address is the sole controller of the one-time wallet. In the scenario that a recovery is needed, the owner address will need to sign transactions. See API Recoveries & Errors for more details.
This request (POST /payments/confirm) returns the same response body that the payment status endpoint (GET /payments) returns.
Within the next_instruction response body object, there is a funding_page_url string. This URL navigates the user to the payment page where they input their fiat payment information with the onramp provider. Developers are expected to display this web page to the user.
In the use case that a user does not fund the onramp directly, the deposit_address (OTW) can be funded by anyone with the deposit_amount to initiate the onramp.
Example: Confirm fiat-to-crypto onramp
Cross-chain swaps with the API
Halliday Payments brings together bridges, DEXs, and cross-chain routing logic to enable users to seamlessly swap to any token on any chain.Get a collection of quotes for a swap
When a user is ready to swap tokens, make an API request to generate quotes based on the amount the user desires to swap. The Halliday API queries all available cross-chain routes supported by the protocol, optimizing current bridge, DEX, and transfer fees. All quoted onchain routes are returned to the client, including all fees. This data can then be dispalyed in a UI so the user can select the their preferred route and quote. All quotes are requested through the unifiedPOST /payments/quotes endpoint.
Example: Quote a crypto-to-crypto swap
Request a quote for swapping AVAX on Avalanche to USDC on Base:Confirm and fund the swap
Once the user selects a quote, the swap needs to be confirmed with the API before the quote expires. Using thepayment_id and state_token returned in the quote, a request is made to confirm the quote and specify the owner and destination. The owner and destination wallet addresses can be different.
The private key of the owner address is the sole controller of the one-time wallet. In the scenario that a recovery is needed, the owner address will need to sign transactions. See API Recoveries & Errors for more details.
This request (POST /payments/confirm) returns the same response body that the payment status endpoint (GET /payments) returns.
Within the next_instruction response body object, the type will be TRANSFER_IN string. This means that the deposit_address can be funded by anyone with the deposit_amount on the source chain. Transferring tokens to this OTW address initiates the swap.
Example: Confirm crypto-to-crypto swap
Tracking Payment Status
This endpoint can be polled to get the latest status of the payment. Thepayment_id parameter is from the chosen quote returned from the quotes endpoint and also the confirm endpoint. Note that the response from POST /payments/confirm is the same as the response body returned from GET /payments.
For more information on the API’s payment statuses and depositing to initialize a payment workflow see Status API.

