Merchant checkout - Hosted mode

A simplified widget enabling direct payment to merchant's wallet address

Merchant Checkout Integration

The merchant checkout flow enables users to make payments directly to the merchant's wallet address, streamlining the process and allowing users to receive their asset after completing only the fiat payment. This eliminates unnecessary steps for the user, providing a more seamless experience.

Note:

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.

  • appId Generation for Partners: For the merchant checkout feature, separate onboarding is necessary. If partners wish to utilize both the standard onramp procedure and the merchant checkout process, they must specifically obtain separate appIds for each flow. Please contact our team for assistance in generating the required appIds.

Customisation(merchant checkout)

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

Customisation options via query params

GET https://onramp.money/main/checkout

User is redirected to the onramp site, with configs set in query params.

Path Parameters

NameTypeDescription

appId*

1

App Id of the merchant/Partner

redirectUrl

onramp-example.com

URL to which the user would be redirected after a successful transaction.* *Applicable only in hosted mode

paymentMethod

1

Type of method the user would choose to pay in.

1 -> Instant transfer (e.g. UPI)

2 -> Bank transfer (e.g. IMPS/FAST)

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.

fiatAmount*

1000

amount denoted in fiat amount. (only ₹ INR is currently supported)

coinAmount

10

amount denoted in the native coin/token.

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

walletAddress*

0x7c8D..596

Onchain wallet address to which the crypto will be withdrawn to.

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

assetDescription

String

A brief description regarding the asset can be mentioned, which will reflect on the summary payments page

assetImage

image link

Partner can add in their custom asset image which would be displayed to the users under their AppId. Note: resolution should be ~ 180x180px

fiatType

1

1 -> India (Default) INR

2 -> Turkey (TRY)

3 -> Arab Emirates Dirham (AED)

4 -> Mexican Peso (MXN)

5 -> Vietnamese dong (VND)

6 -> Nigerian Naira (NGN)

etc

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

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.

{
    // Response
}

For a seamless and quick checkout experience, you can pre-fill all the necessary parameters in the URL. This way, once the user logs in, they will be taken directly to the payments page. Here's an example of a pre-filled URL that directs the user to the payments page:

This method is designed to streamline the payment 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/checkout/?appId=1&coinCode=usdt&network=matic20&walletAddress=0xf142123879b4611Cd4a30C1E0929217C0d4fB37f&fiatAmount=150&assetDescription=CustomAsset&assetImage=https://i.insider.com/6123e085de5f560019e85771?width=300&fiatType=1&paymentMethod=1

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.

  • walletAddress: The destination wallet address for the cryptocurrency.

  • assetDescription: A label for the asset being purchased.

  • 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 would receive.

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