Reference

Endpoint Create a Customer


Name

create_customer

Description

Create a Customer [API reference]

Related Tables

Customers

Parameters

Parameter Required Options
Name: name

Label: Name

The customer’s full name or business name.
Name: description

Label: Description

An arbitrary string that you can attach to a customer object. It is displayed alongside the customer in the dashboard.
Name: email

Label: Email

Customer’s email address.
Name: payment_method

Label: Payment Method

The Id of the PaymentMethod to attach to the customer.
Name: phone

Label: Phone

The customer’s phone number.
Name: balance

Label: Balance

An integer amount in cents that represents the customer’s current balance, which affect the customer’s future invoices. A negative amount represents a credit that decreases the amount due on an invoice; a positive amount increases the amount due on an invoice.
Name: coupon

Label: Coupon

If you provide a coupon code, the customer will have a discount applied on all recurring charges. Charges you create through the API will not have the discount.
Name: preferred_locales

Label: Preferred Locales

Customer’s preferred languages, ordered by preference. Example ["en-US", "en-ES"] . Supported languages are listed here https://support.stripe.com/questions/language-options-for-customer-emails
Name: promotion_code

Label: Promotion Code

The API Id of a promotion code to apply to the customer. The customer will have a discount applied on all recurring payments. Charges you create through the API will not have the discount.
Name: tax_id_data_type

Label: Tax Id Type (ae_trn, au_abn, br_cnpj, br_cpf etc.)

Type of the tax Id, one of ae_trn, au_abn, br_cnpj, br_cpf, ca_bn, ca_qst, ch_vat, cl_tin, es_cif, eu_vat, hk_br, id_npwp, in_gst, jp_cn, jp_rn, kr_brn, li_uid, mx_rfc, my_frp, my_itn, my_sst, no_vat, nz_gst, ru_inn, ru_kpp, sa_vat, sg_gst, sg_uen, th_vat, tw_vat, us_ein, or za_vat
Option Value
ae_trn ae_trn
au_abn au_abn
br_cnpj br_cnpj
br_cpf br_cpf
ca_bn ca_bn
ca_qst ca_qst
ch_vat ch_vat
cl_tin cl_tin
es_cif es_cif
eu_vat eu_vat
hk_br hk_br
id_npwp id_npwp
in_gst in_gst
jp_cn jp_cn
jp_rn jp_rn
kr_brn kr_brn
li_uid li_uid
mx_rfc mx_rfc
my_frp my_frp
my_itn my_itn
my_sst my_sst
no_vat no_vat
nz_gst nz_gst
ru_inn ru_inn
ru_kpp ru_kpp
sa_vat sa_vat
sg_gst sg_gst
sg_uen sg_uen
th_vat th_vat
tw_vat tw_vat
us_ein us_ein
za_vat za_vat
Name: tax_id_data_value

Label: Tax Id Value

Value of the tax Id.
Name: address_line1

Label: Address Line1

Address line 1 (e.g., street, PO Box, or company name).
Name: address_line2

Label: Address Line2

Address line 2 (e.g., apartment, suite, unit, or building).
Name: address_city

Label: Address City

City, district, suburb, town, or village.
Name: address_state

Label: Address State

State, county, province, or region.
Name: address_country

Label: Address Country

Two-letter country code
Name: address_postal_code

Label: Address Postal Code

ZIP or postal code.
Name: shipping_name

Label: Shipping Name

Customer name.
Name: shipping_phone

Label: Shipping Phone

Customer phone (including extension).
Name: shipping_address_line1

Label: Shipping Address Line1

Address line 1 (e.g., street, PO Box, or company name).
Name: shipping_address_line2

Label: Shipping Address Line2

Address line 2 (e.g., apartment, suite, unit, or building).
Name: shipping_address_city

Label: Shipping Address City

City, district, suburb, town, or village.
Name: shipping_address_state

Label: Shipping Address State

State, county, province, or region.
Name: shipping_address_country

Label: Shipping Address Country

Two-letter country code
Name: shipping_address_postal_code

Label: Shipping Address Postal Code

ZIP or postal code.
Name: invoice_prefix

Label: Invoice_Prefix (Must be 3–12 uppercase letters or numbers)

The prefix for the customer used to generate unique invoice numbers.
Name: invoice_settings_default_payment_method

Label: Invoice Settings - Default Payment Method

ID of a payment method that’s attached to the customer, to be used as the customer’s default payment method for subscriptions and invoices.
Name: invoice_settings_footer

Label: Invoice Settings - Footer

Default footer to be displayed on invoices for this customer.
Name: next_invoice_sequence

Label: Next invoice sequence

The suffix of the customer’s next invoice number, e.g., 0001.
Name: tax_exempt

Label: Tax Exempt (none, exempt, reverse)

Describes the customer tax exemption status. One of none, exempt, or reverse. When set to reverse, invoice and receipt PDFs include the text Reverse charge.
Option Value
none none
exempt exempt
reverse reverse

Output Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
Id DT_WSTR nvarchar(100) 100
Object DT_WSTR nvarchar(100) 100
Name DT_WSTR nvarchar(255) 255
Email DT_WSTR nvarchar(100) 100
Description DT_WSTR nvarchar(4000) 4000
Phone DT_WSTR nvarchar(100) 100
PaymentMethod DT_WSTR nvarchar(100) 100
DefaultSource DT_WSTR nvarchar(100) 100
DefaultCurrency DT_WSTR nvarchar(100) 100
Balance DT_WSTR nvarchar(100) 100
Coupon DT_WSTR nvarchar(100) 100
PreferredLocales DT_WSTR nvarchar(100) 100
PromotionCode DT_WSTR nvarchar(100) 100
AddressLine1 DT_WSTR nvarchar(100) 100
AddressLine2 DT_WSTR nvarchar(100) 100
AddressCity DT_WSTR nvarchar(100) 100
AddressState DT_WSTR nvarchar(100) 100
AddressCountry DT_WSTR nvarchar(100) 100
AddressPostalCode DT_WSTR nvarchar(100) 100
ShippingName DT_WSTR nvarchar(255) 255
ShippingPhone DT_WSTR nvarchar(100) 100
ShippingAddressLine1 DT_WSTR nvarchar(100) 100
ShippingAddressLine2 DT_WSTR nvarchar(100) 100
ShippingAddressCity DT_WSTR nvarchar(100) 100
ShippingAddressCountry DT_WSTR nvarchar(100) 100
ShippingAddressState DT_WSTR nvarchar(100) 100
ShippingAddressPostalCode DT_WSTR nvarchar(100) 100
TaxIDType DT_WSTR nvarchar(100) 100
TaxIDValue DT_WSTR nvarchar(100) 100
InvoicePrefix DT_WSTR nvarchar(100) 100
InvoiceSettingsDefaultPaymentMethod DT_WSTR nvarchar(100) 100
InvoiceSettingsFooter DT_WSTR nvarchar(100) 100
NextInvoiceSequence DT_WSTR nvarchar(100) 100
TaxExempt DT_WSTR nvarchar(100) 100
Created DT_DBTIMESTAMP datetime
LiveMode DT_WSTR nvarchar(100) 100
Metadata DT_WSTR nvarchar(1000) 1000
If the column you are looking for is missing, consider customizing Stripe Connector.

Input Columns

Label Data Type (SSIS) Data Type (SQL) Length Description
Name DT_WSTR nvarchar(255) 255
Email DT_WSTR nvarchar(100) 100
Description DT_WSTR nvarchar(4000) 4000
Phone DT_WSTR nvarchar(100) 100
PaymentMethod DT_WSTR nvarchar(100) 100
Balance DT_WSTR nvarchar(100) 100
Coupon DT_WSTR nvarchar(100) 100
tax_id_data_type DT_WSTR nvarchar(4000) 4000
tax_id_data_value DT_WSTR nvarchar(4000) 4000
PreferredLocales DT_WSTR nvarchar(100) 100
PromotionCode DT_WSTR nvarchar(100) 100
AddressLine1 DT_WSTR nvarchar(100) 100
AddressLine2 DT_WSTR nvarchar(100) 100
AddressCity DT_WSTR nvarchar(100) 100
AddressState DT_WSTR nvarchar(100) 100
AddressCountry DT_WSTR nvarchar(100) 100
AddressPostalCode DT_WSTR nvarchar(100) 100
ShippingName DT_WSTR nvarchar(255) 255
ShippingPhone DT_WSTR nvarchar(100) 100
ShippingAddressLine1 DT_WSTR nvarchar(100) 100
ShippingAddressLine2 DT_WSTR nvarchar(100) 100
ShippingAddressCity DT_WSTR nvarchar(100) 100
ShippingAddressCountry DT_WSTR nvarchar(100) 100
ShippingAddressState DT_WSTR nvarchar(100) 100
ShippingAddressPostalCode DT_WSTR nvarchar(100) 100
TaxIDType DT_WSTR nvarchar(100) 100
TaxIDValue DT_WSTR nvarchar(100) 100
InvoicePrefix DT_WSTR nvarchar(100) 100
InvoiceSettingsDefaultPaymentMethod DT_WSTR nvarchar(100) 100
InvoiceSettingsFooter DT_WSTR nvarchar(100) 100
NextInvoiceSequence DT_WSTR nvarchar(100) 100
TaxExempt DT_WSTR nvarchar(100) 100
Created DT_DBTIMESTAMP datetime
Required columns that you need to supply are bolded.

Examples

SSIS

Use Stripe Connector in API Source or in API Destination SSIS Data Flow components to read or write data.

API Source

API Source - Stripe
This connector support read/write operations for Stripe APIs
Stripe
Create a Customer
Optional Parameters
Name
Description
Email
Payment Method
Phone
Balance
Coupon
Preferred Locales
Promotion Code
Tax Id Type (ae_trn, au_abn, br_cnpj, br_cpf etc.)
Tax Id Value
Address Line1
Address Line2
Address City
Address State
Address Country
Address Postal Code
Shipping Name
Shipping Phone
Shipping Address Line1
Shipping Address Line2
Shipping Address City
Shipping Address State
Shipping Address Country
Shipping Address Postal Code
Invoice_Prefix (Must be 3–12 uppercase letters or numbers)
Invoice Settings - Default Payment Method
Invoice Settings - Footer
Next invoice sequence
Tax Exempt (none, exempt, reverse)
SSIS API Source - Read from table or endpoint

API Destination

This Endpoint belongs to the Customers table, therefore it is better to use it, instead of accessing the endpoint directly. Use this table and table-operation pair to create a customer:

API Destination - Stripe
This connector support read/write operations for Stripe APIs
Stripe
Customers
Insert
Optional Parameters
Name
Description
Email
Payment Method
Phone
Balance
Coupon
Preferred Locales
Promotion Code
Tax Id Type (ae_trn, au_abn, br_cnpj, br_cpf etc.)
Tax Id Value
Address Line1
Address Line2
Address City
Address State
Address Country
Address Postal Code
Shipping Name
Shipping Phone
Shipping Address Line1
Shipping Address Line2
Shipping Address City
Shipping Address State
Shipping Address Country
Shipping Address Postal Code
Invoice_Prefix (Must be 3–12 uppercase letters or numbers)
Invoice Settings - Default Payment Method
Invoice Settings - Footer
Next invoice sequence
Tax Exempt (none, exempt, reverse)
SSIS API Destination - Access table operation

ODBC application

Use these SQL queries in your ODBC application data source:

Insert a Customer

Insert a customer

INSERT INTO Customers
([Name]
	, [Email]
	, [Description]
	, [Phone]
	, [Balance]
	, [AddressLine1]
	, [AddressLine2]
	, [AddressCity]
	, [AddressState]
	, [AddressCountry]
	, [AddressPostalCode]
	, [InvoicePrefix]
	)
VALUES('Cust-1'
	, 'email@abc.com'
	, 'Some desc'
	, '+1 222-333-4444'
	, 0
	, '55 Main St.'
	, 'Suite 100'
	, 'New York'
	, 'NY'
	, 'USA'
	, '07204' --JSON fragment 
	, 'INVC'
)

create_customer endpoint belongs to Customers table(s), and can therefore be used via those table(s).

SQL Server

Use these SQL queries in SQL Server after you create a data source in Data Gateway:

Insert a Customer

Insert a customer

DECLARE @MyQuery NVARCHAR(MAX) = 'INSERT INTO Customers
([Name]
	, [Email]
	, [Description]
	, [Phone]
	, [Balance]
	, [AddressLine1]
	, [AddressLine2]
	, [AddressCity]
	, [AddressState]
	, [AddressCountry]
	, [AddressPostalCode]
	, [InvoicePrefix]
	)
VALUES(''Cust-1''
	, ''email@abc.com''
	, ''Some desc''
	, ''+1 222-333-4444''
	, 0
	, ''55 Main St.''
	, ''Suite 100''
	, ''New York''
	, ''NY''
	, ''USA''
	, ''07204'' --JSON fragment 
	, ''INVC''
)';

EXEC (@MyQuery) AT [LS_TO_STRIPE_IN_GATEWAY];

create_customer endpoint belongs to Customers table(s), and can therefore be used via those table(s).