Documentation

Documentation

  • Bank 131 API
  • Languages iconEnglish
    • Русский

›How Payments Work

131 Documentation

  • API features
  • Where to begin

Introduction to API

  • Interaction
  • API libraries
  • Testing
  • Version history

How Payouts Work

  • Features
  • How it all works
  • Main payout scenario
  • Payout refunds
  • The Self-employed

    • Payouts to the self-employed
    • Linking the self-employed
    • Fiscalization

    Payout Methods

    • To a Russian bank card
    • To a foreign bank card
    • To a Russian bank account
    • To a QIWI Wallet
    • To a YooMoney (Yandex.Money)
    • To the Russian Federal Tax Agency
    • Via FPS by a phone number

    Payout Scenarios

    • Payout to a card via widget
    • Single-request payout
    • Payout to a card with PCI DSS
    • Payout to a self-employed person with fiscal receipt

How Payments Work

  • Features
  • Payment process
  • Payments via bank card
  • Payments with later capture
  • Refunds
  • Recurring payments
  • Integration with Google Pay™
  • Payments via Telegram
  • Payments via FPS by QR code
  • Split Payments

    • Features and options
    • Split payments out of the box
    • Split payments using API

    Payment Scenarios

    • Paying via payment form
    • Paying with PCI DSS
    • Single-request payment
    • Google Pay™

Widgets

  • Widget to get card details
  • Payment form widget
  • Widget for linking a self-employed person to the Bank

Passport Verification

  • Features
  • Interaction
  • Methods

    • Verification request
    • Verification status
  • Response and errors

Reports

  • Payouts report
  • Payments report
  • Monthly report

API Reference

  • Objects
  • Methods
  • Webhooks
  • Error codes

Payments via Telegram

You can also receive payments using Telegram bots.

You should begin with the following steps:

  1. Create your Telegram bot.
  2. Connect your Telegram bot to Bank 131.
  3. Set up your Telegram bot and start receiving payments.

How to Create your Telegram Bot

  1. In a Telegram app, start chatting with @BotFather by sending /start and then /newbot.

  1. Specify your bot's name. This is how the bot will be displayed in the customer's list of Telegram chats.

  1. Specify your bot's username. This must be a unique yet self-explanatory username, which customers can easily identify among others in Telegram. Note that a bot's username must end with "bot".
    In the exapmle below, Bank 131 is the bot's name and Bank_131_bot is the bot's username.

  1. Once you confirmed your bot's username, BotFather will provide you with a token to manage your bot that looks like an alphanumeric line. This is the key to your bot, so store it in a safe place and never share with anyone including Bank 131 or Telegram Help & Support officers.

  1. Once you got your token, your bot is ready. You can customize its userpic and add a brief description using the Settings section.

How to Connect your Telegram Bot to Bank 131

  1. Send /mybots to BotFather to obtain the list of bots you created and click your desired bot's name.

  1. In the menu click Bot Settings.

  1. In the next menu, click Payments.

  1. In the list of payment providers, select Банк 131.

Once you clicked Банк 131, you will start chatting with Bank 131 bot in a separate window.

The Bank 131 Test allows to try out making payments safely on a test environment, while Bank 131 Live is used to make real payments.

Bank 131 Test
Bank 131 Live

Click Start. In the chat dialog, Bank 131 will confirm acceptance of your account and ask you to provide a confirmation code — type "qwerty" in reply.

Click Start. In the chat dialog, Bank 131 will confirm acceptance of your account and ask you to provide a confirmation code, the one that was provided to you by a Bank's manager earlier. If you don't have the code, contact us at partners@131.ru.

Note that a confirmation code is NOT your bot token to manage your bot. Never share your token with anyone including Bank 131 or Telegram Help & Support officers.

How to Set up your Telegram Bot and Start Receiving Payments

The settings below are provided for bots that use Telegram API. For bots created via other services, refer to the appropriate API description.

Invoice

Call the sendinvoice method to send invoices to your customers. The call must contain parameters for the item's price, name and its brief description, the payload parameter and, finally, provider_token — the token to manage your Telegram bot.

{
"chat_id": 0000000,
"title": "TestTitle",
"description": "TestDescription",
"payload": "TestPayload",
"provider_token": "0987654321:TEST",
"currency": "RUB",
"start_parameter": "test",
"prices": [{
        "label": "руб",
        "amount": 4500
    }],
}

If you provide data for fiscalization, add the following parameters into the request:

  • need_email and/or need_phone_number, if you require customer's email and/or phone number.

  • send_email_to_provider, if you are going to provide your customer's email to Bank 131.

  • send_phone_number_to_provider, if you are going to provide your customer's phone number to Bank 131.

  • provider_data containing receipt object.

"need_email": true,
"need_phone_number": true,
"send_email_to_provider": true,
"send_phone_number_to_provider": true,
"provider_data": {
    "receipt": {
        "items": [

         {
             "description": "My item",
             "quantity": "1.00",
             "amount": {
                 "value": "200.00",
                 "currency": "RUB"
             },
             "vat_code": "1"
         }

        ]}
    }

Depending on your bot's settings, if you obtained your customers's email and/or phone number earlier, the example may look like:

"send_email_to_provider": true,
"send_phone_number_to_provider": true,
"provider_data": {
    "receipt": {
        "email": "customer@example.com",
        "items": [

         {
             "description": "My item",
             "quantity": "1.00",
             "amount": {
                 "value": "200.00",
                 "currency": "RUB"
             },
             "vat_code": "1"
         }

        ]}
    }

If you require your a customer's shipping address, use the ShippingQuery method. When the customer provides an address, you should send the answerShippingQuery method containing shipping methods and shipping prices in return.

Payment Confirmation

When the customer confirmed the payment, Telegram will send you a webhook containing the PreCheckoutQuery object. In return, you should call the answerPreCheckoutQuery method within 10 seconds.

Successful Payment

When you succeed with the payment, you will receive two confirmations: a webhook containing the SuccessfulPayment object from Telegram and an email from Bank 131.

You can also set up your bot to take an action on receiving the payment confirmations and provide a customer with a service (upload a digital content, etc.).

The payment confirmation sent by Telegram contains the SuccessfulPayment object with the provider_payment_charge_id parameter as the ID for the transaction. Collect this ID for future references.

← Integration with Google Pay™Payments via FPS by QR code →
  • How to Create your Telegram Bot
  • How to Connect your Telegram Bot to Bank 131
  • How to Set up your Telegram Bot and Start Receiving Payments
    • Invoice
    • Payment Confirmation
    • Successful Payment
Documentation
Documentation
PayoutsPaymentsAPI Reference
Step by step
Payout to a card via widgetPayout to a card with PCI DSSPayout to the self-employed Paying via payment form
Get in touch
Ideas and partnerships — partners@131.ruMedia — press@131.ru
© 2022 Bank 131