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
| Name | Type | Required | Description |
|---|---|---|---|
FormID | int64 | yes | Form ID |
Invoice | InputInvoiceClass | yes | Invoice |
RequestedInfoID | string | — | ID of saved and validated order info |
ShippingOptionID | string | — | Chosen shipping option ID |
Credentials | InputPaymentCredentialsClass | yes | Payment credentials |
TipAmount | int64 | — | Tip, 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
Possible errors
| Code | Type | Description |
|---|---|---|
| 400 | FORM_UNSUPPORTED | Please update your client. |
| 400 | INVOICE_INVALID | The specified invoice is invalid. |
| 400 | MESSAGE_ID_INVALID | The provided message id is invalid. |
| 400 | PAYMENT_CREDENTIALS_INVALID | The specified payment credentials are invalid. |
| 400 | PEER_ID_INVALID | The provided peer id is invalid. |
| 400 | TMP_PASSWORD_INVALID | The passed tmp_password is invalid. |
References
- Official documentation
- Generated Go reference
- TL definition:
payments.sendPaymentForm#2d03522f