2. Decrease Earnings

You can decrease the `MemberEarning` value you defined for the product after payment (before confirmation) using this method.

Product - Decrease Merchant Earnings

PUT {{Base Adres}}/api/paywall/product/member/earning/decrease

Important: To use the Product - Decrease Merchant Earnings service, you must include the apikeyprivate and apiclientprivate parameters in the Header section. PaymentAPI Address

Parameter
Type
Compolsory
Description

apikeyprivate

string

Yes

Private Key obtained from the merchant panel.

apiclientprivate

string

Yes

Private Client obtained from the merchant panel.

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

Parameter
Type
Compolsory
Description

PaymentId

int

Yes

Product's payment ID information

ProductId

int

Yes

Product ID information

Earning

decimal

Yes

Amount of earnings to be decreased

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

{
    "PaymentId": 1784175,
    "ProductId": 2216103,
    "Earning": 10
}

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": null
}

Last updated