Skip to main content
These filters allow you to intercept and modify data before it’s sent to the SureCart API, and transform responses as they come back. This is useful for adding metadata, modifying request parameters, or transforming API responses.

surecart/request/model

Filter the model instance before an API request is made. This is the primary way to modify data being sent to the API for any model (checkouts, orders, customers, etc.).
Filter Parameters

Add Affiliate Tracking

Block Checkout Based on Conditions

surecart/request/response

Filter the API response after it’s received. Use this to transform, enrich, or modify response data before it’s used.
Filter Parameters

surecart/request/args

Filter the HTTP request arguments before sending. This allows you to modify headers, timeouts, or other HTTP-level settings.
Filter Parameters

surecart/request/endpoint

Filter the API endpoint URL before the request is made.

Models

Hook into model hydration to modify data after it’s received.

Checkout

Higher-level checkout actions and filters.