Skip to main content
Payluk uses conventional HTTP status codes, and every response — including errors — uses the standard envelope. On an error, message carries the reason and data is an empty object.
{
  "status": 400,
  "message": "Action not allowed",
  "data": {}
}

Status codes

CodeMeaning
200Success.
201Resource created.
400Validation failed, action not allowed in the current state, or not found.
401Unauthorized — missing/invalid token, access denied, or a disallowed action.
403Forbidden — feature not enabled, or wrong environment for the route.
500Server error — e.g. an action attempted by an ineligible account type.
Some validation and state errors that other APIs return as 403/404 are reported here as 400 or 401 with a descriptive message. Always read message rather than inferring meaning from the code alone.

Common messages

MessageWhen it happens
No token providedMissing Authorization header.
Access deniedThe caller isn’t permitted to act on this resource.
Action not allowedThe escrow isn’t in a state that permits this action.
Escrow not foundNo escrow matches the supplied token/ID.
customer-id header is requiredA customer-scoped route was called without the header.
The sum of milestone amounts must equal the escrow amountMilestone amounts don’t add up to amount.
This feature is not enabled on your merchant accountThe route needs a feature flag enabled on your account.
This route is only available on staging environmentA staging-only helper was called on production.

Handling errors

Because the HTTP code and status field always agree, you can branch on either. A robust client checks status >= 400 and surfaces message to logs or to the end user.