Documentation

Documentation

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

›Payment Scenarios

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™
  • 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

Google Pay™

This scenario describes how to perform a payment to a bank card via Google Pay. To use this scenario, integrate Google Pay into your website or application

Step 1. Get a payment token from Google Pay

  1. A user forms an order on your website or application.
  2. The user selects Google Pay as a payment method.
  3. The user selects one of his saved cards or enters details of a new one.
  4. The user clicks Pay.
  5. Google passes you a token.

Step 2. Start a payment session

Send the session/init/payment request to start a payment session. In the payment_details.type filed specify the secured_card value. In the secured_card object pass the data needed to process the payment.

More about sessions

Request headers should be used to pass your project identifier and the request's signature.

More about request format

Request example: session creation with simultaneous payment initiation

    --header 'X-PARTNER-SIGN: key' \
    --header 'X-PARTNER-PROJECT: shop1' \
    --header 'Content-Type: application/json' \
    --data-raw '{
       "payment_details": {
           "type": "secured_card",
           "secured_card": {
               "type": "google_pay",
               "google_pay": {
                   "token": "{\"signature\":
    \"MEgKey\":{\"signedKey\":\"{\\\"keyValue\\\":\\\"MFkwEwbcg\\\\u003d\\\\u003d\\\",\\\"keyExpiration\\\":\\\"118716\\\"}\",\"signatures\":[\"MEQCIw\\u003d\\u003d\"]},\"protocolVersion\":\"ECv2\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"wkJmz3OvO4\\\\u003d\\\"}\"}"
               }
           }
       },
       "amount_details":{
           "amount": 100,
           "currency": "rub"
       },
       "metadata": {
           "key": "value"
       },
       "customer":{
         "reference":"lucky"
       }
    }'

Step 3. 3-D Secure

If the user's card requires 3D Secure, Bank 131 will send you the webhook action_required with redirection details. Redirect the user to the address that will be specified in the field customer_interaction.redirect.url.

Step 4. Learn the payment result

Wait for the webhook payment_finished or request the payment status using the method session/status.

The result of the payment can be found in the payment.status field.

If the status is succeeded, then the payment has been successful. If the status is failed, then the payment has not been completed because of an error.

More about payment statuses

All done, the payment has been performed.

← Single-request paymentWidget to get card details →
  • Step 1. Get a payment token from Google Pay
  • Step 2. Start a payment session
  • Step 3. 3-D Secure
  • Step 4. Learn the payment result
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