onramper

Generate an Onramper widget URL

Creates a widget URL for the requested wallet and payment configuration.

post/api/v1/onramper/generate-widget-url

Request

Request body

walletAddressstring required

Wallet receiving the purchased or swapped crypto.

mode'buy' | 'sell' | 'swap'

Widget transaction mode.

defaultFiatstring

Fiat currency code.

defaultAmountnumber

Default fiat amount.

sellDefaultAmountnumber

Default crypto amount for sell mode.

onlyCryptoNetworksstring

Allowed crypto network identifiers.

defaultPaymentMethodstring

Default payment method.

defaultCryptostring

Default crypto ticker.

onlyPaymentMethodsstring

Allowlisted payment methods.

excludePaymentMethodsstring

Payment methods excluded from the widget.

onlyFiatstring

Allowlisted fiat currencies.

excludeFiatstring

Fiat currencies excluded from the widget.

isAddressEditablestring

Whether the user can edit the wallet address, encoded as a string.

networkPrefixstring

Onramper network prefix.

Example request

{
  "walletAddress": "eth|0000000000000000000000000000000000000001",
  "mode": "buy",
  "defaultFiat": "USD",
  "defaultAmount": 100,
  "sellDefaultAmount": 1,
  "onlyCryptoNetworks": "gala",
  "defaultPaymentMethod": "creditcard",
  "defaultCrypto": "gala",
  "networkPrefix": "gala_gala"
}

Response

Widget URL generated.

statusnumber required
errorboolean required
messagestring required

Example response

{
  "status": 200,
  "message": "Widget URL generated successfully",
  "data": {
    "url": "https://widget.onramper.test/"
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.