Customers

Create a customer

Changed on

Create a new customer record. Customers can be associated with payments for tracking and recurring billing.

post/v1/customers

Request

Headers

X-Idempotency-Keystring required

A unique string to ensure the request is processed only once. Must be unique per request. Valid for 24 hours. Successful (2xx) responses are stored and replayed for the key. On POST /v1/payments, a 502 PROVIDER_TEMPORARILY_UNAVAILABLE for a boleto payment is stored and replayed too: to recover that payment, repeat the request once with the same externalId and a new key. A retry of an earlier card payment request now returns 400 CARD_PAYMENTS_NOT_AVAILABLE_VIA_API instead of the stored response (201 or 502): recover that payment with GET /v1/payments/txid/{txId}, or with a create request with the same externalId, mode: "hosted" and methods: ["CARD"], no card object or card fields, and a new key.

Request body

externalIdstring

Your own customer ID.

namestring
emailstring email
documentstring

CPF or CNPJ number.

documentType'CPF' | 'CNPJ'
phonestring
metadataobject

Response

Customer created.

Changes

    • breaking

      the response's property type changed from object to string for status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • warning

      removed the optional property / from the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • warning

      removed the optional property / from the response with the status

    • info

      added the optional property / to the response with the status