Cards Russia 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 Cards Russia 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/300538912/refunds
Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk=

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

Response:

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

{
  "Refund": {
    "ID": 16405,
    "Created": "20170803095139",
    "MerchantTransactionID": "s2ptest_g28_a",
    "OriginatorTransactionID": null,
    "InitialPaymentID": 300538912,
    "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 Cards Russia 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/3006154/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": 3006154,
    "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
    }
  }
}