# Subscription

### Content

<table><thead><tr><th width="231.6796875">Key</th><th width="154.80078125">Type</th><th>Description</th></tr></thead><tbody><tr><td>id</td><td>int</td><td>Numeric identifier</td></tr><tr><td>uuid</td><td>string</td><td><ul><li>Textual identifier</li><li>8 - 40 characters long</li></ul></td></tr><tr><td>status</td><td>string</td><td>The status of the subscription</td></tr><tr><td>start</td><td>string</td><td>The start date in the format <code>1970-01-01</code></td></tr><tr><td>end</td><td>string|null</td><td>The end date in the format <code>1970-01-01</code> or <code>null</code></td></tr><tr><td>valid_until</td><td>string|null</td><td>The next pay date in the format <code>1970-01-01</code> or <code>null</code></td></tr><tr><td>paymentInterval</td><td>string</td><td>An interval specification like the <code>duration</code> parameter of <a href="https://www.php.net/manual/en/dateinterval.construct.php">DateInterval</a></td></tr><tr><td>invoice</td><td>Invoice</td><td><a data-mention href="/pages/kiQvogNYjBqOH9n5kdI6">/pages/kiQvogNYjBqOH9n5kdI6</a></td></tr><tr><td>contact</td><td>Contact</td><td><a data-mention href="/pages/GsM9BSCi3Dw4KGhI4WBw">/pages/GsM9BSCi3Dw4KGhI4WBw</a></td></tr></tbody></table>

### Status Values

<table><thead><tr><th width="243.73828125">Status</th><th>Description</th></tr></thead><tbody><tr><td>active</td><td>The subscription is active. Further charges are to come.</td></tr><tr><td>failed</td><td>The creation of the subscription failed, or a charge failed (status was overdue), and the retry failed as well.</td></tr><tr><td>cancelled</td><td>The subscription has been cancelled by the merchant, effective immediately. No more charges follow.</td></tr><tr><td>in_notice</td><td>The subscription has been cancelled by the shopper before the end date. The remaining charges will follow.</td></tr><tr><td>overdue</td><td>A charge failed. The subscription is tried to be charged again. After a second failure, the status changes to failed.</td></tr></tbody></table>

### Example

```json
{
  "id": 1234,
  "uuid": "aabb1122",
  "status": "active",
  "start": "2026-01-01",
  "end": null,
  "valid_until": "2026-12-31",
  "paymentInterval": "P1M",
  "invoice": {
    "number": "Test",
    "products": [
      {
        "name": "Test",
        "description": "",
        "price": 5000,
        "quantity": 1,
        "sku": null,
        "vatRate": "8.10"
      }
    ],
    "discount": {
      "code": null,
      "amount": 0,
      "percentage": null
    },
    "shippingAmount": null,
    "currency": "CHF",
    "test": 1,
    "referenceId": "",
    "purpose": "",
    "paymentRequestId": null,
    "paymentLink": null,
    "googleAnalyticProducts": [
      {
        "item_id": 1324,
        "item_name": "Test",
        "price": 50,
        "quantity": 1
      }
    ],
    "originalAmount": 5000,
    "refundedAmount": 0,
    "custom_fields": [
      {
        "type": "email",
        "name": "Email",
        "value": "subscription@test.com"
      }
    ]
  },
  "contact": {
    "id": 1234,
    "uuid": "aabb1122",
    "title": "female",
    "firstname": "Payrexx",
    "lastname": "Test",
    "company": "Company Name",
    "street": "Burgstrasse 20",
    "zip": "3600",
    "place": "Thun",
    "country": "",
    "countryISO": "",
    "phone": "0335500010",
    "email": "subscription@test.com",
    "date_of_birth": "01.01.1970",
    "delivery_title": "",
    "delivery_firstname": "",
    "delivery_lastname": "",
    "delivery_company": "",
    "delivery_street": "",
    "delivery_zip": "",
    "delivery_place": "",
    "delivery_country": "",
    "delivery_countryISO": ""
  }
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.payrexx.com/developer/guides/webhook/subscription.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
