v1

latestOpenAPI 3.0.22026-07-24800528.1 KB
Customers

Create a customer

Creates a new customer with the data provided.<br>⚠️ Please note: this endpoint cannot associate a customer signup with a link or a click, which results in signups, paid customers, and revenue not being accurately attributed to any landing pages or partners. To track your signups from a link or click, please user Server-to-Server instead.

post/v2/customers

Request body

customer_keystring nullable required

External customer key that can be configured on creation.

emailstring required

The customers email, must be a valid email

member_keystring

The key of the member that is responsible for the customer (note: member_key must belong to a team member of a partner in your program).

metaobject

Additional custom fields for the customer that is configured in your PartnerStack dashboard.

namestring

Should be either the customer's name, or the company name

provider_keystring nullable

A unique identifier given by a payment provider (Stripe, Recurly, Chargebee etc)

partner_keystring required

The key of the partner that is responsible for the customer (note: partner_key must belong to a partner in your program).

Example request

{
  "customer_key": "123435",
  "email": "johnsmith@gmail.com",
  "member_key": "stck_12345",
  "meta": {
    "field": "value"
  },
  "name": "John Smith",
  "provider_key": "cus_AJ6bvXbVofMpsW",
  "partner_key": "bertramgilfoyle"
}

Response

Creates a new customer with the data provided.<br>⚠️ Please note: this endpoint cannot associate a customer signup with a link or a click, which results in signups, paid customers, and revenue not being accurately attributed to any landing pages or partners. To track your signups from a link or click, please user Server-to-Server instead.

messagestring required
statusinteger required

Example response

{
  "data": {
    "created_at": 1574181282399,
    "key": "co_a80cb515fe",
    "updated_at": 1574181282399,
    "customer_key": "123435",
    "email": "johnsmith@gmail.com",
    "fields": [
      {
        "field_key": "field_fjkdlrh9i32nfew",
        "name": "Company Address"
      }
    ],
    "mdata": {
      "api_key": "value"
    },
    "meta": {
      "field": "value"
    },
    "name": "John Smith",
    "partner_key": "bertramgilfoyle",
    "partnership_key": "part_A7nGc9pKnx8xEW",
    "provider_key": "cus_AJ6bvXbVofMpsW",
    "shared_id": "fake_shared_id",
    "source_key": "deal_987us345r2",
    "source_type": "deal",
    "submitted_by": "johndoe@gmail.com",
    "submitted_by_email": "johndoe@gmail.com",
    "team": {
      "color": "blue",
      "logo": "file12345.png",
      "name": "Team Whippets"
    },
    "test": true
  }
}