Base URL: /api-pub/v1/contacts
Contacts let you associate payment requests with specific customers or companies. They are entirely optional — you can create payment requests without linking them to any contact. However, using contacts makes it easier to track payment history per customer and to reference them via contactExternalId when creating payment requests from your system.
curl -X POST https://mailpay.cz/api-pub/v1/contacts \
-H "Authorization: Bearer mp_xxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Corp",
"email": "billing@acme.com",
"ico": "12345678",
"externalId": "customer-123"
}'| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Contact name |
email | string | No | Email address |
address | string | No | Postal address |
ico | string | No | Company ID (Czech) |
dic | string | No | Tax ID (Czech) |
externalId | string | No | Your system's ID (unique per org) |