Get refund types (filtered)

You can specify various filters as parameters such as method ID, country code and currency in the query string in order to get the refund types available.

Definition: GET /v1/refunds/types/{idMethod}/{countryCode}/{currency}

Where:
  • {idMethod} – GlobalPay Payment Method ID

The parameters you need to send for a certain refund are be the ones returned followed by regex characters. If there aren’t any, it means no additional parameteres are required.

Request:

GET https://paytest.smart2pay.com/v1/refunds/types/3/BE/EUR
Authorization: Basic MzAyMDE6aEo1Um9iWXg5cjdGZk53Q3ZIWTlMWEhxcXIrRkV6cmM3YUp2UVFrNEdhejFtZzdSeXk=

Response:

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

{
  "RefundTypes": [
    {
      "Name": "SEPABankTransfer",
      "ID": 2,
      "AllowsPartialRefund": true,
      "Customer": {
        "MerchantCustomerID": null,
        "Email": null,
        "FirstName": "^.{1,50}$",
        "LastName": "^.{1,50}$",
        "Gender": null,
        "SocialSecurityNumber": null,
        "Phone": null,
        "Company": null
      },
      "BillingAddress": null,
      "BankAddress": null,
      "Details": {
        "BankCode": "^[a-zA-Z]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}[XXX0-9]{0,3}",
        "CustomerIBAN": "^[a-zA-Z]{2}[0-9]{2}[a-zA-Z0-9]{4}[0-9]{7}([a-zA-Z0-9]?){0,16}$"
      }
    }
  ]
}