CreddotDocsCreddot Docs
API referenceCustomers

Create a customer in the API key environment

POST
/api/v1/customers

Authorization

api-key
headerx-api-key<token>

Your API key: ck_test_... for test mode, ck_live_... for live. Send it with x-api-secret (or Authorization: Bearer ).

Header Parameters

x-api-secret?string

Recommended: API secret sent over HTTPS. You may send it as Authorization: Bearer instead. If supplied, x-timestamp and x-signature are not required.

x-timestamp?string

Legacy signed mode: Unix time in milliseconds; maximum clock skew five minutes.

x-signature?string

Legacy signed mode: HMAC-SHA256(secret, timestamp.METHOD.url.idempotencyKey.bodyHash).

x-idempotency-key*string

1–128 letters/digits or ._:-. Same key and payload replay for 24 hours; conflicting, in-flight, or expired keys return 409. Never change a key to retry an uncertain payment.

Request Body

application/json
  1. body
firstName*string
Lengthlength <= 80
lastName*string
Lengthlength <= 80
email*string
Formatemail
phoneNumber?|null
billingAddressLine1?|
Lengthlength <= 255
billingAddressLine2?|
Lengthlength <= 255
billingCity?|
Lengthlength <= 120
billingState?|
Lengthlength <= 120
billingPostalCode?|
Lengthlength <= 32
billingCountryCode?|null

Response Body

application/json
  1. response
id*string
customerId*string
firstName*string
lastName*string
name*string
email*string
Formatemail
phoneNumber*|null
status*string
Value in"ACTIVE""DISABLED"
environment*string
Value in"SANDBOX""LIVE"
billingAddress*
disabledAt*|
Formatdate-time
createdAt*string
Formatdate-time
updatedAt*string
Formatdate-time
Example Request
curl -X POST 'https://api.creddot.com/api/v1/customers' \  -H 'x-idempotency-key: string' \  -H 'Content-Type: application/json' \  -d '{  "firstName": "Akanji",  "lastName": "Joseph",  "email": "akanji@example.com"}'
Example Response
{  "id": "string",  "customerId": "string",  "firstName": "string",  "lastName": "string",  "name": "string",  "email": "user@example.com",  "phoneNumber": {},  "status": "ACTIVE",  "environment": "SANDBOX",  "billingAddress": {},  "disabledAt": {},  "createdAt": "2019-08-24T14:15:22Z",  "updatedAt": "2019-08-24T14:15:22Z"}