Contact) represents the debtor: the person or entity you charge. It centralizes their data (name, email, phones) so you can reuse it in future charges without repeating the information.
When to create it explicitly: when you want to maintain a debtor roster or reuse the same one across multiple charges. If you only charge once, creating it inline when creating the debt is enough.
Natural key: externalClientId
The externalClientId is the contact’s natural key and is unique per organization. It is the value you use to reference the debtor in debts and subscriptions. The contactId (with the con_ prefix) is the identifier that TapiPay assigns.
Create a contact
externalClientId, name, and email are required.
Creating a contact with an
externalClientId that already exists returns 409 RESOURCE_CONFLICT. Fields not declared in the body are ignored.Phones
Each phone has a requirednumber and type, and optional primary and description. If you do not send description, it takes the value of type (for example, "MOBILE"). The type must be one of:
MAIN, MOBILE, WORK, RELATIVE, OTHER.
A type outside that list returns 400 INVALID_REQUEST.
Use the contact in a charge
In a debt or subscription, you identify the debtor in one of these two ways (exactly one):By reference
You send the
externalClientId of an existing contact. If it does not exist, it returns 422 BUSINESS_RULE_VIOLATION.Inline
You send
contactData with the complete data. If the externalClientId does not exist, it is created; if it already exists, it is updated.createdInline is true if the contact was created in that request, and false if it already existed (was reused or updated).
Search contacts
GET /contacts accepts these filters, which can be combined:
Pagination uses
page (default 1) and limit (default 50, maximum 500). See API conventions.
Update
PATCH /contacts/{id} updates name, email, or phones. Rules:
- Send at least one of
name,email, orphones: an empty body returns400 INVALID_REQUEST. - The
externalClientIdis not modifiable: sending it, or any other unlisted field, returns400. - The
emailcannot be removed:"email": nullreturns400. phonesreplaces the whole list. An empty list ("phones": []) returns400; to keep the current phones, omit the field.- The
companyCodein the body is taken as company context, not as a field to modify.
The contact has no
metadata or delete operation (DELETE) in v1. Manage its lifecycle with PATCH.Errors
Besides validation errors (400) and authentication errors (see Authentication), the contact endpoints can answer:
Endpoints
Try it in the API Reference
Explore each endpoint with its interactive playground.

