Buy/Checkout API

Enables buy or checkout usecase based on the request.

Scenarios
API Response

Users have TokenA on ChainA

Calldata generated for Direct Transfer

Users have TokenB on ChainA

Calldata generated for Swap on ChainA

Users have TokenA on ChainB

Calldata generated for bridging TokenA from ChainB to ChainA

Users have TokenB on ChainB

Calldata generated for swapping and bridging the TokenB from ChainB to TokenA on ChainA.

Steps to follow:

  1. Check Supported Tokens and Chains

    • Before initiating a transaction, verify if the token and chain are supported by Aarc using the v3/supported-chains and v3/supported-tokens endpoints. This ensures compatibility with the Aarc system.

  1. Generate Deposit Address

  • Use the deposit-address endpoint to:

    • Obtain a precise quote for the requested buy/checkout parameters.

    • Determine if the current configuration is viable.

    • Receive deposit parameters and a requestId for tracking purposes.

  1. Transaction Notification for Transfers from EOAs

  • If transferring funds from an Externally Owned Account (EOA), inform the Aarc system by calling the schedule-transaction endpoint. Provide transaction details along with the requestId.

  1. Track Transaction Status

  • Use the request-status endpoint to monitor the progress of your transaction. The endpoint returns detailed information about the transaction state, allowing for real-time tracking.

Last updated