Gsm - Create
curl --request POST \
--url https://sandbox.hyperswitch.io/gsm \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"flow": "<string>",
"sub_flow": "<string>",
"code": "<string>",
"message": "<string>",
"status": "<string>",
"step_up_possible": true,
"clear_pan_possible": true,
"router_error": "<string>",
"unified_code": "<string>",
"unified_message": "<string>",
"feature": "retry",
"feature_data": {
"retry": {
"step_up_possible": true,
"clear_pan_possible": true,
"alternate_network_possible": true
}
},
"description": "<string>",
"user_guidance_message": "<string>"
}
'import requests
url = "https://sandbox.hyperswitch.io/gsm"
payload = {
"flow": "<string>",
"sub_flow": "<string>",
"code": "<string>",
"message": "<string>",
"status": "<string>",
"step_up_possible": True,
"clear_pan_possible": True,
"router_error": "<string>",
"unified_code": "<string>",
"unified_message": "<string>",
"feature": "retry",
"feature_data": { "retry": {
"step_up_possible": True,
"clear_pan_possible": True,
"alternate_network_possible": True
} },
"description": "<string>",
"user_guidance_message": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
flow: '<string>',
sub_flow: '<string>',
code: '<string>',
message: '<string>',
status: '<string>',
step_up_possible: true,
clear_pan_possible: true,
router_error: '<string>',
unified_code: '<string>',
unified_message: '<string>',
feature: 'retry',
feature_data: {
retry: {
step_up_possible: true,
clear_pan_possible: true,
alternate_network_possible: true
}
},
description: '<string>',
user_guidance_message: '<string>'
})
};
fetch('https://sandbox.hyperswitch.io/gsm', 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/gsm",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'flow' => '<string>',
'sub_flow' => '<string>',
'code' => '<string>',
'message' => '<string>',
'status' => '<string>',
'step_up_possible' => true,
'clear_pan_possible' => true,
'router_error' => '<string>',
'unified_code' => '<string>',
'unified_message' => '<string>',
'feature' => 'retry',
'feature_data' => [
'retry' => [
'step_up_possible' => true,
'clear_pan_possible' => true,
'alternate_network_possible' => true
]
],
'description' => '<string>',
'user_guidance_message' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.hyperswitch.io/gsm"
payload := strings.NewReader("{\n \"flow\": \"<string>\",\n \"sub_flow\": \"<string>\",\n \"code\": \"<string>\",\n \"message\": \"<string>\",\n \"status\": \"<string>\",\n \"step_up_possible\": true,\n \"clear_pan_possible\": true,\n \"router_error\": \"<string>\",\n \"unified_code\": \"<string>\",\n \"unified_message\": \"<string>\",\n \"feature\": \"retry\",\n \"feature_data\": {\n \"retry\": {\n \"step_up_possible\": true,\n \"clear_pan_possible\": true,\n \"alternate_network_possible\": true\n }\n },\n \"description\": \"<string>\",\n \"user_guidance_message\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.hyperswitch.io/gsm")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"flow\": \"<string>\",\n \"sub_flow\": \"<string>\",\n \"code\": \"<string>\",\n \"message\": \"<string>\",\n \"status\": \"<string>\",\n \"step_up_possible\": true,\n \"clear_pan_possible\": true,\n \"router_error\": \"<string>\",\n \"unified_code\": \"<string>\",\n \"unified_message\": \"<string>\",\n \"feature\": \"retry\",\n \"feature_data\": {\n \"retry\": {\n \"step_up_possible\": true,\n \"clear_pan_possible\": true,\n \"alternate_network_possible\": true\n }\n },\n \"description\": \"<string>\",\n \"user_guidance_message\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.hyperswitch.io/gsm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"flow\": \"<string>\",\n \"sub_flow\": \"<string>\",\n \"code\": \"<string>\",\n \"message\": \"<string>\",\n \"status\": \"<string>\",\n \"step_up_possible\": true,\n \"clear_pan_possible\": true,\n \"router_error\": \"<string>\",\n \"unified_code\": \"<string>\",\n \"unified_message\": \"<string>\",\n \"feature\": \"retry\",\n \"feature_data\": {\n \"retry\": {\n \"step_up_possible\": true,\n \"clear_pan_possible\": true,\n \"alternate_network_possible\": true\n }\n },\n \"description\": \"<string>\",\n \"user_guidance_message\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"connector": "<string>",
"flow": "<string>",
"sub_flow": "<string>",
"code": "<string>",
"message": "<string>",
"status": "<string>",
"decision": "retry",
"step_up_possible": true,
"clear_pan_possible": true,
"feature": "retry",
"feature_data": {
"retry": {
"step_up_possible": true,
"clear_pan_possible": true,
"alternate_network_possible": true,
"decision": "retry"
}
},
"router_error": "<string>",
"unified_code": "<string>",
"unified_message": "<string>",
"error_category": "frm_decline",
"standardised_code": "account_closed_or_invalid",
"description": "<string>",
"user_guidance_message": "<string>"
}GSM (Global Status Mapping)
Gsm - Create
Creates a GSM (Global Status Mapping) Rule. A GSM rule is used to map a connector’s error message/error code combination during a particular payments flow/sub-flow to Hyperswitch’s unified status/error code/error message combination. It is also used to decide the next action in the flow - retry/requeue/do_default
POST
/
gsm
Gsm - Create
curl --request POST \
--url https://sandbox.hyperswitch.io/gsm \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"flow": "<string>",
"sub_flow": "<string>",
"code": "<string>",
"message": "<string>",
"status": "<string>",
"step_up_possible": true,
"clear_pan_possible": true,
"router_error": "<string>",
"unified_code": "<string>",
"unified_message": "<string>",
"feature": "retry",
"feature_data": {
"retry": {
"step_up_possible": true,
"clear_pan_possible": true,
"alternate_network_possible": true
}
},
"description": "<string>",
"user_guidance_message": "<string>"
}
'import requests
url = "https://sandbox.hyperswitch.io/gsm"
payload = {
"flow": "<string>",
"sub_flow": "<string>",
"code": "<string>",
"message": "<string>",
"status": "<string>",
"step_up_possible": True,
"clear_pan_possible": True,
"router_error": "<string>",
"unified_code": "<string>",
"unified_message": "<string>",
"feature": "retry",
"feature_data": { "retry": {
"step_up_possible": True,
"clear_pan_possible": True,
"alternate_network_possible": True
} },
"description": "<string>",
"user_guidance_message": "<string>"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
flow: '<string>',
sub_flow: '<string>',
code: '<string>',
message: '<string>',
status: '<string>',
step_up_possible: true,
clear_pan_possible: true,
router_error: '<string>',
unified_code: '<string>',
unified_message: '<string>',
feature: 'retry',
feature_data: {
retry: {
step_up_possible: true,
clear_pan_possible: true,
alternate_network_possible: true
}
},
description: '<string>',
user_guidance_message: '<string>'
})
};
fetch('https://sandbox.hyperswitch.io/gsm', 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/gsm",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'flow' => '<string>',
'sub_flow' => '<string>',
'code' => '<string>',
'message' => '<string>',
'status' => '<string>',
'step_up_possible' => true,
'clear_pan_possible' => true,
'router_error' => '<string>',
'unified_code' => '<string>',
'unified_message' => '<string>',
'feature' => 'retry',
'feature_data' => [
'retry' => [
'step_up_possible' => true,
'clear_pan_possible' => true,
'alternate_network_possible' => true
]
],
'description' => '<string>',
'user_guidance_message' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.hyperswitch.io/gsm"
payload := strings.NewReader("{\n \"flow\": \"<string>\",\n \"sub_flow\": \"<string>\",\n \"code\": \"<string>\",\n \"message\": \"<string>\",\n \"status\": \"<string>\",\n \"step_up_possible\": true,\n \"clear_pan_possible\": true,\n \"router_error\": \"<string>\",\n \"unified_code\": \"<string>\",\n \"unified_message\": \"<string>\",\n \"feature\": \"retry\",\n \"feature_data\": {\n \"retry\": {\n \"step_up_possible\": true,\n \"clear_pan_possible\": true,\n \"alternate_network_possible\": true\n }\n },\n \"description\": \"<string>\",\n \"user_guidance_message\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox.hyperswitch.io/gsm")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"flow\": \"<string>\",\n \"sub_flow\": \"<string>\",\n \"code\": \"<string>\",\n \"message\": \"<string>\",\n \"status\": \"<string>\",\n \"step_up_possible\": true,\n \"clear_pan_possible\": true,\n \"router_error\": \"<string>\",\n \"unified_code\": \"<string>\",\n \"unified_message\": \"<string>\",\n \"feature\": \"retry\",\n \"feature_data\": {\n \"retry\": {\n \"step_up_possible\": true,\n \"clear_pan_possible\": true,\n \"alternate_network_possible\": true\n }\n },\n \"description\": \"<string>\",\n \"user_guidance_message\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.hyperswitch.io/gsm")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"flow\": \"<string>\",\n \"sub_flow\": \"<string>\",\n \"code\": \"<string>\",\n \"message\": \"<string>\",\n \"status\": \"<string>\",\n \"step_up_possible\": true,\n \"clear_pan_possible\": true,\n \"router_error\": \"<string>\",\n \"unified_code\": \"<string>\",\n \"unified_message\": \"<string>\",\n \"feature\": \"retry\",\n \"feature_data\": {\n \"retry\": {\n \"step_up_possible\": true,\n \"clear_pan_possible\": true,\n \"alternate_network_possible\": true\n }\n },\n \"description\": \"<string>\",\n \"user_guidance_message\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"connector": "<string>",
"flow": "<string>",
"sub_flow": "<string>",
"code": "<string>",
"message": "<string>",
"status": "<string>",
"decision": "retry",
"step_up_possible": true,
"clear_pan_possible": true,
"feature": "retry",
"feature_data": {
"retry": {
"step_up_possible": true,
"clear_pan_possible": true,
"alternate_network_possible": true,
"decision": "retry"
}
},
"router_error": "<string>",
"unified_code": "<string>",
"unified_message": "<string>",
"error_category": "frm_decline",
"standardised_code": "account_closed_or_invalid",
"description": "<string>",
"user_guidance_message": "<string>"
}Authorizations
Body
application/json
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 Available options:
account_closed_or_invalid, authentication_failed, authentication_required, authorization_missing_or_revoked, card_lost_or_stolen, card_not_supported_restricted, cfg_pm_not_enabled_or_misconfigured, compliance_or_sanctions_restriction, configuration_issue, credit_limit_exceeded, currency_or_corridor_not_enabled, do_not_honor, downstream_technical_issue, duplicate_request, generic_unknown_error, incorrect_authentication_code, insufficient_funds, integ_cryptographic_issue, integration_issue, invalid_card_number, invalid_credentials, invalid_cvv, invalid_expiry_date, invalid_state, issuer_unavailable, merchant_inactive, missing_or_invalid_param, operation_not_allowed, payment_cancelled_by_user, payment_method_issue, payment_session_timeout, pm_address_mismatch, psp_acquirer_error, psp_fraud_engine_decline, rate_limit, stored_credential_or_mit_not_enabled, subscription_plan_inactive, suspected_fraud, three_ds_authentication_service_issue, three_ds_configuration_issue, three_ds_data_or_protocol_invalid, transaction_not_permitted, transaction_timed_out, velocity_limit_exceeded, wallet_or_token_config_issue Response
Gsm created
Available options:
account_closed_or_invalid, authentication_failed, authentication_required, authorization_missing_or_revoked, card_lost_or_stolen, card_not_supported_restricted, cfg_pm_not_enabled_or_misconfigured, compliance_or_sanctions_restriction, configuration_issue, credit_limit_exceeded, currency_or_corridor_not_enabled, do_not_honor, downstream_technical_issue, duplicate_request, generic_unknown_error, incorrect_authentication_code, insufficient_funds, integ_cryptographic_issue, integration_issue, invalid_card_number, invalid_credentials, invalid_cvv, invalid_expiry_date, invalid_state, issuer_unavailable, merchant_inactive, missing_or_invalid_param, operation_not_allowed, payment_cancelled_by_user, payment_method_issue, payment_session_timeout, pm_address_mismatch, psp_acquirer_error, psp_fraud_engine_decline, rate_limit, stored_credential_or_mit_not_enabled, subscription_plan_inactive, suspected_fraud, three_ds_authentication_service_issue, three_ds_configuration_issue, three_ds_data_or_protocol_invalid, transaction_not_permitted, transaction_timed_out, velocity_limit_exceeded, wallet_or_token_config_issue Was this page helpful?