FIAT On-ramp Demo Application
View a demo application that uses AGW and FIAT on-ramp to test the flow.
AGW + FIAT On-ramp Example Repo
Use our example repo to quickly get started with AGW and FIAT on-ramp.
How it works
The FIAT on-ramp works by presenting users with a widget that prompts the user for their payment details to fulfill a quote. The quote determines the amount, address, currency, and other details of the transaction. This flow can be broken down into three steps:Collecting User Information
To generate a quote, information about the user and their desired on-ramp transaction is required, including the user’s country, wallet address, desired amount, etc. (see /quote for more details).Present users with a form to collect the required information, making use of the below endpoints to localize and validate the user’s input:
- /config to get the user’s country and local currency information.
- /currencies to get the available currencies for the user’s country.
- /payment-methods to get the available payment methods for the user’s country.
Fetching Quotes
After collecting the required information from the user, call the /quote endpoint to get an array of quotes from providers that can fulfill the given request.Choose (or allow the user to choose) the best quote for your application’s needs.
Fulfilling the Quote
Provide your selected quote to the /widget endpoint to generate a widget URL that can be either opened directly or embedded in your application using an iframe.The widget URL presents the user with a form to enter their payment details and complete the transaction. Use the /transactions endpoint to track the status of their order using the session ID returned from the widget.
API Overview
Abstract provides a simplified API to help you integrate the FIAT on-ramp into your application.Base URLs
It is recommended to use the staging environment for testing and development.| Staging | Production |
|---|---|
https://onramp.staging-portal.abs.xyz/ | https://onramp.portal.abs.xyz/ |
Endpoints
Below is a summary of the available endpoints.| Endpoint | Description |
|---|---|
| /config | Return a list of countries, purchase limits, and service providers available for on-ramp. |
| /currencies | Return a list of FIAT and crypto currencies for the provided country. |
| /payment-methods | Return a list of payment methods for the provided country. |
| /quote | Generate quotes for purchasing cryptocurrency with FIAT currency. |
| /transactions | Get on-ramp transaction status and history. |
| /widget | Create a session for buying crypto with FIAT currency. |