Customers

Create a customer

Changed on

Create a new customer with the provided information. Sending tag_ids also requires the tags:write scope. Optional tag_ids are applied in the same transaction as the customer: if any tag cannot be applied, no customer is created. The reply's tag_ids are the tags applied at creation; system tags such as No Payment Method are added asynchronously right after, so a later GET may show more tags.

post/customers

Request

  • Base URL
    https://public-api.alternativepayments.io
  • URL
    https://public-api.alternativepayments.io/customers
  • Auth
    OAuth 2
    Client credentials
    Token URL: /oauth/token scopes: customers:write

Request body

citystring
countrystring
einstring
emailstring required
external_idstring
legal_namestring
namestring required
postal_codestring
statestring
street_addressstring
sub_premisestring
tag_idsstring[]

IDs of existing custom tags (see GET /tags) to apply to the new customer. Duplicates are ignored; at most 100 distinct IDs.

Example request

{
  "tag_ids": [
    "0b8f3c5e-6d2a-4f1b-9a7e-3c4d5e6f7a8b"
  ]
}

Response

Created

citystring
countrystring
created_atstring
customer_integration_idstring
default_payment_method_idstring
einstring
emailstring
external_idstring
idstring
legal_namestring
namestring
postal_codestring
statestring
street_addressstring
sub_premisestring
tag_idsstring[] nullable

IDs of the tags applied to the customer; empty when it has none. null only on PATCH, archive or restore when the change succeeded but the tags couldn't be reloaded; GET the customer to read them.

Example response

{
  "tag_ids": [
    "0b8f3c5e-6d2a-4f1b-9a7e-3c4d5e6f7a8b"
  ]
}

Changes

    • info

      added the new optional request property

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status

    • info

      added the optional property to the response with the status

    • breaking

      the request property became required

    • breaking

      the request property became required