Skip to main content

payments.sendPaymentForm

Send compiled payment form

func (c *Client) PaymentsSendPaymentForm(ctx context.Context, request *PaymentsSendPaymentFormRequest) (PaymentsPaymentResultClass, error)

Calling this method

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

res, err := api.PaymentsSendPaymentForm(ctx, &tg.PaymentsSendPaymentFormRequest{
// see Parameters
})
if err != nil {
return err
}
_ = res // PaymentsPaymentResultClass
return nil
})

Parameters

NameTypeRequiredDescription
FormIDint64yesForm ID
InvoiceInputInvoiceClassyesInvoice
RequestedInfoIDstringID of saved and validated order info
ShippingOptionIDstringChosen shipping option ID
CredentialsInputPaymentCredentialsClassyesPayment credentials
TipAmountint64Tip, in the smallest units of the currency (integer, not float/double). For example, for a price of US$ 1.45 pass amount = 145. See the exp parameter in currencies.json, it shows the number of digits past the decimal point for each currency (2 for the majority of currencies).

Returns

PaymentsPaymentResultClass

Possible errors

CodeTypeDescription
400FORM_UNSUPPORTEDPlease update your client.
400INVOICE_INVALIDThe specified invoice is invalid.
400MESSAGE_ID_INVALIDThe provided message id is invalid.
400PAYMENT_CREDENTIALS_INVALIDThe specified payment credentials are invalid.
400PEER_ID_INVALIDThe provided peer id is invalid.
400TMP_PASSWORD_INVALIDThe passed tmp_password is invalid.

References