On/Off Ramp
Documentation of Widget On Ramp and Off Ramp
Definition
On Ramp
Widget Onramp allows the user get cryptocurrencies from FIAT money.
User will need to have a crypto wallet to be able to fund and prove that he/she is an authenticated natural person through a KYC (Know Your Client) flow.
The payment methods integrated with the widget for Argentina are Mercado Pago and Bank Transfer.
The widget is developed to provide its functionalities in any browser.
Off Ramp
Widget Onramp allows the user get FIAT money from cryptocurrencies.
User will need to have a Bank account to be able to depositing and prove that he/she is an authenticated natural person through a KYC (Know Your Client) flow.
The deposit method integrated with the widget for Argentina is Bank Transfer.
The widget is developed to provide its functionalities in any browser,.
Requirements
-
Credentials: Credentials must be requested in order to generate an Authentication token needed to use Widget On Ramp. Contact Ripio support to request the partner’s registration and obtain
client_id
andclient_secret
, which univocally identify you as a Ripio customer. It is the partner’s responsibility to secure these credentials. -
Post-Confirmation Redirect URL: It is required to provide a URL which we will redirect the user once the operation is confirmed. This URL must be public in order to let user continue to the partner’s platform.
Integration
Generate authentication token
This service provides an access JWT token for the user to use the On Ramp Widget.
Endpoint: http://b2b-widget-onramp-api.ripio.com/api/v1/auth
Sandbox::
https://b2b-widget-onramp-api.sandbox.ripio.com/api/v1/auth
Method: POST
Parameters:
Parameter | Type | Description |
---|---|---|
username | string | The username is composed of a concatenation of client_id + “: ” + external_ref . |
password | string | The password is the client_secret |
Disclaimer:
external_ref
: UUID v4 that represents the user logged into your system. It must be a unique and unrepeatable identifier of a user of your system (Read more about UUID and try using generator). This value is then used in the request for approval of a purchase transaction or when reporting the result of a transaction. (see Webhooks). In the documentation we refer to this value as external_ref.
Request:
Example:
Response:
Widget Access
On Ramp
To access Widget On Ramp, you must direct the user from your platform to the Widget On Ramp along with the access token generated above.
The URL must be formed as follows:
Sandbox::
https://b2b-widget-onramp.sandbox.ripio.com
Example:
Off Ramp
To access Widget Off Ramp, you must direct the user from your platform to the Widget Off Ramp along with the access token generated above.
The URL must be formed as follows:
Sandbox::
https://b2b-widget-onramp.sandbox.ripio.com/offramp.html
Example:
When accessing the user will see the following welcome screen:
Parameters
Widget configuration parameters using query params.
Parameter | Type | Description |
---|---|---|
_addr | string (Optional) | Set address to prefill onramp wallet which it won’t be editable. Ex: 0x646eE511616A20a321A1cB72DADCB04C0485b97e |
_net | string | Set network to pre select chain. It must match the networks available to the partner. Ex: ETHEREUM |
_amount | string | Set amount to prefill amount of fiat to onramp. Ex: 1000 or 4321.35 |
_crypto | string (Optional) | Set crypto currency which it won’t be editable. It must match the cryptos available to the partner. Ex: USDT |
_tracking_session | string (Optional) | Custom identifier to track the user session on your end. It will be returned in the webhooks under metadata.session . Ex: random-tracking-id-onramp |
Tracking session parameter
The _tracking_session
parameter can be used as follow:
Then, you will receive the tracking session in the webhooks as follows:
Post-Transaction Redirect Behavior
On Ramp
The On Ramp widget supports a manual redirection flow once the user completes a fiat-to-crypto purchase.
After the user confirms the operation and the On Ramp order is successfully created, the widget will display a final screen with a “Back to Partner” button. When the user clicks this button, they are redirected to a partner-configured URL with all relevant transaction information passed as query parameters.
To enable this functionality, the partner must provide Ripio with a redirection URL during onboarding. This URL must be publicly accessible and can follow any structure under the partner’s domain, for example:
Upon redirection, the following parameters will be appended:
Example final URL:
Query Parameters:
Parameter | Description |
---|---|
external_ref | Session token generated by the partner. |
action | Operation type, always onramp in this case. |
crypto_amount | Amount of cryptocurrency the user received. |
token | Cryptocurrency selected by the user (e.g., UXD ). |
network | Blockchain network used for the crypto transfer. |
deposit_address | User’s wallet address where crypto was sent. |
fiat_amount | Amount of fiat used in the transaction. |
fiat_currency | Fiat currency used by the user (e.g., ARS ). |
fees | Total fees applied to the transaction (e.g., platform, network, etc.). |
session_id | Optional session identifier if sent using _tracking_session . |
country_code | Country code based on the user’s location (e.g., AR ). |
Note: The
session_id
parameter will only be included if the partner specified a_tracking_session
when constructing the On Ramp widget URL.
Example image of the final On Ramp screen:
Off Ramp
The Off Ramp widget allows automatic redirection of the user upon completing a cryptocurrency sale transaction. To enable this, the partner must provide Ripio with a redirection URL, which will be configured in the partner’s account. This URL must be publicly accessible and can point to any valid route under the partner’s domain, for example:
Once this URL is configured, the widget can redirect the user upon completing the Off Ramp flow. There are two ways this redirection may occur, depending on the partner’s integration setup:
1. Automatic Redirection (Partner-Assisted Flow)
If a redirection URL is configured, the widget will automatically redirect the user to that URL after the Off Ramp flow is confirmed. Additionally, relevant transaction details will be appended as query parameters.
Query Parameters:
Parameter | Description |
---|---|
external_ref | Session token generated by the partner. |
action | Operation type, always offramp in this case. |
crypto_amount | Amount of cryptocurrency being sold. |
token | Selected cryptocurrency (e.g., UXD ). |
network | Selected blockchain network (e.g., ETHEREUM , ETHEREUM_SEPOLIA ). |
deposit_address | Deposit address where the crypto must be sent. |
fiat_currency | Fiat currency the user will receive (e.g., ARS ). |
session_id | Optional session identifier if provided using _tracking_session . |
country_code | Country code based on the user’s location (e.g., AR ). |
Note: The
session_id
parameter will only be present if the partner includes a_tracking_session
value when generating the Off Ramp widget URL. This allows the partner to maintain traceability between their internal user session and the transaction on Ripio’s side.
2. Manual Redirection (User-Initiated Flow)
If the partner does not manage the user’s crypto custody, the widget will display a final screen with the required information for the user to manually send the cryptocurrency from their preferred wallet.
In this case:
- The user will see the deposit address (
deposit_address
) and the network (network
) details. - The user must send the specified amount manually from their wallet.
- Once the funds are received, Ripio will process the transaction and deposit the corresponding fiat amount in the user’s bank account.
Additionally, this screen will display a “Back to Partner” button. If the user clicks this button, they will be redirected to the same redirection URL configured by the partner, with the full transaction details included in the query string—just as in the automatic redirection flow.
This ensures that even in manual flows, the partner can receive the complete transaction context and allow users to return to their platform seamlessly.
Example image of the final Off Ramp screen (manual flow):
Settings
Customize your theme - UI
The Widget allows you to configure the theme of the user interface so that the styles are adjusted to the Partner’s brand style, and to the UX of its platform. The theme is set in the partner’s setting, and for this to be possible, the partner must send Ripio a CSS file with the variables corresponding to its brand style.
Below is a template with the default values of the theme, it is recommended to copy and modify the necessary values:
theme.css
Usage
The file with the theme can be assembled only with the values that need to be overwritten, the variables that are not overwritten will use the default value displayed in the template above.
Customize the typography
To use a font it is necessary to be able to import it from a static host and then modify the variable that owns font-family
.
Example:
- Font:
Monserrat
- Host:
https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap
Default UI theme Customized UI theme
Customize Buttons
In case we want to modify the styles of the buttons, only variables starting with --ripio-btn
modify the buttons.
Example:
Primary Button
Default UI theme Customized UI theme
Secondary Button
Default UI theme Customized UI theme
Tertiary Button
Default UI theme Customized UI theme