API · Create payments
API v1An MCP tool wraps this operation: Stored cards and bulk collections.
POST /api/v1/collect/set/paymentsWhat it does#
Create payments.
Authentication#
Host: https://app.tilopay.com. Requires the API bearer token in Authorization: Bearer <token> and the integration key in the body (key).
Parameters#
Integration key.
1 captures; 0 only authorizes.
Payment reason.
Affiliates: array of {id, amount, currency, date}.
Groups: array of {id, amount, currency, date}; amount is per affiliate.
The date field is empty for immediate charges or YYYY-MM-DD for scheduled charges. In groups, amount is per affiliate.
Request example#
<api_key> is the placeholder for your integration key.
{
"key": "<api_key>",
"capture": 1,
"reason": "Cobro mensualidad",
"users": [
{
"id": "5",
"amount": "500.00",
"currency": "CRC",
"date": ""
},
{
"id": "32",
"amount": "1000.00",
"currency": "CRC",
"date": "2024-06-20"
},
{
"id": "25",
"amount": "10.00",
"currency": "USD",
"date": "2024-06-20"
}
],
"groups": [
{
"id": "10",
"amount": "25.00",
"currency": "USD",
"date": ""
}
]
}Response#
batch is the batch code for get/massive/detail. Empty date = immediate; YYYY-MM-DD = scheduled. Repeating this operation creates another charge.
status.
errors.
users_errors.
groups_errors.
programeds.
batch.
{
"status": 200,
"errors": "",
"users_errors": "",
"groups_errors": "",
"programeds": {
"users": [
"5",
"32",
"25"
],
"groups": [
"10"
]
},
"batch": "SGZqbHlHalJiWmRNSEszd3ZEZHo4dz09"
}{
"type": "object",
"properties": {
"status": {
"type": "integer"
},
"errors": {
"type": "string"
},
"users_errors": {
"type": [
"string",
"array"
],
"items": {}
},
"groups_errors": {
"type": [
"string",
"array"
],
"items": {}
},
"programeds": {
"type": "object",
"properties": {
"users": {
"type": "array",
"items": {
"type": "string"
}
},
"groups": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"batch": {
"type": "string"
}
}
}
Error response#
HTTP 400:
{
"status": "400",
"errors": "Please verify the data sent",
"users_errors": [
{
"id": "32",
"amount": "1000.00",
"currency": "CRC",
"date": "invalidDate"
}
],
"groups_errors": [
{
"id": "10",
"amount": "25.00",
"currency": null,
"date": null
}
]
}Last verified: 2026-10-20