Faster payments system

Overview

Faster payments system is a payment method which allows customers to make payments by using mobile banking applications of the banks connected to the Faster Payments System (FPS) which is supported by the Bank of Russia. You can perform purchases through this method by using Payment Page and Gate.

In Faster payments system, payments are processed by using one of the two channels: channel 1—without redirection of the customer to the provider service, or channel 2—with customer redirection. For the information on which of the channels to use, refer to your Monetix key account manager.

Download the logo in vector format here.

Download the logos for the payment method types here.

Payment method type Payments by using mobile banking applications
Countries and regions Russian Federation
Payment currencies RUB
Currency conversion
Purchases
Payouts
Credential-on-file (COF) purchases
Full refunds
Partial refunds
Chargebacks
Special considerations Refer to your Monetix key account manager to set up QR code expiry time.

Channel 1

Callbacks from the payment platform contain provider commission. For more information, see the sections about callback format.

Channel 2

The timer on Payment Page displays the QR code lifetime. If the customer does not make all the required steps to complete the payment within that lifetime, the payment is declined on the provider side.

Onboarding and access fee Refer to your Monetix key account manager

Interaction diagram

Payment processing by using the Faster payments system payment method requires merchant's web service, one of Monetix interfaces, and the Monetix payment platform, as well as provider's technical facilities.

Operations support

Interfaces Amounts, RUB Times
Payment Page Gate Dashboard minimum maximum basic threshold
Purchases (channel 1) * * * *
Purchases (channel 2) * * * *

* Refer to your Monetix Key Account Manager.

You can check the payment amount limits in your project by using Dashboard. To check your payment amount limits, go to Dashboard, select the Projects section and click the Payment methods tab.

Processing scenarios

Depending on the channel you use, the purchase scenario in Faster payments system may be one of the following:

  • Channel 1—the customer completes the payment by following the payment instructions
  • Channel 2—the customer is redirected to the provider service to complete the payment

For the information on which of the channels to use, refer to your Monetix key account manager.

The sections that follow provide detailed information about what you need to perform payments and how you can analyze the information on payments and operations.

Purchase by using Payment Page. Channel 1: no customer redirection

General information

To process a purchase through Payment Page by using the Faster payments system method, the merchant web service needs to send a request with all the required parameters and signature to the Monetix URL and receive a callback with the payment result from the payment platform. The Faster payments system method can also be set as preselected payment method when Payment Page opens. For more information about preselecting payment methods, see the Preselecting payment methods section. The full sequence and special aspects of the purchase processing are provided below.

Figure 5. Purchase sequence by using Payment Page: Steps details
  1. A customer initiates a purchase on the merchant's web service.
  2. The web service sends the request for Payment Page opening to the specified Monetix URL.
  3. The request for opening is redirected to the payment platform.
  4. The payment platform performs the initial request processing that involves validation of the required parameters and signature.
  5. Requested Payment Page is generated into the Monetix payment platform as specified in the project settings and the request parameters.
  6. Payment Page is displayed to the customer.
  7. The customer selects the Faster payments system method and agrees to use the method (or accepts the method already selected on Payment Page and agrees).
  8. The payment platform receives the purchase request for payment processing.
  9. The payment platform performs the internal purchase request processing and sends it to the provider service.
  10. The purchase request is processed on the provider service side.
  11. The provider service generates and sends the data for displaying the payment instructions to the customer to the payment platform.
  12. The payment platform sends the data for displaying the payment instructions to the customer to Payment Page.
  13. The payment instructions are displayed to the customer.
  14. The customer completes all the required payment steps .
  15. The payment is processed on the provider side.
  16. The provider service sends the result notification to the payment platform.
  17. The payment platform sends a callback with the payment result to the web service.
  18. The payment platform sends the result to Payment Page.
  19. A page with the payment result information is displayed to the customer on Payment Page.

The sections that follow discuss in more details the request format and the Payment Page parameters to use in the Faster payments system payment method and provide the information on the format of callbacks with payment results. For the general information on how to use the API, see Payment Page API Description.

Request format

There are several things you need to consider when using the Faster payments system method:

  1. You must provide values for the basic minimum of parameters. Listed below are the parameters that are required for any payment method:
    • project_id—project ID obtained from Monetix
    • payment_id—payment ID unique within the project
    • customer_id—the unique ID of the customer within your project
    • customer_email—customer email
    • customer_first_name—customer first name
    • customer_last_name—customer last name
    • payment_currency—payment currency in ISO-4217 alpha-3 format
    • payment_amount—payment amount in minor currency units without any decimal point or comma except for cases where the currency does not have any minor currency units. If the currency has no minor units (that is, the number of digits for minor currency units is zero), then you must set this parameter to the amount in the major currency units. For the information on whether the currency has any minor units, see Currency codes.
  2. The currency of payment can only be RUB.
  3. If you need to have payment form displayed with the Faster payments system method selected, set the force_payment_method parameter to sbp-qr.
  4. If required, you can also add any other additional parameters Payment Page supports.
  5. After you specify all the parameters you need, you must create the signature for the request. For instructions on how to sign a payment request, see Signature generation and verification.

Here is an example of data from a request for Payment Page opening:

EPayWidget.run(
    {
        project_id: 1234,
        payment_id: 'payment_47',
        customer_id: 'customer_123',
        customer_first_name: 'John',
        customer_last_name: 'Doe',
        customer_email: 'johndoe@example.com',
        payment_currency: 'RUB',
        payment_amount: 1000,    
        signature: "kUi2x9dKHAVNU0FYldJrxh4yo+52Kt8KU+Y19vySO\/RLUkDJrOcZzUCwX6R\/ekpZhkIQg=="
    }
)

All parameters available for payment processing by using the Faster payments system method are provided in the Payment Page invocation parameters section.

Callback format

The Faster payments system method uses the standard format for callbacks to deliver purchase results. For more information, see Callbacks in Payment Page.

Note that in the Faster payments system method the callbacks contain provider commission in the provider_commission parameter of the payment object. For information about commission amount, refer to your Key Accout Manager at Monetix.

The following is the example of a callback with an information about successful 1000.00 RUB purchase made in the 3255 project.

Figure 6. Example of data from a successful purchase callback
{
        "customer": {
            "id": "customer1"
        },
        "project_id": 3255,
        "payment": {
            "provider_commission": 6000,
            "id": "ORDER_ID__75378662",
            "type": "purchase",
            "status": "success",
            "date": "2020-10-13T11:10:29+0000",
            "method": "sbp-qr",
            "sum": {
                "amount": 100000,
                "currency": "RUB"
            },
            "description": ""
        },
        "operation": {
            "id": 328,
            "type": "sale",
            "status": "success",
            "date": "2020-10-13T11:10:29+0000",
            "created_date": "2020-10-13T11:10:18+0000",
            "request_id": "ff47be28fbdb0e5cf332b7f7e68aa126babf690c8080efb9-00000001",
            "sum_initial": {
                "amount": 100000,
                "currency": "RUB"
            },
            "sum_converted": {
                "amount": 100000,
                "currency": "RUB"
            },
            "code": "0",
            "message": "Success",
            "provider": {
                "id": 2501,
                "payment_id": "7598b45846f5878083a74bfb43c9102b",
                "auth_code": ""
            }
        },
        "signature": "cdDAspsSdCPIHcbLPuvjGhbdn7...7W9tqqp7F3hPMOkCDfHtU/MxfRx+J3igQ=="
    }

The following is the example of a callback for a declined purchase.

Figure 7. Example of data from a declined purchase callback
{
        "customer": {
            "id": "customer2"
        },
        "project_id": 3255,
        "payment": {
            "provider_commission": 6000,
            "id": "ORDER_ID_11766298",
            "type": "purchase",
            "status": "decline",
            "date": "2020-10-13T11:11:59+0000",
            "method": "sbp-qr",
            "sum": {
                "amount": 23100,
                "currency": "RUB"
            },
            "description": ""
        },
        "operation": {
            "id": 329,
            "type": "sale",
            "status": "decline",
            "date": "2020-10-13T11:11:59+0000",
            "created_date": "2020-10-13T11:11:55+0000",
            "request_id": "d89d0a4363aea4e0965f7ae3be593a8131a520befbf87fa-00000001",
            "sum_initial": {
                "amount": 23100,
                "currency": "RUB"
            },
            "sum_converted": {
                "amount": 23100,
                "currency": "RUB"
            },
            "code": "20000",
            "message": "General decline",
            "provider": {
                "id": 2501,
                "payment_id": "7fd0aa1860a995a98e1d633be01103e0",
                "auth_code": ""
            }
        },
        "signature": "cJCpmOJ7vH8XlQZRNOzcw3ML...1dSOspHCA0u2NtjbnW2cP9qZYc2Ew=="
    }

Related topics

The following topics might be useful when implementing payments through Payment Page:

Purchase by using Payment Page. Channel 2: customer redirection

General information

In the Faster payments system method, when processing a purchase by using Payment Page, the merchant web service sends a request with all the required parameters and signature to the Monetix URL and accepts the callback with the payment result from the payment platform. When opening Payment Page, you can have Payment Page opened with the Faster payments system method pre-selected. (For more information about pre-selecting payment methods, see Preselecting payment methods.)

The full sequence of the purchase workflow is provided below.

Figure 8. Purchase workflow when using Payment Page
  1. The customer initiates a purchase on the merchant's web service.
  2. The web service sends the request for the Payment Page opening to the Monetix URL.
  3. The request for opening Payment Page is redirected to the payment platform.
  4. The payment platform performs the initial request processing that includes validation whether all the required parameters are available and signature is correct.
  5. The requested Payment Page is generated by the Monetix payment platform as specified in the project settings and request parameters.
  6. Payment Page is displayed to the customer.
  7. The customer selects Faster payments system as the payment method.
  8. The payment platform receives the purchase request for the payment processing from Payment Page.
  9. The payment platform performs the internal purchase request processing and forwards it to the provider service.
  10. The provider service processes the purchase request.
  11. The provider service generates the data for redirecting the customer to its website form and sends it to the payment platform.
  12. The payment platform sends the customer redirection data to Payment Page.
  13. The customer is redirected to the provider website.
  14. The customer completes all the steps required to complete the payment.
  15. The provider service processes the payment.
  16. The result is displayed to the customer on the provider website.
  17. The customer is redirected to Payment Page.
  18. The provider service sends the result notification to the payment platform.
  19. The payment platform sends a callback with the payment result to the web service.
  20. The payment platform sends the result to Payment Page.
  21. The page with the payment result information is displayed to the customer on Payment Page.

The sections that follow discuss in more details the request format and the Payment Page parameters to use in the Faster payments system payment method and provide the information about the format of callbacks with payment results. For the general information about how to use the Payment Page API, see Payment Page API Description.

Request format

There are several things you need to consider when dealing with purchase requests in the Faster payments system method:

  1. You must provide values for the basic minimum of parameters. Listed below are the parameters that are required for any payment method:
    • project_id—project ID you obtained from Monetix
    • payment_id—payment ID unique within the project
    • customer_id—the unique ID of the customer within your project
    • customer_email—customer email
    • customer_first_name—customer first name
    • customer_last_name—customer last name
    • payment_currency—payment currency in ISO-4217 alpha-3 format
    • payment_amount—payment amount in minor currency units without any decimal point or comma except for cases where the currency does not have any minor currency units. If the currency have no minor units (that is, the number of digits for minor currency units is zero), then you must set this parameter to the amount in the major currency units. For the information on whether the currency has any minor units, see Currency codes.
  2. The payment currency can only be RUB.
  3. If you need to have the payment form displayed with the Faster payments system method pre-selected, set the force_payment_method parameter to the code on the sbp-qr payment method.
  4. You can also add any other additional parameters Payment Page supports. For more information about parameters supported by Payment Page, see Payment Page invocation parameters.
  5. After you specify all the parameters you need, you must create the signature for the request. For instructions on how to sign payment requests, see Signature generation and verification.

Here is an example of the data from a request for the Payment Page opening:

EPayWidget.run(
    {
        project_id: 1234, 
        payment_id: 'payment_47',
        customer_id: 'customer_123',
        payment_currency: 'RUB',
        payment_amount: 10000,
        customer_first_name: 'John',
        customer_last_name: 'Doe',
        customer_email: 'johndoe@email.com',
        signature: "kUi2x9dKHAVNU0FYldJrxh4yo+52Kt8KU+Y19vySO\/RLUkDJrOcZzUCwX6R\/ekpZhkIQg=="
    }
)

Callback format

The Faster payments system method uses the standard format for callbacks to deliver purchase results. For more information about callbacks, see Callbacks in Payment Page.

The following is an example of a callback with information about a successful 100.00 RUB purchase.

Figure 9. Example of the data from a successful purchase callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "purchase",
        "status": "success",
        "date": "2022-03-25T11:08:45+0000",
        "method": "sbp-qr",
        "sum": {
            "amount": 10000,
            "currency": "RUB"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123"
    },
    "operation": {
        "id": 28,
        "type": "sale",
        "status": "success",
        "date": "2022-03-25T11:08:45+0000",
        "created_date": "2022-03-25T11:08:05+0000",
        "request_id": "9e32835fb27907e0b08569d7d150e387a16a80e336c5117242b5cf60a4e17839",
        "sum_initial": {
            "amount": 10000,
            "currency": "RUB"
        },
        "sum_converted": {
            "amount": 10000,
            "currency": "RUB"
        },
        "code": "0",
        "message": "Success",
        "provider": {
            "id": 12345,
            "payment_id": "123abc123-321",
            "auth_code": ""
        }
    },
    "signature": "U7HQO7ToISZhMPKdM4Xr4DSX2UuHp99rHrtaxkUKQtoYzFvoB3cs9CRd4xeYG2Q=="
}

The following is the example of a callback for a declined purchase.

Figure 10. Example of the data from a declined purchase callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "purchase",
        "status": "decline",
        "date": "2022-03-25T11:20:30+0000",
        "method": "sbp-qr",
        "sum": {
            "amount": 10000,
            "currency": "RUB"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123"
    },
    "operation": {
        "id": 31,
        "type": "sale",
        "status": "decline",
        "date": "2022-03-25T11:20:30+0000",
        "created_date": "2022-03-25T11:19:53+0000",
        "request_id": "fff3d5f8d5d31bc460b68b57dc63f4b482e906eb",
        "sum_initial": {
            "amount": 10000,
            "currency": "RUB"
        },
        "sum_converted": {
            "amount": 10000,
            "currency": "RUB"
        },
        "code": "20000",
        "message": "General decline",
        "provider": {
            "id": 15923,
            "payment_id": "0cf4215c-8978",
            "auth_code": ""
        }
    },
    "signature": "J7W15rkqrLzTCD4HkoM4qoEnlVlfqz8155QSlXJKR4m8C4z2iFYv58P4VnHANu445/jmY+g=="
}

Related topics

The following topics might be useful when implementing payments through Payment Page:

Purchase by using Gate. Channel 1: no customer redirection

General information

In the Faster payments system method, when processing a purchase by using Gate, the merchant web service is required to do the following:

  1. Send a request with all the required parameters and signature to the Monetix URL.
  2. Display the payment instructions to the customer.
  3. Get the callback with the payment result from the payment platform.

The following diagram provides the detailed picture of the payment processing procedure.

Figure 11. Purchase sequence by using Gate: Steps details
  1. The customer initiates purchase through one of the Faster payments system group banks on the merchant's web service side.
  2. The web service sends the request for processing the purchase by using Gate to the specified Monetix URL.
  3. The payment platform receives the request for processing the purchase from Gate.
  4. The payment platform performs the initial request processing that includes validation of the required parameters and signature.
  5. The payment platform sends the response with request receipt confirmation and correctness check result to the web service. For more information, see Response structure.
  6. The payment platform performs the internal payment request processing and redirects the request to the provider service.
  7. The request is processed on the provider side.
  8. The provider service sends the data for displaying the payment instructions to the customer to the payment platform.
  9. The payment platform sends the callback with the payment instructions data to the web service.
  10. The payment instructions are displayed to the customer.
  11. The customer goes to the National Payment Card System (NSPK) website and selects the payment method.
  12. The customer makes the payment.
  13. The payment is processed on the provider side.
  14. The provider service sends the payment result notification to the payment platform.
  15. The Monetix payment platform sends a callback to the web service.
  16. The customer receives the payment result on the web service.

The sections that follow discuss in more details the request format and the Gate parameters to use in the Faster payments system payment method and provide the information on the format of callbacks with purchase results.

Request format

There are several things you must consider when using purchase requests in the Faster payments system method:
  1. You perform purchase by sending the /v2/payment/sbp-qr/sale request by using POST (HTTP) method.
  2. The following objects and parameters must be specified in the request:
    • general—object with general request information:
      • project_id—project ID obtained from Monetix
      • payment_id—payment ID unique within the project
      • signature—signature created after you specify all the required parameters. For more information about signature generation, see Signature generation and verification.
    • customer—object with customer information:
      • id—the unique ID of the customer within your project
      • ip_address—IP address of the customer's device
      • email—customer email
      • first_name—customer first name
      • last_name—customer last name
    • payment—object with purchase information:
      • amount—purchase amount in minor currency units without any decimal point or comma except for cases where the currency does not have any minor currency units. If the currency has no minor units (that is, the number of digits for minor currency units is zero), then you must set this parameter to the amount in the major currency units. For the information on whether the currency has any minor units, see Currency codes.
      • currency—code of purchase currency in the ISO-4217 alpha-3 format
  3. Additionally, you can specify the URL for redirecting the customer to the web service in the return parameter inside the return_url object.
  4. The currency of a purchase can only be RUB.
  5. If required, you can also add any other additional parameters Gate supports.

Here is an example of data from a purchase request in the Faster payments system method.

Figure 12. Example of data from a purchase request
{
    "general": {
        "project_id": 211,
        "payment_id": "payment_id",
        "signature": "PJkV8ej\/UG0Di8NN5e7cV+eSaRfBaNIipTv+AWoXW\/9MTO8yJA=="
    },
    "payment": {
        "amount": 1000,
        "currency": "RUB"
    },
    "customer": {
        "id": "123",
        "ip_address": "123.67.94.43",
        "first_name": "John",
        "last_name": "Doe",
        "email": "johndoe@example.com"
    },
    "return_url": {
        "return": "http://example.com/return"
    } 
}

Formats of data for displaying the payment instructions

Before displaying the screen with payment instructions to the customer, you must accept a callback from the payment platform with the payment data in the display_data array—only after this you can display the screen with payment instructions to the customer.

There are two options the way the display_data array is structured. Both of them are described below. Refer to you Key Account Manager at Monetix to find out which option is relevant to you.

Option 1

There is only one element in the display_data array. The element contains the following parameters:

  • type—data type (the value is always qr_data)
  • title—data title (the value is always qr_code_url)
  • data—payment link (in the form of a URL)

The following is the callback fragment containing the URL for opening the mobile banking application.

"display_data": [
    {
        "type": "qr_data",
        "title": "qr_code_url",
        "data": "https://qr.nspk.ru/example"
    }
]

Option 2

Each element of the display_data array contains the following parameters:

  • type—data type (the value is always qr_data)
  • title—the name of the payment instruction data, can take the following values:
    • amount—purchase amount in minor currency units without any decimal point or comma
    • currency—code of purchase currency in the ISO-4217 alpha-3 format
    • qr_data or link_nspk—payment link (in the form of a URL). For the information on which value is relevant for you, refer to your Monetix key account manager.
    • lifetime—QR code expiry time in seconds
  • data—payment instruction data

Here is an example of the callback fragment containing the display_data array.

"display_data": [
    {
        "type": "add_info",
        "title": "amount",
        "data": "300000"
    },
    {
        "type": "add_info",
        "title": "qr_data",
        "data": "https://qr.nspk.ru/example"
    },
    {
        "type": "add_info",
        "title": "currency",
        "data": "RUB"
    },
    {
        "type": "add_info",
        "title": "lifetime",
        "data": "900"
    }
]

Along with the payment link contained the display_data array it is recommended to provide the customer with the list of supported banks and instructions for the mobile application on the Faster Payments System website, as well as notify the customer to check the browser settings and allow the opening of applications by using links (if the mobile banking application is meant to be opened by using the URL).

Callback format

The Faster payments system method uses the standard format for callbacks to deliver purchase results. For more information, see Callbacks in Gate.

Note that in the Faster payments system method the callbacks contain provider commission in the provider_commission parameter of the payment object. For information about commission amount, refer to your Key Accout Manager at Monetix.

The following is the example of a callback with an information about successful 1000.00 RUB purchase made in the 3255 project.

Figure 13. Example of data from a successful purchase callback
{
        "customer": {
            "id": "customer1"
        },
        "project_id": 3255,
        "payment": {
            "provider_commission": 6000,
            "id": "ORDER_ID__75378662",
            "type": "purchase",
            "status": "success",
            "date": "2020-10-13T11:10:29+0000",
            "method": "sbp-qr",
            "sum": {
                "amount": 100000,
                "currency": "RUB"
            },
            "description": ""
        },
        "operation": {
            "id": 328,
            "type": "sale",
            "status": "success",
            "date": "2020-10-13T11:10:29+0000",
            "created_date": "2020-10-13T11:10:18+0000",
            "request_id": "ff47be28fbdb0e5cf332b7f7e68aa126babf690c8080efb9-00000001",
            "sum_initial": {
                "amount": 100000,
                "currency": "RUB"
            },
            "sum_converted": {
                "amount": 100000,
                "currency": "RUB"
            },
            "code": "0",
            "message": "Success",
            "provider": {
                "id": 2501,
                "payment_id": "7598b45846f5878083a74bfb43c9102b",
                "auth_code": ""
            }
        },
        "signature": "cdDAspsSdCPIHcbLPuvjGhbdn7...7W9tqqp7F3hPMOkCDfHtU/MxfRx+J3igQ=="
    }

The following is the example of a callback for a declined purchase.

Figure 14. Example of data from a declined purchase callback
{
        "customer": {
            "id": "customer2"
        },
        "project_id": 3255,
        "payment": {
            "provider_commission": 6000,
            "id": "ORDER_ID_11766298",
            "type": "purchase",
            "status": "decline",
            "date": "2020-10-13T11:11:59+0000",
            "method": "sbp-qr",
            "sum": {
                "amount": 23100,
                "currency": "RUB"
            },
            "description": ""
        },
        "operation": {
            "id": 329,
            "type": "sale",
            "status": "decline",
            "date": "2020-10-13T11:11:59+0000",
            "created_date": "2020-10-13T11:11:55+0000",
            "request_id": "d89d0a4363aea4e0965f7ae3be593a8131a520befbf87fa-00000001",
            "sum_initial": {
                "amount": 23100,
                "currency": "RUB"
            },
            "sum_converted": {
                "amount": 23100,
                "currency": "RUB"
            },
            "code": "20000",
            "message": "General decline",
            "provider": {
                "id": 2501,
                "payment_id": "7fd0aa1860a995a98e1d633be01103e0",
                "auth_code": ""
            }
        },
        "signature": "cJCpmOJ7vH8XlQZRNOzcw3ML...1dSOspHCA0u2NtjbnW2cP9qZYc2Ew=="
    }

Related topics

The following topics might be useful when implementing payments through Gate:

Purchase by using Gate. Channel 2: customer redirection

General information

In the Faster payments system method, the merchant web service is required to do the following when processing a purchase by using Gate:

  1. Send a request with all the required parameters and signature to the Monetix URL.
  2. Redirect the customer to the provider service.
  3. Accept the callback with the payment result from the payment platform.

The following diagram provides the detailed picture of the payment processing procedure.

Figure 15. Purchase by using Gate
  1. The customer initiates a purchase with Faster payments system on the merchant's web service side.
  2. The web service sends a request for processing the purchase by using Gate to the Monetix URL.
  3. The payment platform receives the request for processing the purchase from Gate.
  4. The payment platform performs the initial request processing that includes validation whether all the required parameters are available and signature is correct.
  5. The payment platform sends the response with the request receipt confirmation and validation result to the web service. For more information about the response format, see Response structure.
  6. The payment platform performs the internal payment request processing and redirects the request to the provider service.
  7. The provider service processes the request.
  8. The provider service sends the data for redirecting the customer to the provider service to the payment platform.
  9. The payment platform sends the callback with the redirection data inside the redirect_data object to the web service.
  10. The customer is redirected from the web service to the provider service.
  11. The customer completes all the payment steps required.
  12. The provider service processes the payment.
  13. The result is displayed to the customer.
  14. The customer is redirected to the merchant web service.
  15. The provider service sends the payment result notification to the payment platform.
  16. The payment platform sends the callback with the payment result to the web service.
  17. The web service sends the payment result to the customer.

The sections that follow discuss in more details the request format and the Gate parameters to use in the Faster payments system payment method and provide the information about the format of callbacks with purchase results. For the general information on how to use the Gate API, see API Description.

Request format

There are several things you need to consider when dealing with purchase requests in the Faster payments system method:

  1. You initiate a purchase by submitting a purchase request to the /v2/payment/sbp-qr/sale endpoint by using the HTTP method POST.
  2. The following objects and parameters must be specified in any request:
    • general—object with general request identification information:
      • project_id—the project ID you obtained from Monetix
      • payment_id—payment ID unique within the project
      • signature—signature created after you specify all the required parameters. For more information about signature generation, see Signature generation and verification.
    • customer—object with customer information:
      • id—the unique ID of the customer within your project
      • ip_address—IP address of the customer's device
      • email—customer email
      • first_name—customer first name
      • last_name—customer last name
    • payment—object with purchase information:
      • amount—purchase amount in minor currency units without any decimal point or comma except for cases where the currency does not have any minor currency units. If the currency have no minor units (that is, the number of digits for minor currency units is zero), then you must set this parameter to the amount in the major currency units. For the information on whether the currency has any minor units, see Currency codes.
      • currency—code of the purchase currency in the ISO-4217 alpha-3 format
  3. The following parameters with the return URLs are optional, but we strongly advise you to specify them in the request to provide your customer a better user experience. If you don't specify any parameters of the return_url object in the request, by default Gate will redirect the customer to the URL specified in your project in Monetix.
    • return_url—object with the information where to redirect the customer to when the payment is completed or prematurely terminated by the customer:
      • success—the URL to redirect the customer to after the payment is successfully completed.
      • decline—the URL to redirect the customer to after the payment is declined.
      • return—the URL to redirect the customer to when they prematurely terminate the payment. This URL is also used if the success and decline parameters are not specified in the request.
  4. The currency of purchase can only be RUB.
  5. If required, you can add any other additional (optional) parameters Gate supports.

Here is an example of the data from a purchase request in the Faster payments system method.

Figure 16. Example of the data from a purchase request
{
    "general": {
        "project_id": 1234,
        "payment_id": "payment_47",
        "signature": "PJkV8ej\/UG0Di8hTng6JvC7vQsaC6tajQVVfBaNIipTv+AWoXW\/9MTO8yJA=="
    },
    "customer": {
        "id": "customer_123",
        "ip_address": "198.51.100.47",
        "first_name": "John",
        "last_name": "Doe",
        "email": "johndoe@example.com"
    },
    "payment": {
        "amount": 10000,
        "currency": "RUB"
    },
    "return_url": {
        "success": "https://example.com/success/",
        "decline": "https://example.com/decline/",
        "return": "https://example.com/return/"
    }
}

Format of customer redirection data

After receiving and processing your purchase request, the payment platform sends a callback to your web service containing the data to redirect the customer to the provider service.

To redirect the customer, use the values of the following parameters in the redirect_data object:

  • url—the URL to redirect the customer to
  • body—the data to be sent in the request body
  • method—the HTTP method to get an HTML page of the website (for example, POST or GET)
  • encrypted—this is the service parameter. Ignore the data it contains.

Here is an example of a piece of callback containing the data to redirect the customer.

"redirect_data": {
    "method": "GET",
    "body": [],
    "encrypted": [],
    "url": "https://example.com/redirect"
}

Callback format

The Faster payments system method uses the standard format for callbacks to deliver purchase results. For more information about callbacks, see Callbacks in Gate.

The following is an example of a callback with information about a successful 100.00 RUB purchase.

Figure 17. Example of the data from a successful purchase callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "purchase",
        "status": "success",
        "date": "2022-03-25T11:08:45+0000",
        "method": "sbp-qr",
        "sum": {
            "amount": 10000,
            "currency": "RUB"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123"
    },
    "operation": {
        "id": 28,
        "type": "sale",
        "status": "success",
        "date": "2022-03-25T11:08:45+0000",
        "created_date": "2022-03-25T11:08:05+0000",
        "request_id": "9e32835fb27907e0b08569d7d150e387a16a80e336c5117242b5cf60a4e17839",
        "sum_initial": {
            "amount": 10000,
            "currency": "RUB"
        },
        "sum_converted": {
            "amount": 10000,
            "currency": "RUB"
        },
        "code": "0",
        "message": "Success",
        "provider": {
            "id": 12345,
            "payment_id": "123abc123-321",
            "auth_code": ""
        }
    },
    "signature": "U7HQO7ToISZhMPKdM4Xr4DSX2UuHp99rHrtaxkUKQtoYzFvoB3cs9CRd4xeYG2Q=="
}

The following is the example of a callback for a declined purchase.

Figure 18. Example of the data from a declined purchase callback
{
    "project_id": 1234,
    "payment": {
        "id": "payment_47",
        "type": "purchase",
        "status": "decline",
        "date": "2022-03-25T11:20:30+0000",
        "method": "sbp-qr",
        "sum": {
            "amount": 10000,
            "currency": "RUB"
        },
        "description": ""
    },
    "customer": {
        "id": "customer_123"
    },
    "operation": {
        "id": 31,
        "type": "sale",
        "status": "decline",
        "date": "2022-03-25T11:20:30+0000",
        "created_date": "2022-03-25T11:19:53+0000",
        "request_id": "fff3d5f8d5d31bc460b68b57dc63f4b482e906eb",
        "sum_initial": {
            "amount": 10000,
            "currency": "RUB"
        },
        "sum_converted": {
            "amount": 10000,
            "currency": "RUB"
        },
        "code": "20000",
        "message": "General decline",
        "provider": {
            "id": 15923,
            "payment_id": "0cf4215c-8978",
            "auth_code": ""
        }
    },
    "signature": "J7W15rkqrLzTCD4HkoM4qoEnlVlfqz8155QSlXJKR4m8C4z2iFYv58P4VnHANu445/jmY+g=="
}

Related topics

The following topics might be useful when implementing payments through Gate:

Analysis of payments results

As with other payment methods Monetix offers, when using this method, you have several options to analyze the information about payments and operations.

You can load and analyze all the necessary information in Dashboard (dash-light.trxhost.com), for instance you can use the analytic panels in the Analytics section for this purpose.

Also, you can export the information for further analysis by using third party analytical tools. The following options are available:

  • Dashboard allows you to download reports in CSV format by using the tools in the Reports section. You can perform export as a one-time or regular download of data to your local computer.
  • Data API allows you to have payment information exported in JSON format and delivered to a URL you specify. The payment information is exported by means of sending requests to the /operations/get endpoint.

If you have any further questions regarding payment data analysis, contact Monetix technical support.