less than a minute read • Updated 20 hours ago
Webhook payload reference
Example JSON payloads for transaction, subscription, customer, and transaction log webhooks.
The JSON payload follows the same structure as the Hypermedia API. Most objects include the API’s _links array, containing URIs you can use to access the specific resource in the API if you’re also using it — these can be safely ignored otherwise.
Webhook payloads always reflect the current state of the resource at the time they’re sent. If a webhook is resent, it reflects the current state of the resource, not the state at the original send time.
In the examples below, _links arrays have been cleared out to save space, and each assumes the default API filter query string for that resource (see API filter query string reference).
Transaction
{
"_links": { },
"_embedded": {
"fx:customer": {
"_links": { },
"_embedded": {
"fx:attributes": [
{
"_links": { },
"name": "Loyalty Points",
"value": "100",
"visibility": "private",
"date_created": "2020-09-18T08:39:22-0700",
"date_modified": "2020-09-18T08:39:22-0700"
}
]
},
"id": 12345678,
"last_login_date": "2022-07-29T04:10:03-0700",
"first_name": "John",
"last_name": "Person",
"email": "john@example.com",
"tax_id": "",
"password_salt": "",
"password_hash": "$P$Bfo4kbFOqal4gqR9RcE/xg2lK75zK1",
"password_hash_type": "phpass",
"password_hash_config": "8",
"forgot_password": "",
"forgot_password_timestamp": null,
"is_anonymous": false,
"date_created": null,
"date_modified": "2022-08-01T08:58:15-0700"
},
"fx:payments": [
{
"_links": { },
"type": "plastic",
"gateway_type": "authorize",
"processor_response": "Authorize.net Transaction ID:123456789",
"processor_response_details": "a:1:{s:20:\"transactionReference\";s:11:\"123456789\";}",
"purchase_order": "",
"cc_number_masked": "xxxxxxxxx4242",
"cc_type": "Visa",
"cc_exp_month": "01",
"cc_exp_year": "2023",
"fraud_protection_score": 0,
"paypal_payer_id": "",
"third_party_id": "",
"amount": 29.99,
"date_created": "2022-08-01T08:58:16-0700",
"date_modified": "2022-08-01T08:58:16-0700"
}
],
"fx:items": [
{
"_links": { },
"_embedded": {
"fx:item_options": [
{
"_links": { },
"name": "size",
"value": "Large",
"price_mod": 0,
"weight_mod": 0,
"date_created": null,
"date_modified": null
},
{
"_links": { },
"name": "color",
"value": "Surprise Me",
"price_mod": 0,
"weight_mod": 0,
"date_created": null,
"date_modified": null
}
],
"fx:item_category": {
"_links": { },
"admin_email_template_uri": "",
"customer_email_template_uri": "",
"gift_recipient_email_template_uri": "https://api.foxycart.com/email_templates/12345",
"code": "DEFAULT",
"name": "Default for all products",
"item_delivery_type": "flat_rate",
"max_downloads_per_customer": 3,
"max_downloads_time_period": 24,
"default_weight": 1,
"default_weight_unit": "LBS",
"default_length_unit": "IN",
"shipping_flat_rate_type": "per_order",
"shipping_flat_rate": 5,
"handling_fee_type": "flat_percent_with_minimum",
"handling_fee": 1,
"handling_fee_minimum": 0,
"handling_fee_percentage": 10,
"customs_value": 0,
"discount_type": "",
"discount_name": "Gift Set",
"discount_details": "single|3-9.98|5-19.96",
"send_customer_email": false,
"send_admin_email": false,
"admin_email": "",
"date_created": null,
"date_modified": "2022-07-28T01:44:56-0700"
}
},
"item_category_uri": "https://api.foxycart.com/item_categories/12345",
"name": "My Subscription",
"price": 24.99,
"quantity": 1,
"quantity_min": 0,
"quantity_max": 0,
"weight": 1,
"code": "mysub",
"parent_code": "",
"discount_name": "",
"discount_type": "",
"discount_details": "",
"subscription_frequency": "1m",
"subscription_start_date": "2022-08-01T00:00:00-0700",
"subscription_next_transaction_date": "2022-09-01T00:00:00-0700",
"subscription_end_date": null,
"is_future_line_item": false,
"shipto": "Me",
"url": "",
"image": "",
"length": 0,
"width": 0,
"height": 0,
"expires": 0,
"date_created": null,
"date_modified": "2022-08-01T08:57:13-0700"
}
],
"fx:applied_taxes": [
{
"_links": { },
"rate": 0,
"name": "Endpoint",
"amount": 0,
"apply_to_handling": true,
"apply_to_shipping": true,
"is_future_tax": false,
"shipto": "",
"date_created": "2022-08-01T08:58:16-0700",
"date_modified": "2022-08-01T08:58:16-0700"
}
],
"fx:custom_fields": [
{
"_links": { },
"name": "newsletter_subscribe",
"value": "1",
"is_hidden": false,
"date_created": "2022-08-01T08:58:16-0700",
"date_modified": "2022-08-01T08:58:16-0700"
}
],
"fx:discounts": [
{
"_links": { },
"code": "mycode",
"amount": -2.5,
"name": "My Coupon",
"display": "-$2.50",
"is_taxable": false,
"is_future_discount": false,
"date_created": "2022-08-01T08:58:16-0700",
"date_modified": "2022-08-01T08:58:16-0700"
}
],
"fx:shipments": [
{
"_links": { },
"address_name": "Me",
"first_name": "John",
"last_name": "Person",
"company": "",
"address1": "123 Testing Street",
"address2": "",
"city": "LOS ANGELES",
"region": "CA",
"postal_code": "90028",
"country": "US",
"phone": "",
"shipping_service_id": 0,
"shipping_service_description": "Custom Flat Rate Shipping",
"total_item_price": 24.99,
"total_tax": 0,
"total_shipping": 7.5,
"total_price": 29.99,
"date_created": "2022-08-01T08:58:16-0700",
"date_modified": "2022-08-01T08:58:16-0700"
}
],
"fx:billing_addresses": [
{
"_links": { },
"address_name": "Default Billing Address",
"first_name": "John",
"last_name": "Person",
"company": "",
"address1": "123 Testing Street",
"address2": "",
"city": "LOS ANGELES",
"region": "CA",
"customer_postal_code": "90028",
"customer_country": "US",
"customer_phone": "",
"date_created": null,
"date_modified": "2022-08-01T08:58:16-0700"
}
]
},
"id": 1976574034,
"display_id": "foo00943",
"is_test": true,
"hide_transaction": false,
"data_is_fed": false,
"type": "transaction",
"source": "cit_ecommerce",
"transaction_date": "2022-08-02T01:28:16+0930",
"locale_code": "en_US",
"customer_first_name": "John",
"customer_last_name": "Person",
"customer_tax_id": "",
"customer_email": "john@example.com",
"customer_ip": "11.22.123.456",
"ip_country": "United States",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.5 Safari/605.1.15",
"total_item_price": 24.99,
"total_tax": 0,
"total_shipping": 7.5,
"total_future_shipping": 0,
"total_order": 29.99,
"status": "captured",
"date_created": null,
"date_modified": "2022-08-01T08:58:16-0700",
"currency_code": "USD",
"currency_symbol": "$"
}
The type attribute can help with handling the payload — it indicates what kind of transaction this was: transaction, updateinfo, subscription_modification, subscription_renewal, or subscription_cancellation.
Subscription
{
"_links": {
"fx:sub_token_url": {
"href": "https://your-store.foxycart.com/cart?sub_token=3599338e72595b521d62b3ca7e286c212346ec3fc6f859ef139e5d9796900fad",
"title": "This Sub Token",
"type": "text/html"
},
"fx:sub_modification_url": {
"href": "https://your-store.foxycart.com/cart?sub_token=3599338e72595b521d62b3ca7e286c212346ec3fc6f859ef139e5d9796900fad&redirect=https://your-store.com",
"title": "URL to modify this subscription",
"type": "text/html"
}
},
"_embedded": {
"fx:customer": {
"_links": { },
"_embedded": {
"fx:attributes": [
{
"_links": { },
"name": "Loyalty Points",
"value": "100",
"visibility": "private",
"date_created": "2020-09-18T08:39:22-0700",
"date_modified": "2020-09-18T08:39:22-0700"
}
],
"fx:default_billing_address": {
"_links": { },
"address_name": "Default Billing Address",
"first_name": "John",
"last_name": "Person",
"company": "",
"address1": "123 Testing Street",
"address2": "",
"city": "LOS ANGELES",
"region": "CA",
"postal_code": "90028",
"country": "US",
"phone": "",
"is_default_billing": true,
"is_default_shipping": false,
"date_created": null,
"date_modified": "2022-08-01T08:58:15-0700"
},
"fx:default_shipping_address": {
"_links": { },
"address_name": "Me",
"first_name": "John",
"last_name": "Person",
"company": "",
"address1": "123 Testing Street",
"address2": "",
"city": "LOS ANGELES",
"region": "CA",
"postal_code": "90028",
"country": "US",
"phone": "",
"is_default_billing": false,
"is_default_shipping": true,
"date_created": null,
"date_modified": "2022-08-01T08:58:15-0700"
}
},
"id": 12345678,
"last_login_date": "2022-07-29T04:10:03-0700",
"first_name": "John",
"last_name": "Person",
"email": "john@example.com",
"tax_id": "",
"password_salt": "",
"password_hash": "$P$Bfo4kbFOqal4gqR9RcE/xg2lK75zK1",
"password_hash_type": "phpass",
"password_hash_config": "8",
"forgot_password": "",
"forgot_password_timestamp": null,
"is_anonymous": false,
"date_created": null,
"date_modified": "2022-08-01T08:58:15-0700"
},
"fx:transaction_template": {
"_links": { },
"_embedded": {
"fx:items": [
{
"_links": { },
"_embedded": {
"fx:item_options": [
{
"_links": { },
"name": "size",
"value": "Large",
"price_mod": 0,
"weight_mod": 0,
"date_created": null,
"date_modified": null
},
{
"_links": { },
"name": "color",
"value": "Surprise Me",
"price_mod": 0,
"weight_mod": 0,
"date_created": null,
"date_modified": null
}
],
"fx:item_category": {
"_links": { },
"admin_email_template_uri": "",
"customer_email_template_uri": "",
"gift_recipient_email_template_uri": "https://api.foxycart.com/email_templates/1234",
"code": "DEFAULT",
"name": "Default for all products",
"item_delivery_type": "flat_rate",
"max_downloads_per_customer": 3,
"max_downloads_time_period": 24,
"default_weight": 1,
"default_weight_unit": "LBS",
"default_length_unit": "IN",
"shipping_flat_rate_type": "per_order",
"shipping_flat_rate": 5,
"handling_fee_type": "flat_percent_with_minimum",
"handling_fee": 1,
"handling_fee_minimum": 0,
"handling_fee_percentage": 10,
"customs_value": 0,
"discount_type": "",
"discount_name": "Gift Set",
"discount_details": "single|3-9.98|5-19.96",
"send_customer_email": false,
"send_admin_email": false,
"admin_email": "",
"date_created": null,
"date_modified": "2022-07-28T01:44:56-0700"
}
},
"item_category_uri": "https://api.foxycart.com/item_categories/1234",
"name": "My Subscription",
"price": 24.99,
"quantity": 1,
"quantity_min": 0,
"quantity_max": 0,
"weight": 1,
"code": "mysub",
"parent_code": "",
"discount_name": "",
"discount_type": "",
"discount_details": "",
"subscription_frequency": "1m",
"subscription_start_date": "2022-08-01T00:00:00-0700",
"subscription_next_transaction_date": "2022-09-01T00:00:00-0700",
"subscription_end_date": null,
"is_future_line_item": false,
"shipto": "Me",
"url": "",
"image": "",
"length": 0,
"width": 0,
"height": 0,
"expires": 0,
"date_created": null,
"date_modified": "2022-08-01T08:58:16-0700"
}
],
"fx:custom_fields": [
{
"_links": { },
"name": "newsletter_subscribe",
"value": "1",
"is_hidden": false,
"date_created": "2022-08-01T08:58:16-0700",
"date_modified": "2022-08-01T08:58:16-0700"
}
],
"fx:discounts": [
{
"_links": { },
"code": "mycode",
"amount": -2.5,
"name": "My Coupon",
"display": "-$2.50",
"is_taxable": false,
"is_future_discount": false,
"date_created": "2022-08-01T08:58:16-0700",
"date_modified": "2022-08-01T08:58:16-0700"
}
]
},
"customer_uri": "https://api.foxycart.com/customers/12345678",
"template_set_uri": "https://api.foxycart.com/template_sets/1234",
"payment_method_uri": "",
"language": "",
"locale_code": "en_US",
"use_customer_shipping_address": false,
"billing_first_name": "John",
"billing_last_name": "Person",
"billing_company": "",
"billing_address1": "123 Testing Street",
"billing_address2": "",
"billing_city": "LOS ANGELES",
"billing_state": "CA",
"billing_postal_code": "90028",
"billing_country": "US",
"billing_phone": "",
"customer_email": "john@example.com",
"shipping_first_name": "John",
"shipping_last_name": "Person",
"shipping_company": "",
"shipping_address1": "123 Testing Street",
"shipping_address2": "",
"shipping_city": "LOS ANGELES",
"shipping_state": "CA",
"shipping_postal_code": "90028",
"shipping_country": "US",
"shipping_phone": "",
"total_item_price": 24.99,
"total_tax": 0,
"total_shipping": 7.5,
"total_future_shipping": 0,
"total_order": 29.99,
"date_created": null,
"date_modified": "2022-08-01T08:58:16-0700",
"currency_code": "USD",
"currency_symbol": "$"
}
},
"start_date": "2022-08-01T00:00:00-0700",
"next_transaction_date": "2022-09-01T00:00:00-0700",
"end_date": null,
"frequency": "1m",
"error_message": "",
"past_due_amount": 0,
"first_failed_transaction_date": null,
"is_active": true,
"third_party_id": "",
"cancellation_source": "",
"date_created": "2022-08-01T08:58:16-0700",
"date_modified": "2022-08-01T08:58:16-0700",
"payment_type": "plastic"
}
Customer
{
"_links": { },
"_embedded": {
"fx:attributes": [
{
"_links": { },
"name": "Loyalty Points",
"value": "100",
"visibility": "private",
"date_created": "2020-09-18T08:39:22-0700",
"date_modified": "2020-09-18T08:39:22-0700"
}
],
"fx:default_billing_address": {
"_links": { },
"address_name": "Default Billing Address",
"first_name": "John",
"last_name": "Person",
"company": "",
"address1": "123 Testing Street",
"address2": "",
"city": "LOS ANGELES",
"region": "CA",
"postal_code": "90028",
"country": "US",
"phone": "",
"is_default_billing": true,
"is_default_shipping": false,
"date_created": null,
"date_modified": "2022-08-01T08:58:15-0700"
},
"fx:default_shipping_address": {
"_links": { },
"address_name": "Me",
"first_name": "John",
"last_name": "Person",
"company": "",
"address1": "123 Testing Street",
"address2": "",
"city": "LOS ANGELES",
"region": "CA",
"postal_code": "90028",
"country": "US",
"phone": "",
"is_default_billing": false,
"is_default_shipping": true,
"date_created": null,
"date_modified": "2022-08-01T08:58:15-0700"
},
"fx:default_payment_method": {
"_links": { },
"save_cc": true,
"cc_type": "Visa",
"cc_number_masked": "xxxxxxxxx4242",
"cc_exp_month": "01",
"cc_exp_year": "2023",
"date_created": null,
"date_modified": "2022-08-01T08:58:15-0700"
},
"fx:customer_addresses": [
{
"_links": { },
"address_name": "Work",
"first_name": "John",
"last_name": "Person",
"company": "",
"address1": "1024 Commercial Road",
"address2": "",
"city": "LOS ANGELES",
"region": "CA",
"postal_code": "90028",
"country": "US",
"phone": "",
"is_default_billing": false,
"is_default_shipping": false,
"date_created": "2014-09-16T04:21:31-0700",
"date_modified": "2014-10-06T20:00:17-0700"
},
{
"_links": { },
"address_name": "Mum",
"first_name": "Jane",
"last_name": "Person",
"company": "",
"address1": "88 High Street",
"address2": "",
"city": "NEW YORK",
"region": "NY",
"postal_code": "10001",
"country": "US",
"phone": "",
"is_default_billing": false,
"is_default_shipping": false,
"date_created": "2014-10-14T19:12:17-0700",
"date_modified": "2022-01-17T09:02:48-0800"
}
]
},
"id": 12345678,
"last_login_date": "2022-07-29T04:10:03-0700",
"first_name": "John",
"last_name": "Person",
"email": "john@example.com",
"tax_id": "",
"password_salt": "",
"password_hash": "$P$Bfo4kbFOqal4gqR9RcE/xg2lK75zK1",
"password_hash_type": "phpass",
"password_hash_config": "8",
"forgot_password": "",
"forgot_password_timestamp": null,
"is_anonymous": false,
"date_created": null,
"date_modified": "2022-08-01T08:58:15-0700"
}
Transaction Log
{
"_links": { },
"_embedded": {
"fx:transaction_log_details": [
{
"_links": { },
"request_type": "transaction_folder_added",
"reference": "2296720403",
"log": "{\"rel\":\"transaction\",\"id\":2296720403,\"old_values\":{\"folder_id\":null},\"new_values\":{\"folder_id\":6}}"
}
],
"fx:transactions": {
"_links": { },
"folder_uri": "https://api.foxycart.com/store_transaction_folders/6",
"id": 2296720403,
"display_id": "foo12345",
"is_test": true,
"hide_transaction": false,
"data_is_fed": true,
"type": "transaction",
"source": "",
"transaction_date": "2025-01-01T01:01:01-0700",
"locale_code": "en_US",
"customer_first_name": "John",
"customer_last_name": "Person",
"customer_tax_id": "",
"customer_email": "john@example.com",
"customer_ip": "11.22.123.456",
"ip_country": "United States",
"user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.4 Safari/605.1.15",
"total_item_price": 20,
"total_tax": 0,
"total_shipping": 7,
"total_future_shipping": 0,
"total_order": 27,
"status": "approved",
"folder_id": 6,
"date_created": "2025-01-01T01:01:01-0700",
"date_modified": "2025-01-01T01:01:01-0700",
"currency_code": "USD",
"currency_symbol": "$"
}
},
"snapshot": "(a JSON-encoded string containing a full snapshot of the transaction at the time of the log entry)",
"request_source": "hAPI",
"date_created": "2025-01-01T01:01:01-0700"
}
The snapshot field contains a JSON-encoded string with the full state of the related resource at the time the log entry was created — useful for comparing against the current state in _embedded.
Changelog
No example payload is documented for the changelog resource. It follows the same _links/_embedded structure as the other resources above, reflecting whatever store resource was changed.