Interface CreateOnRampPaymentSession

Creates a session for an on-ramp payment. Request type for Tdjson#createOnRampPaymentSession.

interface CreateOnRampPaymentSession {
    @type: "createOnRampPaymentSession";
    address: string;
    base_currency: string;
    base_currency_amount: string;
    cryptocurrency: string;
    cryptocurrency_amount: string;
    fail_return_url: string;
    memo: string;
    payment_method_name: string;
    provider_id: string;
    success_return_url: string;
    theme: string;
}

Properties

@type: "createOnRampPaymentSession"
address: string

Address to which the cryptocurrency will be sent.

base_currency: string

ISO 4217 currency code of the currency that will be used for the purchase; pass an empty string if unknown.

base_currency_amount: string

The amount of the base currency to spend; pass an empty string if the user selected cryptocurrency_amount.

cryptocurrency: string

The cryptocurrency that will be bought.

cryptocurrency_amount: string

The amount of the cryptocurrency to buy; pass an empty string if the user selected base_currency_amount.

fail_return_url: string

The URL opened on failed payment; pass an empty string if none.

memo: string

Memo for the query; pass an empty string if none.

payment_method_name: string

Name of the chosen payment method; pass an empty string if none.

provider_id: string

Unique identifier of the on-ramp provider.

success_return_url: string

The URL opened on successful payment; pass an empty string if none.

theme: string

Preferred theme for the WebView; pass "light" for a light theme, "dark" for a dark theme, or leave empty for a default theme.