2. Define Shipping Cost
Just as you can provide the shipping cost during payment, if you learn the shipping cost from the shipping provider after X days, you can send the related cost to Paywall through this service.
Define Product Shipping Cost
POST
{{Base Adres}}/api/paywall/product/cargocost
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:
ProductId
int
Yes
Product ID information
CargoOwnerType
int
Yes
The party responsible for covering the shipping cost. Must be set carefully. The shipping cost is deducted from the earnings of the respective party. See: CargoOwnerType
CargoCost
decimal
Yes
Shipping cost
The example JSON and sample codes to be sent to the service are as follows:
{
"ProductId": 2113995,
"CargoOwnerType": 1,
"CargoCost": 120
}
Response returned from the service:
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": {
"Id": 466721,
"CurrencyId": 1,
"CargoOwnerType": 1,
"CargoCost": 120.00
}
}
Last updated