import Stigg from '@stigg/typescript';
const client = new Stigg({
apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted
});
const customerResponse = await client.v1.customers.archive('x');
console.log(customerResponse.data);{
"data": {
"createdAt": "2026-04-23T05:09:17.199Z",
"updatedAt": "2025-06-05T02:07:54.190Z",
"archivedAt": "2026-02-18T11:05:34.929Z",
"name": "John Doe",
"email": "john@example.com",
"id": "customer-6e24b4",
"metadata": {},
"integrations": [],
"defaultPaymentMethod": {
"type": "CARD",
"billingId": "pm_1Q0PsIJvEtkwdCNYMSaVuRz6",
"cardLast4Digits": "1234",
"cardExpiryMonth": 12,
"cardExpiryYear": 2025
},
"couponId": "coupon-6e24b4"
}
}Archives a customer, preventing new subscriptions. Optionally cancels existing subscriptions.
import Stigg from '@stigg/typescript';
const client = new Stigg({
apiKey: process.env['STIGG_API_KEY'], // This is the default and can be omitted
});
const customerResponse = await client.v1.customers.archive('x');
console.log(customerResponse.data);{
"data": {
"createdAt": "2026-04-23T05:09:17.199Z",
"updatedAt": "2025-06-05T02:07:54.190Z",
"archivedAt": "2026-02-18T11:05:34.929Z",
"name": "John Doe",
"email": "john@example.com",
"id": "customer-6e24b4",
"metadata": {},
"integrations": [],
"defaultPaymentMethod": {
"type": "CARD",
"billingId": "pm_1Q0PsIJvEtkwdCNYMSaVuRz6",
"cardLast4Digits": "1234",
"cardExpiryMonth": 12,
"cardExpiryYear": 2025
},
"couponId": "coupon-6e24b4"
}
}Server API Key
Server API Key
The unique identifier of the entity
1 - 255The archived customer object.
Response object
A customer can be either an organization or an individual
Show child attributes