2. Create Discoun
You can define discounts both during the payment process and afterward for your relevant products.
Define Product Discount
POST
{{PaymentBaseAddress}}/api/paywall/product/discount
Important: To use the Discount Definition service, you need to send the 'apikeyprivate' and 'apiclientprivate' parameters in the 'Header' section.
PaymentAPI Address
Parameter | Type | Mandatory | Description |
---|---|---|---|
apikeyprivate | string | Yes | The Private Key obtained from the merchant panel. |
apiclientprivate | string | Yes | The Private Client obtained from the merchant panel. |
The parameters that need to be sent to the service are as follows:
Parameter | Type | Mandatory | Description |
---|---|---|---|
ProductId | int | Yes | Product's Id (identity) information |
DiscountOwnerType | int | Yes | Discount holder's type See: DiscountOwnerType |
DiscountType | int | Yes | Discount type See: DiscountType |
DiscountValue | decimal | Yes | Discount value |
Example to be sent to the service JSON and example code as follows
The response returned from the service.
Parameter | Type | Description |
---|---|---|
ErrorCode | int | The error code. Returns '0' if the operation is successful. |
Result | bool | It returns true or false. Returns 'true' if the operation is successful. |
Message | string | If the operation is unsuccessful, this is the error message provided, offering language support based on the locale parameter. |
Body | nesne | Operation details. |
Last updated