Tinkoff

Overview

Tinkoff is a payment method that allows customers to make payments through Tinkoff online banking. Purchases are performed by using Payment Page and Gate, refunds—by using Gate.

General information

Payment method type online banking
Countries and regions RU
Payment currencies RUB
Currency conversion
Purchases +
Payouts
Stored credentials payments
Full refunds +
Partial refunds +
Chargebacks  
Special considerations
Obtaining access to the payment method and access fee refer to your ECommPay key account manager

Interaction diagram

Payment processing through the Tinkoff payment method requires merchant's web service, one of the interfaces and the payment platform of ECommPay, as well as Tinkoff technical facilities.



Operations support

  Interfaces Amounts, RUB
Payment Page CMS Plug-ins Gate Dashboard (Old Dashboard) minimum maximum
Purchases + + 1.00 600,000.00
Full refunds +
Partial refunds +

Processing scenarios

In the Tinkoff method, to perform a purchase operation, you need to redirect a customer to the Tinkoff service, while a refund is performed with the notification of a customer via web service.

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

Purchase by using Payment Page

General information

In the Tinkoff method, when processing a purchase by using Payment Page, the merchant web service should send a request with all the required parameters and signature to the ECommPay URL and get the callback with the payment result from the payment platform. When opening Payment Page, you can have Payment Page opened with the Tinkoff method selected. For more information about preselecting payment methods, see in Preselecting payment methods. The full sequence and particularities of the purchase process are provided below.

Figure: Purchase by using Payment Page

  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 ECommPay 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 ECommPay 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 Tinkoff method.
  8. The payment platform receives the purchase request for payment processing from Payment Page.
  9. The payment platform performs the internal purchase request processing and sends it to the Tinkoff service.
  10. The purchase request is processed on the Tinkoff service side.
  11. The Tinkoff 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 Tinkoff website.
  14. The customer completes all the required payment steps.
  15. The payment is processed on the Tinkoff side.
  16. The result is displayed to the customer on the Tinkoff website.
  17. The customer is redirected to Payment Page.
  18. The Tinkoff 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. 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 Tinkoff 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 Tinkoff method:

  1. You must provide values for the basic minimum of parameters. Listed below are the parameters that are mandatory for any payment method:
    • project_id—the project ID obtained from ECommPay
    • payment_id—payment ID unique within the project
    • payment_currency—payment currency in ISO-4217 alpha-3 format
    • payment_amount—payment amount in minor currency units
    • customer_id—ID of the customer within the project
  2. The currency of payment can only be RUB.
  3. If you need to have payment form displayed with the Tinkoff method selected, set the force_payment_method parameter to tinkoff-online-banking.
  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.

Thus, a correct payment request in the Tinkoff method must include project, customer, and payment IDs, the currency and the amount of a payment in the appropriate currency, as shown in the following example:

EPayWidget.run(
    { payment_id: 'X03936', 
      payment_amount: 10000, 
      payment_currency: 'RUB', 
      project_id: 35, 
      customer_id: 'customer1',
      signature: "kUi2x9dKHAVNU0FYUkDJrOcZzUCwX6R\/ekpZhkIQg=="
    }
)

For information about all parameters available in the Tinkoff method, see Payment Page invocation parameters.

Callback format

The Tinkoff method uses the standard format for callbacks to deliver purchase results. For more information, see Callbacks.

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

Figure: Example of a successful purchase callback

{
    "project_id": 386,
    "payment": {
        "id": "ORDER_105300_49747792",
        "type": "purchase",
        "status": "success",
        "date": "2021-03-18T07:53:06+0000",
        "method": "tinkoff",
        "sum": {
            "amount": 100,
            "currency": "RUB"
        },
        "description": ""
    },
    "operation": {
        "id": 926,
        "type": "sale",
        "status": "success",
        "date": "2021-03-18T07:53:06+0000",
        "created_date": "2021-03-18T07:53:00+0000",
        "request_id": "714bf268610dabe6123b742cd8e832fc21fd244a-00000001",
        "sum_initial": {
            "amount": 100,
            "currency": "RUB"
        },
        "sum_converted": {
            "amount": 100,
            "currency": "RUB"
        },
        "code": "0",
        "message": "Success",
        "provider": {
            "id": 2990,
            "payment_id": "2b8c54fb289325fea609113d4cbcd0f3",
            "auth_code": "",
            "endpoint_id": "tinkoff_bank",
            "date": "2021-03-18T07:53:06+0000"
        }
    },
    "signature": "LptHv8D05q9MY8KaFb4A/J...gTfc9r9y+b/WYFknBbPmGg=="
}

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

Figure: Example of a declined purchase callback

{
    "project_id": 386,
    "payment": {
        "id": "ORDER_63707024",
        "type": "purchase",
        "status": "decline",
        "date": "2021-03-18T07:55:10+0000",
        "method": "tinkoff",
        "sum": {
            "amount": 11900,
            "currency": "RUB"
        },
        "description": ""
    },
    "operation": {
        "id": 927,
        "type": "sale",
        "status": "decline",
        "date": "2021-03-18T07:55:10+0000",
        "created_date": "2021-03-18T07:55:08+0000",
        "request_id": "e5865da3bcfd01b13bbffba7099a66a1de340a6f8-00000001",
        "sum_initial": {
            "amount": 11900,
            "currency": "RUB"
        },
        "sum_converted": {
            "amount": 11900,
            "currency": "RUB"
        },
        "code": "20000",
        "message": "General decline",
        "provider": {
            "id": 2990,
            "payment_id": "73c8eb57ac3be280b206f44a031319d8",
            "auth_code": "",
            "endpoint_id": "tinkoff_bank",
            "date": "2021-03-18T07:55:09+0000"
        }
    },
    "signature": "8TN1v/PGvbSESGkX/+wQJC...w3MdDYtQ/qGq61PQxCl711rhTkv1g=="
}

Related topics

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

Purchase by using Gate

General information

In the Tinkoff 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 ECommPay URL.
  2. Perform the redirection of a customer to the Tinkoff service.
  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: Purchase by using Gate

  1. A customer initiates a purchase through Tinkoff on the merchant's web service side.
  2. The web service sends the request for processing the purchase by using Gate to the specified ECommPay 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 format.
  6. The payment platform performs the internal payment request processing and redirects the request to the Tinkoff service.
  7. The request is processed on the Tinkoff side.
  8. The Tinkoff service sends the data for redirecting the customer to the Tinkoff service to the payment platform.
  9. The payment platform sends the callback with the redirection data in the redirect_data object to the web service.
  10. The customer is redirected from the web service to the Tinkoff service.
  11. The customer completes all the required payment steps.
  12. The payment is processed on the Tinkoff side.
  13. The result is displayed to the customer.
  14. The customer is redirected to the merchant's web service.
  15. The Tinkoff service sends the payment result notification to the payment platform.
  16. The payment platform sends a callback to the web service.
  17. 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 Tinkoff 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 Tinkoff method:
  1. You perform purchase by sending the /v2/payment/online-banking/tinkoff/sale request by using POST (HTTP) method. This request refers to the online banking requests group: /v2/payment/online-banking/{payment_method}/sale
  2. The following objects and parameters must be specified in the request:
    • Object general—general purchase information:
      • project_id—project identifier
      • payment_id—unique payout identifier
      • signature—signature created after you specify all the required parameters. For more information about signature generation, see Signature generation and verification
    • Object customer—customer information:
      • id—ID of the customer within the project
      • ip_address—customer IP address
    • Object payment—purchase information:
      • amount—purchase amount in minor currency units
      • currency—purchase currency in the ISO-4217 alpha-3 format
  3. The currency of purchase can only be RUB.
  4. If required, you can also add any other additional parameters Gate supports.

Thus, a correct payment request in the Tinkoff method must include project, payment and customer IDs, currency and amount of the purchase, as shown in the following example:

Figure: Example of a purchase request

{
    "general": {
        "project_id": 35,
        "payment_id": "Payment 12",
        "signature": "2tlMuYxLW9Yu6RETr8pdCfbOQ+9ajAteg5lPk96Q=="
  },
    "customer": {
        "ip_address": "1.1.1.1",
        "id": "customer1"
  },
    "payment": {
        "amount": 10000,
        "currency": "RUB"
  }
}

Formats of the customer redirection data

To redirect a customer from the web service to the Tinkoff site, you must receive a callback from the payment platform containing the URL for redirection in the redirect_data.url parameter and data to be sent in the request body in the redirect_data.body parameter, and use these parameters when opening the HTML page using the method specified in the redirect_data.method parameter.

The following is the callback fragment containing the redirection data.

"redirect_data": {
            "method": "GET",
            "body": {...},
            "url": "http://example.com/example/a/acs/29d7454b70adad712aa5b536d449c7f7"
        }

Callback format

The Tinkoff method uses the standard format for callbacks to deliver purchase results. For more information, see Callbacks.

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

Figure: Example of a successful purchase callback

{
    "project_id": 386,
    "payment": {
        "id": "ORDER_105300_49747792",
        "type": "purchase",
        "status": "success",
        "date": "2021-03-18T07:53:06+0000",
        "method": "tinkoff",
        "sum": {
            "amount": 100,
            "currency": "RUB"
        },
        "description": ""
    },
    "operation": {
        "id": 926,
        "type": "sale",
        "status": "success",
        "date": "2021-03-18T07:53:06+0000",
        "created_date": "2021-03-18T07:53:00+0000",
        "request_id": "714bf268610dabe6123b742cd8e832fc21fd244a-00000001",
        "sum_initial": {
            "amount": 100,
            "currency": "RUB"
        },
        "sum_converted": {
            "amount": 100,
            "currency": "RUB"
        },
        "code": "0",
        "message": "Success",
        "provider": {
            "id": 2990,
            "payment_id": "2b8c54fb289325fea609113d4cbcd0f3",
            "auth_code": "",
            "endpoint_id": "tinkoff_bank",
            "date": "2021-03-18T07:53:06+0000"
        }
    },
    "signature": "LptHv8D05q9MY8KaFb4A/J...gTfc9r9y+b/WYFknBbPmGg=="
}

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

Figure: Example of a declined purchase callback

{
    "project_id": 386,
    "payment": {
        "id": "ORDER_63707024",
        "type": "purchase",
        "status": "decline",
        "date": "2021-03-18T07:55:10+0000",
        "method": "tinkoff",
        "sum": {
            "amount": 11900,
            "currency": "RUB"
        },
        "description": ""
    },
    "operation": {
        "id": 927,
        "type": "sale",
        "status": "decline",
        "date": "2021-03-18T07:55:10+0000",
        "created_date": "2021-03-18T07:55:08+0000",
        "request_id": "e5865da3bcfd01b13bbffba7099a66a1de340a6f8-00000001",
        "sum_initial": {
            "amount": 11900,
            "currency": "RUB"
        },
        "sum_converted": {
            "amount": 11900,
            "currency": "RUB"
        },
        "code": "20000",
        "message": "General decline",
        "provider": {
            "id": 2990,
            "payment_id": "73c8eb57ac3be280b206f44a031319d8",
            "auth_code": "",
            "endpoint_id": "tinkoff_bank",
            "date": "2021-03-18T07:55:09+0000"
        }
    },
    "signature": "8TN1v/PGvbSESGkX/+wQJC...w3MdDYtQ/qGq61PQxCl711rhTkv1g=="
}

Related topics

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

Refund by using Gate

General information

Tinkoff supports processing of full and partial refunds. In the Tinkoff method, any refund follows the usual procedure which is common to Gate: merchant's web service sends a request with all the required parameters and signature to ECommPay URL, Gate accepts the request and redirects to the payment platform for further processing. The full sequence of the refund process is provided below.



Figure: Refund sequence by using Gate

  1. A customer orders a refund on the merchant's web service side.
  2. Merchant's web service sends the request for the refund processing by using Gate to the appropriate ECommPay URL.
  3. Gate redirects the request to the ECommPay payment platform.
  4. The payment platform performs all the necessary checks and processes the request.
  5. The reply with the request processing results is sent to the merchant's web service. For more information, see Response format.
  6. The payment platform redirects the refund request to the Tinkoff service.
  7. The payment is processed on the Tinkoff side.
  8. Tinkoff sends the result notification to the payment platform.
  9. The payment platform sends a callback with the payment result to the web service.
  10. The customer receives the refund result from the web service.

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

Request format

There are several things you must consider when using refund requests in the Tinkoff method:
  1. You perform refunds by sending the /v2/payment/online-banking/tinkoff/refund request by using POST (HTTP) method. This request refers to the online banking requests group: /v2/payment/online-banking/{payment_method}/refund
  2. The following objects and parameters must be specified in any request:
    • Object general—general refund information:
      • project_id—project identifier
      • payment_id—unique refund identifier
      • signature—signature created after you specify all the required parameters. For more information about signature generation, see Signature generation and verification
    • Object payment—refund information:
      • amount—refund amount in minor units (mandatory for partial refund only)
      • currency—refund currency in ISO-4217 alpha-3 format (mandatory for partial refund only)
      • description—comment or description
  3. If required, you can also add any other additional parameters Gate supports.

Thus, a correct refund request in the Tinkoff method must include project and payment IDs, currency and amount of the refund, as well as refund description, as shown in the following example:

Figure: Example of a refund request

{
   "general": {    
    "project_id": 239,    
    "payment_id": "refund_02",   
    "signature": "of8k9xerKSK4XL1QFaDH3p9Mh0CIcjmOwSwKJ7KLTZYO56lCv+f1M0Sf/7eg=="
 },
   "payment": {    
     "amount": 10000,    
     "currency": "RUB",
     "description": "refund_02"
 }
}

Callback format

The Tinkoff method uses the standard format for callbacks to deliver refund results. For more information, see Callbacks.

The following is the example of a callback with an information about successful 1.00 RUB refund made in the 386 project.

Figure: Example of a successful refund callback

{
    "project_id": 386,
    "payment": {
        "id": "ORDER_78028507",
        "type": "purchase",
        "status": "refunded",
        "date": "2021-03-18T07:56:14+0000",
        "method": "tinkoff",
        "sum": {
            "amount": 0,
            "currency": "RUB"
        },
        "description": ""
    },
    "operation": {
        "id": 929,
        "type": "refund",
        "status": "success",
        "date": "2021-03-18T07:56:14+0000",
        "created_date": "2021-03-18T07:56:13+0000",
        "request_id": "881f8e135923d239046db018ce7efd44abfb8d25-00000001",
        "sum_initial": {
            "amount": 100,
            "currency": "RUB"
        },
        "sum_converted": {
            "amount": 100,
            "currency": "RUB"
        },
        "code": "0",
        "message": "Success",
        "provider": {
            "id": 2990,
            "payment_id": "4ee45ac499e58ff04ce4b22e755bc45c",
            "auth_code": "",
            "date": "2021-03-18T07:56:13+0000"
        }
    },
    "signature": "x4/yXU/Ii4TD8a5Oon2kI+h1/...pyPVbprQshEqsaeorJSpZObBQ=="
}

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

Figure: Example of a declined refund callback

{
    "project_id": 386,
    "payment": {
        "id": "ORDER_105757_66943154",
        "type": "purchase",
        "status": "success",
        "date": "2021-03-18T07:58:06+0000",
        "method": "tinkoff",
        "sum": {
            "amount": 31500,
            "currency": "RUB"
        },
        "description": ""
    },
    "operation": {
        "id": 931,
        "type": "refund",
        "status": "decline",
        "date": "2021-03-18T07:58:06+0000",
        "created_date": "2021-03-18T07:58:05+0000",
        "request_id": "76a486d4ff02c763cdf6623a55159bb51baf96-00000001",
        "sum_initial": {
            "amount": 31500,
            "currency": "RUB"
        },
        "sum_converted": {
            "amount": 31500,
            "currency": "RUB"
        },
        "code": "20000",
        "message": "General decline",
        "provider": {
            "id": 2990,
            "payment_id": "435010f132ec0f26883ca15ca28acefd",
            "auth_code": ""
        }
    },
    "signature": "vz+xV90xccM49uNen3YG7Ht...j92ffMJ4vwpalWVJoRH4YoA=="
}

Related topics

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

Testing

General information

For the Tinkoff method the testing of purchases and refunds by using Gate..

Testing can be performed within a test project, to enable and disable the testing availability, contact ECommPay technical support via support@ecommpay.com.

When performing a test payment, take into account that you must specify the identifier of the test project in the requests, the currency can be only RUB, the interface of the payment forms emulator of Tinkoff may differ from the one used in the production environment.

Test payments statuses

When testing purchases, the final payment status is determined by the amount specified in the request:

  • decline status with 40000 or 40400 amount
  • success status with any other amount

When testing refunds, the final payment status is determined by the amount specified in the request:

  • decline status with 50000 or 50500 amount
  • success status with any other amount

Purchases by using Gate

To perform a test purchase by using Gate, do the following:

  1. Send a correct test request for purchase to the payment platform.
  2. Accept a callback with redirection data.
  3. Go to the received URL and click the Success or Decline button (depending on the amount specified in the request).
  4. Accept a callback with information about the payment result.

The full information about purchase process by using Tinkoff through Gate is provided in the section Purchase by using Gate.

Refunds by using Gate

To perform a test refund by using Gate, send a correct test request for refund of previously performed test purchase to the payment platform and accept a callback with information about the payment result.

The test refund performing is possible only within a day after the initial purchase. The full information about the refund process by using Tinkoff through Gate is provided in the section Refund by using Gate.

Analysis of payments results

As with other payment methods ECommPay offers, when using the Tinkoff method, you have several options to analyse the information about payments and operations performed by using the method—alone or in conjunction with other methods.

You can load and analyse all the necessary information in Dashboard (Old Dashboard), 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 (Old 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 ECommPay technical support.