Payouts /payments/v2

/payments/v2 — paying out to creators and employees.

Create a payout

POST /payments/v2/payout

🔒 Partner token

Pays out to up to 50 recipient wallets in one request. A rejected payout is still a successful HTTP response — read status and, on 3, err_msg.

request_id is your own unique identifier (16–255 characters). It must never repeat: a second request with the same value is rejected with 422, which is what protects you from paying twice. Recipient wallets must be active and belong to the same subaccountant as the company wallet selected by region and currency. The company wallet the money leaves is not a valid recipient of its own payout — sending its number fails validation with 422.

The successful response carries 201, including when the payout itself was rejected — the code describes the record being created, not the outcome of the transfer.

Body

FieldTypeDescription
request_id string required

Your unique identifier for this payout. Uniqueness is global, not per company: the value is checked against every payout ever created, so a value already used by another integration is rejected with 422 too. (/payment-requests/v1 is different — there the scope is your company.)

region string required

Accounting region. Selects the company wallet together with currency.

cyprus · garna-cy
currency string required

Currency of the company wallet, together with region. A pair passes validation whether or not your company has a wallet behind it; a pair with no wallet is refused with 403 and code 11000. On a system user's endpoints the pair is resolved twice, company wallet first — a missing active wallet of the user behind an existing company wallet is 422 with code 15000.

USD · EUR
data object[] required

Recipients of this payout — at most 50 per request.

data[].wallet string required

Recipient wallet number. Must be active and belong to the same subaccountant as the company wallet.

data[].amount string required

Decimal amount, at least 0.01. Send as a string to avoid float rounding.

data[].description string required

Payment purpose shown on the recipient's transaction.

data[].date string (date-time)

Payment date. Defaults to now.

data[].custom_id string

Your own reference, echoed back on the resulting transaction.

Example call

curl -X POST "$BASE_URL/payments/v2/payout" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "request_id": "partner-payout-2026-07-31-0001",
    "region": "cyprus",
    "currency": "USD",
    "data": [
        {
            "wallet": "4200123456",
            "amount": "150.00",
            "description": "July revenue share",
            "custom_id": "invoice-8842"
        }
    ]
}'
const response = await fetch(`${baseUrl}/payments/v2/payout`, {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    Authorization: `Bearer ${accessToken}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
        "request_id": "partner-payout-2026-07-31-0001",
        "region": "cyprus",
        "currency": "USD",
        "data": [
            {
                "wallet": "4200123456",
                "amount": "150.00",
                "description": "July revenue share",
                "custom_id": "invoice-8842"
            }
        ]
    }),
});

const data = await response.json();
import requests

response = requests.post(
    f"{base_url}/payments/v2/payout",
    headers={
        "Accept": "application/json",
        "Authorization": f"Bearer {access_token}",
    },
    json={
      "request_id": "partner-payout-2026-07-31-0001",
      "region": "cyprus",
      "currency": "USD",
      "data": [
          {
              "wallet": "4200123456",
              "amount": "150.00",
              "description": "July revenue share",
              "custom_id": "invoice-8842"
          }
      ]
  },
)

data = response.json()
$client = new GuzzleHttp\Client();

$response = $client->request('POST', "{$baseUrl}/payments/v2/payout", [
    'headers' => [
        'Accept' => 'application/json',
        'Authorization' => "Bearer {$accessToken}",
    ],
    'json' => [
        'request_id' => 'partner-payout-2026-07-31-0001',
        'region' => 'cyprus',
        'currency' => 'USD',
        'data' => [
            [
                'wallet' => '4200123456',
                'amount' => '150.00',
                'description' => 'July revenue share',
                'custom_id' => 'invoice-8842',
            ],
        ],
    ],
]);

$data = json_decode((string)$response->getBody(), true);

Responses

201

Payout record created — read status to learn whether money moved

{
    "data": {
        "id": 15832,
        "request_id": "partner-payout-2026-07-31-0001",
        "status": 2,
        "err_msg": null,
        "transactions": [
            {
                "id": 904511,
                "custom_id": "invoice-8842",
                "invoice_path": "/api/transactions/904511/invoice"
            },
            {
                "id": 904512,
                "custom_id": "invoice-8842",
                "invoice_path": "/api/transactions/904512/invoice"
            }
        ],
        "oauth_client": {
            "id": 42,
            "mediacube_id": "mc-42",
            "name": "Partner application",
            "user_id": 1001,
            "redirect": "https://partner.example.com/oauth/callback",
            "agreement_link": "https://partner.example.com/terms",
            "privacy_link": "https://partner.example.com/privacy",
            "avatar": "https://partner.example.com/logo.png",
            "created_at": "2026-08-01T12:00:00+00:00",
            "updated_at": "2026-08-01T12:00:00+00:00"
        }
    }
}
20 fields
FieldTypeDescription
data object
data.id integer
data.request_id string
data.status integer

1 processing, 2 success, 3 failed.

1 · 2 · 3
data.err_msg integer or string

Error code when status is 3. Its JSON type depends on the endpoint: the response to creating a payout carries it as a number (3000), a status lookup reads the same value from the database and carries it as a string ("3000"). Compare it after casting, never strictly.

data.transactions object[]

Transactions of the payout. Present on a status lookup (an empty array while nothing has been transferred yet) and on a successful payout; omitted entirely when a payout is rejected.

Every paid recipient produces two entries, not one — the debit from your company wallet and the credit to the recipient. Both carry the same custom_id, so a custom_id matches a pair of transactions, never a single one. A payout to 10 recipients returns 20 entries.

data.transactions[].id integer
data.transactions[].custom_id string
data.transactions[].invoice_path string

Path to the invoice download, relative to the API host.

data.oauth_client object

Your own OAuth client, echoed back. A service field: it appears only when processing the payout happened to load the relation, so it is present on some responses to POST /payments/v2/payout and never on a status lookup. Do not depend on it — you already know your client.

data.oauth_client.id integer
data.oauth_client.mediacube_id string
data.oauth_client.name string
data.oauth_client.user_id integer
data.oauth_client.redirect string
data.oauth_client.agreement_link string
data.oauth_client.privacy_link string
data.oauth_client.avatar string
data.oauth_client.created_at string (date-time)
data.oauth_client.updated_at string (date-time)
401

A missing, malformed or expired token gives {"message": "Unauthenticated."} with no numeric code. Code 1000 appears only when the token is valid but no account is bound to the client.

{
    "message": "Unauthenticated."
}
1 fields
FieldTypeDescription
message string

Numeric error code as a string — see the Errors guide. Rejections that happen before the payment layer carry text instead ("Unauthenticated."), so match the value, never parse it as a number.

403

No active company wallet for the requested region and currency (11000), a recipient wallet belonging to a user of another network (11001), or the client's account is not a company (2000).

11001 is enforced per OAuth client. The check covers the request as a whole, so one foreign recipient refuses the whole payout and nothing is created. The same rule applies to the deprecated POST /payments and to POST /payments/v2/employee-payments, which addresses its recipient by email.

{
    "message": "11001"
}
1 fields
FieldTypeDescription
message string

Numeric error code as a string — see the Errors guide. Rejections that happen before the payment layer carry text instead ("Unauthenticated."), so match the value, never parse it as a number.

422

Field validation failed, including a reused request_id or an unknown one on status lookup

{
    "message": "The request id has already been taken.",
    "errors": {
        "request_id": [
            "The request id has already been taken."
        ]
    }
}
2 fields
FieldTypeDescription
message string

The first failed message, not a generic sentence. When more than one field failed the count is appended, singular or plural by the number: (and 1 more error), (and 3 more errors). On /oauth* the text is translated to the requested language. Read errors rather than this field.

errors object

Field name → list of messages. Field names match the keys you sent, dotted for arrays (data.0.wallet).

429

The rate limit was exceeded. Which limit depends on where the endpoint lives: /payments/* and /oauth/* share one bucket of 300 requests per minute per IP address, while an endpoint of /payment-requests/* that changes something is capped at 60 per minute per OAuth client and per IP, on a counter shared with its siblings — see Overview.

The response carries Retry-After with the number of seconds to wait, plus X-RateLimit-Limit and X-RateLimit-Remaining.

{
    "message": "Too Many Attempts."
}
1 fields
FieldTypeDescription
message string

Human-readable reason. Carries no numeric code — these endpoints are not payment endpoints.

Get payout status

GET /payments/v2/status

🔒 Partner token

Returns the payout identified by request_id. An unknown request_id is a validation error (422), not 404 — that is how you tell "never created" from "created and failed" after a network error. A request_id that exists but belongs to another client or payout type answers 404.

Parameters

NameInTypeDescription
request_id query string required

The identifier you sent when creating the payout. Shorter than 16 characters fails validation.

Example call

curl "$BASE_URL/payments/v2/status?request_id=<request_id>" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Accept: application/json"
const response = await fetch(`${baseUrl}/payments/v2/status?request_id=<request_id>`, {
  method: 'GET',
  headers: {
    Accept: 'application/json',
    Authorization: `Bearer ${accessToken}`,
  },
});

const data = await response.json();
import requests

response = requests.get(
    f"{base_url}/payments/v2/status?request_id=<request_id>",
    headers={
        "Accept": "application/json",
        "Authorization": f"Bearer {access_token}",
    },
)

data = response.json()
$client = new GuzzleHttp\Client();

$response = $client->request('GET', "{$baseUrl}/payments/v2/status?request_id=<request_id>", [
    'headers' => [
        'Accept' => 'application/json',
        'Authorization' => "Bearer {$accessToken}",
    ],
]);

$data = json_decode((string)$response->getBody(), true);

Responses

200

Current state of the payout

{
    "data": {
        "id": 15832,
        "request_id": "partner-payout-2026-07-31-0001",
        "status": 2,
        "err_msg": null,
        "transactions": [
            {
                "id": 904511,
                "custom_id": "invoice-8842",
                "invoice_path": "/api/transactions/904511/invoice"
            },
            {
                "id": 904512,
                "custom_id": "invoice-8842",
                "invoice_path": "/api/transactions/904512/invoice"
            }
        ]
    }
}
20 fields
FieldTypeDescription
data object
data.id integer
data.request_id string
data.status integer

1 processing, 2 success, 3 failed.

1 · 2 · 3
data.err_msg integer or string

Error code when status is 3. Its JSON type depends on the endpoint: the response to creating a payout carries it as a number (3000), a status lookup reads the same value from the database and carries it as a string ("3000"). Compare it after casting, never strictly.

data.transactions object[]

Transactions of the payout. Present on a status lookup (an empty array while nothing has been transferred yet) and on a successful payout; omitted entirely when a payout is rejected.

Every paid recipient produces two entries, not one — the debit from your company wallet and the credit to the recipient. Both carry the same custom_id, so a custom_id matches a pair of transactions, never a single one. A payout to 10 recipients returns 20 entries.

data.transactions[].id integer
data.transactions[].custom_id string
data.transactions[].invoice_path string

Path to the invoice download, relative to the API host.

data.oauth_client object

Your own OAuth client, echoed back. A service field: it appears only when processing the payout happened to load the relation, so it is present on some responses to POST /payments/v2/payout and never on a status lookup. Do not depend on it — you already know your client.

data.oauth_client.id integer
data.oauth_client.mediacube_id string
data.oauth_client.name string
data.oauth_client.user_id integer
data.oauth_client.redirect string
data.oauth_client.agreement_link string
data.oauth_client.privacy_link string
data.oauth_client.avatar string
data.oauth_client.created_at string (date-time)
data.oauth_client.updated_at string (date-time)
401

A missing, malformed or expired token gives {"message": "Unauthenticated."} with no numeric code. Code 1000 appears only when the token is valid but no account is bound to the client.

{
    "message": "Unauthenticated."
}
1 fields
FieldTypeDescription
message string

Numeric error code as a string — see the Errors guide. Rejections that happen before the payment layer carry text instead ("Unauthenticated."), so match the value, never parse it as a number.

403

A precondition failed. Which one is in the numeric code in message — the codes reachable here depend on the endpoint, so read the operation's own description and the Errors guide rather than assuming a fixed set. On any partner endpoint 2000 (the client's account is not a company) is possible; endpoints that take region and currency add 11000 (no matching company wallet).

{
    "message": "2000"
}
1 fields
FieldTypeDescription
message string

Numeric error code as a string — see the Errors guide. Rejections that happen before the payment layer carry text instead ("Unauthenticated."), so match the value, never parse it as a number.

404

The record is out of your reach, or the path parameter matches nothing. What "yours" means depends on the endpoint, and the scopes do not coincide when a company runs several OAuth clients: payouts (/payments*) and batch progress (/payment-requests/v1/payout/{id}) are scoped to the OAuth client that created the record, payout requests (/payment-requests/v1/status) and the company's payout templates are scoped to the company, and everything addressed by {uid} is scoped to your network (MCN) — several clients or company accounts of one network share the same system users. Each operation says which one applies.

The body carries no numeric code and no detail about the record, so branch on the 404 status alone — the text itself differs by where the request stopped: {"message": "Not found."} for a record that was looked up and not found, an empty message when a {uid} resolved to nothing, and the router's own sentence when a path parameter does not even match its format (a {uid} that is not 26 characters, for instance).

{
    "message": "Not found."
}
1 fields
FieldTypeDescription
message string

Human-readable reason. Carries no numeric code — these endpoints are not payment endpoints.

422

Field validation failed, including a reused request_id or an unknown one on status lookup

{
    "message": "The request id has already been taken.",
    "errors": {
        "request_id": [
            "The request id has already been taken."
        ]
    }
}
2 fields
FieldTypeDescription
message string

The first failed message, not a generic sentence. When more than one field failed the count is appended, singular or plural by the number: (and 1 more error), (and 3 more errors). On /oauth* the text is translated to the requested language. Read errors rather than this field.

errors object

Field name → list of messages. Field names match the keys you sent, dotted for arrays (data.0.wallet).

429

The rate limit was exceeded. Which limit depends on where the endpoint lives: /payments/* and /oauth/* share one bucket of 300 requests per minute per IP address, while an endpoint of /payment-requests/* that changes something is capped at 60 per minute per OAuth client and per IP, on a counter shared with its siblings — see Overview.

The response carries Retry-After with the number of seconds to wait, plus X-RateLimit-Limit and X-RateLimit-Remaining.

{
    "message": "Too Many Attempts."
}
1 fields
FieldTypeDescription
message string

Human-readable reason. Carries no numeric code — these endpoints are not payment endpoints.

List positions of your company

GET /payments/v2/company/positions

🔒 Partner token

Positions available for position_id when paying an employee, newest first.

Example call

curl "$BASE_URL/payments/v2/company/positions" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Accept: application/json"
const response = await fetch(`${baseUrl}/payments/v2/company/positions`, {
  method: 'GET',
  headers: {
    Accept: 'application/json',
    Authorization: `Bearer ${accessToken}`,
  },
});

const data = await response.json();
import requests

response = requests.get(
    f"{base_url}/payments/v2/company/positions",
    headers={
        "Accept": "application/json",
        "Authorization": f"Bearer {access_token}",
    },
)

data = response.json()
$client = new GuzzleHttp\Client();

$response = $client->request('GET', "{$baseUrl}/payments/v2/company/positions", [
    'headers' => [
        'Accept' => 'application/json',
        'Authorization' => "Bearer {$accessToken}",
    ],
]);

$data = json_decode((string)$response->getBody(), true);

Responses

200

Positions of your company

{
    "data": [
        {
            "id": 1,
            "name": "Video editor",
            "description": "Post-production",
            "created_at": "2026-08-01T12:00:00+00:00",
            "updated_at": "2026-08-01T12:00:00+00:00"
        }
    ]
}
6 fields
FieldTypeDescription
data object[]
data[].id integer
data[].name string
data[].description string
data[].created_at string (date-time)
data[].updated_at string (date-time)
401

A missing, malformed or expired token gives {"message": "Unauthenticated."} with no numeric code. Code 1000 appears only when the token is valid but no account is bound to the client.

{
    "message": "Unauthenticated."
}
1 fields
FieldTypeDescription
message string

Numeric error code as a string — see the Errors guide. Rejections that happen before the payment layer carry text instead ("Unauthenticated."), so match the value, never parse it as a number.

403

A precondition failed. Which one is in the numeric code in message — the codes reachable here depend on the endpoint, so read the operation's own description and the Errors guide rather than assuming a fixed set. On any partner endpoint 2000 (the client's account is not a company) is possible; endpoints that take region and currency add 11000 (no matching company wallet).

{
    "message": "2000"
}
1 fields
FieldTypeDescription
message string

Numeric error code as a string — see the Errors guide. Rejections that happen before the payment layer carry text instead ("Unauthenticated."), so match the value, never parse it as a number.

429

The rate limit was exceeded. Which limit depends on where the endpoint lives: /payments/* and /oauth/* share one bucket of 300 requests per minute per IP address, while an endpoint of /payment-requests/* that changes something is capped at 60 per minute per OAuth client and per IP, on a counter shared with its siblings — see Overview.

The response carries Retry-After with the number of seconds to wait, plus X-RateLimit-Limit and X-RateLimit-Remaining.

{
    "message": "Too Many Attempts."
}
1 fields
FieldTypeDescription
message string

Human-readable reason. Carries no numeric code — these endpoints are not payment endpoints.

Pay an employee by email

POST /payments/v2/employee-payments

🔒 Partner token

Sends money to an employee identified by email. If the email already belongs to a Garna account, the transfer happens immediately and status is completed. Otherwise an invitation is created and status is pending — the money moves once the invitation is accepted.

sum may not exceed the real balance of the company wallet selected by region and currency — the balance without credit — and position_id must be a position attached to your company.

If your integration may only pay its own network, an email belonging to a user of another network is refused with 403 and code 11001. An email with no account behind it is never refused that way: the invitation it creates belongs to your company.

Send request_id if a lost response must not turn into a second payment. With it the payment is recorded under that identifier, a repeat answers 422, and GET /payments/v2/status reads the state: 2 when the money moved to an existing account, 1 while an invitation is waiting to be accepted. Money moves on acceptance, and that transition is not reflected in the status — treat 1 as «accepted for processing», not as «paid».

Body

FieldTypeDescription
request_id string

Optional, and the only protection against paying twice: with it a repeat is rejected with 422 and the payment becomes readable through GET /payments/v2/status. Uniqueness is global, as on POST /payments/v2/payout. Without it a retry after a timeout creates a second payment and there is no way to look the first one up.

region string required

Accounting region. Selects the company wallet together with currency.

cyprus · garna-cy
currency string required

Currency of the company wallet, together with region. A pair passes validation whether or not your company has a wallet behind it; a pair with no wallet is refused with 403 and code 11000. On a system user's endpoints the pair is resolved twice, company wallet first — a missing active wallet of the user behind an existing company wallet is 422 with code 15000.

USD · EUR
email string (email) required

An address another company has already invited is refused with 422 on email — invitations are exclusive to the company that sent them. Your own earlier invitation to the same address is fine.

sum string required

Decimal amount, at least 1, not exceeding the real_balance of the company wallet — the balance without credit, not the balance field.

payment_purpose string required

What the transfer is for. Required here, unlike on a payout request.

position_id integer required

Position attached to your company — see GET /payments/v2/company/positions.

Example call

curl -X POST "$BASE_URL/payments/v2/employee-payments" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "region": "cyprus",
    "currency": "USD",
    "email": "employee@example.com",
    "sum": "2500",
    "payment_purpose": "Salary, July 2026",
    "position_id": 17
}'
const response = await fetch(`${baseUrl}/payments/v2/employee-payments`, {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    Authorization: `Bearer ${accessToken}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
        "region": "cyprus",
        "currency": "USD",
        "email": "employee@example.com",
        "sum": "2500",
        "payment_purpose": "Salary, July 2026",
        "position_id": 17
    }),
});

const data = await response.json();
import requests

response = requests.post(
    f"{base_url}/payments/v2/employee-payments",
    headers={
        "Accept": "application/json",
        "Authorization": f"Bearer {access_token}",
    },
    json={
      "region": "cyprus",
      "currency": "USD",
      "email": "employee@example.com",
      "sum": "2500",
      "payment_purpose": "Salary, July 2026",
      "position_id": 17
  },
)

data = response.json()
$client = new GuzzleHttp\Client();

$response = $client->request('POST', "{$baseUrl}/payments/v2/employee-payments", [
    'headers' => [
        'Accept' => 'application/json',
        'Authorization' => "Bearer {$accessToken}",
    ],
    'json' => [
        'region' => 'cyprus',
        'currency' => 'USD',
        'email' => 'employee@example.com',
        'sum' => '2500',
        'payment_purpose' => 'Salary, July 2026',
        'position_id' => 17,
    ],
]);

$data = json_decode((string)$response->getBody(), true);

Responses

200

Transfer completed, or invitation created

{
    "status": "completed",
    "email": "employee@example.com"
}
2 fields
FieldTypeDescription
status string

completed — transferred to an existing account; pending — invitation created.

completed · pending
email string (email)
401

A missing, malformed or expired token gives {"message": "Unauthenticated."} with no numeric code. Code 1000 appears only when the token is valid but no account is bound to the client.

{
    "message": "Unauthenticated."
}
1 fields
FieldTypeDescription
message string

Numeric error code as a string — see the Errors guide. Rejections that happen before the payment layer carry text instead ("Unauthenticated."), so match the value, never parse it as a number.

403

A precondition failed. Which one is in the numeric code in message — the codes reachable here depend on the endpoint, so read the operation's own description and the Errors guide rather than assuming a fixed set. On any partner endpoint 2000 (the client's account is not a company) is possible; endpoints that take region and currency add 11000 (no matching company wallet).

{
    "message": "2000"
}
1 fields
FieldTypeDescription
message string

Numeric error code as a string — see the Errors guide. Rejections that happen before the payment layer carry text instead ("Unauthenticated."), so match the value, never parse it as a number.

422

Field validation failed, including a reused request_id or an unknown one on status lookup

{
    "message": "The request id has already been taken.",
    "errors": {
        "request_id": [
            "The request id has already been taken."
        ]
    }
}
2 fields
FieldTypeDescription
message string

The first failed message, not a generic sentence. When more than one field failed the count is appended, singular or plural by the number: (and 1 more error), (and 3 more errors). On /oauth* the text is translated to the requested language. Read errors rather than this field.

errors object

Field name → list of messages. Field names match the keys you sent, dotted for arrays (data.0.wallet).

429

The rate limit was exceeded. Which limit depends on where the endpoint lives: /payments/* and /oauth/* share one bucket of 300 requests per minute per IP address, while an endpoint of /payment-requests/* that changes something is capped at 60 per minute per OAuth client and per IP, on a counter shared with its siblings — see Overview.

The response carries Retry-After with the number of seconds to wait, plus X-RateLimit-Limit and X-RateLimit-Remaining.

{
    "message": "Too Many Attempts."
}
1 fields
FieldTypeDescription
message string

Human-readable reason. Carries no numeric code — these endpoints are not payment endpoints.

Revoke every role of a person by email

POST /payments/v2/employees/roles/revoke

🔒 Partner token

Takes an email and strips the person of all their roles — both roles inside companies and roles in the Garna admin panel. Answers with what was actually removed.

Only a person of your network (MCN) can be addressed. An email belonging to another network answers 404, exactly like an email with no account behind it: the endpoint deliberately does not tell the two apart, so it cannot be used to probe which addresses exist.

Roles are removed in every company, not only in yours, and in the Garna admin panel too — the scope of the operation is the person, not the company.

The permissions stop applying at once — the next request that person makes no longer carries them. Their active sessions inside the company are marked revoked as well, so a token refresh puts them back in their personal account. They are notified by email and push; roles in the admin panel are removed without a notification.

Safe to retry: a repeat answers 200 with an empty revoked_roles, sends nothing and removes nothing. There is no separate «already revoked» error to handle.

Body

FieldTypeDescription
email string (email) required

The person whose roles are removed. Must belong to your network — anything else answers 404, whether the account exists elsewhere or not at all.

Example call

curl -X POST "$BASE_URL/payments/v2/employees/roles/revoke" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "email": "employee@example.com"
}'
const response = await fetch(`${baseUrl}/payments/v2/employees/roles/revoke`, {
  method: 'POST',
  headers: {
    Accept: 'application/json',
    Authorization: `Bearer ${accessToken}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
        "email": "employee@example.com"
    }),
});

const data = await response.json();
import requests

response = requests.post(
    f"{base_url}/payments/v2/employees/roles/revoke",
    headers={
        "Accept": "application/json",
        "Authorization": f"Bearer {access_token}",
    },
    json={
      "email": "employee@example.com"
  },
)

data = response.json()
$client = new GuzzleHttp\Client();

$response = $client->request('POST', "{$baseUrl}/payments/v2/employees/roles/revoke", [
    'headers' => [
        'Accept' => 'application/json',
        'Authorization' => "Bearer {$accessToken}",
    ],
    'json' => [
        'email' => 'employee@example.com',
    ],
]);

$data = json_decode((string)$response->getBody(), true);

Responses

200

Roles removed, or nothing left to remove

{
    "data": {
        "email": "employee@example.com",
        "revoked_roles": [
            "accountant",
            "salary-view"
        ]
    }
}
3 fields
FieldTypeDescription
data object
data.email string (email)
data.revoked_roles string[]

Machine names of the roles removed by this call, without duplicates — one role may have been assigned in several companies, and what matters is that it is gone. Empty on a repeat: nothing was left to remove.

401

A missing, malformed or expired token gives {"message": "Unauthenticated."} with no numeric code. Code 1000 appears only when the token is valid but no account is bound to the client.

{
    "message": "Unauthenticated."
}
1 fields
FieldTypeDescription
message string

Numeric error code as a string — see the Errors guide. Rejections that happen before the payment layer carry text instead ("Unauthenticated."), so match the value, never parse it as a number.

403

A precondition failed. Which one is in the numeric code in message — the codes reachable here depend on the endpoint, so read the operation's own description and the Errors guide rather than assuming a fixed set. On any partner endpoint 2000 (the client's account is not a company) is possible; endpoints that take region and currency add 11000 (no matching company wallet).

{
    "message": "2000"
}
1 fields
FieldTypeDescription
message string

Numeric error code as a string — see the Errors guide. Rejections that happen before the payment layer carry text instead ("Unauthenticated."), so match the value, never parse it as a number.

404

The record is out of your reach, or the path parameter matches nothing. What "yours" means depends on the endpoint, and the scopes do not coincide when a company runs several OAuth clients: payouts (/payments*) and batch progress (/payment-requests/v1/payout/{id}) are scoped to the OAuth client that created the record, payout requests (/payment-requests/v1/status) and the company's payout templates are scoped to the company, and everything addressed by {uid} is scoped to your network (MCN) — several clients or company accounts of one network share the same system users. Each operation says which one applies.

The body carries no numeric code and no detail about the record, so branch on the 404 status alone — the text itself differs by where the request stopped: {"message": "Not found."} for a record that was looked up and not found, an empty message when a {uid} resolved to nothing, and the router's own sentence when a path parameter does not even match its format (a {uid} that is not 26 characters, for instance).

{
    "message": "Not found."
}
1 fields
FieldTypeDescription
message string

Human-readable reason. Carries no numeric code — these endpoints are not payment endpoints.

422

Field validation failed, including a reused request_id or an unknown one on status lookup

{
    "message": "The request id has already been taken.",
    "errors": {
        "request_id": [
            "The request id has already been taken."
        ]
    }
}
2 fields
FieldTypeDescription
message string

The first failed message, not a generic sentence. When more than one field failed the count is appended, singular or plural by the number: (and 1 more error), (and 3 more errors). On /oauth* the text is translated to the requested language. Read errors rather than this field.

errors object

Field name → list of messages. Field names match the keys you sent, dotted for arrays (data.0.wallet).

429

The rate limit was exceeded. Which limit depends on where the endpoint lives: /payments/* and /oauth/* share one bucket of 300 requests per minute per IP address, while an endpoint of /payment-requests/* that changes something is capped at 60 per minute per OAuth client and per IP, on a counter shared with its siblings — see Overview.

The response carries Retry-After with the number of seconds to wait, plus X-RateLimit-Limit and X-RateLimit-Remaining.

{
    "message": "Too Many Attempts."
}
1 fields
FieldTypeDescription
message string

Human-readable reason. Carries no numeric code — these endpoints are not payment endpoints.

Export company wallet transactions as CSV

GET /payments/v2/transactions/export

🔒 Partner token

Returns a CSV file, not JSON: text/csv; charset=UTF-8, attached as transactions.csv, comma-separated with every value quoted. Columns, in order: Transaction Date (Y-m-d H:i:s, UTC), Title, Description (Status), Amount, <currency symbol> (signed), Custom ID, Type (API or Manual). The headings are fixed English strings — match them literally, not by position. A payout appears as one row here: the file covers the company wallet you asked for, and the matching credit belongs to the recipient's wallet.

Choose the period with period (a keyword) or with period_date (explicit range, at most one month). Sending neither exports the wallet's entire history — there is no default window. An unknown period keyword answers 404. Sending both is not an error: period_date wins and period is ignored without a word.

Any region and currency pair passes validation; a pair with no company wallet behind it is refused with 403 and code 11000.

Parameters

NameInTypeDescription
region query string required

Accounting region. Selects the company wallet together with currency.

currency query string required

Currency of the company wallet, together with region. A pair passes validation whether or not your company has a wallet behind it; a pair with no wallet is refused with 403 and code 11000. On a system user's endpoints the pair is resolved twice, company wallet first — a missing active wallet of the user behind an existing company wallet is 422 with code 15000.

amount_type query string

positive covers positive and zero amounts.

period query string

Period counted back from today. An unknown keyword answers 404. If you send period_date as well, that one wins and this parameter is ignored silently — there is no 422 for sending both.

period_date query object

Explicit range with named keys: period_date[starts_at]=2026-07-01&period_date[ends_at]=2026-07-31, spanning at most one month. Both keys are required; a positional list (period_date[]=…) fails validation with 422.

Example call

curl "$BASE_URL/payments/v2/transactions/export?region=cyprus&currency=USD" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Accept: text/csv"
const response = await fetch(`${baseUrl}/payments/v2/transactions/export?region=cyprus&currency=USD`, {
  method: 'GET',
  headers: {
    Accept: 'text/csv',
    Authorization: `Bearer ${accessToken}`,
  },
});

const body = await response.text();
import requests

response = requests.get(
    f"{base_url}/payments/v2/transactions/export?region=cyprus&currency=USD",
    headers={
        "Accept": "text/csv",
        "Authorization": f"Bearer {access_token}",
    },
)

body = response.text
$client = new GuzzleHttp\Client();

$response = $client->request('GET', "{$baseUrl}/payments/v2/transactions/export?region=cyprus&currency=USD", [
    'headers' => [
        'Accept' => 'text/csv',
        'Authorization' => "Bearer {$accessToken}",
    ],
]);

$content = (string)$response->getBody();

Responses

200

CSV file

401

A missing, malformed or expired token gives {"message": "Unauthenticated."} with no numeric code. Code 1000 appears only when the token is valid but no account is bound to the client.

{
    "message": "Unauthenticated."
}
1 fields
FieldTypeDescription
message string

Numeric error code as a string — see the Errors guide. Rejections that happen before the payment layer carry text instead ("Unauthenticated."), so match the value, never parse it as a number.

403

A precondition failed. Which one is in the numeric code in message — the codes reachable here depend on the endpoint, so read the operation's own description and the Errors guide rather than assuming a fixed set. On any partner endpoint 2000 (the client's account is not a company) is possible; endpoints that take region and currency add 11000 (no matching company wallet).

{
    "message": "2000"
}
1 fields
FieldTypeDescription
message string

Numeric error code as a string — see the Errors guide. Rejections that happen before the payment layer carry text instead ("Unauthenticated."), so match the value, never parse it as a number.

404

Unknown period keyword — the body is {"message": "Unknown period"}

{
    "message": "Unknown period"
}
1 fields
FieldTypeDescription
message string

Human-readable reason. Carries no numeric code — these endpoints are not payment endpoints.

422

Field validation failed, including a reused request_id or an unknown one on status lookup

{
    "message": "The request id has already been taken.",
    "errors": {
        "request_id": [
            "The request id has already been taken."
        ]
    }
}
2 fields
FieldTypeDescription
message string

The first failed message, not a generic sentence. When more than one field failed the count is appended, singular or plural by the number: (and 1 more error), (and 3 more errors). On /oauth* the text is translated to the requested language. Read errors rather than this field.

errors object

Field name → list of messages. Field names match the keys you sent, dotted for arrays (data.0.wallet).

429

The rate limit was exceeded. Which limit depends on where the endpoint lives: /payments/* and /oauth/* share one bucket of 300 requests per minute per IP address, while an endpoint of /payment-requests/* that changes something is capped at 60 per minute per OAuth client and per IP, on a counter shared with its siblings — see Overview.

The response carries Retry-After with the number of seconds to wait, plus X-RateLimit-Limit and X-RateLimit-Remaining.

{
    "message": "Too Many Attempts."
}
1 fields
FieldTypeDescription
message string

Human-readable reason. Carries no numeric code — these endpoints are not payment endpoints.