For developers & AI

API, webhooks and MCP for your Shopify subscriptions

Fetch, pause, skip, reschedule and cancel subscriptions from your own systems. Webhooks tell you what changes. Through the MCP server an AI assistant works with the same data, within the scopes you give it.

12
endpoints for subscriptions, customers and points
7
webhook events, signed with HMAC-SHA256
6
scopes you switch on or off per key
120/min
requests per key, adjustable
In your dashboard

You manage keys and webhooks yourself

There is no access to request. You create a key yourself, with exactly the scopes the integration needs.

API keys

One key per integration

Give your ERP, your support tool and your AI assistant a key each. You see which integration does what, and you can revoke one key without touching the rest.

  • Scopes per key: read, or write as well
  • A separate rate limit per key
  • You see when a key was last used
  • A key is shown once, when you create it
API keys in Loyalo with the scopes, the limit and the last use per key, and the address of the REST API and the MCP server
Webhooks

A message as soon as something changes

You add an endpoint and choose the events you want to receive. Every message is signed. If delivery fails, Loyalo retries after 1, 5, 20, 60 and 240 minutes.

  • Send a test message with one button
  • The latest deliveries with status and number of attempts
  • Resend a failed delivery by hand
  • Pause an endpoint temporarily
Webhooks in Loyalo: an endpoint with the chosen events and the latest deliveries with their result
Examples

Your first request

Send your key in the x-api-key header. Responses are JSON; lists include a next_offset for the next page.

curl "https://mwugkfkidoakjoelhtir.supabase.co/functions/v1/v2-api/subscriptions?status=active&limit=50" \
  -H "x-api-key: $LOYALO_API_KEY"

Full API documentation

REST API

The endpoints of the subscription API

The endpoints of the subscription API
EndpointScopeWhat it does
GET /subscriptionssubscriptionsList your shop's subscriptions, newest first.
GET /subscriptions/{id}subscriptionsA single subscription with lines, amount and next billing date.
POST /subscriptions/{id}/pausesubscriptions:writePauses the subscription (both Shopify and Mollie).
POST /subscriptions/{id}/resumesubscriptions:writeResumes a paused subscription.
POST /subscriptions/{id}/skipsubscriptions:writeSkips the next delivery; the date moves one interval forward.
POST /subscriptions/{id}/reschedulesubscriptions:writeMoves the next delivery to another date (within a year).
POST /subscriptions/{id}/cancelsubscriptions:writeCancels the subscription permanently.
GET /customerscustomersCustomers with point balance, spend and language preference.
GET /pointspointsPoint transactions, optionally filtered by customer.
POST /pointspoints:writeAdd (positive) or remove (negative) points. Give the customer by customer_id (Loyalo's), shopify_customer_id or email: exactly one. The same idempotency_key (or Idempotency-Key header) never books twice.
GET /redemptionsredemptionsRedeemed discounts with code, status and expiry.
GET /ping—Validates your key and returns the shop and its scopes.
Webhooks

The events you can receive

Shopify sends its own webhooks about orders and customers. Loyalo adds events about subscriptions and points.

The events you can receive
EventWhen
subscription.createdNew subscription created
subscription.updatedSubscription changed (date, lines, frequency)
subscription.pausedSubscription paused
subscription.resumedSubscription resumed
subscription.cancelledSubscription cancelled
subscription.payment_failedPayment attempt failed
points.changedA customer's point balance changed
pingTest message (button in Loyalo)
Reliable

Secure and predictable

Scopes per key

A key belongs to one store and only works for the scopes you tick: subscriptions, customers, points and redemptions, read or write.

Rate limit

120 requests per minute per key by default, adjustable per key. Go over it and you get a 429; try again a little later.

Never booked twice

Adding points with an idempotency key never books twice, even when your request is retried after a timeout.

Signed messages

Every webhook carries a signature: HMAC-SHA256 over the timestamp and the body, with your endpoint's secret. You reject old messages.

AI agents

An MCP server for your AI assistant

Loyalo is also an MCP server. An assistant such as Claude or ChatGPT uses the same operations as tools, so it can look up or pause a subscription when asked in plain language.

How to connect an assistant
  • Connect with one address and an API key as Bearer token
  • The assistant only sees the tools its key's scopes allow
  • Give it read scopes only, or write scopes as well when it may change things
  • A separate key per assistant, which you can revoke on its own
  • Works with any client that supports MCP over HTTP
Use cases

What you build with it

ERP and warehouse

Tell your ERP that a subscription started or was cancelled, and fetch the running subscriptions for your planning.

Customer service

Pause or reschedule a subscription from your own support tool, without switching screens.

Points from other channels

Add points for a purchase at a fair or in your own app, and read a customer's balance.

Your own reporting

Fetch subscriptions, customers and points for your data warehouse or your BI tool.

Frequently asked questions from developers

Does Loyalo have an API?

Yes, a REST API for subscriptions, customers, points and redemptions, with keys you create yourself in the dashboard. The API is included in every plan.

How do I authenticate?

With an API key in the x-api-key header, or as a Bearer token. You create the key under Settings › API & webhooks. A key belongs to one store and is only shown once, so store it safely.

Which webhooks does Loyalo send?

Seven events: a subscription that was created, changed, paused, resumed or cancelled, a failed payment and a changed points balance. You can also send a test message with a button.

What happens when my endpoint is unreachable for a while?

Loyalo retries the delivery after 1, 5, 20, 60 and 240 minutes. In the dashboard you see every delivery with its result and can resend a failed one by hand. Your endpoint should respond with a 2xx status within 10 seconds.

How do I check that a webhook comes from Loyalo?

Check the signature in the x-loyalo-signature header: an HMAC-SHA256 over 'timestamp.body' with your endpoint's secret, using the time from x-loyalo-timestamp. Compare in constant time and reject requests older than five minutes.

Can an AI assistant change subscriptions?

Only if you give it a key with write scopes. With a read-only key an assistant can look things up and summarise, but not change anything.

Can I use the Shopify API for subscriptions as well?

Yes. Orders and customers are in Shopify, and a card subscription is a contract there; you read those through Shopify as usual. Loyalo's API adds what Shopify does not have: pausing, skipping and rescheduling in one request, iDEAL subscriptions and points.

Read on: API documentationIntegrationsAnalytics

Demo

Request a demo or a trial

In half an hour we show you how Loyalo works in your store, or we send you an install link right away. The trial runs for 14 days and needs no credit card.

Build on your subscriptions

If you have questions about an integration, we can look at what you want to build in a demo.