Refund Transaction

Description

The refundTransaction endpoint submits a refund transaction for a payment whose funds have been captured to a payment gateway.

Request

Endpoint

/ui/v1/refundTransaction

Method

POST
Content-Type: application/json
Authorization: Basic $TOKEN

Note

Replace $TOKEN in the request with the base64-encoded username/password combination in the format username:password.

Given a username of username and a password of password, the request header would appear as follows:

Content-Type: application/json
Authorization: Basic dXNlcm5hbWU6cGFzc3dvcmQ=

Request Body

{
    "transactionIds": [
        "221"
    ],
    "refundMethod": {
        "name": "ORIGINAL_PAYMENT_METHOD"
    },
    "refundMoney": {
        "amount": "5.00",
        "currency": {
            "currencyCode": "BRL"
        }
    },
    "refundStatus": {
        "name": "FULL"
    },
    "refundReason": "",
    "transactionCategory": {
        "name": "CARD_NOT_PRESENT"
    },
    "memo": "",
    "refundPaymentMethod": {
        "type": "creditcard",
        "paymentMethodType": "CREDIT_CARD",
        "cardNetworkName": "MASTERCARD",
        "refundMethod": {
            "name": "ORIGINAL_PAYMENT_METHOD"
        },
        "refundStatus": {
            "name": "FULL"
        },
        "voidStatus": {
            "name": "NONE"
        },
        "money": {
            "amount": "5.00",
            "currency": {
                "currencyCode": "BRL"
            }
        },
        "paymentGateway": {
            "name": "CIELO_ECOMMERCE"
        }
    }
}

Response

{
    "tiList": [
        {
            "id": 222,
            "originalOrderId": "1000000227",
            "pymtGtwyRefNumber": "170509",
            "authCode": "389059",
            "parentPymtGtwyRefNumber": "170509",
            "paymentGateway": {
                "value": "Cielo (E-commerce)",
                "name": "CIELO_ECOMMERCE"
            },
            "money": {
                "amount": 5.000,
                "currency": {
                    "id": 25,
                    "currencyCode": "BRL",
                    "currencyText": "Brazilian Real",
                    "currencySymbol": "R$",
                    "fractionalUnit": "Centavo",
                    "numOfDecimalPlaces": "2",
                    "supportedByVisaCheckout": true,
                    "createdDateTime": 1650902464000,
                    "isoNumericCode": "986",
                    "isoCountryCode": "076"
                }
            },
            "orderId": "1000000228",
            "splitPaymentsTxnSequence": "2",
            "encryptedPaymentMethod": null,
            "paymentMethodType": {
                "value": "Mastercard",
                "name": "MASTERCARD"
            },
            "encodedMetaData": null,
            "responseMsg": "Operation Successful",
            "responseCode": "0",
            "createdDateTime": 1677529282000,
            "lastUpdatedDateTime": null,
            "initiatedDateTime": 1677529282000,
            "transactionStatus": {
                "value": "Success",
                "name": "SUCCESS"
            },
            "channel": {
                "id": 4,
                "channelName": "Clubmed-Trancoso",
                "channelStatus": {
                    "value": "Active",
                    "name": "ACTIVE"
                },
                "channelType": {
                    "value": "External",
                    "name": "EXTERNAL"
                },
                "createdDateTime": 1672331082000,
                "merchantId": 3,
                "lockedDateTime": null,
                "lockedByUserId": null,
                "createdUserId": 1,
                "lastModifiedUserId": 27,
                "industryType": {
                    "value": "eCommerce",
                    "name": "ECOMMERCE"
                },
                "allowCashAsPaymentMethodInd": false,
                "allowMoneyOrderAsPaymentMethodInd": false,
                "allowPaperCheckAsPaymentMethodInd": false,
                "allowEStoreCreditAsPaymentMethodInd": false,
                "paymentMethods": [
                    {
                        "id": 166,
                        "paymentMethodType": {
                            "value": "Boleto Bancário",
                            "name": "BOLETO_BANCARIO"
                        },
                        "paymentGateway": {
                            "value": "Cielo (E-commerce)",
                            "name": "CIELO_ECOMMERCE"
                        },
                        "cardBrand": {
                            "value": "Boleto Bancário",
                            "name": "BOLETO_BANCARIO"
                        },
                        "cardId": null,
                        "createdUserId": 1,
                        "lastModifiedUserId": 27,
                        "createdDateTime": 1674568009000,
                        "lastUpdatedDateTime": null,
                        "position": 37
                    },
                    {
                        "id": 119,
                        "paymentMethodType": {
                            "value": "Voucher Card",
                            "name": "VOUCHER_CARD"
                        },
                        "paymentGateway": {
                            "value": "Cielo (E-commerce)",
                            "name": "CIELO_ECOMMERCE"
                        },
                        "cardBrand": {
                            "value": "Alelo",
                            "name": "ALELO"
                        },
                        "cardId": 1360,
                        "createdUserId": 1,
                        "lastModifiedUserId": 27,
                        "createdDateTime": 1672331083000,
                        "lastUpdatedDateTime": null,
                        "position": 24
                    },
                    {
                        "id": 113,
                        "paymentMethodType": {
                            "value": "Debit Card",
                            "name": "PIN_LESS_DEBIT_CARD"
                        },
                        "paymentGateway": {
                            "value": "Cielo (E-commerce)",
                            "name": "CIELO_ECOMMERCE"
                        },
                        "cardBrand": {
                            "value": "VISA Debit",
                            "name": "VISA_DEBIT"
                        },
                        "cardId": 1340,
                        "createdUserId": 1,
                        "lastModifiedUserId": 27,
                        "createdDateTime": 1672331083000,
                        "lastUpdatedDateTime": null,
                        "position": 18
                    },
                    {
                        "id": 105,
                        "paymentMethodType": {
                            "value": "3D Secure",
                            "name": "THREE_D_SECURE"
                        },
                        "paymentGateway": {
                            "value": "Cielo (E-commerce)",
                            "name": "CIELO_ECOMMERCE"
                        },
                        "cardBrand": {
                            "value": "VERIFIED by VISA",
                            "name": "VERIFIED_BY_VISA"
                        },
                        "cardId": 1320,
                        "createdUserId": 1,
                        "lastModifiedUserId": 27,
                        "createdDateTime": 1672331083000,
                        "lastUpdatedDateTime": null,
                        "position": 10
                    },
                    {
                        "id": 95,
                        "paymentMethodType": {
                            "value": "Credit Card",
                            "name": "CREDIT_CARD"
                        },
                        "paymentGateway": {
                            "value": "Cielo (E-commerce)",
                            "name": "CIELO_ECOMMERCE"
                        },
                        "cardBrand": {
                            "value": "VISA",
                            "name": "VISA"
                        },
                        "cardId": 1301,
                        "createdUserId": 1,
                        "lastModifiedUserId": 27,
                        "createdDateTime": 1672331083000,
                        "lastUpdatedDateTime": null,
                        "position": 0
                    }
                ],
                "allowDynamicRoutingCapabilityInd": false,
                "secondaryPaymentGateway": null,
                "tertiaryPaymentGateway": null,
                "userCount": null,
                "assignedPaymentMethods": null,
                "message": null,
                "paymentMethodsCount": null,
                "merchantName": null
            },
            "transactionType": {
                "value": "Refund",
                "name": "REFUND"
            },
            "batchStatus": {
                "value": "Processed",
                "name": "PROCESSED"
            },
            "lockedDateTime": null,
            "lockedByUserId": null,
            "createdUserId": 27,
            "lastModifiedUserId": null,
            "reconcileTransactionRefNumber": "",
            "paymentService2000Data": null,
            "batchID": null,
            "voidActionInd": false,
            "refundActionInd": false,
            "captureActionInd": false,
            "incrementalAuthActionInd": false,
            "reAuthActionInd": false,
            "paymentType": {
                "name": "SINGLE_PAYMENT"
            },
            "paymentCycle": null,
            "totalCapturedAmount": null,
            "totalRefundedAmount": null,
            "refundStatus": {
                "value": "Full",
                "name": "FULL"
            },
            "refundMethod": {
                "value": "Original Payment Method",
                "name": "ORIGINAL_PAYMENT_METHOD"
            },
            "totalVoidedAmount": null,
            "voidStatus": {
                "value": "None",
                "name": "NONE"
            },
            "incrementalAuthAmount": null,
            "reAuthAmount": null,
            "totalAuthAmount": null,
            "scheduledPaymentDateTime": null,
            "subscriptionId": "2df7afb9-e082-462b-a08e-440c21af1356",
            "transactionOwnerId": 27,
            "vcOrderId": null,
            "invoiceNumber": null,
            "customerNumber": null,
            "transactionCategory": {
                "value": "Card Not Present (CNP)",
                "name": "CARD_NOT_PRESENT"
            },
            "encryptedGeolocationInfo": null,
            "voidReason": null,
            "refundReason": "",
            "captureAmount": 5.000,
            "voidAmount": null,
            "posEntryMode": {
                "value": "Manual Entry - Wired (Current EMV)",
                "name": "MANUAL_ENTRY_WIRED"
            },
            "merchantId": 3,
            "memo": "",
            "partialAuthAmount": null,
            "retryTraceNumber": null,
            "lastFourDigitsOfAcctNum": null,
            "merchantNumber": "16a7aaff-2300-4a58-b4fc-83f83275ee32",
            "digitalSignature": null,
            "goodsAndServicesPurchaseType": null,
            "checkInDate": null,
            "checkOutDate": null,
            "bookingNumber": null,
            "groupName": null,
            "customerName": "John Smith",
            "merchantLocation": null,
            "customerId": null,
            "routingLevel": {
                "value": "Primary",
                "name": "PRIMARY"
            },
            "productCode": null,
            "convenienceFees": null,
            "acquirerTerminalId": "00000001",
            "transactionStatusInformation": null,
            "applicationIdentifier": null,
            "terminalVerificationResults": null,
            "issuerApplicationData": null,
            "cardholderVerificationMethodResults": null,
            "macKSN": null,
            "issuerAuthenticationData": null,
            "issuerScriptTemplate1": null,
            "issuerScriptTemplate2": null,
            "applicationLabel": null,
            "fiservIPGTransactionId": null,
            "transactionDetails": [],
            "posTerminalId": null,
            "qualifiedHealthcareAmount": null,
            "amountType": {
                "value": "Unknown",
                "code": "",
                "name": "UNKNOWN"
            },
            "avsResultCode": null,
            "cvvResultCode": null,
            "fiservLocalTransmissionDateTime": null,
            "numberOfInstallments": 0,
            "merchantCategoryCode": null,
            "membershipNumber": null,
            "field55EMVData": null,
            "captureMode": {
                "value": "Host Capture (HCS)",
                "name": "HOST_CAPTURE"
            },
            "eightDigitBIN": null,
            "binIssuingCountryCode": null,
            "cardNetworkTransactionId": null,
            "recurrenceEndDate": null,
            "electronicCommerceIndicator": null,
            "posTerminal": null,
            "returnURL": null,
            "cancelURL": null,
            "paymentRedirectURL": null,
            "cardType": null,
            "realex3DSecureVISAPit": "",
            "realex3DSecureURL": "",
            "realex3DSecurePaReq": "",
            "realex3DSecureEncodedMD": "",
            "realexRequestID": "",
            "createdUserName": null,
            "capturePymtGtwyRefNumber": null,
            "transactionOwnerUserName": null,
            "geolocation": null,
            "addProfileAsPartOfAuthRequest": false,
            "paymentAction": null,
            "merchantName": null,
            "productName": null,
            "strCheckInDate": null,
            "strCheckOutDate": null,
            "serialNumber": null,
            "textMessageType": null,
            "avsResponseStatus": null,
            "cvvResponseStatus": null,
            "profileSubscriptionId": null,
            "message": null,
            "ipaymentMethod": null,
            "ssoenabledInd": "",
            "transactionDetailMap": {},
            "qrcodeBase64Image": null,
            "qrcodeCopyURL": null,
            "qrcodeBase64ImageString": null,
            "IFDSerialNumber": null
        }
    ]
}

Updated As Of Version 5.8.0.3