Base URL: /api-pub/v1/payment-requests
Payment requests are the core resource in MailPay. Each one represents an expected incoming payment with a specified amount, due date, and bank account. Once created, MailPay automatically monitors your inbox for matching payments and updates the request status accordingly. You can optionally link a payment request to a contact or use your own externalId to sync with your system.
curl -X POST https://mailpay.cz/api-pub/v1/payment-requests \
-H "Authorization: Bearer mp_xxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Invoice #001",
"amount": "1500.00",
"dueDate": "2026-03-01T00:00:00Z",
"bankAccount": "1234567890/0100"
}'Link a payment request to a contact using contactId (internal) or contactExternalId (your system's ID):
curl -X POST https://mailpay.cz/api-pub/v1/payment-requests \
-H "Authorization: Bearer mp_xxx" \
-H "Content-Type: application/json" \
-d '{
"name": "Invoice #002",
"amount": "2500.00",
"dueDate": "2026-03-15T00:00:00Z",
"bankAccount": "1234567890/0100",
"contactExternalId": "customer-123",
"variableSymbol": "2024002"
}'| Field | Type | Description |
|---|---|---|
name | string | Payment request name / description |
amount | string | Decimal amount, e.g. "1500.00" |
dueDate | string | ISO 8601 date, e.g. "2026-03-01T00:00:00Z" |
bankAccount | string | Account number / bank code, e.g. "1234567890/0100" |
| Field | Type | Description |
|---|---|---|
contactId | string | Internal contact ID |
contactExternalId | string | Your system's contact ID |
variableSymbol | string | Variable symbol |
specificSymbol | string | Specific symbol |
constantSymbol | string | Constant symbol |
currency | string | Default: "CZK" |
note | string | Internal note |
externalId | string | Your system's ID (unique per org) |
Retrieve a payment request by its internal ID or by your externalId:
curl https://mailpay.cz/api-pub/v1/payment-requests/:id \
-H "Authorization: Bearer mp_xxx"curl https://mailpay.cz/api-pub/v1/payment-requests/by-external-id/:externalId \
-H "Authorization: Bearer mp_xxx"Example response:
{
"id": "clx1abc...",
"externalId": "invoice-001",
"name": "Invoice #001",
"amount": "1500.00",
"currency": "CZK",
"dueDate": "2026-03-01T00:00:00.000Z",
"variableSymbol": null,
"specificSymbol": null,
"constantSymbol": null,
"bankAccount": {
"id": "clx2def...",
"accountNumber": "1234567890",
"bankCode": "0100"
},
"contact": null,
"note": null,
"status": "PENDING",
"createdAt": "2026-02-20T10:00:00.000Z",
"updatedAt": "2026-02-20T10:00:00.000Z"
}