CRMchat APIBeta
Telegram APIPayments

payments.getPaymentForm

POST
/workspaces/{workspaceId}/telegram-accounts/{accountId}/call/payments.getPaymentForm

Get a payment form

Authorization

bearerAuth
AuthorizationBearer <token>

In: header

Path Parameters

workspaceId*string

Workspace ID

accountId*string

Telegram account ID

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

params*

Get a payment form

Response Body

application/json

application/json

curl -X POST "https://example.com/workspaces/string/telegram-accounts/string/call/payments.getPaymentForm" \  -H "Content-Type: application/json" \  -d '{    "params": {      "invoice": {        "_": "inputInvoiceMessage",        "peer": {          "_": "inputPeerEmpty"        },        "msgId": 0      }    }  }'
{  "result": {    "_": "payments.paymentForm",    "canSaveCredentials": true,    "passwordMissing": true,    "formId": "string",    "botId": 0,    "title": "string",    "description": "string",    "photo": {      "_": "webDocument",      "url": "string",      "accessHash": "string",      "size": 0,      "mimeType": "string",      "attributes": [        {          "_": "documentAttributeImageSize",          "w": 0,          "h": 0        }      ]    },    "invoice": {      "_": "invoice",      "test": true,      "nameRequested": true,      "phoneRequested": true,      "emailRequested": true,      "shippingAddressRequested": true,      "flexible": true,      "phoneToProvider": true,      "emailToProvider": true,      "recurring": true,      "currency": "string",      "prices": [        {          "_": "labeledPrice",          "label": "string",          "amount": "string"        }      ],      "maxTipAmount": "string",      "suggestedTipAmounts": [        "string"      ],      "termsUrl": "string",      "subscriptionPeriod": 0    },    "providerId": "string",    "url": "string",    "nativeProvider": "string",    "nativeParams": {      "_": "dataJSON",      "data": "string"    },    "additionalMethods": [      {        "_": "paymentFormMethod",        "url": "string",        "title": "string"      }    ],    "savedInfo": {      "_": "paymentRequestedInfo",      "name": "string",      "phone": "string",      "email": "string",      "shippingAddress": {        "_": "postAddress",        "streetLine1": "string",        "streetLine2": "string",        "city": "string",        "state": "string",        "countryIso2": "string",        "postCode": "string"      }    },    "savedCredentials": [      {        "_": "paymentSavedCredentialsCard",        "id": "string",        "title": "string"      }    ],    "users": [      {        "_": "userEmpty",        "id": 0      }    ]  }}