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
}
}
{"Refund":{"hint":"Refund structure","regexp":"","type":"object","InvalidRequestID":{"hint":"Refund failure reference ID","regexp":"","type":"string"},"ID":{"hint":"GlobalPay refund ID, a unique number that identifies the refund in the GlobalPay system.","regexp":"^\\d{1,12}$","type":"int"},"SiteID":{"hint":"The ID of the site","regexp":"^\\d{1,12}$","type":"int"},"Created":{"hint":"Date and time when the refund was created.","regexp":"","type":"datetime"},"MerchantTransactionID":{"hint":"Merchant Transaction ID, a number that uniquely identifies a refund in your system.","regexp":"","type":"string"},"OriginatorTransactionID":{"hint":"Originator transaction ID, a number that uniquely identifies the transaction in the original requester\u2019s system.","regexp":"^[0-9a-zA-Z_-]{1,50}$","type":"string"},"InitialPaymentID":{"hint":"GlobalPay payment ID of the initial transaction.","regexp":"^\\d{1,12}$","type":"int"},"MethodTransactionID":{"hint":"The Acquirer Reference Number (ARN), a unique number that tags a credit card transaction\/refund when it goes from the merchant bank (the acquiring bank) through the card scheme to the cardholder\\'s bank (the issuer). This number can be used by issuing banks to trace a transaction with an acquirer.","regexp":"","type":"string"},"Amount":{"hint":"The amount you want to refund. It can be the same as the capture amount or less. The last two digits represent the decimal part (11.54 will be sent 1154).","regexp":"^\\d{1,12}$","type":"int"},"Currency":{"hint":"The currency in which you sell the services or products. Format is according to ISO 4217, a three-letter code.","regexp":"^[A-Z]{3}$","type":"string"},"Description":{"hint":"The reason why you are doing the refund.","regexp":"^.{1,255}$","type":"string"},"StatementDescriptor":{"hint":"Refund statement description","regexp":"^.{1,255}$","type":"string"},"CaptureID":{"hint":"Refunded capture ID","regexp":"^\\d{1,12}$","type":"int"},"Customer":{"hint":"Customer details","regexp":"","type":"object","ID":{"hint":"Customer ID, a unique number that identifies the customer in the GlobalPay system.","regexp":"^\\d{1,12}$","type":"int"},"MerchantCustomerID":{"hint":"The ID of the customer in your system.","regexp":"^([0-9a-zA-Z_-]{1,50})?$","type":"string"},"Email":{"hint":"Customer\u2019s email","regexp":"^[a-zA-Z0-9\\._%+-]{1,100}@[a-zA-Z0-9\\.-]{1,40}\\.[a-zA-Z]{1,8}$","type":"string"},"FirstName":{"hint":"Customer\u2019s first name","regexp":"","type":"string"},"LastName":{"hint":"Customer\u2019s last name","regexp":"","type":"string"},"Gender":{"hint":"Customer\u2019s gender. It can have the following values: 1 - Male, 2 - Female.","regexp":"","type":"string"},"DateOfBirth":{"hint":"Customer date of birth","regexp":"^(((19|20)\\d\\d)(0[1-9]|1[012])(0[1-9]|[12][0-9]|3[01]))$","type":"date"},"SocialSecurityNumber":{"hint":"Customer\u2018s social or fiscal identifier","regexp":"","type":"string"},"Phone":{"hint":"Customer\u2019s phone including prefix","regexp":"","type":"string"},"Company":{"hint":"Company name (for legal entities)","regexp":"","type":"string"},"InputDateTime":{"hint":"Customer creation date","regexp":"","type":"datetime"}},"BillingAddress":{"hint":"Billing Address details","regexp":"","type":"object","ID":{"hint":"Address ID, a unique number that identifies an address in the GlobalPay system.","regexp":"^\\d{1,12}$","type":"int"},"Country":{"hint":"Customer\u2018s country. Recommended to be sent in order to increase the conversion. If MethodID is missing, this field (taken from BillingAddress object) controls which payment methods are shown on the hosted payment pages. Format is according to ISO-3166-1 alpha-2, a two-letter code.","regexp":"^([A-Za-z]{2})?$","type":"string"},"City":{"hint":"City name","regexp":"^(.{1,255})?$","type":"string"},"ZipCode":{"hint":"Postal code","regexp":"^(.{1,255})?$","type":"string"},"State":{"hint":"State name","regexp":"^(.{1,255})?$","type":"string"},"Street":{"hint":"Street name","regexp":"^(.{1,255})?$","type":"string"},"StreetNumber":{"hint":"Street Number","regexp":"^(.{1,255})?$","type":"string"},"HouseNumber":{"hint":"House Number","regexp":"^(.{1,255})?$","type":"string"},"HouseExtension":{"hint":"House Extension","regexp":"^(.{1,255})?$","type":"string"}},"BankAddress":{"hint":"","regexp":"","type":"object","ID":{"hint":"Bank address ID","regexp":"^\\d{1,12}$","type":"int"},"Country":{"hint":"Bank address country. Format is according to ISO-3166-1 alpha-2, a two-letter code.","regexp":"^([A-Za-z]{2})?$","type":"string"},"City":{"hint":"City name","regexp":"^(.{1,255})?$","type":"string"},"ZipCode":{"hint":"Postal code","regexp":"^(.{1,255})?$","type":"string"},"State":{"hint":"State name","regexp":"^(.{1,255})?$","type":"string"},"Street":{"hint":"Street name","regexp":"^(.{1,255})?$","type":"string"},"StreetNumber":{"hint":"Street Number","regexp":"^(.{1,255})?$","type":"string"},"HouseNumber":{"hint":"House Number","regexp":"^(.{1,255})?$","type":"string"},"HouseExtension":{"hint":"House Extension","regexp":"^(.{1,255})?$","type":"string"}},"Articles":{"hint":"The services\/products purchased from the website. Mandatory to be sent for Klarna Invoice and Klarna Payments payment methods.","regexp":"","type":"array of objects","MerchantArticleID":{"hint":"The ID of the article in your system","regexp":"^\\d{1,19}$","type":"string"},"Name":{"hint":"Article\u2019s name","regexp":"^.{1,250}$","type":"string"},"Quantity":{"hint":"The number of products. If is not sent the default value is 1.","regexp":"^\\d{1,3}$","type":"int"},"Price":{"hint":"The price for one item","regexp":"","type":"int"},"VAT":{"hint":"Value-Added Tax ( it is a tax in percent on the purchase price)","regexp":"^\\d{1,4}$","type":"int"},"Discount":{"hint":"The percent on the original price offered by you as discount. The last two digits represent the decimal part (10% will be sent 1000).","regexp":"^\\d{1,4}$","type":"int"},"DiscountValue":{"hint":"The fixed value on the original price offered by you as discount. The last two digits represent the decimal part (10 GBP will be sent 1000).","regexp":"^\\d{1,4}$","type":"int"},"Type":{"hint":"The type of article. It can have the following values: 4 - Discount, 5 -Physical, 6 - Shipping_fee, 7 - Sales_tax, 8 - Digital, 9 - Gift_card, 10 - Store_credit, 11 - Surcharge.","regexp":"^(1|2|3|4|5|6|7|8|9|10|11)$","type":"int"},"TaxType":{"hint":"The type of tax. It can have the following values: 1 - without VAT, 2 - VAT at the rate of 0%, 3 - VAT of the receipt at the rate of 10%, 4 - VAT of the receipt at the rate of 18%, 5 - VAT of the receipt at the applicable rate of 10\/110, 6 - VAT of the receipt at the applicable rate of 18\/118.","regexp":"^(1|2|3|4|5|6)$","type":"int"}},"Status":{"hint":"Refund status","regexp":"","type":"object","ID":{"hint":"The ID of the refund status. It can have the following values: 1 - Open, 2 - Success, 4 - Failed.","regexp":"","type":"int"},"Info":{"hint":"The description of the status","regexp":"","type":"string"},"Reasons":{"hint":"The reasons why the payment got to this status.","regexp":"","type":"array of objects","Code":{"hint":"The id of the message type transmitted in the response. See our section GlobalPay Return Codes for a complete description.","regexp":"","type":"int"},"Info":{"hint":"The message body","regexp":"","type":"string"}}}}}