Make a Custom Request for method sendInvoice

(Oleg Pavlish) #1

Hi, dear Team of FlowXO

I can not make the right request to connect the payment option in Telegrams.

For this, I use the “sendInvoice” method, which is described here: https://core.telegram.org/bots/api#sendinvoice

Now my request looks like this:

{
“title”:“Some product name”,
“description”:“Some product description”,
“payload”:“invoice_number”,
“provider_token”:“123456789:TEST:61feaae6-8257-4e70-9287-bc1ab4855259”,
“start_parameter”:“Some_param_123”,
“currency”:“RUB”,
“prices”:[
{
“LabeledPrice”:
{
“label”:“Price”,
“amount”:“145”
}
}
],
“reply_markup”:{
“inline_keyboard”:[
{
“Pay”:“true”,
“Text”:“Pay now”
}
]
}
}

But it does not work.

Please, help ASAP

(Daniel Beckett) #2

Hi @oleg_pavlish

What do you see in the interaction logs for your flow? Are there any particular errors showing? If so, please can you let me know what you see.

Thanks,
Dan

(Igor Yakimov) #3

I use webhook “Make a HTTP Request” instead of Custom Request.
Try this one:

{
“chat_id”:"{{new_message.channel_id}}",
“title”:“Some product name”,
“description”:“Some product description”,
“payload”:“invoice_number”,
“provider_token”:“123456789:TEST:61feaae6-8257-4e70-9287-bc1ab4855259”,
“start_parameter”:“Some_param_123”,
“currency”:“RUB”,
“prices”:[{“label”:“Price”,“amount”:“145” }]
}

Replace “new_message” in my code with your starting trigger’s name in the flow.