err_code. Branch on it, not on message. When a field is wrong, errors names it.
{
"status": false,
"message": "Bad Request",
"data": null,
"err_code": "REQ_FIELD_MISSING",
"errors": { "customer_id": ["This field is required."] }
}
Fix and resend
Most
400 and 401 codes. Sending the same request again won’t help.Retry with backoff
429, 500, 503 and NET_TIMEOUT. Wait 1s, double each time, stop after 3 to 5 tries.Stop and escalate
RISK_AML_FAILED, or a 5xx that keeps coming back. Contact support@zapyd.com.General
Any endpoint can return these.| Code | HTTP | Meaning | What to do |
|---|---|---|---|
AUTH_MISSING_HEADERS | 401 | Missing authentication headers | Send X-API-KEY, X-TIMESTAMP and X-SIGNATURE on every request. |
AUTH_INVALID_SIGNATURE | 401 | Invalid signature | Rebuild the signature from the API key, timestamp and canonical body. GET requests sign {}. See Authentication. |
AUTH_UNAUTHORIZED | 401 | Unauthorized | Check the API key is active and belongs to this environment (sandbox or production). |
AUTH_INVALID_API_KEY, AUTH_INVALID_TIMESTAMP, AUTH_TIMESTAMP_EXPIRED, AUTH_ORG_DISABLED, AUTH_ROUTE_FORBIDDEN | 401 | Key, timestamp, organization or route rejected | See Authentication errors for each cause and fix. |
REQ_SERVICE_NOT_FOUND | 401 | The path matches no module | Check the module prefix, such as /cms/api/v1. |
NOT_FOUND | 404 | Not found | Check the path, including the module prefix such as /cms/api/v1. |
TOO_MANY_REQUESTS | 429 | Too many requests | Back off and retry. |
NET_TIMEOUT | 400 | Request timed out | Retry with backoff. Before retrying an initiate call, check the order history so you don’t create the order twice. |
SYS_UPSTREAM_ERROR | 400 | A Zapyd service couldn’t be reached | Retry with backoff, checking the order history first for an initiate call. |
UNKNOWN_ERROR | 400 | Unknown error | Retry once. If it repeats, contact support with the request time. |
SYS_INTERNAL_ERROR | 500 | Internal server error | Retry with backoff. If it persists, contact support with the request time. |
SYS_SERVICE_UNAVAILABLE | 503 | Service unavailable | Retry with backoff. |
bank_validation_unavailable | 503 | Validate Bank Account couldn’t get an answer from the bank | Retry with backoff. |
Request validation
Every code from here down returns HTTP400.
| Code | Meaning | What to do |
|---|---|---|
REQ_FIELD_MISSING | Mandatory field is missing | errors lists the missing fields. Add them. |
INPUT_MALFORMED | Malformed input | errors lists the fields with a blank, badly formatted or too-long value. |
INPUT_MALFORMED_ADDITIONAL_INFO | Malformed additional_info | Fix the shape of the additional_info object. |
INPUT_INVALID_DATE_FORMAT | Invalid date format | Send dates in the format the endpoint documents. |
REQ_INVALID_COUNTRY | Invalid country code | Send an ISO 3166 alpha-3 code, such as IND. |
REQ_INVALID_RESIDENCE_COUNTRY | Invalid residence country code | Send an ISO 3166 alpha-3 code for the country of residence. |
REQ_NON_RESIDENT_UNSUPPORTED | Non-residents not supported | The customer must live in the country they onboard in. |
Customers
| Code | Meaning | What to do |
|---|---|---|
USR_NOT_FOUND | Customer not found | Check the customer_id. |
AUTH_ORG_MISMATCH | Customer belongs to another organization | Use IDs created with your own API key, in the same environment. |
USR_DUPLICATE_CONTACT | Phone or email is linked to another customer | Look up the existing customer, or use different contact details. |
USR_DUPLICATE_EMAIL | The email is already registered for a US customer | Use another email, or look up the existing customer. |
CUSTOMER_NOT_FOUND | Limits and EDD endpoints: customer not found | Check the customer_id, and that the customer has finished onboarding. |
USR_UNVERIFIED | Customer is unverified | Finish KYC first. The customer must be VERIFIED. |
REMITTER_NOT_FOUND | Remitter not found | Check the remitter_id. For India and Vietnam, create the remitter with Create Remitter; elsewhere, send the sender’s customer_id. |
REMITTER_UNVERIFIED | The sender customer isn’t verified | Outside India and Vietnam, the sender must be a VERIFIED customer with full KYC. Finish the sender’s KYC first. |
REMITTER_INVALID | This remitter can’t send this payout | Outside India and Vietnam, send the sender’s customer_id, not a remitter from Create Remitter. |
CAPABILITY_NOT_ENABLED | The customer wasn’t created for this flow | errors.capability names the flow and the customer’s capabilities. Capabilities are fixed at creation: onboard a new customer with the flow. |
KYC
| Code | Meaning | What to do |
|---|---|---|
KYC_INVALID_AADHAAR_INPUT | Aadhaar input is incomplete | Send both document_front_image_url and document_back_image_url, or aadhaar_json inside additional_data. |
KYC_INVALID_DOC_TYPE | Document type not supported for the country | Pick a type from Fetch KYC Configuration. |
KYC_IN_USE | These KYC details belong to another customer | Each identity can verify only one customer. |
KYC_UPDATE_LIMIT_EXCEEDED | KYC update limit reached | Contact support to update this customer again. |
Bank accounts
| Code | Meaning | What to do |
|---|---|---|
BANK_DUPLICATE_ACCOUNT | UPI ID or account number is already in use | An account can belong to one customer only. |
BANK_LIMIT_REACHED | 3 accounts already added | A customer can have 3 active accounts per rail. Delete one first. |
BANK_NOT_FOUND | Bank account not found, or not this customer’s | Check the bank_id belongs to this customer_id. |
Orders
Payins and payouts share these codes with aPAYIN_ or PAYOUT_ prefix.
| Code | Meaning | What to do |
|---|---|---|
PAYIN_AMOUNT_ZERO_OR_NEGATIVEPAYOUT_AMOUNT_ZERO_OR_NEGATIVE | Amount is zero or negative | Send a positive amount. |
PAYIN_AMOUNT_BELOW_MINPAYOUT_AMOUNT_BELOW_MIN | Amount is below the minimum | Read the minimum from the configuration endpoint. |
PAYIN_AMOUNT_ABOVE_MAXPAYOUT_AMOUNT_ABOVE_MAX | Amount is above the maximum | Read the maximum from the configuration endpoint, or split the order. |
PAYIN_DUPLICATE_CLIENT_REF_IDPAYOUT_DUPLICATE_CLIENT_REF_ID | client_reference_id already exists | The order already exists. Fetch it from history instead of creating it again. |
PAYIN_QUOTATION_NOT_FOUNDPAYOUT_QUOTATION_NOT_FOUND | Quotation not found | Check the quotation_id. |
PAYIN_QUOTATION_LINKEDPAYOUT_QUOTATION_LINKED | Quotation is linked to another order | Each quotation backs one order. Create a new quotation. |
PAYIN_QUOTATION_EXPIREDPAYOUT_QUOTATION_EXPIRED | Quotation has expired | Create a new quotation and initiate before its expiry_time. |
PAYIN_INVALID_PAYIN_IDPAYOUT_INVALID_PAYOUT_ID | Invalid payin or payout ID | Check the payin_id or payout_id. |
PAYIN_BANK_ACCOUNT_UNVERIFIED | The payin’s bank account isn’t VERIFIED | Wait for the BANK webhook, or use another account. |
PAYMENT_MODE_NOT_SUPPORTED | payment_method isn’t offered for this fiat, or doesn’t fit the bank account | Pick a method from the configuration that fits the account: IMPS for ACCOUNT_DETAILS, UPI for a UPI account. |
PAYOUT_QUOTATION_NETWORK_MISMATCH | Prefunded model: the network isn’t your prefunded wallet’s network | Quote on the network from Fetch Balance. |
PREFUNDED_FLOW_NOT_ENABLED | Prefunded payouts aren’t enabled for your organization | Contact your Zapyd account manager. |
INSUFFICIENT_PREFUNDED_BALANCE | The prefunded balance doesn’t cover sending_amount | Top up, then create a new quotation. |
PAYOUT_FLOW_MISMATCH | The quotation belongs to the other payout flow | Initiate a remittance quotation with POST /remittance-payout/initiate, and a standard one with POST /payout/initiate. |
PAYIN_DUPLICATE_UTR | UTR is linked to another payin | Each bank transfer reference can fund one payin. |
PAYIN_INVALID_UTR_FORMAT | Invalid UTR format | See Understanding UTR for the format per rail. |
Risk and compliance
| Code | Meaning | What to do |
|---|---|---|
RISK_EDD_REQUIRED | Enhanced due diligence required | Submit EDD, then retry once it’s approved. See Limits and EDD. |
RISK_DAILY_LIMIT_EXCEEDED | Daily limit exhausted | Check the customer’s limits endpoint, and try again the next day. |
RISK_PER_TRANSACTION_LIMIT_EXCEEDED | The amount is above the per-transaction limit | Lower the amount, or split the order. |
RISK_PAYMENT_MODE_LIMIT_EXCEEDED | The payment method’s limit is used up | Try another payment method, or try again later. |
RISK_LIFETIME_LIMIT_EXCEEDED | The customer’s lifetime limit is used up | Submit EDD to raise it. |
PAYMENT_MODE_NOT_ALLOWED | The payment method isn’t allowed for this customer or country | Pick another method from the configuration. |
RISK_IP_CHECK_FAILED | IP address check failed | Send the end user’s own IP address in risk_parameters. |
RISK_AML_FAILED | AML screening failed | The customer can’t transact. Don’t retry. Contact support if you think this is wrong. |
By endpoint
Every endpoint can also return the general codes, includingSYS_INTERNAL_ERROR.
Customers
Customers
| Endpoint | Codes |
|---|---|
POST /customer/create | REQ_INVALID_COUNTRY, REQ_NON_RESIDENT_UNSUPPORTED, REQ_INVALID_RESIDENCE_COUNTRY, REQ_FIELD_MISSING, INPUT_MALFORMED, USR_DUPLICATE_CONTACT |
GET /customer/{customer_id} | USR_NOT_FOUND, AUTH_ORG_MISMATCH |
GET /customer/list | INPUT_INVALID_DATE_FORMAT |
KYC
KYC
| Endpoint | Codes |
|---|---|
GET /kyc/configuration/{customer_id} | USR_NOT_FOUND, AUTH_ORG_MISMATCH |
POST /kyc/add-data | REQ_FIELD_MISSING, INPUT_MALFORMED, USR_NOT_FOUND, AUTH_ORG_MISMATCH, KYC_INVALID_AADHAAR_INPUT, KYC_INVALID_DOC_TYPE, KYC_IN_USE, INPUT_MALFORMED_ADDITIONAL_INFO |
PATCH /kyc/update-tax-info | REQ_FIELD_MISSING, INPUT_MALFORMED, USR_NOT_FOUND, AUTH_ORG_MISMATCH, KYC_IN_USE |
PATCH /kyc/update-document-info | REQ_FIELD_MISSING, INPUT_MALFORMED, USR_NOT_FOUND, AUTH_ORG_MISMATCH, KYC_IN_USE, KYC_INVALID_AADHAAR_INPUT, KYC_INVALID_DOC_TYPE |
PATCH /kyc/update-selfie-info | REQ_FIELD_MISSING, USR_NOT_FOUND, AUTH_ORG_MISMATCH, INPUT_MALFORMED_ADDITIONAL_INFO, KYC_UPDATE_LIMIT_EXCEEDED |
Bank accounts
Bank accounts
| Endpoint | Codes |
|---|---|
POST /bank/create | REQ_FIELD_MISSING, USR_NOT_FOUND, AUTH_ORG_MISMATCH, USR_UNVERIFIED, BANK_DUPLICATE_ACCOUNT, BANK_LIMIT_REACHED |
POST /bank/validate | REQ_FIELD_MISSING, INPUT_MALFORMED, bank_validation_unavailable |
GET /bank/{customer_id}/{bank_id} | USR_NOT_FOUND, AUTH_ORG_MISMATCH, BANK_NOT_FOUND |
GET /bank/list/{customer_id} | USR_NOT_FOUND, AUTH_ORG_MISMATCH |
Payouts
Payouts
Payins
Payins