2. Cancel

You can use this service to send an async cancel request to your terminals.

POST {{Base Address}}/api/payment/async/cancel

It will be sufficient to send a request to the address provided above. You can use the 'Base Address' as you wish for both the Test environment and the Production environment.

Important: To use the Async Cancel service, you must send the 'apikeyprivate' and 'apiclientprivate' parameters in the 'Header' field. PhysicalAPI Address

The header information that needs to be sent to the service is as follows:

Parameter
Type
Compulsory
Description

apikeyprivate

string

Yes

The Private Key obtained from your merchant panel.

apiclientprivate

string

Yes

The Private Client obtained from your merchant panel.

The body information that needs to be sent to the service is as follows:

{
    "PaymentRequestId": "7cc7c8e8-9d92-41b6-9378-e9ecef5a7812"
}
Parameter
Type
Compulsory
Description
PaymentRequestId

Guid

Yes

It is the identity information returned from Paywall at the time of the sales order.

Response returned from the service:

Parameter
Type
Description

Result

object

Returns the details in the service response.

ErrorCode

int

Error code. If the transaction is successful, it returns a value of '0'.

Succeeded

bool

It returns a value of true or false. If the transaction is successful, it returns a value of 'true'.

Failed

bool

It returns a value of true or false. If the transaction is unsuccessful, it returns a value of 'true'.

Message

string

If the transaction is faulty, this is the error message provided, and it offers language support according to the locale parameter.

ClientMessage

string

It returns the fixed values of the Paywall error codes. You can perform mapping.

{
    "result": {
        "paymentRequestId": "72ec8714-d116-4306-8881-38a43c485da9",
        "paymentRequestActivityId": "3a7deace-d437-4d3f-8ef8-1cba82f18e8f",
        "paymentRequestActivityTypeId": 2,
        "paymentStatus": 4
    },
    "failed": false,
    "message": null,
    "clientMessage": null,
    "succeeded": true
}
Parameter
Type
Description
PaymentRequestId

Guid

It is the identity information of the Async payment in Paywall. It should be stored.

PaymentRequestActivityId

Guid

It is the identity information of the last transaction of the Async payment.

PaymentRequestActivityTypeId

int

The type of the last transaction of the Async payment.

Bkz: Payment Type

PaymentStatus

int

The final status of the async payment.

Bkz: Ödeme Durumu

Last updated