YooMoney

Overview

YooMoney is the electronic payment service that allows you to receive payments from customers, perform refunds and payouts to customers by means of YooMoney e-wallets. Purchases are performed by using Payment Page and Gate, refunds—by using Gate.

General information

Payment method type Payments by using e-wallets
Countries and regions RU
Payment currencies RUB
Currency conversion
Purchases +
Payouts
Stored credentials payments
Full refunds +
Partial refunds +
Chargebacks
Notes
Onboarding and access fee Refer to your key account manager ECommPay

Interaction diagram

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



Operations support

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

*

  • For wallets with anonymous status—15,000.00 RUB
  • For wallets with reviewed status—60,000.00 RUB
  • For wallets with identified status—250,000.00 RUB; up to 600,000.00 RUB per day and 300,000,000.00 RUB per month

Processing scenarios

In the YooMoney method, to perform a purchase operation, you need to redirect a customer to the YooMoney 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 YooMoney method, to perform 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 YooMoney 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 sequence 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 YooMoney 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 YooMoney service.
  10. The purchase request is processed on the YooMoney service side.
  11. The YooMoney 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 YooMoney website.
  14. The customer completes all the payment steps required.
  15. The payment is processed on the YooMoney side.
  16. The result is displayed to the customer on the YooMoney website.
  17. The customer is redirected to Payment Page.
  18. The YooMoney 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 YooMoney 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 YooMoney 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 units
    • customer_id—customer ID unique within the project
  2. The currency of payment can only be supported currency code (i.e. USD).
  3. To preselect YooMoney as the payment method on Payment Page for customers, pass the code yoomoney-wallet in the force_payment_method parameter in the request for opening.
  4. If required, you can also add any other additional parameters Payment Page supports. For information about all parameters available in the YooMoney method, 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 a payment request, see Signature generation and verification.

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

EPayWidget.run(
    { payment_id: 'X03936', 
      payment_amount: 10000, 
      payment_currency: 'currency for example', 
      project_id: 0, 
      customer_id: 'customer1',
      signature: "kUi2x9dKHAVNU0FYldJrxh4yo+52Kt8KU+Y1Y4HASCQ9vySO\/RLCvhtT4DqtVUkDJrOcZzUCwX6R\/ekpZhkIQg=="
    }
)

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

Callback format

The YooMoney 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 100,00 RUB purchase from the account 410017362577523 made by the customer fav_customer in the 35 project.

Figure: Example of a successful purchase callback

{
        "project_id": 35,
        "payment": {
            "OperationFee": {
                "amount": 0,
                "currency": "RUB"
            },
            "date": "2019-03-21T08:29:25+0000",
            "id": "ORDER_ID_000000001",
            "method": "Yoomoney",
            "status": "success",
            "sum": {
                "amount": 10000,
                "currency": "RUB"
            },
            "type": "purchase",
            "description": "purchase"
        },
        "operation": {
            "id": 34335004,
            "type": "sale",
            "status": "success",
            "date": "2019-03-21T08:29:25+0000",
            "created_date": "2019-03-21T08:23:21+0000",
            "request_id": 33c3e988c6",
            "sum_initial": {
                "amount": 10000,
                "currency": "RUB"
            },
            "sum_converted": {
                "amount": 10000,
                "currency": "RUB"
            },
        "account": {
            "number": "410017362577523"
        },
        "customer": {
            "id": "fav_customer"
        },
            "provider": {
                "id": 4541,
                "payment_id": "24255dbb",
                "date": "2019-03-21T08:28:28+0000",
                "auth_code": "",
                "endpoint_id": "yoo_money"
            },
            "code": "0",
            "message": "Success"
        },
        "signature": "bBi4Esp9MYahN7Co7mktmmqsNnDh8Ku33HYYHIljvWTIcOfL4sfPwHFrDlkMDs+Aw=="
    }

The following is the example of a callback for a purchase declined due to insufficient funds on customer account.

Figure: Example of a declined purchase callback

 {
        "project_id": 35,
        "account": {
            "number": "410017362577523"
        },
        "payment": {
            "OperationFee": {
                "amount": 0,
                "currency": "RUB"
            },
            "date": "2019-03-20T15:33:02+0000",
            "id": "TEST_005",
            "method": "Yoomoney",
            "status": "decline",
            "sum": {
                "amount": 10000,
                "currency": "RUB"
            },
            "type": "purchase",
            "description": ""
        },
        "operation": {
            "id": 30997000000639,
            "type": "sale",
            "status": "decline",
            "date": "2019-03-20T15:33:02+0000",
            "created_date": "2019-03-20T14:50:44+0000",
            "request_id": "16fc9bfd8c0cf7",
            "sum_initial": {
                "amount": 10000,
                "currency": "RUB"
            },
            "sum_converted": {
                "amount": 10000,
                "currency": "RUB"
            },
            "provider": {
                "id": 4541,
                "payment_id": "24246705-000f3",
                "date": "2019-03-20T14:50:45+0000",
                "auth_code": "",
                "endpoint_id": "yoo_money"
            },
            "code": "20105",
            "message": "Insufficient funds on customer account"
         },
        "signature": "6qJMdnMSokT+vz89C4iZFrQxpsyg3NdFCJ3Xv6cWL08oORUlAl05jj3AX4/1Q=="
    }

Related topics

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

Purchase by using Gate

General information

In the YooMoney 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 redirecting customer to the YooMoney service.
  3. Get the callback with the payment result from the payment platform.

The full sequence and particularities of the purchase processes are provided below.



Figure: Purchase sequence by using Gate

  1. A customer initiates a purchase through YooMoney 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 YooMoney service.
  7. The request is processed on the YooMoney side.
  8. The YooMoney service sends the data for redirecting the customer to the YooMoney 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 YooMoney service.
  11. The customer completes all the payment steps required.
  12. The payment is processed on the YooMoney side.
  13. The result is displayed to the customer.
  14. The customer is redirected to the merchant's web service.
  15. The YooMoney service sends the payment result notification to the payment platform.
  16. The ECommPay 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 YooMoney payment method and provide the information about formats of the data for redirecting customers and the information about the format of callbacks with payment results. The general information about working with API see in the API Description section.

Request format

There are several things you must consider when using purchase requests in the YooMoney method:
  1. You perform purchase by sending the request to /v2/payment/wallet/yoomoney/sale by using POST (HTTP) method. This endpoint belongs to the group for making payments by using an e-wallet: /v2/payment/wallet/{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—the ID of the customer within the merchant project
      • ip_address—customer IP address
    • Object payment—purchase information:
      • amount—purchase amount
      • currency—purchase currency in the ISO-4217 alpha-3 format
  3. The currency of a purchase can only be supported currency code (i.e. USD).
  4. If required, you can also add any other additional parameters Gate supports.

Thus, a correct payment request through the YooMoney method must include project and payment IDs, customer ID and IP-address, signature, currency and amount of the purchase, as shown in the following example:

Figure: Purchase request example

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

Formats of the customer redirection data

To redirect a customer from the web service to the YooMoney 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 standard format for callbacks is used to deliver purchase results from YooMoney. For more information, see Callbacks.

The following is the example of a callback with an information about successful 100,00 RUB purchase from the account 410017362577523 made by the customer fav_customer in the 35 project.

Figure: Example of a succeed purchase callback

{
        "project_id": 35,
        "payment": {
            "OperationFee": {
                "amount": 0,
                "currency": "RUB"
            },
            "date": "2019-03-21T08:29:25+0000",
            "id": "ORDER_ID_000000001",
            "method": "Yoomoney",
            "status": "success",
            "sum": {
                "amount": 10000,
                "currency": "RUB"
            },
            "type": "purchase",
            "description": "purchase"
        },
        "operation": {
            "id": 34335004,
            "type": "sale",
            "status": "success",
            "date": "2019-03-21T08:29:25+0000",
            "created_date": "2019-03-21T08:23:21+0000",
            "request_id": 33c3e988c6",
            "sum_initial": {
                "amount": 10000,
                "currency": "RUB"
            },
            "sum_converted": {
                "amount": 10000,
                "currency": "RUB"
            },
        "account": {
            "number": "410017362577523"
        },
        "customer": {
            "id": "fav_customer"
        },
            "provider": {
                "id": 4541,
                "payment_id": "24255dbb",
                "date": "2019-03-21T08:28:28+0000",
                "auth_code": "",
                "endpoint_id": "yoo_money"
            },
            "code": "0",
            "message": "Success"
        },
        "signature": "bBi4Esp9MYahN7Co7mktmmqsNnDh8Ku33HYYHIljvWTIcOfL4sfPwHFrDlkMDs+Aw=="
    }

The following is the example of a callback for a purchase declined due to insufficient funds on customer account.

Figure: Example of a declined purchase callback

 {
        "project_id": 35,
        "account": {
            "number": "410017362577523"
        },
        "payment": {
            "OperationFee": {
                "amount": 0,
                "currency": "RUB"
            },
            "date": "2019-03-20T15:33:02+0000",
            "id": "TEST_005",
            "method": "Yoomoney",
            "status": "decline",
            "sum": {
                "amount": 10000,
                "currency": "RUB"
            },
            "type": "purchase",
            "description": ""
        },
        "operation": {
            "id": 30997000000639,
            "type": "sale",
            "status": "decline",
            "date": "2019-03-20T15:33:02+0000",
            "created_date": "2019-03-20T14:50:44+0000",
            "request_id": "16fc9bfd8c0cf7",
            "sum_initial": {
                "amount": 10000,
                "currency": "RUB"
            },
            "sum_converted": {
                "amount": 10000,
                "currency": "RUB"
            },
            "provider": {
                "id": 4541,
                "payment_id": "24246705-000f3",
                "date": "2019-03-20T14:50:45+0000",
                "auth_code": "",
                "endpoint_id": "yoo_money"
            },
            "code": "20105",
            "message": "Insufficient funds on customer account"
         },
        "signature": "6qJMdnMSokT+vz89C4iZFrQxpsyg3NdFCJ3Xv6cWL08oORUlAl05jj3AX4/1Q=="
    }

Related topics

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

Refund by using Gate

General information

YooMoney supports full and partial refunds processing. To perform a refund through the YooMoney method, merchant's web service sends a request with all the required parameters and signature to ECommPay URL, and receives a callback with the payment result. The full sequence of the refund process is provided below.

Note: If the refund request is sent at the end of the day in which payment was performed (after 23:59:59, GMT+3), the payment system charges a commission for the operation.


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 YooMoney service.
  7. The payment is processed on the YooMoney side.
  8. YooMoney 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 YooMoney 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 YooMoney method:
  1. You perform refund by sending the request to /v2/payment/wallet/yoomoney/refund by using POST (HTTP) method. This endpoint belongs to the group for making payments by using an e-wallet: /v2/payment/wallet/{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 customer—customer information:
      • ip_address—customer IP address
    • Object payment—refund information:
      • description—comment or description
      • 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)
  3. If required, you can also add any other additional parameters Gate supports.

Thus, a correct refund request in the YooMoney method must include project and payment IDs, customer IP address, currency and amount of the refund, as shown in the following example:

Figure: Example of a refund request

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

Callback format

The YooMoney 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 100,00 RUB refund for the customer account account1 in the 386 project.

Figure: Example of a successful refund callback

{
        "project_id": 386,
        "payment": {
            "id": "EP1bb6-c379",
            "type": "purchase",
            "status": "partially refunded",
            "date": "2019-03-04T11:16:29+0000",
            "method": "Yoomoney",
            "sum": {
                "amount": 50000,
                "currency": "RUB"
            },
            "description": ""
        },
        "account": {
            "number": "account1"
        },
        "operation": {
            "id": 633,
            "type": "refund",
            "status": "success",
            "date": "2019-03-04T11:16:29+0000",
            "created_date": "2019-03-04T11:16:25+0000",
            "request_id": "88c5433b45f91",
            "sum_initial": {
                "amount": 10000,
                "currency": "RUB"
            },
            "sum_converted": {
                "amount": 10000,
                "currency": "RUB"
            },
            "provider": {
                "id": 4541,
                "payment_id": "94b4a6a434857ee45ab107",
                "date": "2019-03-04T11:16:28+0000",
                "auth_code": ""
            },
            "code": "0",
            "message": "Success"
        },
        "signature": "NPKaC8A2wQehyGWVYTVTQ14HE4JBB+H2FVHbS1YTT9VOHG1VFJ5zqg=="
    }

The following is the example of a callback for a refund declined due to the refund amount is more than init amount.

Figure: Example of a declined refund callback

{
        "project_id": 386,
        "payment": {
            "id": "EP1bb6-c379",
            "type": "purchase",
            "status": "success",
            "date": "2019-03-04T11:16:29+0000",
            "method": "Yoomoney",
            "sum": {
                "amount": 50000,
                "currency": "RUB"
            },
            "description": ""
        },
        "account": {
            "number": "account1"
        },
        "operation": {
            "id": 633,
            "type": "refund",
            "status": "decline",
            "date": "2019-03-04T11:16:29+0000",
            "created_date": "2019-03-04T11:16:25+0000",
            "request_id": "88c5433b45f91",
            "sum_initial": {
                "amount": 100000,
                "currency": "RUB"
            },
            "sum_converted": {
                "amount": 100000,
                "currency": "RUB"
            },
            "provider": {
                "id": 4541,
                "payment_id": "94b4a6a434857ee45ab107",
                "date": "2019-03-04T11:16:28+0000",
                "auth_code": ""
            },
            "code": "3283",
            "message": "Refund amount more than init amount"
        },
        "signature": "NPKaC8A2wQehyGWVYTVTQ14HE4JBB+H2FVHbS1YTT9VOHG1VFJ5zqg=="
    }

Related topics

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

Testing

General information

For the YooMoney 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 YooMoney 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 YooMoney 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 YooMoney 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 YooMoney 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.