Skip to main content
POST
/
v2
/
customer_sessions
Create a new customer session
curl --request POST \
  --url https://dev.sbx.imprint.co/v2/customer_sessions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "customer_id": "AD87A18A-A4BE-49FF-BC46-BF6F0779DBAA",
  "partner_customer_id": "CUST_03476998",
  "transaction_amount": 34000,
  "transaction_currency": "USD",
  "customer_history": {
    "email": "[email protected]",
    "phone": "+14155552671",
    "first_name": "John",
    "last_name": "Doe",
    "preferred_language": "en",
    "address": {
      "street_line1": "123 Main St",
      "street_line2": "Apt 4B",
      "city": "San Francisco",
      "state": "CA",
      "postal_code": "94105",
      "country": "USA"
    },
    "account_tenure": 13,
    "ltv_amount": 34000,
    "ltv_currency": "USD",
    "loyalty_tier": "GOLD",
    "account_created_at": "2025-02-13T19:08:07.000Z",
    "transaction_count": 100
  },
  "source": "<string>",
  "metadata": {
    "store_number": "123"
  }
}
'
{
  "id": "2EE24580-B97B-4949-A65C-929CCB9B9B8D",
  "client_secret": "QzMyNzg4QzgtNEUwOS00QkU4LThDMjEtMkU5OUQ3QzkwRDhGCg==",
  "expires_at": "2025-02-13T19:08:07.000Z",
  "metadata": {
    "store_number": "123"
  },
  "source": "web_signup"
}

Authorizations

Authorization
string
header
required

Bearer HTTP authentication. Allowed headers-- Authorization: Bearer <api_key>

Body

application/json
customer_id
string

Unique identifier for the Imprint customer, if creating a customer session for a known imprint customer that the id is available for

Example:

"AD87A18A-A4BE-49FF-BC46-BF6F0779DBAA"

partner_customer_id
string

The unique identifier for the customer in the partner's system

Example:

"CUST_03476998"

transaction_amount
integer

The current transaction amount, if the session is currently executing a transaction. integer value in the min currency unit (cents for USD)

Example:

34000

transaction_currency
string

The 3 char currency code of the amount in iso-4217

Example:

"USD"

customer_history
object

A Customer's account history with the partner

source
string

The source where the session is initiated

metadata
object

Additional linking metadata

Example:
{ "store_number": "123" }

Response

Customer session created successfully

Represents a session created on behalf of an Imprint customer

id
string
required

The unique ID Imprint assigns to the session.

Example:

"2EE24580-B97B-4949-A65C-929CCB9B9B8D"

client_secret
string
required

Not to be logged or stored. Provide this one time use token to the Imprint SDK or other client side code to allow the customer access to edit their own account or apply

Example:

"QzMyNzg4QzgtNEUwOS00QkU4LThDMjEtMkU5OUQ3QzkwRDhGCg=="

expires_at
string
required

the RFC-3339 timestamp when the client_secret will expire.

Example:

"2025-02-13T19:08:07.000Z"

metadata
object

Set of key-value pairs for storing additional information about the customer session.

Example:
{ "store_number": "123" }
source
string

The source where the session was initiated

Example:

"web_signup"