1. Product Based

Confirm Product Based Payment

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

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

ProductIds

List<int>

yes

During the payment process, the Id information related to the product(s) sent should be used in the PayWall system. The relevant Id is returned within the response of the product.

If you are unable to store these Id information on your end, you can use the 'Payment-Based' confirmation method.

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

{
    "ProductIds": [
        1626127,
        1626128,
        1626129,
        1626130,
        1626131
    ]
}

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 a true or false value. If the transaction is successful, it returns 'true'.

Message

string

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

Body

nesne

Transaction details

Sample response for success

{
    "ErrorCode": 0,
    "Result": true,
    "Message": "",
    "Body": {
        "Success": [
            {
                "ProductId": 1626127
            },
            {
                "ProductId": 1626128
            },
            {
                "ProductId": 1626129
            },
            {
                "ProductId": 1626130
            },
            {
                "ProductId": 1626131
            }
        ],
        "Fail": []
    }
}

Sample response for failure

{
    "ErrorCode": 1,
    "Result": false,
    "Message": "",
    "Body": {
        "Success": [],
        "Fail": [
            {
                "ProductId": 1626127,
                "Reason": "This product already approved"
            },
            {
                "ProductId": 1626128,
                "Reason": "This product already approved"
            },
            {
                "ProductId": 1626129,
                "Reason": "This product already approved"
            },
            {
                "ProductId": 1626130,
                "Reason": "This product already approved"
            },
            {
                "ProductId": 1626131,
                "Reason": "This product already approved"
            }
        ]
    }
}

Last updated