Shopify setup
Collect the customer’s Cortex Cloud username, verify paid-order webhooks with Shopify’s signing key, and test delivery before launch.
Before you start
- A Preset Bridge account with validated Cortex Cloud credentials and an active API token.
- A stable SKU on each Shopify product or variant that should trigger delivery.
- The Cortex Cloud resource ID for every preset or capture you sell.
- Permission to edit the Shopify theme and create webhooks in the store admin.
- Enough Preset Bridge credits for a real test delivery.
1. Collect the Cortex Cloud username
Add a cart attribute named ndsp_username to the cart form. The exact theme file varies, but the field must belong to the form with the ID cart.
<label for="cortex-cloud-username">Cortex Cloud username</label>
<input
id="cortex-cloud-username"
type="text"
name="attributes[ndsp_username]"
form="cart"
value="{{ cart.attributes['ndsp_username'] | escape }}"
required
>
ndsp_username.
2. Create the Preset Bridge integration
- In Shopify, open Settings → Notifications → Webhooks.
- Copy the store’s webhook signing key shown below the webhook list.
- In Preset Bridge, open Integrations → Store integrations and select Add integration.
- Choose shopify, select the store’s API token and paste the Shopify signing key.
- Keep the username field key as
ndsp_usernameand accepted order statuses aspaid. - Add the product mappings, then create the integration.
- Copy the Preset Bridge webhook URL.
Shopify owns the signing key. Preset Bridge stores an encrypted copy for verification and does not generate or rotate it.
3. Create the Shopify webhook
- In Shopify, open Settings → Notifications → Webhooks and create a webhook.
- Select Order payment as the event and JSON as the format.
- Paste the Preset Bridge webhook URL.
- Select a current stable webhook API version and save.
- Send a Shopify test notification. It should not return HTTP 401. A sample without a real username or mapped SKU can still need attention.
4. Run a real test order
- Buy a mapped product and enter a Cortex Cloud username you can access.
- Confirm the paid order appears once under Deliveries in Preset Bridge.
- Follow the store account back in Cortex Cloud when the request arrives.
- Wait for the scheduled retry, or retry the delivery after the follow-back is visible.
- Confirm the correct preset or capture appears in the customer account.
- Confirm the Preset Bridge delivery reaches Completed.
Return results to Shopify
Preset Bridge can send signed delivery events to any HTTPS endpoint through an outbound webhook subscription. Subscribe to delivery.completed, delivery.action_required, delivery.retry_scheduled, delivery.failed, delivery.ignored, delivery.invalidated and delivery.reopened, then limit the subscription to this integration ID.
See Delivery result webhooks for the callback payload and signature.
Troubleshooting
Shopify reports HTTP 401
Replace the Shopify signing key in the Preset Bridge integration settings. The key must come from the same Shopify store that created the webhook.
The username is missing
Open the Shopify order and check that ndsp_username appears under Additional details. Test the normal cart and accelerated checkout separately.
No product mapping matched
Compare the line-item SKU or variant ID in Shopify with the mapping’s External ref. The values must match exactly.
The order arrived twice
Preset Bridge uses Shopify’s event ID to reject duplicate deliveries. Keep only one Order payment webhook pointed at the integration URL.