Hashira
ReferenceCustomers

Create a customer

Requires a name plus at least one of `taxId`, `email` or `phone` — a name alone identifies nobody to the payment gateway. That rule is enforced by the request schema and by a database constraint, and a violation reports under `taxId` in the `fields` object.

POST
/v1/customers
AuthorizationBearer <token>

A Hashira API key.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1/customers" \  -H "Content-Type: application/json" \  -d '{    "name": "string"  }'
{  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",  "name": "string",  "taxId": "string",  "email": "string",  "phone": "string",  "createdAt": "2019-08-24T14:15:22Z"}