Skip to main content

payments.exportInvoice

Generate an invoice deep link

func (c *Client) PaymentsExportInvoice(ctx context.Context, invoicemedia InputMediaClass) (*PaymentsExportedInvoice, error)

Calling this method

client.Run(ctx, func(ctx context.Context) error {
api := client.API()

res, err := api.PaymentsExportInvoice(ctx, invoicemedia)
if err != nil {
return err
}
_ = res // *PaymentsExportedInvoice
return nil
})

Parameters

NameTypeRequiredDescription
InvoiceMediaInputMediaClassyesInvoice

Returns

*PaymentsExportedInvoice

Possible errors

CodeTypeDescription
400BUSINESS_CONNECTION_INVALIDThe connection_id passed to the wrapping invokeWithBusinessConnection call is invalid.
400CURRENCY_TOTAL_AMOUNT_INVALIDThe total amount of all prices is invalid.
400INVOICE_PAYLOAD_INVALIDThe specified invoice payload is invalid.
400MEDIA_INVALIDMedia invalid.
400PAYMENT_PROVIDER_INVALIDThe specified payment provider is invalid.
400STARS_INVOICE_INVALIDThe specified Telegram Star invoice is invalid.
400USER_BOT_REQUIREDThis method can only be called by a bot.
400WEBDOCUMENT_MIME_INVALIDInvalid webdocument mime type provided.
400WEBDOCUMENT_URL_EMPTYThe passed web document URL is empty.

References