import { OrderSubscription } from "@polar-sh/sdk/models/components/ordersubscription.js";
let value: OrderSubscription = {
metadata: {
"key": false,
},
createdAt: new Date("2025-04-20T08:54:47.616Z"),
modifiedAt: new Date("2024-05-11T17:42:20.998Z"),
id: "<value>",
amount: 943657,
currency: "Singapore Dollar",
recurringInterval: "year",
status: "canceled",
currentPeriodStart: new Date("2024-09-08T13:20:56.574Z"),
currentPeriodEnd: new Date("2024-10-04T01:35:43.769Z"),
cancelAtPeriodEnd: false,
canceledAt: new Date("2024-11-12T12:33:25.249Z"),
startedAt: new Date("2025-01-12T21:23:56.904Z"),
endsAt: new Date("2023-04-05T18:06:17.605Z"),
endedAt: new Date("2025-05-25T00:48:37.912Z"),
customerId: "<value>",
productId: "<value>",
discountId: "<value>",
checkoutId: "<value>",
customerCancellationReason: "unused",
customerCancellationComment: "<value>",
priceId: "<value>",
userId: "<value>",
};
Field |
Type |
Required |
Description |
metadata |
Record<string, components.OrderSubscriptionMetadata> |
✔️ |
N/A |
createdAt |
Date |
✔️ |
Creation timestamp of the object. |
modifiedAt |
Date |
✔️ |
Last modification timestamp of the object. |
id |
string |
✔️ |
The ID of the object. |
amount |
number |
✔️ |
The amount of the subscription. |
currency |
string |
✔️ |
The currency of the subscription. |
recurringInterval |
components.SubscriptionRecurringInterval |
✔️ |
N/A |
status |
components.SubscriptionStatus |
✔️ |
N/A |
currentPeriodStart |
Date |
✔️ |
The start timestamp of the current billing period. |
currentPeriodEnd |
Date |
✔️ |
The end timestamp of the current billing period. |
cancelAtPeriodEnd |
boolean |
✔️ |
Whether the subscription will be canceled at the end of the current period. |
canceledAt |
Date |
✔️ |
The timestamp when the subscription was canceled. The subscription might still be active if cancel_at_period_end is true . |
startedAt |
Date |
✔️ |
The timestamp when the subscription started. |
endsAt |
Date |
✔️ |
The timestamp when the subscription will end. |
endedAt |
Date |
✔️ |
The timestamp when the subscription ended. |
customerId |
string |
✔️ |
The ID of the subscribed customer. |
productId |
string |
✔️ |
The ID of the subscribed product. |
discountId |
string |
✔️ |
The ID of the applied discount, if any. |
checkoutId |
string |
✔️ |
N/A |
customerCancellationReason |
components.CustomerCancellationReason |
✔️ |
N/A |
customerCancellationComment |
string |
✔️ |
N/A |
priceId |
string |
✔️ |
: warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |
userId |
string |
✔️ |
: warning: ** DEPRECATED **: This will be removed in a future release, please migrate away from it as soon as possible. |