Yandex.Money Refund Request (Fiscalization)

This setup is required for the Merchants that decide to setup the interaction with their online sales register via Yandex.Checkout.

For Yandex.Money the refunds can be full and/or partial depending if you have to return all the money to customer or not. A particular case is for Partial refund as you will need to provide additional parameters.

Below there are two examples of a refund request: one for a full refund, where no additional parameters are needed and one for a partial refund, where additional parameters are needed.

Definition: POST /v1/payments/{id}/refunds

Where:
  • {id} – GlobalPay Payment ID

A 201 HTTP response (Created) is returned if the refund was correctly initialized.

Full refund means you can only refund the entire paid amount for the initial transaction. For full refund you only need to send the Amount parameter, like in the below example:

Request:

POST https://paytest.smart2pay.com/v1/payments/3005389123/refunds
Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk=

{
  "Refund": {
    "MerchantTransactionID": "s2ptest_g28_b",
    "Amount": 100
   }
}

Response:

HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8

{
  "Refund": {
    "ID": 1640512,
    "Created": "20170803095139",
    "MerchantTransactionID": "s2ptest_g28_b",
    "OriginatorTransactionID": null,
    "InitialPaymentID": 3005389123,
    "Amount": "100",
    "Currency": "EUR",
    "Description": null,
    "TypeID": 5,
    "SiteID": 30201,
    "Details": null,
    "Customer": null,
    "BillingAddress": null,
    "BankAddress": null,
    "Articles": null,
    "Status": {
      "ID": 1,
      "Info": "Open",
      "Reasons": null
    }
  }
}

For Yandex.Money a particular case is for Partial refund as you will need to provide the below additional parameters in request: Merchant Article ID and Quantity, like in the below example:

Request:

POST https://paytest.smart2pay.com/v1/payments/3006154123/refunds
Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk=

{
  "Refund": {
    "MerchantTransactionID": "YandexPartialRefund",
    "Amount": 980,
    "Articles": [
      {
        "MerchantArticleID": "1231",
        "Quantity": 1
      }
    ]
  }
}

Response:

HTTP/1.1 201 Created
Content-Type: application/json; charset=utf-8

{
  "Refund": {
    "ID": 0,
    "Created": null,
    "MerchantTransactionID": "YandexPartialRefund",
    "OriginatorTransactionID": null,
    "InitialPaymentID": 3006154123,
    "Amount": "980",
    "Currency": null,
    "Description": null,
    "TypeID": 0,
    "SiteID": 30201,
    "Details": null,
    "Customer": null,
    "BillingAddress": null,
    "BankAddress": null,
    "Articles": [
      {
        "MerchantArticleID": "1231",
        "Name": null,
        "Quantity": 1,
        "Price": 0,
        "VAT": 0,
        "Discount": 0,
        "Type": null,
        "DiscountValue": 0
      }
    ],
    "Status": {
      "ID": 1,
      "Info": "Open",
      "Reasons": null
    }
  }
}