Get Stably Ramp Buy Widget URL
This endpoint returns the Stably Ramp Widget URL which can be render via an Iframe/WebView or opened as a separate link. URL params can also be defined per our documentation: https://docs.stably.io/widget-configuration-guide
Query parameters
-
The region of the user. countryid or country+state id
-
The payment method to be used
-
The crypto currency that user wants to buy. ID defined in configuration
-
The fiat currency that user wants to use to buy crypto. ID defined in configuration
-
The amount of fiat currency that user wants to use to buy crypto
-
The wallet address of the user where the crypto will be sent
-
orderCustomId string
A client-defined randomly generated 64-character string used to retrieve the order in case the redirection goes wrong. Used characters are lower case (a-z), upper case (A-Z) and digits (0-9). This is only used if the "orderCustomId" feature is enabled in the /configuration endpoint.
-
The URL the user will be redirected to after the buy flow has been performed in Stably Ramp widget
-
An ID identifying StablyRamp and associating subsequent order with it
Responses
-
200 text/html
The widget is rendered directly
-
Redirect to the another address actually rendering the widget. Specify the redirected address in the "Location" HTTP header of the response. See https://en.wikipedia.org/wiki/HTTP_303 for more information.
-
400 application/json
An unexpected error
curl \
-X GET https://ramp-api.dev.stably.io/public/api/v1/buy?region=string&payment=string&crypto=string&fiat=string&amount=string&walletAddress=string&redirectUrl=string&partnerAccountId=string
<html><body><h1>Buy Widget</h1></body></html>
{
"error": "string",
"code": 42,
"message": "string"
}