Hosted Mode

The hosted mode is the quickest method to add offramp support to your app.

Offramp integration

simple integration(offramp)

Integrating in hosted mode is pretty straight forward, the only thing you would need to do is redirect your user to offramp (link below), this would work for both on desktop and mobile, just add a link to your app.

https://onramp.money/main/sell/?appId=1

Note:

  • Supported Currencies: To view the list of all the fiat currencies supported by Onramp, click here.

  • Supported Payment Methods: To view the list of all the supported payment methods for various currencies supported by Onramp, click here.

Customisation(offramp)

If you want to set some custom options for your integration, just add them as query parameters to the URL.

For example, we can pre-fill the network, coinAmount etc so the user flow can be enhanced and seamless overall, for detailed customisation refer to the block below.

customisation options via query params

GET https://onramp.money/main/sell/?appId=1

User is redirected to the offramp page, with configs set in query params.

Path Parameters

NameTypeDescription

appId*

1

App Id of the merchant/Partner

coinAmount

10

amount denoted in the native coin/token.

either coinAmount or fiatAmount, can be passed. When passed both coinAmount takes precedence

network

bep20

supported networks by onramp for onchain transactions current supported networks: usdt - bep20 | matic20 | erc20 | trc20 usdc - bep20 | matic20

busd - bep20

matic - matic20

bnb - bep20

eth - erc20 | matic20

coinCode

usdt

Name of the coin (also denoted as key in data.allCoinConfig in the response returned in the allConfig endpoint) current supported coins:

usdt| usdc | busd | eth | bnb | matic | sol

fiatAmount

1000

amount denoted in fiat amount.

merchantRecognitionId

13422

Specific string that can be passed by the merchant/Partner at the time of making the request, this would reflect via update from webhook.

phoneNumber

%2B90-9993749865

The user's phone number should be URL-encoded, with the country code and phone number separated by a hyphen. e.g. the number +90-9993749865 would be encoded as %2B90-9993749865.

fiatType

1

1 -> India (Default) INR

2 -> Turkey (TRY)

6 -> Nigerian Naira (NGN)

etc

Note: For a complete list of supported fiat currencies, please visit the "Fiat Currencies" page under "Supported Assets & Fiat"

{
    // Response
}

Note: After generating the token and initiating the order, Onramp.money will send a request to initiate the on-chain withdrawal to the destination address on behalf of the user.

Integrating in hosted mode is pretty straight forward, the only thing you would need to do is redirect your user to Onramp (link below), this would work for both on desktop and mobile, just add a link to your app.

This method is designed to streamline the process within applications by allowing certain parameters to be pre-filled. This pre-filling of parameters enables users to be redirected directly to the payment confirmation page, thus enhancing the user experience by removing unnecessary steps.

Example url

https://onramp.money/main/sell/?appId=1&walletAddress=0xf142123879b4611Cd4a30C1E0929217C0d4fB37f&coinCode=usdt&network=matic20&fiatAmount=150

The parameters that can be pre-filled are:

  • appId: The application ID that is unique to the client's application.

  • walletAddress: The user's wallet address where they will receive the cryptocurrency.

  • coinCode: The code of the cryptocurrency to be purchased (in this case, USDT).

  • network: The blockchain network on which the transaction will occur (in this case, MATIC20).

  • fiatAmount: The amount of fiat currency (in this case, INR) that the user is spending.

By customising the URL with these parameters, Onramp provides a seamless experience where the user is taken directly to the payment page with all the necessary details already filled in, pending only their confirmation to proceed with the transaction. This method simplifies the process for the user, making it more efficient and user-friendly.

The Onramp widget URL allows the inclusion of a redirectUrl parameter. Upon completion of a purchase, Onramp will redirect the user to the specified URL using this parameter. This feature can be utilised by your application to detect the completion of a transaction and execute subsequent actions, such as providing the user with purchase status notifications.

if your app name is onramp-example, and the parameter is set to redirectUrl = http://onramp-example.com

the redirect would be as the following

//after successful transaction
http://onramp-example.com?orderId=123&status=success

//incase transaction is pending
http://onramp-example.com?orderId=123&status=pending

Last updated