A webhook sends an HTTP GET or POST request to a URL when a Cart trigger runs. Use it to run actions in third-party platforms and other external APIs that accept webhook requests.
This integration is available in PublishPress Cart Free and Pro.
Before you start #
You need:
- PublishPress Cart Free or Pro installed and active.
- The URL that receives the request, from the platform or API you send data to.
- A product in Cart. Create one under Cart → Products.
Add a webhook to a product #
- Go to Cart → Products and open the product.
- Open the Integrations tab.
- Click Add New.
- In Service, choose Webhook.
- In Trigger, choose the event that runs the webhook.
- In Method, choose GET or POST.
- In Webhook URL, enter the URL that receives the request.
- Optional: turn on Include headers, then enter each header on its own line in Headers.
- Optional: in Field map, map order information to your own keys. See the field map section below.
- Click Publish or Update.
The webhook settings on a product look like this:

Field map and Headers are both optional. If they are empty, Cart sends all available order information in the body, with the header Content-Type: application/json; charset=utf-8.
Use variables with the GET method #
With GET, add variables to the Webhook URL. See the Personalization Fields article for the list of variables you can use.
Check the POST parameters #
With POST, Cart includes these parameters in the request:
| Variable name | Description |
|---|---|
bump_amount | (decimal) Order bump amount |
bump_id | (integer) Bump product ID |
bump_name | (string) Bump product name |
coupon | (string) Coupon code used at checkout |
currency | (string) Uppercase, 3-character currency code, such as USD or GBP |
customer_country | (string) Customer country |
customer_email | (string) Customer’s email address |
customer_firstname | (string) Customer’s first name |
customer_lastname | (string) Customer’s last name |
customer_name | (string) Customer’s full name |
customer_phone | (string) Customer’s phone number |
order_id | (integer) Order ID |
order_amount | (decimal) Total order amount |
order_status | (string) Order status |
order_url | (string) The page the order was placed on |
payment_plan | (string) The name of the selected payment plan |
product_id | (string) The main product’s ID |
product_name | (string) The main product’s name |
studiocart_secret | (string) The secret is the same as the API Key found under Cart → Settings. See the next section. |
total order excluding VAT | (string) Pre-tax amount |
VAT amount charged | (string) Tax amount |
VAT number | (string) VAT number |
VAT percentage charged | (string) Tax rate |
website_url | (string) The website URL |
XXXXXX | (string) Custom field information. Replace XXXXXX with the ID of your custom field. |
"XXX" | (string) Static value wrapped in double quotes. Replace XXX with the string you want to send to the webhook. |
Verify the request with your API key #
The studiocart_secret value is the same as the API Key in Cart → Settings. On the platform that receives the data, check that this value matches your API Key. This makes sure nobody else can post data to your URL.
Map order data to your own keys #
Use Field map to map order information to custom keys. You can use any variable from the table above. For custom fields and static values, also use:
| Variable name | Description |
|---|---|
XXXXXX | (string) Custom field information. Replace XXXXXX with the ID of your custom field. |
"XXX" | (string) Static value wrapped in double quotes. Replace XXX with the string you want to send to the webhook. |
- In Field map, enter the field key, a colon, then the matching Cart variable.
- Put one pair on each line.
For example:
NAME : customer_name
TEST_FIELD : "static value"