Purchase
Last updated
fetch('https://api.idosgames.com/api/{titleTemplateId}/{titleId}/Client/Purchase/CreateTelegramInvoice', {
method: 'POST',
headers: {
'Content-Type': 'application/json'
},
body: JSON.stringify({
title: 'Game Purchase',
description: 'In-game currency purchase',
payload: 'unique-payload',
provider_token: 'provider-token',
currency: 'USD',
prices: [{ label: '100 Coins', amount: 1000 }]
})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error('Error:', error)); {
"ok": true,
"result": "https://t.me/invoice_link"
}