- Customer details: Phone number, email address, or both
- Address details: Pincode, state, and other information. The address is included only if the customer submits the complete address.
- Cart details: Always included
- OCC URL: Link to the merchant’s Shopify store with the OCC page preloaded
Note: Cashfree doesn’t send abandoned checkouts to Shopify if a login is required in the native checkout settings.
Adding a webhook endpoint
To start receiving abandoned cart webhooks from Cashfree One Click Checkout (OCC), follow these steps:- Sign in to the Merchant Dashboard using your credentials.
- Go to Payment Gateway > Developers > Webhooks > Configuration > Payment Gateway tab.
- On the Webhooks page, click Add Webhook Endpoints.
-
In the Endpoint Details section:
- Enter the endpoint URL where you want to receive webhook data.
- Click Test to verify the URL.
- From the drop-down menu, select Webhook Version: 2025-01-01.
- Click Continue.
-
In the Add Policy section:
- Choose a retry policy. The default policy includes 3 retries.
- Select the relevant events to subscribe to.
- Optionally, add another retry policy if needed.
- Click Continue.
-
In the Summary section:
- Review the configuration.
- Click Update Secret Key, then click Update in the confirmation pop-up.
- Click Save.
Sample webhook event payload
Below is a sample webhook event payload for an abandoned cart.Note: Use the signature to verify that the request has not been tampered with. To verify the signature, use your merchant secret key along with the payload.
Webhook headers
Each webhook request contains the following headers for validation and tracing:Header Key | Description |
---|---|
x-datadog-sampling-priority | Indicates trace sampling priority. A value of 1 means the trace is retained. |
x-datadog-parent-id | ID of the parent span in a distributed trace. |
x-datadog-trace-id | Unique ID for the trace across services. |
content-length | Size of the request body in bytes. |
x-webhook-attempt | Number of delivery attempts. |
content-type | MIME type of the request body (application/json ). |
x-webhook-signature | Cryptographic signature for payload integrity. |
x-idempotency-key | Unique key to prevent duplicate processing. |
x-webhook-timestamp | Unix timestamp (in milliseconds) indicating when the webhook was sent. |
x-webhook-version | Version of the webhook payload (e.g., 2025-01-01 ). |
accept | Acceptable media types in the response (*/* ). |
host | Receiving server domain (e.g., webhook.site ). |
user-agent | Client software sending the request (e.g., ReactorNetty/1.1.11 ). |