Create a Ramp - V2


Introduction to Ramp Flow v2

Overview

We have introduced the new Ramp v2 flow to enhance the swap experience. Unlike the previous version, where the quote and creation happened in a single step, v2 splits the process into two distinct stages:

  1. Preview: Submit your swap intention, receive a guaranteed quote, view blockchain fees, and validate all data.
  2. Accept: Confirm the preview using its ID to create the actual Swap Order.

This improvement allows users to evaluate if the swap conditions meet their expectations prior to proceeding, increases transparency, and optimizes the user experience.

Key Improvements

  • Generated Preview ID: The preview endpoint returns a unique ID, which is used to lock in the details when calling the creation endpoint.
  • Upfront Validation: All necessary validations (KYC checks, address formats, limits) are performed during the preview. If the preview succeeds, the creation is guaranteed to succeed (within the expiration window).
  • Better Decision Making: You receive the exact blockchainFee and price data before committing.

Ramp Status Lifecycle

Once a Swap Order is created (via the Accept endpoint), it can have the following statuses:

  • SwapOrderCreated: When the process is initiated, and a ramp is created.
  • DepositReceived: Funds received from user (crypto or fiat).
  • TradeCompleted: Exchange executed at agreed rate.
  • WithdrawalCreated: Withdrawal request initiated.
  • WithdrawalProcessing: The ongoing withdrawal process.
  • WithdrawalCompleted: Funds sent to destination.
  • SwapOrderCompleted: The final status of the ramp, signifying successful completion
  • SwapOrderError: The final status of the ramp when it concludes with an error.
  • RefundProcessing: Indicates that the refund process has started.
  • SwapOrderRefunded: Indicates that the refund has been successfully completed.
  • SwapOrderReverted: When trade is reverted.