Skip to content

Understanding renewal errors (rebill errors)

  • Access to the Ciklik API (API documentation)
  • Familiarity with rebill (automatic renewal) concepts
  • Ciklik module installed and configured on PrestaShop

The Ciklik API exposes a dedicated endpoint for rebill errors: /api/rebill-errors

The rebill-errors endpoint covers exclusively the following errors:

No products from the subscription were available at the time of renewal. No order is generated.

{
"id": 1,
"type": "failed",
"created_at": "2026-01-08T06:00:00Z",
"subscription_id": "uuid-de-l-abonnement",
"message": "All items out of stock"
}

Behavior:

  • No order is created in PrestaShop
  • The subscription remains active
  • The error is logged and accessible via the API
  • The rebill will be automatically retried the next day, then every following day until stock is restored. Once stock is available again, the renewal is processed and the date of that payment becomes the new due date (the cycle restarts from that date)

At least one product from the subscription was out of stock, but the order was placed with the available products.

{
"id": 432,
"type": "partial",
"created_at": "2026-01-08T06:00:00Z",
"subscription_id": "uuid-de-l-abonnement",
"message": "Partial stock availability"
}

Behavior:

  • The order is created with only the available products
  • The out-of-stock product is not listed in the error response (known limitation)
  • To identify the missing product, compare the content of the generated order with the expected content of the subscription

The PrestaShop site returned an unexpected response (empty HTTP response, 500 error, 401, timeout…).

Behavior:

  • The error is captured
  • The rebill is automatically retried 24 hours later
  • The subscription remains in active status

You can filter errors by date to analyze a specific period:

Fenêtre de terminal
GET /api/rebill-errors?filter[created_at_after]=2026-01-07&filter[created_at_before]=2026-01-09

A subscription has been consistently failing for several months:

  1. Retrieve errors for this subscription:

    Fenêtre de terminal
    GET /api/rebill-errors?filter[subscription_id]=uuid-abonnement
  2. Analyze the error type:

    • failed → Check the product stock in PrestaShop
    • partial → Compare the generated order with the subscription
    • API error → Check PrestaShop server logs

To identify yesterday’s issues:

Fenêtre de terminal
GET /api/rebill-errors?filter[created_at_after]=2026-01-07&filter[created_at_before]=2026-01-08

Q: Why doesn’t my credit card payment error appear in this endpoint?

Credit card payment errors (card declined, insufficient funds, etc.) are not handled by this endpoint. They go through the payment retry system. See Payment retries: Rebill.

Q: How do I know which product was out of stock during a partial error?

The out-of-stock product is not listed in the error. Compare the content of the generated order (via the orders API) with the expected content of the subscription (via the subscriptions API).

Q: Are errors kept indefinitely?

Yes, since the endpoint was activated in December 2025. Earlier errors were not retained.