3. Refund

You can use the service to process a refund for a payment made through APM.

Payment Refund Process

POST {{Base Adres}}/api/paywall/apm/refund

Important: To use the APM Payment Refund service, you need to include 'apikeypublic' and 'apiclientpublic' parameters in the 'Header' field.

PaymentAPI Address

The header parameters that need to be sent to the service are as follows:

Parameter (Headers)
Type
Compulsory
Description

apikeypublic

string

Yes

The Public Key obtained from the merchant panel.

apiclientpublic

string

Yes

The Public Client obtained from the merchant panel.

The parameters that need to be sent to the service in the (BODY) are as follows:

Parameter
Type
Compulsory
Description

UniqueCode

string

Yes

The UniqueCode parameter for the APM payment. It is included in the response returned by the API at the time of creation.

The parameters returned from the service are as follows:

Parameter
Type
Description

ErrorCode

int

Error code. Returns a value of '0' if the operation is successful.

Result

bool

Returns a value of true or false. Returns true if the operation is successful.

Message

string

If the operation fails, this message specifies the error and provides language support according to the locale parameter.

Body

object

If the operation fails, this is the detailed object regarding the error.

{
    "ErrorCode": 0,
    "Result": true,
    "Message": "",
    "Body": {
        "ApmKey": "FoodCardProvider",
        "ApmConnectionId": 19,
        "ApmTransactionId": 4292,
        "UniqueCode": "cda31a20-5089-40c6-9fb*********",
        "MerchantUniqueCode": "A1s2d3F774G5H6J7K8L9",
        "Amount": 1.00,
        "ProviderDummyResponse": {
            "ErrorCode": 0,
            "Body": {
                "ResponseCode": 0,
                "ResponseMessage": "İptal işlemi başarılı bir şekilde gerçekleştirilmiştir.",
                "MerchantCode": "*********",
                "TerminalCode": "*********",
                "SaleRefCode": "cda31a20-5089-40c6*********",
                "TransactionId": 111111111111,
                "ReturnType": 1
            },
            "HttpCode": 200
        }
    }
}

Last updated