🚀 VaultsPay API v1 is live. See what's new →
Set UpRequest & Response Format

Request & Response Format

All VaultsPay endpoints exchange JSON over HTTPS.

Requests

  • Send JSON with the header Content-Type: application/json.
  • Use UTF-8 encoding.

Success Response Format

All successful responses wrap their payload inside a data field:

{
  "data": {
    // data here
  }
}

Error Response Format

Error responses return a structured object with a code, message, type, and a list of field-level errors where applicable:

{
  "code": 1000,
  "message": "Invalid payload. Please check your request.",
  "type": "INVALID_PAYLOAD",
  "errors": [
    {
      "key": "id",
      "reason": "User does not exist with this id"
    }
  ]
}
FieldDescription
codeNumeric error code
messageHuman-readable description of the error
typeMachine-readable error type
errorsArray of field-level validation errors (may be empty)
errors[].keyThe field or parameter that caused the error
errors[].reasonExplanation of what went wrong for that field