Authentication
Secret keys per environment and the /me resource.
Every authenticated request carries your key in Authorization: Bearer or X-API-Key. The format is sk_test_<id>.<secret> or sk_live_<id>.<secret>. The merchant (MID) comes from the key: it is not in the path. Create and rotate keys in the dashboard. Collection, payout, verification and deposit-account POSTs require Idempotency-Key. Public API bodies and responses use camelCase (merchantId, orderReference, settledAt).
GET
Inspect the key
/api/v1/me
Returns the merchant, environment and scopes of the key.
Parameters
NameTypeUseDescription
Authorizationheader
stringRequiredBearer $CLOBEPAY_API_KEY. X-API-Key with the same value is also accepted. Do not send both.
Responses
- HTTP 200Valid key.
Errors
- HTTP 400
ambiguous_credentialsAuthorization: Bearer and X-API-Key carry different keys. - HTTP 401
missing_credentialsNo key was sent (Authorization: Bearer or X-API-Key). - HTTP 401
invalid_api_keyThe key does not exist, is malformed or does not match. - HTTP 401
api_key_revokedThe key was revoked. - HTTP 401
api_key_expiredThe key expired. - HTTP 401
api_key_wrong_environmentThe key belongs to another environment (test key in live, or the other way around). - HTTP 403
insufficient_scopeThe key does not have the scope for this route. - HTTP 429
rate_limitedToo many requests. Honour Retry-After.
GET/me
curl -X GET "$CLOBEPAY_API_BASE/me" \ -H "Authorization: Bearer $CLOBEPAY_API_KEY"Response
HTTP 200{
"merchantId": "MID000847",
"merchantName": "Comercial del Valle",
"environment": "test",
"scopes": [
"payment_links:read",
"payment_links:write",
"payins:read"
],
"apiKeyId": "2a581389-bc78-4a05-b2ad-15d24803fee0"
}