Check whether a promo code works
check_codeTests one promo code against a store's real cart right now, without buying anything, and says whether the store accepts it and how much it takes off. Use it for a code the shopper found somewhere else (a video, an email, a coupon site) before they rely on it. Pass the product page URL to test on that exact product. Works on Shopify stores; for other stores it answers could_not_check.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"url": "<url>",
"code": "<code>"
},
"name": "check_code"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | Product page URL or store domain, e.g. "https://ridge.com/products/wallet" or "ridge.com". A product URL lets codes be checked on that exact product. | |
| code | Yes | The promo code as written, e.g. "SAVE10" |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | No | ||
| next | No | Suggested next calls. | |
| error | No | ||
| saved | No | ||
| store | No | ||
| reason | No | ||
| status | No | "did_not_apply": the cart rejected it on the tested product; it may still work on other products or above a minimum spend | |
| summary | Yes | ||
| currency | No | ||
| offer_id | No | ||
| tested_on | No | ||
| cart_total | No |