# Get Stably Ramp Buy Widget URL **GET /buy** 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 ## Servers - Sandbox Server: https://ramp-api.dev.stably.io/public/api/v1 (Sandbox Server) - Production Server: https://ramp-api.prod.stably.io/public/api/v1 (Production Server) ## Parameters ### Query parameters - **region** (string) The region of the user. countryid or country+state id - **payment** (string) The payment method to be used - **crypto** (string) The crypto currency that user wants to buy. ID defined in configuration - **fiat** (string) The fiat currency that user wants to use to buy crypto. ID defined in configuration - **amount** (string) The amount of fiat currency that user wants to use to buy crypto - **walletAddress** (string) 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. - **redirectUrl** (string) The URL the user will be redirected to after the buy flow has been performed in Stably Ramp widget - **partnerAccountId** (string) An ID identifying StablyRamp and associating subsequent order with it ## Responses ### 200 The widget is rendered directly #### Body: text/html (string) string ### 303 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 An unexpected error #### Body: application/json (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. [Powered by Bump.sh](https://bump.sh)