Create a customer

POST
/v1/customers

Registers a person or business you act for, under your own external_id. The same external_id sent again with the same identity (type, country, display_name, profile) returns the existing customer (200); with a different identity it is a 409 conflict. metadata is yours and is not compared.

Autorización

apiKey
headerAuthorizationBearer <clave>

Your secret API key, sent as Authorization: Bearer <key>. A key names its environment: psp_test_… works only against sandbox (https://api-sandbox.caibopay.app), psp_live_… only against live (https://api.caibopay.app). Keys are issued by Caibo when your account is opened; the dashboard (Developers) shows the key in use.

Encabezados

Idempotency-Key*string

A unique key for this request, 8 to 128 characters.

Match^[A-Za-z0-9._:-]{8,128}$
application/json
  1. body
country*string

ISO 3166-1 alpha-2 of the customer.

display_name*string

The name shown for the customer. Stored encrypted.

Longitudlength <= 200
external_id*string

Your own id for this customer. Unique per account; sending it again returns the same customer.

Longitudlength <= 128
metadata?

Your own references: at most 20 keys of the form [a-z][a-z0-9_]{0,39}, string values of at most 500 characters. Never personal data.

Camposproperties <= 20
profile?
type*string

Person or business.

Valor en"individual""business"

Cuerpo de la respuesta

The request was already made: the existing resource is returned.

application/json
  1. response
compliance_status*string

What compliance said about the customer. It changes through the platform's checks, never through this API.

Valor en"unverified""pending""verified""rejected""review"
country*string

ISO 3166-1 alpha-2.

created_at*string

When it was created.

Formatodate-time
display_name*string

The name shown for the customer.

external_id*string

Your own id for this customer.

id*string

The id of the customer.

Match^cus_[0-9a-z]+$
metadata*

Your own references: at most 20 keys of the form [a-z][a-z0-9_]{0,39}, string values of at most 500 characters. Never personal data.

Camposproperties <= 20
profile?
status*string

blocked: the platform stopped this customer; nothing is paid to its beneficiaries. closed: final.

Valor en"active""blocked""closed"
type*string

Person or business.

Valor en"individual""business"
updated_at*string

When it last changed.

Formatodate-time
Ejemplo de solicitud
curl -X POST 'https://api-sandbox.caibopay.app/v1/customers' \  -H 'Idempotency-Key: string' \  -H 'Content-Type: application/json' \  -d '{  "country": "string",  "display_name": "string",  "external_id": "string",  "type": "individual"}'
Ejemplo de respuesta
{  "compliance_status": "unverified",  "country": "string",  "created_at": "2019-08-24T14:15:22Z",  "display_name": "string",  "external_id": "string",  "id": "string",  "metadata": {    "property1": "string",    "property2": "string"  },  "profile": {    "address": {      "city": "string",      "country": "string",      "line1": "string",      "line2": "string",      "postal_code": "string",      "state": "string"    },    "date_of_birth": "string",    "email": "string",    "first_name": "string",    "identity_document": "string",    "identity_document_country": "string",    "identity_document_type": "string",    "last_name": "string",    "phone": "string",    "registration_number": "string",    "tax_id": "string"  },  "status": "active",  "type": "individual",  "updated_at": "2019-08-24T14:15:22Z"}