1. Product-Based
Confirm Payment Based on Product
POST
{{Base Adres}}/api/paywall/marketplace/reject/product
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:
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.
The example JSON and sample codes to be sent to the service are as follows:
{
"ProductIds": [
1626240,
1626241,
1626242,
1626143,
1626144,
1626145,
1626146
]
}
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
Example response for a successful operation
{
"ErrorCode": 0,
"Result": true,
"Message": "",
"Body": {
"Success": [
{
"ProductId": 1626240
},
{
"ProductId": 1626241
},
{
"ProductId": 1626242
},
{
"ProductId": 1626243
},
{
"ProductId": 1626244
},
{
"ProductId": 1626245
},
{
"ProductId": 1626246
}
],
"Fail": []
}
}
Example response for a failed operation
{
"ErrorCode": 1,
"Result": false,
"Message": "",
"Body": {
"Success": [],
"Fail": [
{
"ProductId": 1626240,
"Reason": "This product marketplace earning calculated not found"
},
{
"ProductId": 1626241,
"Reason": "This product marketplace earning calculated not found"
},
{
"ProductId": 1626242,
"Reason": "This product marketplace earning calculated not found"
},
{
"ProductId": 1626243,
"Reason": "This product marketplace earning calculated not found"
},
{
"ProductId": 1626244,
"Reason": "This product marketplace earning calculated not found"
},
{
"ProductId": 1626245,
"Reason": "This product marketplace earning calculated not found"
},
{
"ProductId": 1626246,
"Reason": "This product marketplace earning calculated not found"
}
]
}
}
Last updated