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": "2025-10-26T10:00:00.000Z",
"updatedAt": "2025-10-26T10:00:00.000Z",
"archivedAt": "2025-12-31T22:00:00.000Z",
"name": "John Doe",
"email": "john@example.com",
"billingId": "cus_MIhJJFnJL24HFH",
"id": "customer-6e24b4",
"billingCurrency": "usd",
"metadata": {},
"integrations": [],
"defaultPaymentMethod": {
"type": "CARD",
"billingId": "pm_1Q0PsIJvEtkwdCNYMSaVuRz6",
"cardLast4Digits": "1234",
"cardExpiryMonth": 12,
"cardExpiryYear": 2025
},
"couponId": "coupon-6e24b4",
"timezone": null,
"language": "en",
"passthrough": {
"stripe": {
"invoiceCustomFields": {}
},
"zuora": {}
}
}
}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": "2025-10-26T10:00:00.000Z",
"updatedAt": "2025-10-26T10:00:00.000Z",
"archivedAt": "2025-12-31T22:00:00.000Z",
"name": "John Doe",
"email": "john@example.com",
"billingId": "cus_MIhJJFnJL24HFH",
"id": "customer-6e24b4",
"billingCurrency": "usd",
"metadata": {},
"integrations": [],
"defaultPaymentMethod": {
"type": "CARD",
"billingId": "pm_1Q0PsIJvEtkwdCNYMSaVuRz6",
"cardLast4Digits": "1234",
"cardExpiryMonth": 12,
"cardExpiryYear": 2025
},
"couponId": "coupon-6e24b4",
"timezone": null,
"language": "en",
"passthrough": {
"stripe": {
"invoiceCustomFields": {}
},
"zuora": {}
}
}
}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