Get Stably Ramp Sell Widget URL

GET /sell

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

  • region string Required

    The region of the user. countryid or country+state id

  • payment string Required

    The payment method chosen by the user. Supported values are "debit-credit-card", "apple-pay", "sepa-bank-transfer", "gbp-bank-transfer", "ach-bank-transfer", "upi", and "pix"

  • crypto string Required

    The crypto currency that user wants to buy. ID defined in configuration

  • fiat string Required

    The fiat currency that user wants to use to buy crypto. ID defined in configuration

  • amount string Required

    The amount of fiat currency that user wants to use to buy crypto

  • walletAddress string Required

    The wallet address of the user where the crypto will be sent

  • redirectUrl string Required

    The URL the user will be redirected to after the buy flow has been performed in Stably Ramp widget

  • partnerAccountId string Required

    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

    Hide response attributes Show response attributes object
    • error string

      A description of the unexpected error.

    • code integer

      The error code associated with the unexpected error.

    • message string

      A detailed error message explaining the issue.

GET /sell
curl \
 -X GET https://ramp-api.dev.stably.io/public/api/v1/sell?region=string&payment=string&crypto=string&fiat=string&amount=string&walletAddress=string&redirectUrl=string&partnerAccountId=string
Response examples (200)
<html><body><h1>Buy Widget</h1></body></html>
Response examples (400)
{
  "error": "string",
  "code": 42,
  "message": "string"
}