Skip to main content
POST
/
api
/
v1
/
customers
JavaScript
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.provision({ id: 'id' });

console.log(customerResponse.data);
{
  "data": {
    "createdAt": "2026-12-09T01:44:41.821Z",
    "updatedAt": "2026-12-09T01:44:41.824Z",
    "archivedAt": "2026-12-09T01:44:41.826Z",
    "name": "John Doe",
    "email": "[email protected]",
    "id": "customer-6e24b4",
    "metadata": {},
    "integrations": [],
    "defaultPaymentMethod": {
      "type": "CARD",
      "billingId": "pm_1Q0PsIJvEtkwdCNYMSaVuRz6",
      "cardLast4Digits": "1234",
      "cardExpiryMonth": 12,
      "cardExpiryYear": 2025
    },
    "couponId": "coupon-6e24b4"
  }
}

Authorizations

X-API-KEY
string
header
required

Server API Key

Headers

X-API-KEY
string
required

Server API Key

Body

application/json

Provisions a new customer with unique ID, optional name and email.

id
string
required

Customer slug

Maximum string length: 255
name
string | null

The name of the customer

Maximum string length: 255
email
string<email> | null

The email of the customer

Maximum string length: 255
metadata
object

Additional metadata

integrations
CustomerIntegration · object[]

List of integrations

defaultPaymentMethod
PaymentMethod · object

The default payment method details

couponId
string | null

Customer level coupon

Maximum string length: 255

Response

Customer created.

Response object

data
Customer · object
required

A customer can be either an organization or an individual