2. Payment Based

Confirm Payment Based Payment

POST {{PaymentBaseAddress}}/api/paywall/marketplace/approve/payment

Important: In order to use the payment service, you need to send the 'apikeypublic' and 'apiclientpublic' parameters in the 'Header' section. PaymentAPI Address

ParameterTypeMandatoryDescription

apikeypublic

string

Yes

The Public Key you obtained from the merchant panel.

apiclientpublic

string

Yes

The Public Client you obtained from the merchant panel.

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

ParameterTypeMandatoryDescription

PaymentId

int

Yes

The Payment should use the Id information on the PayWall side.

Sample to be sent to the service JSON and sample codes is as follows.

{
    "PaymentId": 1644501
}

The response returned from the service:

ParameterTypeDescription

ErrorCode

int

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

Result

bool

It returns either true or false. If the transaction is successful, it returns 'true'.

Message

string

If the transaction is unsuccessful, this is the specified error message, providing language support based on the locale parameter.

Body

nesne

Transaction details

Sample response for success

{
    "ErrorCode": 0,
    "Result": true,
    "Message": "",
    "Body": {
        "Success": [
            {
                "ProductId": 1626132
            },
            {
                "ProductId": 1626133
            },
            {
                "ProductId": 1626134
            },
            {
                "ProductId": 1626135
            },
            {
                "ProductId": 1626136
            }
        ],
        "Fail": []
    }
}

Sample response for failure

{
    "ErrorCode": 1,
    "Result": false,
    "Message": "",
    "Body": {
        "Success": [],
        "Fail": [
            {
                "ProductId": 1626132,
                "Reason": "This product already approved"
            },
            {
                "ProductId": 1626133,
                "Reason": "This product already approved"
            },
            {
                "ProductId": 1626134,
                "Reason": "This product already approved"
            },
            {
                "ProductId": 1626135,
                "Reason": "This product already approved"
            },
            {
                "ProductId": 1626136,
                "Reason": "This product already approved"
            }
        ]
    }
}

Last updated