Parameters for generating an on-ramp URL via OffRampIntegration.getOnRampUrl.

An on-ramp URL redirects the user to a provider's checkout page where they pay with a credit card or bank transfer and receive crypto at cAddress.

interface OnRampUrlParams {
    amount: string;
    asset: string;
    cAddress: string;
    fiatCurrency: string;
    provider: OffRampProvider;
}

Properties

amount: string

Fiat amount the user intends to spend (as a decimal string).

'100' for $100 USD
asset: string

Crypto asset the user wants to receive.

'XLM', 'USDC'
cAddress: string

Target C-address that will receive the purchased crypto. The provider will route funds to this address on Stellar.

fiatCurrency: string

ISO 4217 fiat currency code.

'USD', 'EUR', 'GBP'
provider: OffRampProvider

Provider to use for this transaction.