Skip to main content
PUT
/
PaymentGateway
/
refund
Perform a payment gateway refund operation
curl --request PUT \
  --url https://api.orchestrasolutions.com/PaymentGateway/refund \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "currency": "<string>",
  "refTransId": "<string>",
  "amount": 123,
  "card": {
    "cardHolderName": "<string>",
    "cardNumber": "<string>",
    "expirationYear": 123,
    "expirationMonth": 123,
    "ownerID": "<string>",
    "issueNumber": "<string>",
    "cvv": "<string>",
    "threeDSAuthentication": {
      "authenticationValue": "<string>",
      "eci": "<string>",
      "xid": "<string>",
      "version": "<string>",
      "merchantName": "<string>",
      "sli": "<string>"
    },
    "cardType": "Unspecified"
  },
  "payerDetails": {
    "clientIPAddress": "<string>",
    "countryCode": "<string>",
    "address1": "<string>",
    "address2": "<string>",
    "address3": "<string>",
    "postCode": "<string>",
    "city": "<string>",
    "stateProvince": "<string>"
  },
  "myRef": "<string>",
  "paymentGatewayAccountName": "<string>",
  "certificateName": "<string>",
  "paymentGatewayAccount": {
    "paymentGatewayName": "<string>",
    "credentials": [
      {
        "key": "<string>",
        "value": "<string>"
      }
    ]
  },
  "networkTokenBrand": "Visa"
}
'
{
  "authorizationCode": "<string>",
  "currency": "AFN",
  "amount": 123,
  "operationType": "Charge",
  "operationResultCode": "Success",
  "operationResultDescription": "<string>",
  "customGatewayResponse": "<unknown>",
  "gatewayName": "<string>",
  "gatewayReference": "<string>",
  "gatewayResultCode": "<string>",
  "gatewayResultDescription": "<string>",
  "gatewayResultSubCode": "<string>",
  "gatewayResultSubDescription": "<string>",
  "gatewayToken": "<unknown>"
}

Refunds & Voids Guide

Complete guide with partial refunds, examples, and best practices

Authorizations

X-Api-Key
string
header
required

Please enter ApiKey into field

Body

application/json

Refund Request Model

Model for UPG refund operation

currency
string
required

The currency of the transaction. Based on the ISO 4217 standard.

Minimum string length: 1
refTransId
string
required

The transaction ID that this operation is referring to.

Minimum string length: 1
amount
number<double>
required

The amount to be charged (the amount should be in major units - for example, 10.23)

card
object
required

The card details that should be charged. You can either provide us with the raw card details or provide a reference to the stored card details in a token.

payerDetails
object

The billing information of the card owner

myRef
string | null

Your custom reference for this transaction

paymentGatewayAccountName
string | null

The reference name provided to the stored Payment Gateway Account as set in PUT /PaymentGatewayAccounts/{name}. Please note, if you provide us with both this parameter and the raw credentials in the paymentGatewayAccount object, this parameter will be ignored and the raw credentials will take precedence.

certificateName
string | null

Optional parameter if the payment gateway requires authentication using a client certificate. The name of the certificate that was stored in our system via our users portal

Maximum string length: 128
paymentGatewayAccount
object

The raw credentials necessary to connect to the chosen payment gateway as defined in GET /PaymentGateway. Please note, if you provide us with both the raw details here and a stored Payment Gateway Account in the paymentGatewayAccountName parameter, these credentials will take precedence.

networkTokenBrand
enum<string>
Available options:
Visa,
MasterCard,
Amex

Response

OK

authorizationCode
string | null
currency
enum<string>
Available options:
AFN,
EUR,
ALL,
DZD,
USD,
AOA,
XCD,
ARS,
AMD,
AWG,
AUD,
AZN,
BSD,
BHD,
BDT,
BBD,
BYR,
BZD,
XOF,
BMD,
BTN,
INR,
BOB,
BOV,
BAM,
BWP,
NOK,
BRL,
BND,
BGN,
BIF,
KHR,
XAF,
CAD,
CVE,
KYD,
CLF,
CLP,
CNY,
COP,
COU,
KMF,
CDF,
NZD,
CRC,
HRK,
CUC,
CUP,
ANG,
CZK,
DKK,
DJF,
DOP,
EGP,
SVC,
ERN,
ETB,
FKP,
FJD,
XPF,
GMD,
GEL,
GHS,
GIP,
GTQ,
GBP,
GNF,
GYD,
HTG,
HNL,
HKD,
HUF,
ISK,
IDR,
XDR,
IRR,
IQD,
ILS,
JMD,
JPY,
JOD,
KZT,
KES,
KPW,
KRW,
KWD,
KGS,
LAK,
LBP,
LSL,
ZAR,
LRD,
LYD,
CHF,
LTL,
MOP,
MKD,
MGA,
MWK,
MYR,
MVR,
MRO,
MUR,
XUA,
MXN,
MXV,
MDL,
MNT,
MAD,
MZN,
MMK,
NAD,
NPR,
NIO,
NGN,
OMR,
PKR,
PAB,
PGK,
PYG,
PEN,
PHP,
PLN,
QAR,
RON,
RUB,
RWF,
SHP,
WST,
STD,
SAR,
RSD,
SCR,
SLL,
SGD,
XSU,
SBD,
SOS,
SSP,
LKR,
SDG,
SRD,
SZL,
SEK,
CHE,
CHW,
SYP,
TWD,
TJS,
TZS,
THB,
TOP,
TTD,
TND,
TRY,
TMT,
UGX,
UAH,
AED,
USN,
UYI,
UYU,
UZS,
VUV,
VEF,
VND,
YER,
ZMW,
ZWL,
XBA,
XBB,
XBC,
XBD,
XTS,
XXX,
XAU,
XPD,
XPT,
XAG
amount
number<double>
operationType
enum<string>
Available options:
Charge,
PreAuth,
Capture,
Void,
Refund,
Tokenize,
Status
operationResultCode
enum<string>
Available options:
Success,
Accepted,
Rejected,
TemporaryFailure,
FatalFailure,
NotImplemented
operationResultDescription
string | null
customGatewayResponse
unknown
gatewayName
string | null
gatewayReference
string | null
gatewayResultCode
string | null
gatewayResultDescription
string | null
gatewayResultSubCode
string | null
gatewayResultSubDescription
string | null
gatewayToken
unknown