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);
import os
from stigg import Stigg

client = Stigg(
    api_key=os.environ.get("STIGG_API_KEY"),  # This is the default and can be omitted
)
customer_response = client.v1.customers.provision(
    id="id",
)
print(customer_response.data)
package main

import (
	"context"
	"fmt"

	"github.com/stiggio/stigg-go"
	"github.com/stiggio/stigg-go/option"
)

func main() {
	client := stigg.NewClient(
		option.WithAPIKey("My API Key"),
	)
	customerResponse, err := client.V1.Customers.Provision(context.TODO(), stigg.V1CustomerProvisionParams{
		ID: "id",
	})
	if err != nil {
		panic(err.Error())
	}
	fmt.Printf("%+v\n", customerResponse.Data)
}
package io.stigg.example;

import io.stigg.client.StiggClient;
import io.stigg.client.okhttp.StiggOkHttpClient;
import io.stigg.models.v1.customers.CustomerProvisionParams;
import io.stigg.models.v1.customers.CustomerResponse;

public final class Main {
    private Main() {}

    public static void main(String[] args) {
        StiggClient client = StiggOkHttpClient.fromEnv();

        CustomerProvisionParams params = CustomerProvisionParams.builder()
            .id("id")
            .build();
        CustomerResponse customerResponse = client.v1().customers().provision(params);
    }
}
require "stigg"

stigg = Stigg::Client.new(api_key: "My API Key")

customer_response = stigg.v1.customers.provision(id: "id")

puts(customer_response)
using System;
using Stigg.Client;
using Stigg.Client.Models.V1.Customers;

StiggClient client = new();

CustomerProvisionParams parameters = new() { ID = "id" };

var customerResponse = await client.V1.Customers.Provision(parameters);

Console.WriteLine(customerResponse);
stigg v1:customers provision \
  --api-key 'My API Key' \
  --id id
curl --request POST \
  --url https://api.stigg.io/api/v1/customers \
  --header 'Content-Type: application/json' \
  --header 'X-API-KEY: <api-key>' \
  --data '
{
  "id": "<string>",
  "name": "<string>",
  "email": "jsmith@example.com",
  "billingId": "<string>",
  "metadata": {},
  "integrations": [
    {
      "syncedEntityId": "<string>",
      "id": "<string>"
    }
  ],
  "defaultPaymentMethod": {
    "billingId": "<string>",
    "cardLast4Digits": "<string>",
    "cardExpiryMonth": 123,
    "cardExpiryYear": 123
  },
  "couponId": "<string>",
  "timezone": "<string>",
  "language": "<string>",
  "passthrough": {
    "stripe": {
      "customerName": "<string>",
      "billingAddress": {
        "city": "<string>",
        "country": "<string>",
        "line1": "<string>",
        "line2": "<string>",
        "postalCode": "<string>",
        "state": "<string>"
      },
      "shippingAddress": {
        "city": "<string>",
        "country": "<string>",
        "line1": "<string>",
        "line2": "<string>",
        "postalCode": "<string>",
        "state": "<string>"
      },
      "paymentMethodId": "<string>",
      "taxIds": [
        {
          "type": "<string>",
          "value": "<string>"
        }
      ],
      "invoiceCustomFields": {},
      "metadata": {}
    },
    "zuora": {
      "billingAddress": {
        "city": "<string>",
        "country": "<string>",
        "line1": "<string>",
        "line2": "<string>",
        "postalCode": "<string>",
        "state": "<string>"
      },
      "paymentMethodId": "<string>",
      "metadata": {}
    }
  }
}
'
<?php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.stigg.io/api/v1/customers",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'id' => '<string>',
    'name' => '<string>',
    'email' => 'jsmith@example.com',
    'billingId' => '<string>',
    'metadata' => [
        
    ],
    'integrations' => [
        [
                'syncedEntityId' => '<string>',
                'id' => '<string>'
        ]
    ],
    'defaultPaymentMethod' => [
        'billingId' => '<string>',
        'cardLast4Digits' => '<string>',
        'cardExpiryMonth' => 123,
        'cardExpiryYear' => 123
    ],
    'couponId' => '<string>',
    'timezone' => '<string>',
    'language' => '<string>',
    'passthrough' => [
        'stripe' => [
                'customerName' => '<string>',
                'billingAddress' => [
                                'city' => '<string>',
                                'country' => '<string>',
                                'line1' => '<string>',
                                'line2' => '<string>',
                                'postalCode' => '<string>',
                                'state' => '<string>'
                ],
                'shippingAddress' => [
                                'city' => '<string>',
                                'country' => '<string>',
                                'line1' => '<string>',
                                'line2' => '<string>',
                                'postalCode' => '<string>',
                                'state' => '<string>'
                ],
                'paymentMethodId' => '<string>',
                'taxIds' => [
                                [
                                                                'type' => '<string>',
                                                                'value' => '<string>'
                                ]
                ],
                'invoiceCustomFields' => [
                                
                ],
                'metadata' => [
                                
                ]
        ],
        'zuora' => [
                'billingAddress' => [
                                'city' => '<string>',
                                'country' => '<string>',
                                'line1' => '<string>',
                                'line2' => '<string>',
                                'postalCode' => '<string>',
                                'state' => '<string>'
                ],
                'paymentMethodId' => '<string>',
                'metadata' => [
                                
                ]
        ]
    ]
  ]),
  CURLOPT_HTTPHEADER => [
    "Content-Type: application/json",
    "X-API-KEY: <api-key>"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
{
  "data": {
    "createdAt": "2025-10-26T10:00:00.000Z",
    "updatedAt": "2025-10-26T10:00:00.000Z",
    "archivedAt": null,
    "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": {}
    }
  }
}
{
  "message": "<string>"
}
{
  "message": "<string>",
  "code": "Unauthenticated"
}
{
  "message": "<string>"
}
{
  "message": "<string>"
}
{
  "message": "<string>",
  "code": "RateLimitExceeded"
}

Authorizations

X-API-KEY
string
header
required

Server API Key

Headers

X-ACCOUNT-ID
string

Account ID — optional when authenticating with a user JWT (Bearer token); falls back to the user's first membership. Ignored for API-key auth.

X-ENVIRONMENT-ID
string

Environment ID — required when authenticating with a user JWT (Bearer token) on environment-scoped endpoints. Ignored for API-key auth (env is intrinsic to the key).

Body

application/json

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

id
string
required

Customer slug

Required string length: 1 - 255
Pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.@-]*$
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
billingId
string | null

The unique identifier for the entity in the billing provider

Maximum string length: 255
billingCurrency
enum<string> | null

The billing currency of the customer

Available options:
usd,
aed,
all,
amd,
ang,
aud,
awg,
azn,
bam,
bbd,
bdt,
bgn,
bif,
bmd,
bnd,
bsd,
bwp,
byn,
bzd,
brl,
cad,
cdf,
chf,
cny,
czk,
dkk,
dop,
dzd,
egp,
etb,
eur,
fjd,
gbp,
gel,
gip,
gmd,
gyd,
hkd,
hrk,
htg,
idr,
ils,
inr,
isk,
jmd,
jpy,
kes,
kgs,
khr,
kmf,
krw,
kyd,
kzt,
lbp,
lkr,
lrd,
lsl,
mad,
mdl,
mga,
mkd,
mmk,
mnt,
mop,
mro,
mvr,
mwk,
mxn,
myr,
mzn,
nad,
ngn,
nok,
npr,
nzd,
pgk,
php,
pkr,
pln,
qar,
ron,
rsd,
rub,
rwf,
sar,
sbd,
scr,
sek,
sgd,
sle,
sll,
sos,
szl,
thb,
tjs,
top,
try,
ttd,
tzs,
uah,
uzs,
vnd,
vuv,
wst,
xaf,
xcd,
yer,
zar,
zmw,
clp,
djf,
gnf,
ugx,
pyg,
xof,
xpf
metadata
object

Additional metadata

integrations
CustomerIntegration · object[]

List of integrations

defaultPaymentMethod
PaymentMethod · object | null

The default payment method details

couponId

Customer level coupon

Required string length: 1 - 255
Pattern: ^[a-zA-Z0-9][a-zA-Z0-9_|.-]*$
timezone
string | null

Timezone to use for this customer

Maximum string length: 255
language
string | null

Language to use for this customer

Maximum string length: 255
passthrough
CustomerPassthrough · object

Vendor-specific billing passthrough fields.

Response

The newly created customer object.

Response object

data
Customer · object
required

A customer can be either an organization or an individual