1. Payment ID

The Cancellation & Refund service provides both cancellation and refund operations simultaneously.

Cancellation & Refund

POST {{Private Base Address}}/api/paywall/private/revert/by/paymentid

It is sufficient to send a request to the address provided above. You can use the "Base Address" as needed for both the test and live environments.

Important: In order to use the Cancellation & Refund with Payment ID service, you must send the 'apikeyprivate' and 'apiclientprivate' parameters in the Header field. PaymentPrivateAPI Address

Parameter
Type
Compulsory
Description

apikeyprivate

string

Yes

The Private Key obtained from the merchant panel.

apiclientprivate

string

Yes

The Private Client obtained from the merchant panel.

The parameters to be sent to the service are as follows:

Parameter
Type
Compulsory
Description

PaymentId

int

Yes

In the API response returned by Paywall after the payment initiation, the corresponding PaymentId of the transaction in Paywall is included. This information should be stored on your side.

Amount

decimal

No

If the Amount parameter is sent as 0, the transaction will be processed based on the full amount. If the Amount value differs from the existing transaction amount, it will be processed as a partial refund.

MarketPlace:DeleteExistingRecords

bool

No

Within the scope of the marketplace, if the earnings approval for the relevant payment is granted, this parameter must be sent as true. When sent as true, existing earnings will be deleted after the cancellation request is successfully completed.

{
    "PaymentId": 9474444843, // Ödeme sonucunda Paywall'dan dönmektedir
    "Amount": 0,
    "MarketPlace": { // nullable
        "DeleteExistingRecords": false
    }
}

Response returned from the service:

Parameter
Type
Description

ErrorCode

int

Error code. Returns “0” if the operation is successful.

Result

bool

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

Message

string

If the operation fails, this is the message describing the error; it provides language support based on the locale parameter.

Last updated