Documentation
Product Details API
API Description
Product Details API allows to pull name, type, price and other fields of a product that is stored in Paymentwall Merchant Area > Products Section. Merchant can pass the product SKU ID and pull the details.
This API can be activated for your Paymentwall Merchant Account by request. To activate it please email us at devsupport@paymentwall.com.
API Endpoint
https://api.paymentwall.com/api/rest/product/
Request Method
GET
Request Parameters
parameter | required | description |
---|---|---|
key | yes | Project key |
ag_external_id | yes | Merchant's product SKU ID |
country_code | no | Country code in ISO 3166-1 alpha-2 format. By default determines country code by user IP |
callback | no | JSONP callback function |
sign_version | no | Signature version |
sign | no | Request signature |
Request Sample 1
https://api.paymentwall.com/api/rest/product?key=[PROJECT_KEY]&ag_external_id=product_100244&sign_version=2&sign=[SIGNATURE]
Response Sample 1
{
"object":"product",
"id":"product_100244",
"name":"Premium Access",
"amount":"9.99",
"currency":"USD",
"period_length":"1", // visible only if product type is subscription
"period_type":"week", // visible only if product type is subscription
"recurring":"1", // visible only if product type is subscription
"trial":"1", // visible only if product type is subscription
"post_trial_product_id":"product_100245" // visible only if product type is subscription and subscription is in trial mode
}
Request Sample 2
https://api.paymentwall.com/api/rest/product?key=[PROJECT_KEY]&ag_external_id=product_100244&country_code=US&callback=productDetailsHandler
Response Sample 2
productDetailsHandler({
"object":"product",
"id":"product_100244",
... // all other fields similar to Response Sample 1
});
Request Sample 3
https://api.paymentwall.com/api/rest/product?key=[PROJECT_KEY]&ag_external_id=product_100241&callback=productDetailsHandler
Response Sample 3
productDetailsHandler([]); // product is not found