Refund types

A unique feature of GlobalPay is that it offers an API which allows you to refund any type of transaction, no matter of the payment method that was used.

The refunds can be full and/or partial depending if you have to return all the money to customer or not.

Full refund means you can only refund the entire paid amount for the initial transaction.

Partial refund means you have the possibility to refund a smaller amount than the one from the initial paid transaction. You can perform more than one refund for a transaction with the limitation that the sum of partial refunds to be smaller or equal than the initial paid amount.

Also for each payment method is specific one or more of the below refund types:

Refund Type ID Refund Type
1 Native
2 SEPA Bank Transfer
3 SWIFT Bank Transfer
4 Manual Support Work No Info
5 SEPA Bank Transfer No Info
6 SWIFT Bank Transfer No Info
7 Local Bank Transfer
8 Local Bank Transfer No Info
9 Manual Support Work Details Needed
10 Local Bank Transfer 2 API

Refund type/types per method:

Method ID Method Name Limitation Partial/Full Refund Refund type(s) supported Estimated processing time
1 Bank Transfer N/A Partial/Full 2, 3 and 7 1-5 business days
2 iDEAL Maximum refund period is 48 days. Partial/Full 5 1-3 business days
3 MrCash N/A Partial/Full 2 1-3 business days
4 GiroPay N/A Partial/Full 5 1-3 business days
5 EPS N/A Partial/Full 5 1-3 business days
9 Pay now (former SOFORT Banking) N/A Partial/Full 5, 6 and 8 1-5 business days
12 Przelewy24 N/A Partial/Full 1 1-3 business days
13 OneCard The refund should be requested before the settlement day. Full 4 1-3 business days
18 POLi N/A Partial/Full 3 1-10 business days
19 PayU N/A Full 3 and 7 1-10 business days
20 SIBS (Multibanco) N/A Partial/Full 2 1-3 business days
22 Moneta Wallet N/A Partial/Full 4 1-3 business days
23 Paysera N/A Partial/Full 4 1-10 business days
24 Alipay Maximum refund period is 365 days. Partial/Full 1 and 3 1-2 business days
29 Trustly The initial payment needs to be settled first, process which takes 1-2 business days Partial/Full 1 1-2 business days
37 eNETS Debit Maximum refund period is 6 months. Partial/Full 3 5-15 business days
40 Paysafecard N/A Partial/Full 2, 3 and 7 1-5 business days
46 MercadoPago Maximum refund period is 90 days for Brazil and 60 days for Mexico. Partial/Full 1 The refund is processed in realtime however it takes 30 to 60 days to show up on the buyer’s bill, depending on the card brand and bank.
49 ToditoCash Native – The refund has to be made in the same day as the payment. Bank Transfer Swift – starting with next day. Partial/Full 1 and 3 Real-time processing for Native Refund; 1-5 business days for Bank Transfer Swift Refund.
58 PayWithMyBank N/A Partial/Full 4 1-10 business days
65 Finnish Banks N/A Partial/Full 2 1-3 business days
66 MTCPay N/A Partial/Full 7 1-5 business days
67 DragonPay Maximum refund period is 30 days. Partial/Full 4 Refunds are processed every Friday
69 Cards N/A Partial/Full 1 depends on the acquirer
72 PagoEfectivo N/A Partial/Full 3 1-10 business days
73 MyBank N/A Partial/Full 2 1-3 business days
74 Yandex.Money N/A Partial/Full 1 One business day
78 Skrill N/A Partial/Full 1 One business day
79 Pay by mobile N/A Partial/Full 2 and 3 1-5 business days
81 WebMoney Transfer Maximum refund period is 90 days. Partial/Full 1 One business day
83 UnionPay N/A Partial/Full 1 One business day
84 SEPA Direct Debit N/A Partial/Full 5 1-3 business days
87 VTC Pay N/A Partial/Full 8 1-5 business days
94 Paypal N/A Partial/Full 1 One business day
99 PagueloFacil N/A Partial/Full 3 1-10 business days
100 Interac Instant N/A Partial/Full 3 1-10 business days
101 Open Banking N/A Partial/Full 1 One business day
105 Bizum N/A Partial/Full 1 One business day
106 Eromnet N/A Partial/Full 1 One business day
111 Flutterwave N/A Partial/Full 1 and 2 1-5 business days
112 Coinify N/A Full 1 1-5 business days
1000 Boleto Bancário N/A Partial/Full 7 1-5 business days
1002 Transferencia entre Contas Bradesco N/A Partial/Full 7 1-5 business days
1003 Qiwi Wallet Maximum refund period is 90 days. Partial/Full 1 Real-time processing
1004 Beeline Maximum refund period is 90 days. Partial/Full 4 One business day
1006 MTS Maximum refund period is 90 days. Partial/Full 4 One business day
1010 AmOnline N/A Partial/Full 4 1-5 business days
1011 CIMB Clicks (formerly known as Channel-e) N/A Partial/Full 4 1-5 business days
1013 Hong Leong Bank Transfer N/A Partial/Full 4 1-5 business days
1014 Maybank2U N/A Partial/Full 4 1-5 business days
1017 RHB N/A Partial/Full 4 1-5 business days
1036 Cash Options Thailand N/A Partial/Full 3 1-10 business days
1037 Online Banking Thailand N/A Partial/Full 3 1-10 business days
1041 OP-Pohjola N/A Partial/Full 2 1-3 business days
1042 Nordea N/A Partial/Full 2 1-3 business days
1043 Danske N/A Partial/Full 2 1-3 business days
1044 Cash-in N/A Partial/Full 3 1-10 business days
1045 Cards Russia N/A Partial/Full 1 One business day
1051 Globe Gcash N/A Partial/Full 4 1-5 business days
1052 Klarna Checkout N/A Partial/Full 1 One business day
1054 BII VA N/A Partial/Full 9 7-10 business days
1056 CIMB Clicks N/A Partial/Full 9 7-10 business days
1058 IB Muamalat N/A Partial/Full 9 7-10 business days
1061 Mandiri ATM Automatic N/A Partial/Full 9 7-10 business days
1063 Danamon Online Banking N/A Partial/Full 9 7-10 business days
1065 TELE2 N/A Partial/Full 4 1-5 business days
1066 Wechat Maximum refund period is 365 days. Partial/Full 1 1-3 business days
1067 Public Bank Online N/A Partial/Full 4 1-5 business days
1071 Bank Rakyat Internet Banking N/A Partial/Full 4 1-5 business days
1072 AffinOnline N/A Partial/Full 4 1-5 business days
1073 Pay4Me Malaysia N/A Partial/Full 4 1-5 business days
1077 Hong Leong Connect PEx+ N/A Partial/Full 4 1-5 business days
1078 Klarna Payments N/A Partial/Full 1 One business day
1079 Cards Argentina Maximum refund period is 180 days Partial/Full 1 One business day
1080 Santander Rio Maximum refund period is 180 days Partial/Full 10 1-5 business days
1081 Cash Payments Argentina Maximum refund period is 180 days Partial/Full 10 1-5 business days
1082 Credit Cards Brazil Maximum refund period is 180 days Partial/Full 1 One business day
1083 Boleto Brazil Maximum refund period is 180 days Partial/Full 10 1-5 business days
1084 Online Bank Transfer Brazil Maximum refund period is 180 days Partial/Full 10 1-5 business days
1085 Credit Cards Chile Maximum refund period is 180 days Partial/Full 1 One business day
1086 Servipag Maximum refund period is 180 days Partial/Full 10 1-5 business days
1087 WebPay Maximum refund period is 180 days Partial/Full 10 1-5 business days
1088 Cards Colombia Maximum refund period is 180 days Partial/Full 1 One business day
1089 PSE Colombia Maximum refund period is 180 days Partial/Full 10 1-5 business days
1090 Cash payment Colombia Maximum refund period is 180 days Partial/Full 10 1-5 business days
1091 Cards Mexico Maximum refund period is 180 days Partial/Full 1 One business day
1092 Oxxo Maximum refund period is 180 days Partial/Full 10 1-5 business days
1093 SPEI Maximum refund period is 180 days Partial/Full 10 1-5 business days
1094 Bank Transfer Mexico Maximum refund period is 180 days Partial/Full 10 1-5 business days
1095 Credit Cards Uruguay Maximum refund period is 180 days Partial/Full 1 One business day
1096 Redpagos Maximum refund period is 180 days Partial/Full 10 1-5 business days
1097 Credit Cards(Visa) Maximum refund period is 180 days Partial/Full 1 One business day
1098 Cash payment Peru Maximum refund period is 180 days Partial/Full 10 1-5 business days
1099 Bank Transfer Peru Maximum refund period is 180 days Partial/Full 10 1-5 business days
1100 VTC Pay Wallet N/A Full 4 1-5 business days
1101 Cards Vietnam N/A Full 4 1-5 business days
1102 Online Banking Vietnam N/A Full 4 1-5 business days
1103 Rapi Pago Maximum refund period is 180 days Partial/Full 10 1-5 business days
1104 Pago Fácil Maximum refund period is 180 days Partial/Full 10 1-5 business days
1105 Credit Cards Turkey Maximum refund period is 180 days Partial/Full 1 One business day
1106 Credit Cards India Maximum refund period is 180 days Partial/Full 1 One business day
1107 Netbanking Maximum refund period is 180 days Partial/Full 1 One business day
1108 UPI Maximum refund period is 180 days Partial/Full 1 One business day
1113 Cards LATAM Maximum refund period is 180 days Partial/Full 1 One business day
1121 M-Pesa N/A Partial/Full 3 1-10 business days
1122 Airtel Money N/A Partial/Full 3 1-10 business days
1123 Equitel N/A Partial/Full 3 1-10 business days
1124 Tigo Pesa N/A Partial/Full 3 1-10 business days
1125 MTN N/A Partial/Full 3 1-10 business days
1126 PesaLink N/A Partial/Full 3 1-10 business days
1127 NIBSS N/A Partial/Full 3 1-10 business days
1128 Tingg Wallet N/A Partial/Full 3 1-10 business days
1129 PostFinance Card N/A Partial/Full 1 One business day
1130 PostFinance E-finance N/A Partial/Full 1 One business day
1131 PayTM Maximum refund period is 180 days Partial/Full 1 One business day
1132 Klarna Pay Later N/A Partial/Full 1 One business day
1133 Klarna Slice It N/A Partial/Full 1 One business day
1133 Klarna Slice It N/A Partial/Full 1 One business day
1134 GCash (Alipay OSP) N/A Partial/Full 1 One business day
1135 KakaoPay (Alipay OSP) N/A Partial/Full 1 One business day
1136 Dana (Alipay OSP) N/A Partial/Full 1 One business day
1137 Touch ‘n Go eWallet N/A Partial/Full 4 1-5 business days
1138 Fawry N/A Partial/Full 10 1-5 business days
1139 Loterica N/A Partial/Full 1 1 business day
1140 Boleto Bancario Brazil N/A Partial/Full 1 1 business day
1141 Alfa-Click N/A Partial/Full 3 1-10 business days
1142 Cash-in CIS N/A Partial/Full 3 1-10 business days
1143 Truemoney N/A Partial/Full 1 1 business day
1144 Touch’n Go eWallet N/A Partial/Full 1 1 business day
1145 AlipayHK N/A Partial/Full 1 1 business day
1152 Cards India N/A Partial/Full 1 1 business day
1153 PIX Maximum refund period is 180 days Partial/Full 10 1-5 business days
1154 Afterpay N/A Partial/Full 1 1 business day
1155 Clearpay N/A Partial/Full 1 1 business day
1156 Clave N/A Partial/Full 3 1-10 business days
1157 Nequi N/A Partial/Full 3 1-10 business days
1158 PagoCash N/A Partial/Full 3 1-10 business days
1159 Blik N/A Partial/Full 1 1 business day
1160 Klarna Pay Now N/A Partial/Full 1 1 business day
1161 Bank Transfer N/A Partial/Full 1 and 2 1-5 business days
1162 Bank Transfer N/A Partial/Full 2 1-3 business days
1176 ZaloPay N/A Full 1 Real-time processing

Create a Refund

When you are initiating a refund you need to provide the Refund Amount and the Merchant Transaction ID, that is automatically generated. You can change this ID by introducing your ID value.

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

Where:
  • {id} – GlobalPay Payment ID

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

Request:

POST https://paytest.smart2pay.com/v1/payments/4520424/refunds
Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=

{
  "Refund": {
    "MerchantTransactionID": "s2ptest_gi10",
    "Amount": 100,
    "Description": "Refund Test Description"
   }
}

Response:

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

{
    "Refund": {
        "ID": 36675,
        "Created": "20190516075916",
        "MerchantTransactionID": "s2ptest_gi10",
        "OriginatorTransactionID": null,
        "InitialPaymentID": 4520424,
        "Amount": "100",
        "Currency": "EUR",
        "Description": "Refund Test Description",
        "TypeID": 5,
        "SiteID": 30201,
        "Details": null,
        "Customer": null,
        "BillingAddress": null,
        "BankAddress": null,
        "Articles": null,
        "Status": {
            "ID": 1,
            "Info": "Open",
            "Reasons": null
        },
        "SplitID": 0
    }
}

For some payment methods to be processed correctly, depending on the type of refund, we require additional parameters, specific details, such as customer IBAN.

Please check Get information for a refund for more information on what parameters you need to send in order to initiate a specific refund.

  • A particular case is for Klarna Invoice payment method where in order to initiate a refund you will need to provide Merchant Article ID and Quantity parameters, like in the below example:

    Request:

    POST https://paytest.smart2pay.com/v1/payments/3006154/refunds
    Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=
    
    {
      "Refund": {
        "MerchantTransactionID": "s2ptest_g30",
        "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": "s2ptest_g30",
        "OriginatorTransactionID": null,
        "InitialPaymentID": 0,
        "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
        },
        "SplitID": 0
      }
    }

  • Another particular case is for LATAM payment methods (Cash Payment and Online Banking payment methods – see the list below).

    The refunds for most LATAM payment methods are made by our local provider. In order for the refund to be processed the Customer bank details/ and customer full name are required. There are 2 possibilities:

    1. The Customer bank details are sent in full in the request, like in the below example. In this case, the refund should be processed within 48 hours.
    2. The Customer bank details are not sent in request. However, in this case, the local provider will contact the customer in order to obtain the bank details so the refund can be performed.

    Request:

    POST https://paytest.smart2pay.com/v1/payments/4070604/refunds
    Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=
    
    {
      "Refund": {
        "MerchantTransactionID": "s2ptest_f201",
        "Amount": 400,
        "Details": {
          "CustomerAccountNumber":"A88888888888",
          "BankAccountType":"I",
          "BankName":"Banco do Brasil",
          "BankBranch":"Branch1234"
          },
        "Customer": {
          "Email":"test@test.com",
          "FirstName":"John",
          "LastName":"Smith"            
        }
      }
    }

    Response:

    HTTP/1.1 201 Created
    Content-Type: application/json; charset=utf-8
    
    {
      "Refund": {
        "ID": 27601,
        "Created": "20180914091320",
        "MerchantTransactionID": "s2ptest_f201",
        "OriginatorTransactionID": null,
        "InitialPaymentID": 4070604,
        "Amount": "400",
        "Currency": "PLN",
        "Description": null,
        "TypeID": 10,
        "SiteID": 30201,
        "Details": {
          "CustomerAccountNumber": "A88888888888",
          "BankName": "Banco do Brasil",
          "BankAccountType": "I",
          "BankBranch": "Branch1234"
          },
        "Customer": {
          "ID": 336,
          "MerchantCustomerID": null,
          "Email": "test@test.com",
          "FirstName": "John",
          "LastName": "Smith",
          "Gender": null,
          "SocialSecurityNumber": null,
          "Phone": null,
          "Company": null,
          "DateOfBirth": null
          },
        "BillingAddress": null,
        "BankAddress": null,
        "Articles": null,
        "Status": {
          "ID": 1,
          "Info": "Open",
          "Reasons": null
        },
        "SplitID": 0
      }
    }

    Latam payment methods
    Method ID Method Name
    32 Debito Banco do Brasil
    1080 Santander Rio
    1081 Cash Payments Argentina
    1083 Boleto Brazil
    1084 Online Bank Transfer Brazil
    1086 Servipag
    1087 WebPay
    1089 PSE Colombia
    1090 Cash payment Colombia
    1092 Oxxo
    1093 SPEI
    1094 Bank Transfer Mexico
    1096 Redpagos
    1098 Cash payment Peru
    1099 Bank Transfer Peru
    1103 Rapi Pago
    1104 Pago Fácil
    1107 Netbanking
    1108 UPI
  • For Direct Card transactions you can initiate refunds only for those with a Captured payment status. When you are initiating a refund you need to provide the Refund Amount and the Merchant Transaction ID, that is automatically generated. You can change this ID by introducing your ID value. When refunding a payment that has multiple partial captures, you also need to send the CaptureID parameter in the request.

    Request:

    POST https://securetest.smart2pay.com/v1/payments/202246/refunds
    Authorization: Basic MTAxMDpnYWJp
    
    {
     "Refund": { 
       "MerchantTransactionID": "s2ptest_h19",
       "OriginatorTransactionID": "108_a",
       "Amount": 1000,   
       "Description": "refund reason",
       "StatementDescriptor": "refund ",
       "CaptureID": 546
      }
    }

    Response:

    HTTP/1.1 201 Created
    Content-Type: application/json; charset=utf-8
    
    {
      "Refund": {
        "ID": 263,
        "SiteID": 1010,
        "Created": "20161205095348",
        "MerchantTransactionID": "s2ptest_h19",
        "OriginatorTransactionID": "108_a",
        "InitialPaymentID": 0,
        "Amount": 1000,
        "Currency": "EUR", 
        "Description": "refund reason",
        "StatementDescriptor": null,
        "CaptureID": 546,
        "Customer": null,
        "BillingAddress": null,
        "BankAddress": null,
        "Articles": null,
        "Status": {
          "ID": 2,
          "Info": "Success",
          "Reasons": []
        },
        "SplitID": 0
      }
    }

    In case of an API error, an HTTP 4xx (you did something wrong) or HTTP 5xx (we did something wrong) response is returned.

    For more information about the reasons of a wrong request response see our section GlobalPay Return Codes.

    Request:

    POST https://paytest.smart2pay.com/v1/payments/4520424/refunds
    Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=
    
    {
      "Refund": {
        "MerchantTransactionID": "s2ptest_gi11",
        "Amount": 100,
        "Description": "Refund Test Description"
       }
    }

    Response:

    HTTP/1.1 400 Bad Request
    Content-Type: application/json; charset=utf-8
    
    {
        "Refund": {
            "ID": 36677,
            "Created": "20190516080948",
            "MerchantTransactionID": "s2ptest_gi11",
            "OriginatorTransactionID": null,
            "InitialPaymentID": 4520424,
            "Amount": "100",
            "Currency": "EUR",
            "Description": "Refund Test Description",
            "TypeID": 5,
            "SiteID": 30201,
            "Details": null,
            "Customer": null,
            "BillingAddress": null,
            "BankAddress": null,
            "Articles": null,
            "Status": {
                "ID": 4,
                "Info": "Failed",
                "Reasons": [
                    {
                        "Code": "134",
                        "Info": "Another refund is already in process"
                    }
                ]
            },
            "SplitID": 0
        }
    }

Refund Notification

We will notify you when a refund changes its status to the Notification URL you setup in the Merchant Dashboard.

You need to respond with HTTP code 204 (No Content)!

Refund notification format:

Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=



{
  "Refund": {
    "ID": 16405,
    "Created": "20170803095139",
    "MerchantTransactionID": "s2ptest_g28",
    "OriginatorTransactionID": null,
    "InitialPaymentID": 3005389,
    "Amount": 100,
    "Currency": "EUR",
    "Description": "",
    "TypeID": 5,
    "SiteID": 30201,
    "Details": null,
    "Customer": null,
    "BillingAddress": null,
    "BankAddress": null,
    "Articles": null,
    "Status": {
      "ID": 2,
      "Info": "Success",
      "Reasons": null
    },
    "SplitID": 0
  }
}

Response:

204 No Content

Whenever a a refund changes its status, we notify you of the event and whether it was successful or not. In case of a non-successful refund, additional information will be sent in the Reasons Code and Info fields.

For more information about the reasons of a wrong request response see our section GlobalPay Return Codes.

Below is a case of a non-successful refund for WeChat payment method when the customer Wallet is closed and the refund cannot be processed. Additional information to why the payment got to this status will be sent in the Reasons Code and Info fields:

Refund notification format:

Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=



{
  "Refund": {
    "ID": 18882,
    "Created": "20171213124659",
    "MerchantTransactionID": "893817297012",
    "OriginatorTransactionID": null,
    "InitialPaymentID": 3464340,
    "Amount": "100",
    "Currency": "EUR",
    "Description": null,
    "TypeID": 1,
    "SiteID": null,
    "Details": null,
    "Customer": null,
    "BillingAddress": null,
    "BankAddress": null,
    "Articles": null,
    "Status": {
      "ID": 4,
      "Info": "Failed",
      "Reasons": [
        {
          "Code": "5000",
          "Info": "USER_ACCOUNT_ABNORMAL"
        }
      ]
    },
    "SplitID": 0
  }
}

Response:

204 No Content

Another case of a non-successful refund is for Alipay payment method when the customer Wallet is closed and the refund cannot be processed. Additional information to why the payment got to this status will be sent in the Reasons Code and Info fields:

Refund notification format:

Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=



{
  "Refund": {
    "ID": 18882,
    "Created": "20171213124659",
    "MerchantTransactionID": "893817297012",
    "OriginatorTransactionID": null,
    "InitialPaymentID": 3464340,
    "Amount": "100",
    "Currency": "EUR",
    "Description": null,
    "TypeID": 1,
    "SiteID": null,
    "Details": null,
    "Customer": null,
    "BillingAddress": null,
    "BankAddress": null,
    "Articles": null,
    "Status": {
      "ID": 4,
      "Info": "Failed",
      "Reasons": [
        {
          "Code": "5000",
          "Info": "BUYER_NOT_EXIST"
        }
      ]
    },
    "SplitID": 0
  }
}

Response:

204 No Content

For Card payments the refund we will also notify you when a refund changes its status to the Notification URL you setup in the Merchant Dashboard.

Refund notification format:

Authorization: Basic MTAxMDpnYWJp

{
  "Refund": {
    "ID": 263,
    "SiteID": 1010,
    "Created": "20161205095348",
    "MerchantTransactionID": "s2ptest_h19",
    "OriginatorTransactionID": "108_a",
    "InitialPaymentID": 0,
    "Amount": 2000,
    "Currency": "EUR",
    "Description": "refund reason",
    "StatementDescriptor": null,
    "CaptureID": 546,
    "Customer": null,
    "BillingAddress": null,
    "BankAddress": null,
    "Articles": null,
    "Status": {
      "ID": 2,
      "Info": "Success",
      "Reasons": []
    },
    "SplitID": 0
  }
}

Response:

204 No Content

Get refund types for a certain payment

You can get more information on what parameters you need to send for a certain payment by using a few actions based on GET HTTP request.

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

Where:
  • {id} – GlobalPay Payment ID

For Native Refund type:

Request:

GET https://paytest.smart2pay.com/v1/payments/2427069/refunds/types
Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=

Response:

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

{
  "RefundTypes": [
    {
      "Name": "Native",
      "ID": 1,
      "AllowsPartialRefund": true,
      "Customer": null,
      "BillingAddress": null,
      "BankAddress": null,
      "Details": null
    }
  ]
}

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

In order to be processed correctly, the following types of refunds require additional parameters:

  • For Sepa Bank Transfer Refund type:

    Request:

    GET https://paytest.smart2pay.com/v1/payments/2427083/refunds/types
    Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=

    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}$"
          }
        }
      ]
    }

  • For SWIFT Bank Transfer Refund type:

    Request:

    GET https://paytest.smart2pay.com/v1/payments/2427087/refunds/types
    Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=

    Response:

    HTTP/1.1 200 OK
    Content-Type: application/json; charset=utf-8
    
    {
      "RefundTypes": [
        {
          "Name": "SWIFTBankTransfer",
          "ID": 3,
          "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": {
            "CustomerAccountNumber": "^\\w{1,35}$",
            "BankCode": "^[a-zA-Z]{4}[a-zA-Z]{2}[a-zA-Z0-9]{2}[XXX0-9]{0,3}"
          }
        }
      ]
    }

  • For Manual Support Work Details Needed Refund type:

    Request:

    GET https://paytest.smart2pay.com/v1/payments/4295859/refunds/types
    Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=

    Response:

    HTTP/1.1 200 OK
    Content-Type: application/json; charset=utf-8
    
    {
      "RefundTypes": [
      {
        "Name": "ManualSupportWorkDetailsNeeded",
        "ID": 9,
        "AllowPartialRefund": true,
        "Customer": {
        "MerchantCustomerID": null,
        "Email": null,
        "FirstName": "^.{1,50}$",
        "LastName": "^.{1,50}$",
        "Gender": null,
        "SocialSecurityNumber": null,
        "SocialSecurityNumber2": null,
        "Phone": null,
        "Company": null,
        "DateOfBirth": null
      },
      "BillingAddress": null,
      "BankAddress": {
        "City": null,
        "ZipCode": null,
        "State": null,
        "Street": "^[0-9a-zA-Z]{1,512}$",
        "StreetNumber": "^[0-9a-zA-Z]{1,512}$",
        "HouseNumber": null,
        "HouseExtension": null,
        "Country": null
       },
       "Details": {
         "BankName": "^.{1,50}$"
          }
        }
      ]
    }

  • For Local Bank Transfer 2 API Refund type:

    Request:

    GET https://paytest.smart2pay.com/v1/payments/171510128/refunds/types
    Authorization: Basic MzAyMDE6KzlLZUd6S0Y3VzhTLzc5YTVSMzNZSlVnN0U3V0ZOY1piakdmekxWM2JYU25GQ095RnQ=

    Response:

    HTTP/1.1 200 OK
    Content-Type: application/json; charset=utf-8
    
    {
      "RefundTypes": [
        {
        "Name": "LocalBankTransfer2API",
        "ID": 10,
        "AllowsPartialRefund": true,
        "Customer": {
          "MerchantCustomerID": null,
          "Email": null,
          "FirstName": "^.{1,50}$",
          "LastName": "^.{1,50}$",
          "Gender": null,
          "SocialSecurityNumber": null,
          "SocialSecurityNumber2": null,
          "Phone": null,
          "Company": null,
          "DateOfBirth": null
          },
        "BillingAddress": null,
        "BankAddress": null,
        "Details": {
          "CustomerAccountNumber": "^\\w{1,35}$",
          "BankName": "^.{1,50}$",
          "BankBranch": "^.{1,50}$",
          "BankAccountType": "^(I|S|C)$"
          }
        }
      ]
    }

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}$"
      }
    }
  ]
}

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
  }
}

Get a list of refunds of a specific payment

You can get a list of refunds for a specific payment by using an action based on GET HTTP request. Please be aware that only a limited amount of details for each refund will be provided.

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

Where:
  • {id} – GlobalPay Payment ID

Request:

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

Response:

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

{
  "Refunds": [
    {
      "ID": 16410,
      "Created": "20170803131840",
      "MerchantTransactionID": "s2ptest_g104",
      "OriginatorTransactionID": null,
      "InitialPaymentID": 3006286,
      "Amount": "20",
      "Currency": "EUR",
      "Description": null,
      "TypeID": 5,
      "SiteID": 30201,
      "Details": null,
      "Customer": null,
      "BillingAddress": null,
      "BankAddress": null,
      "Articles": null,
      "Status": {
        "ID": 4,
        "Info": "Failed",
        "Reasons": null
      },
    "SplitID": 0
    },
    {
      "ID": 16408,
      "Created": "20170803131825",
      "MerchantTransactionID": "s2ptest_g103",
      "OriginatorTransactionID": null,
      "InitialPaymentID": 3006286,
      "Amount": "20",
      "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:

GET https://securetest.smart2pay.com/v1/payments/202247/refunds
Authorization: Basic MTAxMDpnYWJp

Response:

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

{
  "Refunds": [
    {
      "ID": 266,
      "SiteID": 1010,
      "Created": "20161205095522",
      "MerchantTransactionID": "s2ptest_h22",
      "OriginatorTransactionID": null,
      "InitialPaymentID": 202247,
      "Amount": "1000",
      "Currency": "EUR",
      "Description": "refund reason",
      "StatementDescriptor": null,
      "Customer": null,
      "BillingAddress": null,
      "BankAddress": null,
      "Articles": null,
      "Status": {
        "ID": 4,
        "Info": "Failed",
        "Reasons": [
          {
            "Code": "2206",
            "Info": "Refund.Amount exceeds initial payment available amount"
          }
        ]
      },
      "SplitID": 0
    },
    {
      "ID": 265,
      "SiteID": 1010,
      "Created": "20161205095515",
      "MerchantTransactionID": "s2ptest_h21",
      "OriginatorTransactionID": null,
      "InitialPaymentID": 202247,
      "Amount": "1000",
      "Currency": "EUR",
      "Description": "refund reason",
      "StatementDescriptor": null,
      "Customer": null,
      "BillingAddress": null,
      "BankAddress": null,
      "Articles": null,
      "Status": {
        "ID": 2,
        "Info": "Success",
        "Reasons": []
      },
     "SplitID": 0
    },
    {
      "ID": 264,
      "SiteID": 1010,
      "Created": "20161205095505",
      "MerchantTransactionID": "s2ptest_h20",
      "OriginatorTransactionID": null,
      "InitialPaymentID": 202247,
      "Amount": "1000",
      "Currency": "EUR",
      "Description": "refund reason",
      "StatementDescriptor": null,
      "Customer": null,
      "BillingAddress": null,
      "BankAddress": null,
      "Articles": null,
      "Status": {
        "ID": 2,
        "Info": "Success",
        "Reasons": []
      },
      "SplitID": 0
    }
  ]
}

Get the status of a refund for a card payment

You can get the status of a refund for a card payment by using the following GET HTTP request.

Please note that this method sends only the status information about the refund. To receive more information about the refund please go to our section Get information on a specific refund.

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

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

Request:

GET https://securetest.smart2pay.com/v1/payments/202246/refunds/263/status
Authorization: Basic MTAxMDpnYWJp

Response:

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

{
  "Refund": {
    "ID": 263,
    "InitialPaymentID": 202246,
    "MerchantTransactionID": "s2ptest_h19",
    "StateDetails": {
      "ID": 2,
      "Info": "Success",
      "Reasons": []
    },
    "SplitID": 0
  }
}