Creating customers
The first step in creating a payment is to have the unique identifier of your customer. You can do this by creating a new customer or consulting one that was previously created.
POST
/v3/customers
Check the full reference of this endpoint
{
"name": "John Doe",
"cpfCnpj": "19540550000121",
"mobilePhone": "4799376637"
}
When creating a customer, a JSON object is returned with some information, and most importantly, the identifier of your customer, which should look something like this: cus_000005219613
. With the identifier in hand, it is already possible to create a payment.
The creation of duplicate customers is allowed. If you do not want this to happen, it is necessary to store the identifiers of the customers created in your application, or implement a search before creating the customer. You can check for the existence of the customer in List Customers.
API Reference
Check the complete reference of the
Customers
endpoint (/v3/customers
)
Updated 8 months ago