CartirraAPI
Get API keys

Getting started

Warranties

Give a warranty with an item at checkout, or add one after the sale. The shopper keeps it in their Cartirra account and is reminded before it ends. Growth and above.

If you sell phones, appliances, electronics or anything else that comes with a guarantee, Cartirra keeps the warranty for you and for the shopper. You say what the warranty is when you create the checkout session. When the order is paid, the warranty starts. The shopper finds it in their Cartirra account with the receipt, and Cartirra reminds them before it ends.

Warranties need the Growth plan or above. On Starter, a checkout session or payment link with a warranty is refused with feature_not_available.

1. Add a warranty to a checkout line

When you create a checkout session, give each line that comes with a warranty a warranty object. Lines without one need nothing.

curl https://api.cartirra.com/v1/checkout-sessions \
  -H "Authorization: Bearer $CARTIRRA_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "lines": [
      {
        "name": "Samsung Galaxy A15",
        "quantity": 1,
        "sku": "SM-A155",
        "unit_price": { "amount": "185000.00", "currency": "NGN" },
        "warranty": {
          "months": 12,
          "covered_by": "manufacturer",
          "provider": "Samsung Nigeria",
          "terms": "Covers faults from manufacture. Not water or screen damage."
        }
      },
      {
        "name": "Phone case",
        "quantity": 1,
        "unit_price": { "amount": "5000.00", "currency": "NGN" }
      }
    ],
    "success_url": "https://shop.example.com/thanks"
  }'
FieldWhat it is
months or daysHow long it lasts: months from 1 to 120, or days from 1 to 3650. Give one of them.
covered_byWho honours it: merchant (you, the default) or manufacturer.
providerThe manufacturer's name, for a manufacturer's warranty: "Samsung Nigeria".
termsWhat it covers, in your words, up to 2,000 characters. The shopper sees this.

Then open the checkout with the session's client_secret as usual (Cartirra Popup and Redirect). Payment links take the same warranty on their lines.

2. What happens when the order is paid

When the payment succeeds, Cartirra creates one warranty for each line that has one:

  • It starts on the day the order was paid and ends on its last covered day. Both are calendar days in Lagos time: a 12-month warranty paid on 27 October 2026 covers up to 26 October 2027.
  • It gets a reference like WRN-20261027-001 and the order's store.
  • A line with a quantity of 2 gets one warranty that covers the line.
  • You get the warranty.created webhook, and the warranty shows on the order in your dashboard.

The shopper keeps the warranty in their Cartirra account, next to the order and its receipt. They're emailed 30 days and 7 days before it ends, and Cartirra app users also get a notification.

3. Add or change a warranty after the sale

Some details are only known later, like a serial number, or you may want to add a warranty to an order that was paid without one. Add one to a paid order:

curl -X POST https://api.cartirra.com/v1/orders/$ORDER_ID/warranties \
  -H "Authorization: Bearer $CARTIRRA_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "line_index": 0,
    "serial_number": "R58W30ABCDE",
    "months": 12,
    "covered_by": "manufacturer",
    "provider": "Samsung Nigeria"
  }'
  • line_index is the order line it covers (from 0), and its name is used. Without a line, give item_name.
  • Give months or days, or the exact ends_on date. starts_on defaults to the day the order was paid.

To change one, update it: the serial number, dates, terms, who covers it, or the item's name.

curl -X PATCH https://api.cartirra.com/v1/warranties/$WARRANTY_ID \
  -H "Authorization: Bearer $CARTIRRA_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "serial_number": "R58W30ABCDE" }'

If the item comes back for a refund, or the warranty was given by mistake, void it with a reason. The shopper sees it as voided.

curl -X POST https://api.cartirra.com/v1/warranties/$WARRANTY_ID/void \
  -H "Authorization: Bearer $CARTIRRA_SECRET_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "reason": "Item returned for a refund" }'

4. Find warranties

GET /v1/warranties lists them, newest first, and you can filter by:

  • state: active (still covering, including those ending soon), ending_soon (30 days or fewer left), expired or voided;
  • order_id, customer_id or store_id;
  • q: searches the item name, serial number and reference.

GET /v1/orders/{id}/warranties lists one order's warranties.

Webhooks

EventSent when
warranty.createdA warranty starts: an order with one is paid, or you add one
warranty.updatedYou change its serial number, dates, terms or cover
warranty.voidedYou void it

A warranty expiring sends no webhook. Read ends_on, or list with state=ending_soon or state=expired.

Permissions

Secret keys can read and manage warranties. In the dashboard, team members need warranties:read to see them and warranties:write to add, change or void them.