# GlobalPay Merchant Docs for Telegram Payments This document assumes that: - you carefully studied [Telegram Bot Payments API](https://core.telegram.org/bots/payments); - you know how to create a payment invoice; - your bot replies to `pre_checkout_query` ## Testing Integration To test your payment integration with GlobalPay: 1. Obtain a `provider_token` from [BotFather](https://t.me/botfather). See Appendix A for step-by-step instructions. 2. Generate a sample invoice using [`sendInvoice`](https://core.telegram.org/bots/api#sendinvoice) method and `provider_token` that you got from step 1. As of v1.0.0 no other options are needed for provider, except provider token. ### Basic test card numbers Genuine card information cannot be used in test mode. Instead, use any of the following test cards and a valid expiration date to create a successful payment. | Number | Brand | Date |Phone number | | ------------------- | ------ | -------- |-----------------| | 8600 1404 0738 9072 | UzCard | 10/24 |998\*\*\*\*\*6998| | 9860 0901 0131 2172 | Humo | 03/24 |998\*\*\*\*\*3929| ### Transaction verification To verify the payment you must verify the SMS code, which will be sent to the [Telegram channel](https://t.me/test_mypay). ## Going Live ### Obtaining merchant token After signing a contract with GlobalPay, you will be presented with a merchant token, which will be used for authorization purposes. ### Authorization To get into authorization interface follow instructions on Appendix A and choose *Connect GlobalPay Live* in step 6. Afterwards, you will be given a button with an unique link to merchant authorization interface, where you should use your *merchant token* to authorize. In case of a successful authorization, you will be redirected back to BotFather, where you can get a `provider_token`. > NOTE: test cards given above will not work on LIVE. So, you must use a real card. ## Additional Information - Only UzCard and Humo cards are supported - Only UZS is supported, so make sure you set `currency` as `UZS` in your invoice - Prices for items, as well as for tips must be given in tiyins (multiply the original price by 100) ## Appendices ### Appendix A: Obtaining `provider_token` 1. Go to [BotFather](https://t.me/botfather) 2. Type `/mybots` to get the list of available bots 3. Select your bot that you want to connect to **GlobalPay** 4. Next, select *Payments* 5. Afterwards, select *GlobalPay* from the list of payment providers 6. If you want to test your integration, select *Connect GlobalPay Test*, otherwise select *Connect GlobalPay Live* 7. After successful connection, your `provider_token` will be available on the main menu of *Payments* section (see step 4)