Refunds - Retrieve
curl --request GET \
--url https://sandbox.hyperswitch.io/v2/refunds/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://sandbox.hyperswitch.io/v2/refunds/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://sandbox.hyperswitch.io/v2/refunds/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.hyperswitch.io/v2/refunds/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.hyperswitch.io/v2/refunds/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.hyperswitch.io/v2/refunds/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.hyperswitch.io/v2/refunds/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"payment_id": "<string>",
"amount": 6540,
"currency": "AED",
"status": "succeeded",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"connector": "absa_sanlam",
"profile_id": "<string>",
"merchant_connector_id": "<string>",
"merchant_reference_id": "ref_mbabizu24mvu3mela5njyhpit4",
"reason": "<string>",
"metadata": {},
"error_details": {
"code": "<string>",
"message": "<string>"
},
"connector_refund_reference_id": "<string>",
"raw_connector_response": "<string>",
"feature_metadata": {
"multi_currency_processing": {
"amount": 123,
"currency": "AED"
}
}
}Refunds
Refunds - Retrieve
Retrieves a Refund. This may be used to get the status of a previously initiated refund
GET
/
v2
/
refunds
/
{id}
Refunds - Retrieve
curl --request GET \
--url https://sandbox.hyperswitch.io/v2/refunds/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://sandbox.hyperswitch.io/v2/refunds/{id}"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://sandbox.hyperswitch.io/v2/refunds/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.hyperswitch.io/v2/refunds/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.hyperswitch.io/v2/refunds/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sandbox.hyperswitch.io/v2/refunds/{id}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.hyperswitch.io/v2/refunds/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"payment_id": "<string>",
"amount": 6540,
"currency": "AED",
"status": "succeeded",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"connector": "absa_sanlam",
"profile_id": "<string>",
"merchant_connector_id": "<string>",
"merchant_reference_id": "ref_mbabizu24mvu3mela5njyhpit4",
"reason": "<string>",
"metadata": {},
"error_details": {
"code": "<string>",
"message": "<string>"
},
"connector_refund_reference_id": "<string>",
"raw_connector_response": "<string>",
"feature_metadata": {
"multi_currency_processing": {
"amount": 123,
"currency": "AED"
}
}
}Authorizations
Response
Refund retrieved
The three-letter ISO 4217 currency code (e.g., "USD", "EUR") for the payment amount. This field is mandatory for creating a payment.
Available options:
AED, AFN, ALL, AMD, ANG, AOA, ARS, AUD, AWG, AZN, BAM, BBD, BDT, BGN, BHD, BIF, BMD, BND, BOB, BRL, BSD, BTN, BWP, BYN, BZD, CAD, CDF, CHF, CLF, CLP, CNY, COP, CRC, CUC, CUP, CVE, CZK, DJF, DKK, DOP, DZD, EGP, ERN, ETB, EUR, FJD, FKP, GBP, GEL, GHS, GIP, GMD, GNF, GTQ, GYD, HKD, HNL, HRK, HTG, HUF, IDR, ILS, INR, IQD, IRR, ISK, JMD, JOD, JPY, KES, KGS, KHR, KMF, KPW, KRW, KWD, KYD, KZT, LAK, LBP, LKR, LRD, LSL, LYD, MAD, MDL, MGA, MKD, MMK, MNT, MOP, MRU, MUR, MVR, MWK, MXN, MYR, MZN, NAD, NGN, NIO, NOK, NPR, NZD, OMR, PAB, PEN, PGK, PHP, PKR, PLN, PYG, QAR, RON, RSD, RUB, RWF, SAR, SBD, SCR, SDG, SEK, SGD, SHP, SLE, SLL, SOS, SRD, SSP, STD, STN, SVC, SYP, SZL, THB, TJS, TMT, TND, TOP, TRY, TTD, TWD, TZS, UAH, UGX, USD, UYU, UZS, VES, VND, VUV, WST, XAF, XCD, XOF, XPF, YER, ZAR, ZMW, ZWL Available options:
absa_sanlam, authipay, adyenplatform, stripe_billing_test, phonypay, fauxpay, pretendpay, stripe_test, adyen_test, checkout_test, paypal_test, aci, adyen, affirm, airwallex, amazonpay, archipel, authorizedotnet, bambora, bamboraapac, bankofamerica, barclaycard, betterpayment, billwerk, bitpay, bluesnap, blackhawknetwork, calida, boku, braintree, breadpay, cardinal, cashtocode, celero, chargebee, checkbook, checkout, citigate, coinbase, coingate, custombilling, cryptopay, ctp_mastercard, ctp_visa, cybersource, cybersourcedecisionmanager, d24, datatrans, deutschebank, digitalvirgo, dlocal, dwolla, ebanx, ecommpay, envoy, elavon, etisalat, elavon_pg, facilitapay, finix, fiserv, fiservemea, fiservcommercehub, fiuu, flexiti, forte, getnet, gigadat, givepayments, globalpay, globalpayments_heartland, globalpayments_realex, globepay, gocardless, gotyme_sanlam, gpayments, hipay, helcim, hyperpg, hyperswitch_vault, interpayments, inespay, iatapay, ilixium, imerchantsolutions, itaubank, jpmorgan, jpmorgan_orbital, juspay, juspaythreedsserver, klarna, loonio, merchante, mifinity, mollie, moneris, multisafepay, netcetera, nexinets, nexixpay, nmi, nomupay, noon, nordea, novalnet, nuvei, opennode, paybox, paydotcom, payhound, payload, payme, paynearme, payone, paypal, paysafe, paystack, paytm, payconex, payu, peachpayments, payjustnow, payjustnowinstore, phonepe, placetopay, powertranz, prophetpay, rapyd, razorpay, recurly, redsys, revolv3, saferpay, santander, shift4, silverflow, square, stax, stripe, stripebilling, taxjar, threedsecureio, tesouro, tokenex, tokenio, trustly, truelayer, trustpay, trustpayments, tsys, tsys_transit, vgs, volt, wellsfargo, wise, worldline, worldpay, worldpayraft, worldpayvantiv, worldpayxml, worldpaymodular, signifyd, nsure, plaid, riskified, sanlam_payshield, xendit, zen, zift, zsl Was this page helpful?