CreateOnrampSessionRequest

Both users and bots may be able to use this request. See code examples.

---functions---
payments.createOnrampSession#a2197cf6 flags:# provider:string crypto_currency:string address:string payment_method:flags.0?string base_currency:flags.1?string base_amount:flags.2?string memo:flags.3?string theme:flags.4?string success_return_url:flags.5?string fail_return_url:flags.6?string crypto_amount:flags.7?string = OnrampSession

Returns

OnrampSession

This type can only be an instance of:

OnrampSession

Parameters

providerstring
crypto_currencystring
addressstring
payment_methodstringThis argument defaults to None and can be omitted.
base_currencystringThis argument defaults to None and can be omitted.
base_amountstringThis argument defaults to None and can be omitted.
memostringThis argument defaults to None and can be omitted.
themestringThis argument defaults to None and can be omitted.
success_return_urlstringThis argument defaults to None and can be omitted.
fail_return_urlstringThis argument defaults to None and can be omitted.
crypto_amountstringThis argument defaults to None and can be omitted.

Known RPC errors

This request can't cause any RPC error as far as we know.

Example

from telethon.sync import TelegramClient
from telethon import functions, types

with TelegramClient(name, api_id, api_hash) as client:
    result = client(functions.payments.CreateOnrampSessionRequest(
        provider='some string here',
        crypto_currency='some string here',
        address='some string here',
        payment_method='some string here',
        base_currency='some string here',
        base_amount='some string here',
        memo='some string here',
        theme='some string here',
        success_return_url='some string here',
        fail_return_url='some string here',
        crypto_amount='some string here'
    ))
    print(result.stringify())