1. Product-Based

Confirm Payment Based on Product

POST {{Base Adres}}/api/paywall/marketplace/approve/self/product

Important: To use the Payment service, you must include the apikeypublic and apiclientpublic parameters in the Header section. PaymentAPI Address

Parameter
Type
Compolsory
Description

apikeypublic

string

Yes

Public Key obtained from the merchant panel.

apiclientpublic

string

Yes

Public Client obtained from the merchant panel.

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

Parameter
Type
Compolsory
Description

PaymentId

int

Yes

The payment's ID information on the Paywall side should be used.

ProductIds

List<int>

Yes

The ID information of the product(s) sent during the payment must be used in the Paywall system. This ID is returned in the response related to the product.

If you cannot store these ID details on your side, you can use the "Payment-Based" confirmation method.

Payout

PayoutModel

No

Settings that can be configured at the time of earnings distribution related to the payment are included under this parameter. For example, a special note can be added to the payment receipt at the time of the money transfer.

You can review the following JSON to see the values it accepts.

The example JSON and sample codes to be sent to the service are as follows:

{
    "PaymentId": 1784197,
    "ProductIds": [
        1626127,
        1626128,
        1626129,
        1626130,
        1626131
    ],
    "Payout": {
        "DescriptionApply": true,
        "Description": "Ödemeye özel para transferi açıklaması"
    }
}

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, and it supports localization based on the locale parameter.

Body

object

Detailed information about the transaction

{
    "ErrorCode": 0,
    "Result": true,
    "Message": "",
    "Body": {
        "Success": [
            {
                "ProductId": 1626127
            },
            {
                "ProductId": 1626128
            },
            {
                "ProductId": 1626129
            },
            {
                "ProductId": 1626130
            },
            {
                "ProductId": 1626131
            }
        ],
        "Fail": []
    }
}
{
    "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