Get information on a specific refund

You can get information about a refund by using the following action based on Get HTTP request.

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

Where:
  • payments/{id} – GlobalPay Payment ID
  • and
  • refunds/{id} – GlobalPay Refund ID

Request:

GET https://paytest.smart2pay.com/v1/payments/3005389/refunds/16405
Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=

Response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "Refund": {
    "ID": 16405,
    "Created": "20170803095139",
    "MerchantTransactionID": "s2ptest_g28",
    "OriginatorTransactionID": null,
    "InitialPaymentID": 3005389,
    "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
    },
    "SplitID": 0
  }
}

The same action can be used to get information on a specific refund for a card payment.

Request:

https://securetest.smart2pay.com /v1/payments/283334/refunds/4491
Authorization: Basic MTAxMDpnYWJp

Response:

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8

{
  "Refund":  {
    "ID": 4491,
    "SiteID": 1010,
    "Created": "20180330120728",
    "MerchantTransactionID": "s2p_test_l1a",
    "OriginatorTransactionID": null,
    "InitialPaymentID": 58552,
    "Amount": "1650",
    "Currency": "EUR",
    "Description": "payment product test",
    "StatementDescriptor": "card payment",
    "Customer": null,
    "BillingAddress": null,
    "BankAddress": null,
    "Articles": null,
    "Status": {
      "ID": 2,
      "Info": "Success",
      "Reasons": []
      },
    "MethodTransactionID": "74177818074008189507669",
    "SplitID": 0
  }
}