Reference

Table Customers


Description

No description available

Supported Operations

Below section contains supported CRUD operations. Each operation is executed by some EndPoint behind the scene.
Method Supported Reference EndPoint
SELECT get_customers
INSERT create_customer
UPDATE update_customer
UPSERT
DELETE delete_customer
LOOKUP get_single_customer

Examples

SSIS

Use Stripe Connector in API Source component to read data or in API Destination component to read/write data:

Read from Customers table using API Source

API Source - Stripe
Read and write Stripe data effortlessly. Manage customers, products, subscriptions, and invoices — almost no coding required.
Stripe
Customers
Optional Parameters
Email Id
Created later than (yyyy-MM-dd)
Created on or later than (yyyy-MM-dd)
Created earlier than (yyyy-MM-dd)
Created on or earlier than (yyyy-MM-dd)
SSIS API Source - Read from table or endpoint

Read/write to Customers table using API Destination

API Destination - Stripe
Read and write Stripe data effortlessly. Manage customers, products, subscriptions, and invoices — almost no coding required.
Stripe
Customers
Select
Optional Parameters
Email Id
Created later than (yyyy-MM-dd)
Created on or later than (yyyy-MM-dd)
Created earlier than (yyyy-MM-dd)
Created on or earlier than (yyyy-MM-dd)
SSIS API Destination - Access table operation

ODBC application

Use these SQL queries in your ODBC application data source:

Read customers

<p>Reads all records from the <code>Customers</code> table. This example demonstrates a basic SELECT query to retrieve a complete list of customers from the Stripe account.</p>

SELECT * FROM Customers

Read a customer

<p>Reads a single customer record from the <code>Customers</code> table by specifying the <code>Id</code>. This example demonstrates how to filter results to a specific customer using the WHERE clause.</p>

SELECT * FROM Customers
WHERE Id = 'abc'

Read customers filtered by date

<p>Reads customer records created after a specific date. This example demonstrates how to filter the <code>Customers</code> table using the <code>Created</code> column with a date comparison in <code>yyyy-MM-dd</code> format.</p>

SELECT * FROM Customers
WHERE Created > '2010-01-01'

Create a customer

<p>Creates a new customer record in the <code>Customers</code> table. This example demonstrates how to use the <code>INSERT INTO</code> statement to specify customer details such as name, email, phone, and address information.</p>

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'
)

Update a customer

<p>Updates an existing customer record in the <code>Customers</code> table. This example shows how to modify multiple fields, including contact and shipping information, for a specific customer identified by their <code>Id</code>.</p>

UPDATE Customers
SET   Name='Cust1-Updated'
	, Email='a-updated@b.com'
	, Phone='+1 800-123-2345'
	, Description='Desc-updated'
	, AddressLine1='Line-1-upd'
	, AddressLine2='Line-2-upd'
	, AddressCity='SomeCity'
	, AddressState='NY'
	, AddressCountry='USA'
	, AddressPostalCode='112233'
	
	, ShippingPhone='+1 800-123-2345'
	, ShippingName='SHName-upd'
	, ShippingAddressLine1='Line-1-upd'
	, ShippingAddressLine2='Line-2-upd'
	, ShippingAddressCity='SomeCity'
	, ShippingAddressState='NY'
	, ShippingAddressCountry='USA'
	, ShippingAddressPostalCode='112233'
	
	, Balance=100	
WHERE Id='cus_IcUG2lD69ZHuol'

Delete a customer

<p>Deletes a customer record from the <code>Customers</code> table. This example demonstrates how to remove a customer using the <code>DELETE FROM</code> statement with a specific <code>Id</code> in the WHERE clause.</p>

DELETE FROM Customers
WHERE Id = 'abc'

SQL Server

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

Read customers

<p>Reads all records from the <code>Customers</code> table. This example demonstrates a basic SELECT query to retrieve a complete list of customers from the Stripe account.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Customers';

EXEC (@MyQuery) AT [LS_TO_STRIPE_IN_GATEWAY];

Read a customer

<p>Reads a single customer record from the <code>Customers</code> table by specifying the <code>Id</code>. This example demonstrates how to filter results to a specific customer using the WHERE clause.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Customers
WHERE Id = ''abc''';

EXEC (@MyQuery) AT [LS_TO_STRIPE_IN_GATEWAY];

Read customers filtered by date

<p>Reads customer records created after a specific date. This example demonstrates how to filter the <code>Customers</code> table using the <code>Created</code> column with a date comparison in <code>yyyy-MM-dd</code> format.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'SELECT * FROM Customers
WHERE Created > ''2010-01-01''';

EXEC (@MyQuery) AT [LS_TO_STRIPE_IN_GATEWAY];

Create a customer

<p>Creates a new customer record in the <code>Customers</code> table. This example demonstrates how to use the <code>INSERT INTO</code> statement to specify customer details such as name, email, phone, and address information.</p>

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];

Update a customer

<p>Updates an existing customer record in the <code>Customers</code> table. This example shows how to modify multiple fields, including contact and shipping information, for a specific customer identified by their <code>Id</code>.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'UPDATE Customers
SET   Name=''Cust1-Updated''
	, Email=''a-updated@b.com''
	, Phone=''+1 800-123-2345''
	, Description=''Desc-updated''
	, AddressLine1=''Line-1-upd''
	, AddressLine2=''Line-2-upd''
	, AddressCity=''SomeCity''
	, AddressState=''NY''
	, AddressCountry=''USA''
	, AddressPostalCode=''112233''
	
	, ShippingPhone=''+1 800-123-2345''
	, ShippingName=''SHName-upd''
	, ShippingAddressLine1=''Line-1-upd''
	, ShippingAddressLine2=''Line-2-upd''
	, ShippingAddressCity=''SomeCity''
	, ShippingAddressState=''NY''
	, ShippingAddressCountry=''USA''
	, ShippingAddressPostalCode=''112233''
	
	, Balance=100	
WHERE Id=''cus_IcUG2lD69ZHuol''';

EXEC (@MyQuery) AT [LS_TO_STRIPE_IN_GATEWAY];

Delete a customer

<p>Deletes a customer record from the <code>Customers</code> table. This example demonstrates how to remove a customer using the <code>DELETE FROM</code> statement with a specific <code>Id</code> in the WHERE clause.</p>

DECLARE @MyQuery NVARCHAR(MAX) = 'DELETE FROM Customers
WHERE Id = ''abc''';

EXEC (@MyQuery) AT [LS_TO_STRIPE_IN_GATEWAY];