Wallet pay

Connecting the payment system
Connecting on Telegram side
Step 1. Log in to your partner account
On the page that opens, click "Log in via Telegram", then enter your phone number in the pop-up window "Appears oauth.telegram.org " and click "Apply".
It is necessary to connect the payment system both through the web browser and through the application:
You will receive a Telegram message requesting authorization - click "Apply".
You also need to click "Apply" in the pop-up window "oauth.telegram.org " in a web browser.
It is recommended to use an account that the person in charge of finance has access to. For legal entities – an authorized representative.
Step 2. Take a small survey

If you are logging in for the first time or you need some additional information, WalletPay offers you to answer a few questions to get more detailed information. There are two steps:
1. Questionnaire
2. KYB (Know Your Business) or KYC (Know Your Customer) checks
After completion, your application will be reviewed soon and you will be notified of the results. If successful, you will see the commission charged by the service and get access to your account where you can start integration.
For legal entities, the form can only be filled out by a trusted person: a director or an employee by proxy.
Step 3. Create the first "Store".
After completing the "Survey" successfully, you will be suggested to create your first store.
Step 4. Create an "API key"
After the name of the first store, you will be suggested to set it up:
Generate API key.
Copy your API key and start integrating with Mavibot.
Step 5. Create an order and receive a payment link
If you want to put a link in a button, use Inline Button.
Please note that only the specified "customerTelegramUserId" can open the payment page.
Step 6. Withdraw funds
After the client confirms the payment, the funds are credited to your assets and are held for 48 hours by default. After this time, you will be able to withdraw funds to the balance of your Wallet, which you used to log into the Paypal Wallet service.
Step 7. Return of funds
Currently, withdraw funds are available from your Wallet account, which you use to log in to WalletPay. But it will be available in your Merchant account soon.
What the payment button look like?
When integrating your Telegram Bot with the "Wallet Pay API", make sure that the payment button complies with the following recommendations:
Named as one of two ways:
:purse: Wallet Pay
:purse: Pay via Wallet
Located above the other buttons (if you have any).
Note. :purse: — это смайлик (see https://emojipedia.org/purse/).
See the example in [Demo Store Bot].
Connecting to Mavibot
Log in to the project and click the “Connect” button for Wallet Pay in the “Payment systems” section.

In the window that opens, enter the API key generated for your WalletPay store.

How to generate a payment link
Create a funnel constructor block and call the “wallet_pay_generate_payment_url” function in the calculator, passing the necessary parameters to it:
amount
the amount of the payment in cryptocurrency or other fiat currency available for conversion to “TON”.
сurrency_code
The default payment currency is “RUB". List of available currencies: "TON" "BTC" "USDT" "EUR" "USD" "RUB"
description
a short description of the order from 5 to 100 characters.
timeout_seconds
The link's validity period is in seconds, the default is 3600 seconds.

When the block is triggered in a chat with a bot, the client will receive a payment link, and the wallet_pay_payment_completed client variable will be created with the value False.
This link can only be opened in a chat with a bot connected to a WalletPay billing account.
Payment verification
After successful payment, the client's wallet_pay_payment_completed variable will set to True, and the seller will receive a callback in the form of 4690FE98_success, which consists of:
“4690FE98” - these are the first 8 characters of the Wallet Pay API key.
слова об успешно
! if there is a payment error, you will receive a callback with the suffix “_fail”.
Address for notifications (callbacks): https://chatter.salebot.pro/wallet_pay/payment_callback - inserted into the payment system settings
A callback can be embedded in the block condition to send a message to the client about a successful payment (or a payment error):


If you do not want to knock the client out of the main chatbot scheme, use the "Non state condition" block. You cannot go to this block, so the client will not be knocked out of the main funnel after payment and will receive a notification of successful payment. омление об успешной оплате.
And if you need to continue the funnel with a reaction to a successful payment, then use the "Start condition" block, then the client will move from the payment block to the "Start condition" block, from which you can continue the funnel.
More information about conditional blocks is provided in the article of the same name. ссылкаблоках с условием рассказали
Useful links
Last updated