Yandex.Money

Overview

Note:

Two technical implementations are currently supported for working with the Yandex.Money method: the new one described in this section and the old one described in the section Yandex.Money (legacy).

Details about the difference between these implementations and how to switch from the old implementation to the new one should be clarified with the ECommPay key account manager.

Yandex.Money is the electronic payment service that allows you to receive payments from customers, including payment by using saved wallet credentials, perform refunds and payouts to customers by means of Yandex.Wallet e-wallets. Purchases are performed by using Payment Page and Gate, payouts and 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 Yandex.Money payment method requires merchant's web service, one of the interfaces and the payment platform of ECommPay, as well as Yandex.Money technical facilities.



Operations support

  Interfaces Amounts, RUB
Payment Page Mobile SDKs CMS Plug-ins Gate Dashboard minimum maximum
Purchases + + + 1.00
Stored credentials payments +
Payouts + 1.00 *
Full refunds +
Partial refunds +
*
  • 15,000.00 (for wallets with anonymous status)
  • 60,000.00 (for wallets with the identified status when a customer passed the identification in the Yandex.Money account)
  • 300,000.00 (to one e-wallet per day)
  • 600,000.00 (to one e-wallet per month)

Processing scenarios

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

Figure: Purchase by using Payment Page procedure diagram



Figure: Purchase by using Gate procedure diagram



Figure: Refund by using Gate procedure diagram



Figure: Payout by using Gate procedure diagram



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 Yandex.Money 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 Yandex.Money method selected. For more information about preselecting payment methods, see in Preselecting payment method.

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 Yandex.Money 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 Yandex.Money service.
  10. The purchase request is processed on the Yandex.Money service side.
  11. The Yandex.Money 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 Yandex.Money website.
  14. The customer completes all the payment steps required.
  15. The payment is processed on the Yandex.Money side.
  16. The result is displayed to the customer on the Yandex.Money website.
  17. The customer is redirected to Payment Page.
  18. The Yandex.Money 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 Yandex.Money 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 Yandex.Money 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 RUB.
  3. To preselect Yandex.Money as the payment method on Payment Page for customers, pass the code yandexMoney 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 Yandex.Money 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 Yandex.Money 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: 'RUB', 
      project_id: 0, 
      customer_id: 'customer1',
      signature: "kUi2x9dKHAVNU0FYldJrxh4yo+52Kt8KU+Y1Y4HASCQ9vySO\/RLCvhtT4DqtVUkDJrOcZzUCwX6R\/ekpZhkIQg=="
    }
)

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

Callback format

The Yandex.Money 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": "WalletYandexMoney",
            "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": 1181,
                "payment_id": "24255dbb",
                "date": "2019-03-21T08:28:28+0000",
                "auth_code": "",
                "endpoint_id": "yandex_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": "YANDEX_TEST_005",
            "method": "WalletYandexMoney",
            "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": 1181,
                "payment_id": "24246705-000f3",
                "date": "2019-03-20T14:50:45+0000",
                "auth_code": "",
                "endpoint_id": "yandex_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 Yandex.Money methods, 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 Yandex.Money 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 Yandex.Money 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 Yandex.Money service.
  7. The request is processed on the Yandex.Money side.
  8. The Yandex.Money service sends the data for redirecting the customer to the Yandex.Money 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 Yandex.Money service.
  11. The customer completes all the payment steps required.
  12. The payment is processed on the Yandex.Money side.
  13. The result is displayed to the customer.
  14. The customer is redirected to the merchant's web service.
  15. The Yandex.Money 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 Yandex.Money 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 Yandex.Money method:
  1. You perform purchase by sending the request to /v2/payment/wallet/yandexmoney/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 RUB.
  4. If required, you can also add any other additional parameters Gate supports.

Thus, a correct payment request through the Yandex.Money 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 Yandex.Money 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": {
                "redirectType": "redirect"
            },
            "encrypted": [],
            "url": "https://money.yandex.ru/payments/internal/confirmation?orderId=24255dbb-31"
        }

Callback format

The standard format for callbacks is used to deliver purchase results from Yandex.Money. 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": "WalletYandexMoney",
            "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": 1181,
                "payment_id": "24255dbb",
                "date": "2019-03-21T08:28:28+0000",
                "auth_code": "",
                "endpoint_id": "yandex_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": "YANDEX_TEST_005",
            "method": "WalletYandexMoney",
            "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": 1181,
                "payment_id": "24246705-000f3",
                "date": "2019-03-20T14:50:45+0000",
                "auth_code": "",
                "endpoint_id": "yandex_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:

COF purchases by using Gate

General information

The Yandex.Money payment method provides the ability to perform COF purchases of two types: OneClick and regular payments. For more information about COF purchases, see Credential-on-file (COF) purchases.

COF purchase registration

To register a COF purchase by using Gate, the merchant is required to send a request for purchase with all the required parameters, signature, and the COF purchase registration parameter recurring.register: true to the ECommPay URL and get the callback with the payment result from the payment platform. To register a regular payment the request should also contain information about the frequency, amount, start and end dates of the regular payments.

In the COF purchase registration callback you receive its identifier, which you can use to perform OneClick payments, and to update, change conditions or cancel regular payments.

For more information about purchase processing by using Gate, see Purchase by using Gate.

COF purchase performing

After the payment is registered, customers can initiate a OneClick payment or the funds are debited automatically according to the specified regular payment conditions.

Updating of the regular payments performing conditions

At any time, you can change the conditions of regular payments, for example, change the execution time, the expiration date or the amount of debits. When conditions change, the actual withdrawal of funds from the customer account does not occur.

Cancellation of the regular payments performing

Until the expiration date of regular payments performing, you can cancel it.

The sections that follow discuss in more details the requests formats and parameters to use in the Yandex.Money payment method and the information about the format of callbacks with payment results. The general information about working with API see in the API Description section.

Requests format

There are several things you must consider when performing COF purchases in the Yandex.Money method:
  1. You can perform COF purchases by sending the following requests by using POST (HTTP) method:

    Specify the payment method code—yandexmoney in the {payment Method} field of the address.

  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
      • account_save—an optional parameter to indicate whether the customer wallet details must be saved for OneClick payments performing
    • Object payment—purchase information:
      • amount—purchase amount
      • currency—purchase currency in the ISO-4217 alpha-3 format
    • Object recurring—COF purchase information:
      • register—payment registration as a regular payment
      • id—registered regular payment identifier
      • saved_account_id—identifier of the customer's wallet saved in the payment platform for making an OneClick payment, for more information, see the section Saving payment data
      • start_date—the start date of regular payments, in the DD-MM-YYYY format (must be at least one day later than the date of registration)
      • expiry_year—regular payments end year
      • expiry_month—regular payments end month
      • expiry_day—regular payments end day
      • amount—amount of debiting
      • period—regular payment performing period
      • interval— regular payment performing interval
      • time—regular payment performing time in the hh:mm:ss (UTC0) format

      The required parameters in the recurring object depend on the type of request. For more information, see the API specification.

  3. If required, you can also add any other additional parameters Gate supports.

A correct COF purchase registration request through the Yandex.Money method must include project and payment IDs, customer data, signature, currency and amount of the purchase, as well as the registration parameter and the conditions for regular payments, as shown in the following example:

Figure: OneClick payment registration request example

 {
  "general": {
    "project_id": 238,
    "payment_id": "TEST_15427007172789",
    "signature": "DH0v2pZnkK9hwytQ6/ZtDSQh+wwx/OqrWdbltzO5GMSkzd0Iq6lM2v8rmWQV4sbP+4A==",
  },
  "customer": {
    "ip_address": "87.245.207.226",
    "id": "123",
    "account_save" : true
  },
  "payment": {
    "amount": 1000,
    "currency": "RUB"
  },
  "recurring": {
    "register": true
 }
}

Figure: Regular payment registration request example

 {
  "general": {
    "project_id": 238,
    "payment_id": "TEST_15427007172789",
    "signature": "DH0v2pZnkK9hwytQ6/ZtDSQh+wwx/OqrWdbltzO5GMSkzd0Iq6lM2v8rmWQV4sbP+4A==",
  },
  "customer": {
    "ip_address": "87.245.207.226"
  },
  "payment": {
    "amount": 1000,
    "currency": "RUB"
  },
  "recurring": {
    "register": true,
    "amount": 1000,
    "interval": 1,
    "cycle": "week",
    "start_date": "21-11-2018",
    "expiry_year": 2025,
    "expiry_month": 11,
    "expiry_day": 25
  }
}
A correct OneClick payment performing request through the Yandex.Money method must include project and payment IDs, customer IP-address, signature, currency and amount of the purchase, as well as the customer saved account identifier, as shown in the following example:

Figure: OneClick payment performing request example

 {
  "general": {
    "project_id": 238,
    "payment_id": "TEST_15427007172789",
    "signature": "DH0v2pZnkK9hwytQ6/ZtDSQh+wwx/OqrWdbltzO5GMSkzd0Iq6lM2v8rmWQV4sbP+4A==",
  },
  "customer": {
    "ip_address": "87.245.207.226",
    "id": "customer123"
  },
  "payment": {
    "amount": 1000,
    "currency": "RUB"
  },
  "saved_account_id": "9657893243"
}
A correct regular payment conditions updating request through the Yandex.Money method must include project and payment IDs, customer IP-address, signature, currency and amount of the purchase, as well as the COF purchase identifier and conditions parameters, as shown in the following example:

Figure: Regular payment conditions updating request example

 {
  "general": {
    "project_id": 238,
    "payment_id": "TEST_15427007172789",
    "signature": "DH0v2pZnkK9hwytQ6/ZtDSQh+wwx/OqrWdbltzO5GMSkzd0Iq6lM2v8rmWQV4sbP+4A==",
  },
  "customer": {
    "ip_address": "87.245.207.226"
  },
  "payment": {
    "amount": 1000,
    "currency": "RUB"
  },
  "recurring": {
    "id": 1234567890
  }
}
A correct regular payment cancellation request through the Yandex.Money method must include project and payment IDs, customer IP-address, signature, currency and amount of the purchase, as well as the COF purchase identifier, as shown in the following example:

Figure: Regular payment cancellation request example

 {
  "general": {
    "project_id": 238,
    "payment_id": "TEST_15427007172789",
    "signature": "DH0v2pZnkK9hwytQ6/ZtDSQh+wwx/OqrWdbltzO5GMSkzd0Iq6lM2v8rmWQV4sbP+4A==",
  },
  "customer": {
    "ip_address": "87.245.207.226"
  },
  "payment": {
    "amount": 1000,
    "currency": "RUB"
  },
  "recurring": {
    "id": 1234567890
  }
}

Callback format

The standard format for callbacks is used to deliver the results of actions with COF purchases. For more information, see Callbacks.

The following is the example of a callback with an information about COF purchase registration for a customer in the 238 project.

Figure: Example of succeed COF purchase registration

 {
        "project_id": 238,
        "payment": {
            "id": "recurring_payment",
            "type": "purchase",
            "status": "success",
            "date": "2018-11-20T08:44:46+0000",
            "method": "yandexMoney",
            "sum": {
                "amount": 300,
                "currency": "RUB"
            },
            "description": "payment"
        },
        "account": {
            "number": "customer@mail.com"
        },
        "recurring": {
            "id": 1000030038,
            "currency": "RUB",
            "valid_thru": "-0001-11-30T00:00:00+0000"
        },
        "operation": {
            "id": 1000034,
            "type": "recurring",
            "status": "success",
            "date": "2018-11-20T08:44:46+0000",
            "created_date": "2018-11-20T08:44:41+0000",
            "request_id": "07fd7ade7cf010",
            "sum_initial": {
                "amount": 300,
                "currency": "RUB"
            },
            "sum_converted": {
                "amount": 300,
                "currency": "RUB"
            },
            "provider": {
                "id": 1063,
                "payment_id": "2548950091",
                "date": "2018-11-20T08:44:45+0000",
                "auth_code": ""
            },
            "code": "0",
            "message": "Success"
        },
        "signature": "x2tsnvLCRXZMX8Kwyr9a8+I3RipuPWUod5c89cDSQ6cRq/yx56uZb7MTMdDEEg4w=="
    }

The following is the example of a callback after regular payment conditions updating.

Figure: Example of regular payment conditions updating callback

{
        "project_id": 238,
        "payment": {
            "id": "SALE_ID",
            "type": "purchase",
            "status": "success",
            "date": "2018-11-22T07:05:56+0000",
            "method": "yandexMoney",
            "sum": {
                "amount": 100,
                "currency": "RUB"
            },
            "description": "COF purchase"
        },
        "recurring": {
            "id": 1000034,
            "currency": "RUB",
            "valid_thru": "2018-11-29T00:00:00+0000"
        },
        "operation": {
            "id": 1972,
            "type": "recurring_update",
            "status": "success",
            "date": "2018-11-22T07:09:18+0000",
            "created_date": "2018-11-22T07:09:16+0000",
            "request_id": "ab70b4f9643bb0b",
            "sum_initial": {
                "amount": 0,
                "currency": ""
            },
            "sum_converted": {
                "amount": 0,
                "currency": ""
            },
            "provider": {
                "id": 1063,
                "payment_id": "",
                "auth_code": ""
            },
            "code": "0",
            "message": "Success"
        },
        "signature": "dVpS1keJ0Bf0ofZSLhwJm3rr0Oh534I+8lPJ42BRcAak+1nLPlD9rkjcKYUEtgpsMA=="
    }

The following is the example of a callback after regular payment cancellation.

Figure: Example of regular payment cancellation callback

  {
        "project_id": 238,
        "payment": {
            "id": "SALE_ID",
            "type": "purchase",
            "status": "success",
            "date": "2018-11-22T07:05:56+0000",
            "method": "yandexMoney",
            "sum": {
                "amount": 100,
                "currency": "RUB"
            },
            "description": "COF purchase"
        },
        "recurring": {
            "id": 1000034,
            "currency": "RUB",
            "valid_thru": "2018-11-29T00:00:00+0000"
        },
        "operation": {
            "id": 1973,
            "type": "recurring_cancel",
            "status": "success",
            "date": "2018-11-22T07:14:51+0000",
            "created_date": "2018-11-22T07:14:50+0000",
            "request_id": "8d5ea1f970faaa76c4d10",
            "sum_initial": {
                "amount": 0,
                "currency": ""
            },
            "sum_converted": {
                "amount": 0,
                "currency": ""
            },
            "provider": {
                "id": 1063,
                "payment_id": "",
                "auth_code": ""
            },
            "code": "0",
            "message": "Success"
        },
        "signature": "QHS5h1BVZqHS39wlzC0pfgSZZAhZVA6ZLDnyP1JAWHM0irFE/Lt3dMTizyQsossGDUVMAQ=="
    }

The following is the example of a callback with an information about declined COF purchase registration.

Figure: Example of declined COF purchase registration

{
        "project_id": 238,
        "payment": {
            "id": "123456",
            "type": "purchase",
            "status": "decline",
            "date": "2018-11-15T07:17:08+0000",
            "method": "yandexMoney",
            "sum": {
                "amount": 200,
                "currency": "RUB"
            },
            "description": "COF purchase"
        },
        "errors": [
            {
                "code": "2701",
                "message": "Rules Failed Code",
                "description": "fatal: RULES_FAILED_CODE"
            }
        ],
        "recurring": {
            "id": 100070,
            "currency": "RUB",
            "valid_thru": "-0001-11-30T00:00:00+0000"
        },
        "operation": {
            "id": 10001868,
            "type": "recurring",
            "status": "decline",
            "date": "2018-11-15T07:17:08+0000",
            "created_date": "2018-11-15T07:17:08+0000",
            "request_id": "e5ee540d420d6ccd",
            "sum_initial": {
                "amount": 200,
                "currency": "RUB"
            },
            "sum_converted": {
                "amount": 200,
                "currency": "RUB"
            },
            "provider": {
                "id": 1063,
                "payment_id": ""
            },
            "code": "2701",
            "message": "Rules Failed Code"
        },
        "signature": "SgrlW4XHS8dJdGW3lDLacXdwe4L5Mvg3SjFEoViCg9k04OqTBaNimdWxwwXYGjCsFI5ig=="
    }

Related topics

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

Refund by using Gate

General information

Yandex.Money supports full and partial refunds processing. To perform a refund through the Yandex.Money 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 Yandex.Money service.
  7. The payment is processed on the Yandex.Money side.
  8. Yandex.Money 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 Yandex.Money 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 Yandex.Money method:
  1. You perform refund by sending the request to /v2/payment/wallet/yandexmoney/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 Yandex.Money 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 Yandex.Money 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": "WalletYandexMoney",
            "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": 1181,
                "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": "WalletYandexMoney",
            "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": 1181,
                "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:

Payout by using Gate

General information

To perform a payout through the Yandex.Money 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 payout process is provided below.



Figure: Payout sequence by using Gate

  1. A customer orders a payout through the Yandex.Money system.
  2. Merchant's web service sends the request for the payout 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 payout request to the Yandex.Money service.
  7. The payout is processed on the Yandex.Money side.
  8. Yandex.Money 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 payout result from the web service.

The sections that follow discuss in more details the request format and the Gate parameters to use in the Yandex.Money payment method and provide the information on the format of callbacks with payout 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 payout requests in the Yandex.Money method:
  1. You perform payout by sending the request to /v2/payment/yandexmoney/payout by using POST (HTTP) method.
  2. The following objects and parameters must be specified in any request:
    • Object general—general payout 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—identifier
      • ip_address—customer IP address
    • Object account—customer account information:
      • number—account number;
    • Object payment—payout information:
      • amount—payout amount
      • currency—purchase currency in the ISO-4217 alpha-3 format
  3. The currency of payout can only be RUB.
  4. If required, you can also add any other additional parameters Gate supports.

Thus, a correct payout request in the Yandex.Money method must include project, customer, and payment IDs, customer IP address, currency and amount of the payout, and the account number for funds crediting, as shown in the following example:

Figure: Example of a payout request

{
    "general": {
        "project_id": 35,
        "payment_id": "Payment 12",
        "signature": "2tlMuYxLW9Yu6RETr8pdCfmi0UPE8euD+2AbrQgJguu0BQjXWH6naCA9Ts6o4EVPjLyfbOQ+9ajAteg5lPk96Q=="
  },
    "customer": {
        "id": "fav_customer",
        "ip_address": "1.1.1.1" 
  },
    "payment": {
        "amount": 10000,
        "currency": "RUB"
  },
    "account": {
        "number": "45456965"
  }
}

Callback format

The Yandex.Money method uses the standard format for callbacks to deliver payout results. For more information, see Callbacks.

The following is the example of a callback with an information about successful 100,00 RUB payout made for the fav_customer customer ID in the 199 project.

Figure: Example of a successful payout callback

 {
        "project_id": 199,
        "payment": {
            "id": "yandexpayout",
            "type": "payout",
            "status": "success",
            "date": "2018-08-20T13:50:16+0000",
            "method": "YandexMoney",
            "sum": {
                "amount": 1000,
                "currency": "RUB"
            },
            "description": "10000"
        },
        "customer": {
            "id": "fav_customer"
        },
        "operation": {
            "id": 188500000010,
            "type": "payout",
            "status": "success",
            "date": "2018-08-20T13:50:16+0000",
            "created_date": "2018-08-20T13:50:14+0000",
            "request_id": "81b1ce17e524",
            "sum_initial": {
                "amount": 10000,
                "currency": "RUB"
            },
            "sum_converted": {
                "amount": 10000,
                "currency": "RUB"
            },
            "provider": {
                "id": 1063,
                "payment_id": "",
                "date": "2018-08-20T13:50:15+0000",
                "auth_code": ""
            },
            "code": "0",
            "message": "Success"
        },
        "signature": "wM8KqQhG5CgFfqDGvIl8hm71ZbhBB6yUg0xEGHnqtEUmDYahTMOW4RZCXk+KA=="
    }

The following is the example of a callback for a payout rejected due to payout amount limit.

Figure: Example of a declined payout callback

{
        "project_id": 460,
        "payment": {
            "id": "test_YM",
            "type": "payout",
            "status": "decline",
            "date": "2019-03-01T18:21:10+0000",
            "method": "YandexMoney",
            "sum": {
                "amount": 10000,
                "currency": "RUB"
            },
            "description": "Payout"
        },
        "account": {
            "number": "13043"
        },
        "customer": {
            "id": "Customer"
        },
        "operation": {
            "id": 29911000000101,
            "type": "payout",
            "status": "decline",
            "date": "2019-03-01T18:21:10+0000",
            "created_date": "2019-03-01T18:21:09+0000",
            "request_id": "4c0181064f2b078",
            "sum_initial": {
                "amount": 10000,
                "currency": "RUB"
            },
            "sum_converted": {
                "amount": 10000,
                "currency": "RUB"
            },
            "provider": {
                "id": 1063,
                "payment_id": "",
                "auth_code": ""
            },
            "code": "3104",
            "message": "Payment Constraint Invalid Payout Amount"
        },
        "signature": "0AfxEKIBSnElP6Rq8WWiZg2h/UZ4OD2WmfP+Q2f9g8D0PUKXA0hm+ufw=="
    }

Related topics

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

Testing

General information

For the Yandex.Money method the testing of purchases by using Payment Page and Gate and refunds by using Gate are available..

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, and the interfaces of the payment forms emulator of Payment Page and Yandex.Money may differ from the ones 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 Payment Page

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

  1. Send a correct test request for Payment Page opening to the payment platform.
  2. If the yandexMoney method was not specified in the request—select the method on the emulator page.
  3. Click the Success or Decline button (depending on the amount specified in the request).
  4. Accept a callback with information about the payment result.

If, while on the web page of the Yandex.Money payment form emulator, the Success or Decline button is not clicked within 30 minutes, the payment status is set to decline and the corresponding callback is sent from the payment platform side (regardless of the amount indicated in the request).

The full information about purchase process by using Yandex.Money through Payment Page is provided in the section Purchase by using Payment Page.

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.

If, while on the web page of the Yandex.Money payment form emulator, the Success or Decline button is not clicked within 30 minutes, the payment status is set to decline and the corresponding callback is sent from the payment platform side (regardless of the amount indicated in the request).

The full information about purchase process by using Yandex.Money 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 Yandex.Money 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 Yandex.Money 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, for instance you can use the analytic panels on the Analytics tab to this end.

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 and XLS formats—by using the tools on the Payments tab. You can perform export as a one-time download to your local computer or have payment data regularly exported and delivered to email addresses you specify.
  • 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 using the /operations/get queries.

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