Request & Response Format
All VaultsPay endpoints exchange JSON over HTTPS.
Requests
- Send JSON with the header
Content-Type: application/json. - Use
UTF-8encoding.
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"
}
]
}| Field | Description |
|---|---|
| code | Numeric error code |
| message | Human-readable description of the error |
| type | Machine-readable error type |
| errors | Array of field-level validation errors (may be empty) |
| errors[].key | The field or parameter that caused the error |
| errors[].reason | Explanation of what went wrong for that field |