Skip to content

REFUND

REFUND processes a refund for a transaction that has been previously captured. The capture may be either full or partial.

Successful requests will be indicated with a 2xx HTTP response code and the Approved attribute set to 'true'.

NOTE

It is possible to receive an HTTP 2xx response code indicating that the request was successfully received, understood, and processed at the HTTP protocol level, but still have the Approved attribute set to false. (A 2xx response code with an Approved attribute set to false means the server successfully handled the request itself; however the actual business or application logic determined that the request was not approved).

Available Functions

Perform a 'refund' transaction

POST, /v0/transaction/refund

REQUEST Object Attributes

View REQUEST Object Attributes
refundTable
AttributeData TypeDescriptionRequired
Amountobject

Amount Object

True
Totaldecimal

Total Transaction Amount


Total is aKey/Value of the "Amount" Object View object structure example

True
Currencystring

ISO 3-letter currency code


Currency is aKey/Value of the "Amount" Object View object structure example

True
TransactionIDksuid

Transaction ID from the Capture Response

False
PaymentMethodobject

Transaction Payment Method

True
Cardobject

Card info


Card is aKey/Value of the "PaymentMethod" Object View object structure example

True
CardPresentboolean

Indicates if this card is present


CardPresent is aKey/Value of the "PaymentMethod" "Card" Object View object structure example

True
CVCobject

Card Verification Value

(AKA CVV2)


CVC is aKey/Value of the "PaymentMethod" "Card" Object View object structure example

False
CVCstring

Card Verification Value

(AKA CVV2)


CVC is aKey/Value of the "PaymentMethod" "Card" "CVC" Object View object structure example

False
PANobject

Personal Account Number Info


PAN is aKey/Value of the "PaymentMethod" "Card" Object View object structure example

True
PANstring

Personal Account Number


PAN is aKey/Value of the "PaymentMethod" "Card" "PAN" Object View object structure example

True
ExpMonthstring

Account Expiration Month

(MM)


ExpMonth is aKey/Value of the "PaymentMethod" "Card" "PAN" Object View object structure example

True
ExpYearstring

Account Expiration Year

(YY)


ExpYear is aKey/Value of the "PaymentMethod" "Card" "PAN" Object View object structure example

True
Track2object

Track 2 Data


Track2 is aKey/Value of the "PaymentMethod" "Card" Object View object structure example

False
Track2string

Track 2 string

("Start" and "End" sentinels required)


Track2 is aKey/Value of the "PaymentMethod" "Card" "Track2" Object View object structure example

False
PINobject

PIN


PIN is aKey/Value of the "PaymentMethod" "Card" Object View object structure example

False
Datastring

PIN Data


Data is aKey/Value of the "PaymentMethod" "Card" "PIN" Object View object structure example

False
KSNstring

Key Serial Number


KSN is aKey/Value of the "PaymentMethod" "Card" "PIN" Object View object structure example

False
BillingAddressobject

Customer billing address


BillingAddress is aKey/Value of the "PaymentMethod" "Card" Object View object structure example

False
Namestring

Customer name

(Full Name)


Name is aKey/Value of the "PaymentMethod" "Card" "BillingAddress" Object View object structure example

False
Line1string

Customer address line 1


Line1 is aKey/Value of the "PaymentMethod" "Card" "BillingAddress" Object View object structure example

False
Line2string

Customer address line 2


Line2 is aKey/Value of the "PaymentMethod" "Card" "BillingAddress" Object View object structure example

False
Citystring

Customer city


City is aKey/Value of the "PaymentMethod" "Card" "BillingAddress" Object View object structure example

False
Statestring

Customer state


State is aKey/Value of the "PaymentMethod" "Card" "BillingAddress" Object View object structure example

False
PostalCodestring

Customer postal code

(AKA Zip Code)


PostalCode is aKey/Value of the "PaymentMethod" "Card" "BillingAddress" Object View object structure example

False
Countrystring

Customer country


Country is aKey/Value of the "PaymentMethod" "Card" "BillingAddress" Object View object structure example

False
Phonestring

Customer Phone Number


Phone is aKey/Value of the "PaymentMethod" "Card" "BillingAddress" Object View object structure example

False
Emailstring

Customer Email


Email is aKey/Value of the "PaymentMethod" "Card" "BillingAddress" Object View object structure example

False
ICCobject

See Attributes in Integrated Circuit Card Data Section


ICC is aKey/Value of the "PaymentMethod" "Card" Object View object structure example

False
3DSecureobject

3D Secure Result data for verification of card transactions


3DSecure is aKey/Value of the "PaymentMethod" "Card" Object View object structure example

False
AuthenticationValuestring

Authentication value from 3D Secure results


Authentication Value is aKey/Value of the "PaymentMethod" "Card" "3DSecure" Object View object structure example

False
ECommerceIndicatorstring

ECommerce indicator (ECI) from 3D Secure results


ECommerceIndicator is aKey/Value of the "PaymentMethod" "Card" "3DSecure" Object View object structure example

False
3DSecureTransactionIDstring

3D Secure Transaction ID from 3D Secure results


3DSecureTransactionID is aKey/Value of the "PaymentMethod" "Card" "3DSecure" Object View object structure example

False
Tokenobject

Indicates the Token ID as the payment method


Token is aKey/Value of the "PaymentMethod" Object View object structure example

False
TokenIDksuid

Token ID


TokenID is aKey/Value of the "PaymentMethod" "Token" Object View object structure example

False
DataActionstring

Data Action

False
Attributesobject

Transaction attributes

False
EntryModeobject

Description of the card entry mode


EntryMode is aKey/Value of the "Attributes" Object View object structure example

False
ProcessingSpecifiersobject

Description of the specific data used for processing the transaction.


ProcessingSpecifiers is aKey/Value of the "Attributes" Object View object structure example

False
Recurringobject

See Recurring Section

(Use with Recurring Payment, Standing Payment, Unscheduled Payment requests)

False
Detailobject

Transaction Details

False
MerchantDataobject

Merchant Defined Transaction Data

(supports 1 or more Merchant Defined Keys)


MerchantData is aKey/Value of the "Detail" Object View object structure example

False
MerchantDefinedKey1string

Merchant - defined transaction data

(field 1)


MerchantDefinedKey1 is aKey/Value of the "Detail" "MerchantData" Object View object structure example

False
MerchantDefinedKey2string

Merchant - defined transaction data

(field 2)


MerchantDefinedKey2 is aKey/Value of the "Detail" "MerchantData" Object View object structure example

False
Orderobject

Order data details for purchase

(Standard Data and Corporate Data)


Order is aKey/Value of the "Detail" Object View object structure example

False
Itemobject array

Item data details for purchase

(Standard Data and Corporate Data)


Item is aKey/Value of the "Detail" Object View object structure example

False
ShipToobject

ShipTo receiver data

(Standard Data and Corporate Data)


ShipTo is aKey/Value of the "Detail" Object View object structure example

False
ShipFromobject

ShipFrom sender data

(Standard Data and Corporate Data)


ShipFrom is aKey/Value of the "Detail" Object View object structure example

False
Shipmentobject array

Shipment details in Detail Shipment Data Section

(Standard Data and Corporate Data)


Shipment is aKey/Value of the "Detail" Object View object structure example

False
TransactionEntryobject

See Transaction Entry Section

(Information about transaction entry)

False

REQUEST Example: eCommerce

Code Sample using CURL
sh
URL=https://api.qa.paynetworx.net/v0/transaction/refund
HTTPAUTHTOKEN=1fHfjpw86udrDQHRMKabypEmhY4:1fHfkJrOs7iVBnC07HDxCPZuPsK
curl -sS --user $HTTPAUTHTOKEN -H 'Content-Type: application/json' -H "Request-ID: $(ksuid)" $URL -d '
{
    "Amount": {
        "Total": 5.50,
        "Currency": "USD"
    },
    "TransactionID": "1XSnl0X7GC44qPT2CVV8BCz0bQi",
    "Detail": {
        "MerchantData": {
            "CustomerID": "991111"
        }
    }
}'

REQUEST Example: Retail (magnetic stripe with PIN)

Code Sample using CURL
sh
URL=https://api.qa.paynetworx.net/v0/transaction/refund
HTTPAUTHTOKEN=1fHfjpw86udrDQHRMKabypEmhY4:1fHfkJrOs7iVBnC07HDxCPZuPsK
curl -sS --user $HTTPAUTHTOKEN -H 'Content-Type: application/json' -H "Request-ID: $(ksuid)" $URL -d '
{
    "Amount": {
        "Total": 5.50,
        "Currency": "USD"
    },
    "PaymentMethod": {
        "Card": {
            "Track2": {
                "Track2": ";5204****2784=2512901?"
            },
            "PIN": {
                "Data": "6AAEAEB42F24D677",
                "KSN": "FFFF9876543210E00002"
            }
        }
    },
    "Attributes": {
        "EntryMode": "magstripe",
        "ProcessingSpecifiers": {
            "InitiatedByPOS": true,
            "DebitDirect": true
        }
    },
    "TransactionEntry": {
        "Device": "Ingenico Move/5000",
        "DeviceVersion": "0.0",
        "Application": "EXAMPLE POS App",
        "ApplicationVersion": "0.0",
        "Timestamp": "2021-02-02T14:06:18"
    },
    "Detail": {
        "MerchantData": {
            "CustomerID": "991111"
        }
    }
}'

REQUEST Example: Retail (magnetic stripe without PIN)

Code Sample using CURL
sh
URL=https://api.qa.paynetworx.net/v0/transaction/refund
HTTPAUTHTOKEN=1fHfjpw86udrDQHRMKabypEmhY4:1fHfkJrOs7iVBnC07HDxCPZuPsK
curl -sS --user $HTTPAUTHTOKEN -H 'Content-Type: application/json' -H "Request-ID: $(ksuid)" $URL -d '
{
    "Amount": {
        "Total": 5.50,
        "Currency": "USD"
    },
    "PaymentMethod": {
        "Card": {
            "Track2": {
                "Track2": ";5204****2784=2512901?"
            }
        }
    },
    "Attributes": {
        "EntryMode": "magstripe",
        "ProcessingSpecifiers": {
            "InitiatedByPOS": true
        }
    },
    "TransactionEntry": {
        "Device": "Ingenico Move/5000",
        "DeviceVersion": "0.0",
        "Application": "EXAMPLE POS App",
        "ApplicationVersion": "0.0",
        "Timestamp": "2021-02-02T14:06:18"
    },
    "Detail": {
        "MerchantData": {
            "CustomerID": "991111"
        }
    }
}'

REQUEST Example: Restaurant (EMV)

Code Sample using CURL
sh
URL=https://api.qa.paynetworx.net/v0/transaction/refund
HTTPAUTHTOKEN=1fHfjpw86udrDQHRMKabypEmhY4:1fHfkJrOs7iVBnC07HDxCPZuPsK
curl -sS --user $HTTPAUTHTOKEN -H 'Content-Type: application/json' -H "Request-ID: $(ksuid)" $URL -d '
{
    "Amount": {
        "Total": 5.50,
        "Currency": "USD"
    },
    "PaymentMethod": {
        "Card": {
            "Track2": {
                "Track2": ";4005520000000129=221220118358262?"
            },
            "ICC": {
                "CardSequenceNumber": "000",
                "TerminalCapabilities": "000000",
                "TerminalVerificationResults": "8000010000",
                "UnpredictableNumber": "9BADBCAB",
                "IssuerApplicationData": "0F400102030405060708090A0B0C0D0E",
                "ApplicationCryptogram": "30148FDAF37B80AD",
                "ApplicationTransactionCounter": "00FF",
                "ApplicationInterchangeProfile": "0000",
                "TransactionType": "00",
                "TerminalCountryCode": "0826",
                "TransactionDate": "010101",
                "AmountAuthorized": "000000012300",
                "TransactionCurrencyCode": "0826",
                "AmountOther": "000000000000",
                "FormFactorIndicator": "00000001"
            }
        }
    },
    "Attributes": {
        "EntryMode": "contactless-chip",
        "ProcessingSpecifiers": {
            "InitiatedByPOS": true
        }
    },
    "TransactionEntry": {
        "Device": "Ingenico Move/5000",
        "DeviceVersion": "0.0",
        "Application": "EXAMPLE POS App",
        "ApplicationVersion": "0.0",
        "Timestamp": "2021-02-02T14:06:18"
    }
}'

RESPONSE Object Attributes

View RESPONSE Object Attributes
defaultResponseTable
AttributeData TypeDescription
TransactionIDksuid

Unique transaction lifetime system ID

EventIDksuid

Unique transaction event system ID

RequestIDksuid

Unique transaction request system ID

Approvedboolean

Request approval indicator

Tokenobject

Request approval indicator

TokenIDksuid

Token ID


TokenID is aKey/Value of the "Token" Object View object structure example

TokenNamestring

Unique Name of the Token Used


TokenName is aKey/Value of the "Token" Object View object structure example

RESPONSE Example

JSON Response Object
json
{
  "TransactionID": "1XSnl0X7GC44qPT2CVV8BCz0bQi",
  "EventID": "1XSnvq7J5ggxZg70sWuRg4kEBcu",
  "RequestID": "1XSnzEjZ4IBh5Nj0OEVPTWpwYo8",
  "Approved": true
}