Documentation

Documentation

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

›Widgets

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

Widget for linking a self-employed person to the Bank

This widget allows you to link self-employed people to Bank 131. Before showing it to the user, you can check whether the person is in fact self-employed and whether they are linked to Bank 131. This can be done using the check and session/request requests.

What the widget looks like

Initial state of the widget

alt-text

Request to link the self-employed person has been sent successfully

alt-text

The individual has confirmed their linkage to Bank 131 and has updated the application status

alt-text

The individual has rejected linkage to Bank 131

alt-text

There was an error during linkage

alt-text

How to add a widget to a page

To use widgets, you need to connect our JavaScript library to the page and obtain a token. One token lets you perform one operation.

1. Link the script and basic styles to the page

In test environment

<link href="https://widget-demo.bank131.ru/self-employed.css" rel="stylesheet">
<script src="https://widget-demo.bank131.ru/self-employed.js"></script>

For real operations

<link href="https://widget.bank131.ru/self-employed.css" rel="stylesheet">
<script src="https://widget.bank131.ru/self-employed.js"></script>

2. Place a container in the code which the widget will then be inserted into

<div id="bank131-self-employed"></div>

3. Create an instance of the widget

To create an instance of the widget, use the Bank131SelfEmployed global object; display it in the container using the render() method. You will need the unique token you have obtained to work with the widget.

<script>
  if (window.Bank131SelfEmployed) {
    const selfEmployed = new Bank131SelfEmployed({
      stage: Bank131SelfEmployed.STAGES.bind,
      publicToken: '0eb43bd1b6f5c7ed83903d7acd774179621018a2e74fb2702e5616f1f31fe553', // token
    });

    selfEmployed.render();
  }
</script>

5. Obtain the result from the widget

Subscribe to the messages on the current page.

window.addEventListener('message', function (event) {
// Handler code

console.dir(event.data);
})

Message format for: event data

    {
      "meta": {
        "stage": "bind"
      },
      "payload": {
        "status": "completed" // "in_progress" or "failed"
      }
    }

Possible values of the status field:

  • completed — the linkage has been successful;
  • in_progress — registration is in progress; waiting for the self-employed person to confirm the linkage through "Мой налог" ("My Tax") or the Federal Tax Agency website.
  • failed — the linkage has not been completed because of an error.
← Payment form widgetFeatures →
  • What the widget looks like
  • How to add a widget to a page
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