Skip to main content

Managing Partners (Merchants)

A Partner in 4pay.online terminology is a merchant — a business that accepts payments through your platform. Partners have their own isolated workspace: their own transactions, API keys, balances, and Partner Area access.


Creating a partner

Via Admin Console

  1. Go to Partners → New Partner
  2. Fill in the required fields:
    • Name — company or merchant name
    • Login — unique login for Partner Area access
    • Password — temporary password (partner should change on first login)
    • Email — contact email for notifications
  3. Assign terminals — which payment providers this partner can use
  4. Configure webhook defaults (optional) — notify_url template
  5. Click Save

Via Admin API

curl -X POST https://4pay.online/api/v1/partners \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ADMIN_TOKEN" \
-d '{
"name": "Acme Online Store",
"login": "acme_store",
"pass": "temporary-password-123"
}'

Response:

{
"id": 42,
"name": "Acme Online Store",
"login": "acme_store",
"created_at": "2026-03-01T10:00:00Z"
}

Managing partner terminals

Terminals define which payment providers a partner can use. Each terminal is a configured connection to one payment provider.

Assign a terminal to a partner

curl -X POST https://4pay.online/api/v1/terminal \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ADMIN_TOKEN" \
-d '{
"name": "Stripe USD",
"partner_id": 42,
"provider": "stripe",
"type": "payment",
"is_active": true,
"env": "prod",
"provider_params": {
"api_key": "sk_live_..."
},
"merchant_adapter": "merchant_default"
}'

Key terminal fields:

FieldDescription
providerProvider adapter name (see Provider Catalog)
typepayment, payout, or merchant (notification-only)
envprod or test
provider_paramsProvider-specific credentials and settings
merchant_paramsNotification settings (tg_ids_to_notify, etc.)

API key management

Each partner needs an API key to authenticate requests. You create and manage API keys from the Admin Console.

Create an API key

curl -X POST https://4pay.online/api/v1/api_keys \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ADMIN_TOKEN" \
-d '{
"name": "Production Key",
"partner_id": 42
}'

The response includes the key value — store it securely, it is shown only once.

Revoke an API key

In the Admin Console: Partners → [Partner] → API Keys → Revoke

Or via API:

curl -X DELETE https://4pay.online/api/v1/api_keys/KEY_ID \
-H "Authorization: Bearer ADMIN_TOKEN"

Partner limits

Set spending and velocity limits per partner to manage risk:

Limit typeDescription
Per-transaction maxMaximum amount per single transaction
Daily limitMaximum total volume per day
Monthly limitMaximum total volume per calendar month
VelocityMaximum number of transactions per minute/hour

Configure in Admin Console → Partners → [Partner] → Limits, or via the Limits API.


Monitoring partner activity

Transaction view per partner

In the Admin Console, go to Partners → [Partner] → Transactions to see all transactions for that partner with full filtering.

Per-partner stats

curl "https://4pay.online/api/v1/transactions?partner_id=42&status=charged&from=2026-03-01" \
-H "Authorization: Bearer ADMIN_TOKEN"

Notifications

Configure Telegram or email notifications for partner events:

  • Large transactions above threshold
  • Negative revenue (fee > amount)
  • Daily summary
  • Failed transaction spike

Deactivating a partner

To temporarily suspend a partner without deleting their data:

  1. Go to Admin Console → Partners → [Partner]
  2. Toggle Active to off
  3. All API requests with that partner's credentials will return 403 Forbidden

Reactivate at any time by toggling back to Active.