1C integration
Club payments pushed from 1C (Russian accounting system) to player wallets. Access: the 1C token in the X-1C-Token header.
Ping and token check #
/v1/integrations/1c/pingAccess: 1C token Header X-1C-Token: <1C token>.
Checks the token and returns counters of received payments: total and unmatched. Call it when setting up the exchange and before each upload.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
X-1C-Token | string | yes | 1C integration token |
Example request
curl -X GET "https://your-server/api/v1/integrations/1c/ping" \
-H "X-1C-Token: <1C token>"Responses
| Code | detail | Meaning |
|---|---|---|
| 200 | — | Success; example below |
| 401 | bad_1c_token | Invalid 1C token or the integration is disabled |
| 422 | […] | Parameter or body validation error: detail is a list of errors |
Example response
{"ok": true, "payments": 128, "unmatched": 3}Import payments #
/v1/integrations/1c/paymentsAccess: 1C token Header X-1C-Token: <1C token>.
Accepts a batch of 1 to 500 payments. A payment is identified by ext_id (the 1C payment document number): resending the same ext_id credits nothing and comes back with result=duplicate, so a batch can be resent safely. The player is looked up by phone: found — the amount is credited to the wallet (applied); no player with this phone — the payment is stored as unmatched and credited later by re-matching; phone not recognized — rejected with error=bad_phone.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
X-1C-Token | string | yes | 1C integration token |
Request body application/json
| Field | Type | Required | Description |
|---|---|---|---|
payments | array [object] | yes | Payments, 1 to 500 items from 1; items up to 500 |
payments[].ext_id | string | yes | 1C payment document number — the idempotency key length from 1; length up to 64 |
payments[].phone | string | yes | Player phone: +7XXXXXXXXXX, 8XXXXXXXXXX or 10 digits length from 10; length up to 20 |
payments[].amount | integer | yes | Amount in whole roubles, above 0 and up to 1,000,000 greater than 0; max 1000000 |
payments[].paid_at | string (date-time) | yes | Payment date and time (ISO 8601) |
payments[].purpose | string | no | Purpose — shown in the player's wallet history length up to 200 |
payments[].kind | string | no | Kind: topup, membership, booking, other (anything else becomes other) length up to 12; default "topup" |
Example request
curl -X POST "https://your-server/api/v1/integrations/1c/payments" \
-H "X-1C-Token: <1C token>" \
-H "Content-Type: application/json" \
-d '{
"payments": [
{
"ext_id": "00-000123",
"phone": "+79000000001",
"amount": 3500,
"paid_at": "2026-10-02T10:15:00+03:00",
"purpose": "Court booking",
"kind": "booking"
}
]
}'Responses
| Code | detail | Meaning |
|---|---|---|
| 200 | — | Success; example below |
| 401 | bad_1c_token | Invalid 1C token or the integration is disabled |
| 422 | […] | Parameter or body validation error: detail is a list of errors |
Example response
{
"ok": true,
"applied": 1,
"unmatched": 1,
"duplicate": 0,
"rejected": 0,
"items": [
{
"ext_id": "00-000123",
"phone": "+79000000001",
"amount": 3500,
"kind": "booking",
"purpose": "Court booking",
"paid_at": "2026-10-02T10:15:00+03:00",
"status": "applied",
"error": "",
"user_id": "3d6e9a10-5b2c-4f8e-a1d7-6c4b2e0f9a83",
"applied_at": "2026-10-02T07:15:04+00:00",
"result": "applied"
},
{
"ext_id": "00-000124",
"phone": "+79000000002",
"amount": 2000,
"kind": "topup",
"purpose": "",
"paid_at": "2026-10-02T10:20:00+03:00",
"status": "unmatched",
"error": "no_user_with_phone",
"user_id": null,
"applied_at": null,
"result": "unmatched"
}
]
}List payments (reconciliation) #
/v1/integrations/1c/paymentsAccess: 1C token Header X-1C-Token: <1C token>.
Payments received by the cloud, newest first, for reconciliation with 1C. Filters: status (applied, unmatched, rejected), since — received at or after this time, limit — 1 to 1000 (200 by default).
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
status | string | no | Status filter: applied, unmatched, rejected |
since | string (date-time) | no | Received at or after (ISO 8601) |
limit | integer | no | How many rows to return min 1; max 1000; default 200 |
Headers
| Name | Type | Required | Description |
|---|---|---|---|
X-1C-Token | string | yes | 1C integration token |
Example request
curl -X GET "https://your-server/api/v1/integrations/1c/payments?status=unmatched&since=2026-10-01T00:00:00%2B03:00&limit=200" \
-H "X-1C-Token: <1C token>"Responses
| Code | detail | Meaning |
|---|---|---|
| 200 | — | Success; example below |
| 401 | bad_1c_token | Invalid 1C token or the integration is disabled |
| 422 | […] | Parameter or body validation error: detail is a list of errors |
Example response
{
"items": [
{
"ext_id": "00-000124",
"phone": "+79000000002",
"amount": 2000,
"kind": "topup",
"purpose": "",
"paid_at": "2026-10-02T10:20:00+03:00",
"status": "unmatched",
"error": "no_user_with_phone",
"user_id": null,
"applied_at": null
}
]
}Re-match unmatched payments #
/v1/integrations/1c/payments/retryAccess: 1C token Header X-1C-Token: <1C token>.
Looks up players again for all unmatched payments and credits those found. Use it after players have signed up in the app. No body.
Headers
| Name | Type | Required | Description |
|---|---|---|---|
X-1C-Token | string | yes | 1C integration token |
Example request
curl -X POST "https://your-server/api/v1/integrations/1c/payments/retry" \
-H "X-1C-Token: <1C token>"Responses
| Code | detail | Meaning |
|---|---|---|
| 200 | — | Success; example below |
| 401 | bad_1c_token | Invalid 1C token or the integration is disabled |
| 422 | […] | Parameter or body validation error: detail is a list of errors |
Example response
{"ok": true, "checked": 3, "applied": 1}