For developers
Powerful Promotions. Seamless Integration.
Integrate promotions, loyalty rewards, coupons, referrals, and gift cards into your existing applications through Aliya's REST API. Your backend sends the cart; Aliya answers with the discounts, messages, and points to apply. Campaigns are managed in the dashboard, so your business team changes a promotion without a release on your side.
PUT /v1/sessions/{id} the cart, every time it changes
POST /v1/sessions/{id}/reserve right before payment
POST /v1/sessions/{id}/confirm after payment succeeded
POST /v1/sessions/{id}/cancel payment failed or abandoned
POST /v1/sessions/{id}/returns some items refunded laterHow it fits
From Checkout to Answer
Aliya sits behind your checkout. Your server calls it; your customers never talk to it directly.
Customer checkout
The customer builds a cart or a booking in your store, app, or booking system.
Aliya API
Your backend sends the cart, the customer's ID, and any codes they typed.
Promotion & loyalty evaluation
Running campaigns, codes and their limits, points, and gift cards are worked out.
Checkout response
The discount per item and per order, messages to show, and the points the customer will earn.
Evaluating a cart uses nothing up
Pricing a cart, as often as it changes, only answers what the cart would get. No code use is counted, no budget is spent, and no points are given. It is free on every plan.
Confirming a purchase makes it count
Right before payment your system reserves the order, which holds the codes, budgets, and gift card amounts. After the payment succeeds, it confirms: codes are used, cards are charged, and points are given. A failed payment cancels, and everything is given back.
The flow
Three calls around the payment you already take
A session is one cart, under an id of your own. You keep your checkout, your payment provider and your customer data.
Price the cart
Send the whole cart whenever it changes: items, amounts, coupon codes, and the attributes your campaigns look at. The answer has the discount per item and for the order, messages to show, and the points the customer will earn.
Reserve before payment
Reserving claims the coupon uses, budgets and gift card amounts and holds them while the customer pays. If anything changed since the customer saw the price, you get the new price back in place of a reservation.
Confirm, or cancel
Confirm after the payment succeeded: codes are used, cards are charged and points are given. Cancel gives everything back. Returns later give back the share of the returned items.
Built for reliability
The parts of an integration that usually go wrong
- Sandbox and live apart. A sandbox application has its own campaigns, codes and data, and its own keys. In a sandbox a debug option says why each campaign did or did not apply.
- Safe to retry. Reserve, confirm, cancel and returns take an idempotency key: a retry with the same key gets the first answer, not a second booking.
- Never in the way of a sale. Price with a short timeout and carry on without promotions if the engine cannot be reached. The docs describe the fallback.
- Keys you can control. One key per application, shown once, rotated without downtime, optionally limited to your own addresses. A live key sent from a browser is refused.
- No personal data needed. Customers are known by an id of your own. Amounts are whole numbers in minor units, errors are standard problem details.
- Move an existing discount safely. Shadow mode runs the engine next to the discount your system already calculates, and the report shows where the two differ.
Webhooks
Your systems hear what happened
Signed messages to an address of yours when an order is confirmed, a code is used, points are given, a member changes tier, a referral is rewarded or a gift card changes.
- Signed with a secret of your own, which the SDKs check for you
- Delivered at least once, and retried for about three days
- Every delivery listed in the admin for 30 days, with a button to send it again
- Messages of your own design from a campaign rule
Webhooks are in live applications from the Growth plan, and in every sandbox.
SDKs and docs
Clients for .NET and TypeScript
Both cover every call, throw typed errors, retry with the same idempotency key and check webhook signatures. Install them from NuGet and npm like any other package. For other languages, generate a client from the OpenAPI document.
- .NET on NuGet:
InnovateSoftware.Promotions.Client - TypeScript on npm:
@innovatesoftware/promotions-client - A quick start, and the guide page by page
- An API reference with examples in cURL, .NET and TypeScript
- Try it: send a call from the page, with a sandbox key
- A changelog; version 1 grows by adding, never by breaking
Build against a sandbox this afternoon
Sign up, load the demo shop, copy the sandbox key and send your first cart. It is free, with every feature, for as long as you use it.
