Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add to sendInvoice start_parameter #1185

Closed
TarasiukDima opened this issue Mar 31, 2024 · 2 comments
Closed

Add to sendInvoice start_parameter #1185

TarasiukDima opened this issue Mar 31, 2024 · 2 comments

Comments

@TarasiukDima
Copy link

Feature Request

In method sendInvoice not exist start_parameter. Because of this, after payment, the customer cannot see the receipt and can re-pay for the order. This is not suitable for stores with dynamically generated orders.

@sojinsamuel
Copy link

sojinsamuel commented Apr 1, 2024

@TarasiukDima i dont how to resolve your issue, i am also having some issues with the payment part too, but some steps behind you. can you check this issue #1187 i raised may be you could help

@danielperez9430
Copy link
Collaborator

danielperez9430 commented May 4, 2024

The start_parameter is a optional value, so all optionals values need to be send as object in the last param "form"

This is the method signature:

 sendInvoice(chatId, title, description, payload, providerToken, currency, prices, form = {})

Example:

const title = 'Invoice link product';
const description = 'Our test invoice link product';
const payload = 'sku-p002';
const providerToken = 'XXXXXX';
const currency = 'EUR';
const prices = [{ label: 'NTBA API', amount: 12000 }, { label: 'tax', amount: 10000 }];
      
bot.sendInvoice(chatId, title, description, payload, providerToken, currency, prices, { start_parameter: 'XXXX' })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants