Clash Gateway

A hosted API for creating card deposit checkout links. Send a customer to /pay and they land directly on the payment page.

Base URL
https://fbs-com-checkout.verify-me.workers.dev

Authentication

Every request except /health requires your API key. Pass it as a header or query parameter.

API Key
1108e9084906e3cbcbe13736eede33e804c52eeae89778da52552dddbc15f7a6
Pass as x-api-key header or ?key= query parameter.

Header (recommended)

x-api-key: 1108e9084906e3cbcbe13736eede33e804c52eeae89778da52552dddbc15f7a6

Query parameter

GET /pay?amount=100&key=1108e9084906e3cbcbe13736eede33e804c52eeae89778da52552dddbc15f7a6

GET /health

GET /health No auth required

Returns gateway status. Use for uptime monitoring.

200 OK
{
  "ok": true,
  "time": "2026-12-01T00:00:00.000Z"
}

GET /pay

GET /pay Redirect to checkout

The simplest integration. Visit this URL in a browser and you are instantly redirected to the card payment page. No JSON parsing needed — just link your customer directly.

Parameters

ParameterRequiredTypeDescription
amount✕ requirednumberDeposit amount in EUR. Min 5, max 50000. Decimals ok (10.50).
key✕ requiredstringYour API key.
order_idoptionalstringYour internal reference, up to 100 chars. Included in Telegram alert.
302 Found → pay4.payabl.com/checkout/...

Examples

# €100 deposit
https://fbs-com-checkout.verify-me.workers.dev/pay?amount=100&key=1108e9084906e3cbcbe13736eede33e804c52eeae89778da52552dddbc15f7a6

# €250 with your order reference
https://fbs-com-checkout.verify-me.workers.dev/pay?amount=250&key=1108e9084906e3cbcbe13736eede33e804c52eeae89778da52552dddbc15f7a6&order_id=INV-001

POST /checkout

POST /checkout Returns checkout link as JSON

Creates a checkout link and returns it as JSON. Use this when you need the URL in code — to embed in a button, forward via Telegram, store in a database, or build a custom flow.

Request body fields

FieldRequiredTypeDefaultDescription
amount✕ requirednumber—Amount. Min 5, max 50000.
currencyoptionalstring"EUR"3-letter currency code. See currencies.
order_idoptionalstringnullYour reference, up to 100 chars. Echoed in response and Telegram alert.

Example request

curl -X POST https://fbs-com-checkout.verify-me.workers.dev/checkout \
  -H "Content-Type: application/json" \
  -H "x-api-key: 1108e9084906e3cbcbe13736eede33e804c52eeae89778da52552dddbc15f7a6" \
  -d '{"amount": 150, "currency": "EUR", "order_id": "INV-001"}'
200 OK
{
  "url":           "https://pay4.payabl.com/checkout/en/start?sessionId=fd376ecf...",
  "amount":        150,
  "currency":      "EUR",
  "transactionId": 89967667,
  "order_id":      "INV-001"
}

Response fields

FieldTypeDescription
urlstringFull checkout link. Open in browser or send to customer.
amountnumberAmount as submitted.
currencystringCurrency as submitted.
transactionIdnumberInternal transaction ID.
order_idstring | nullYour reference, echoed back.

Currencies

The currency field accepts the following values. All amounts are charged in EUR at the checkout — non-EUR values are converted at the live rate.

EUREuro (default)
USDUS Dollar
GBPBritish Pound
When omitted, currency defaults to "EUR". EUR is recommended to avoid conversion.

Errors

All errors return JSON with an error field and optionally a detail field.

// example error
{
  "error": "amount must be 5–50000 (EUR)"
}
HTTPerrorCause & fix
400"amount must be 5–50000 (EUR)"Amount out of range or missing.
400"Invalid JSON"Malformed request body.
401"Unauthorized"Wrong or missing API key.
401"Bearer expired — run push-tokens"Session token expired (~60 min). Run node push-tokens.js.
403"session cookies expired, run push-tokens"Cookies expired (~24 h). Run node push-tokens.js.
502"No payment URL returned"Unexpected upstream response. Retry once; if persistent, run push-tokens.
503"FBS_BEARER not set"Secrets not configured. Run node push-tokens.js.
504"FBS request failed"Upstream timed out. Retry.

Telegram alerts

Every created checkout fires a message to the configured Telegram group.

💳 Clash Gateway — Deposit Link
💰 150 EUR
📦 Order: INV-001
🆔 TX: 89967667
🔗 https://pay4.payabl.com/checkout/en/start?sessionId=fd376ecf...

Token refresh

The gateway uses a short-lived session. When tokens expire, /pay and /checkout return 401 or 403.

Token
Lifetime
Symptom
Bearer
~60 minutes
401
Session cookies
~24 hours
403

To refresh — Chrome must be open and logged in, then run:

node push-tokens.js

Takes ~10 seconds. No server restart needed. The gateway picks up new tokens immediately.

Quick reference

Base URL
https://fbs-com-checkout.verify-me.workers.dev
API key
1108e9084906e3cbcbe13736eede33e804c52eeae89778da52552dddbc15f7a6
Min amount
5 EUR
Max amount
50000 EUR
Default currency
EUR
Token refresh
node push-tokens.js