Additional guidance
Errors & Exceptions
Xe uses conventional HTTP response codes to indicate the success or failure of an API request, in general:
- Codes in the 2xx range indicate success.
- Codes in the 4xx range indicate an error that failed given the information provided.
- Codes in the 5xx range indicate an error with Xe's platform.
| HTTP Error Code | Description |
|---|
| 200 — OK | Everything worked. |
| 400 — Bad Request | The request was not accepted, often due to validation or missing parameters. \nThe response will contain an XeException with a typeOfFailure, a MODEL_VALIDATION type will indicate you have received a ValidationException, and SERVICE_EXCEPTION type will indicate you have a received a ServiceException. |
| 401 — Unauthorized | Access Token not valid |
| 404 — Not Found | The requested resource does not exist. |
| 500 — Server Errors | Something went wrong on Xe's platform. |
When receiving a 400 - Bad Request you will either receive a ServiceException or ValidationException, the typeOfFailure will determine which exception you will receive.
| Type Of Failure | Exception |
|---|
| MODEL_VALIDATION | ValidationException |
| SERVICE_EXCEPTION | ServiceException |
The following are a list of codes used to describe issues within a ServiceException or Payment issues.
| Code | Description |
|---|
| 181 — Internal Server Errors | Something went wrong on Xe's platform. |
| 190 | Invalid Request |
| 1000 | You've reached the maximum number of payments for this batch |
| 1001 | Please provide a valid currency |
| 1002 | Please provide a valid destination country |
| 1003 | Please provide a valid effective date |
| 1004 | Please provide a sell currency |
| 1005 | Please provide a buy currency |
| 1006 | Please provide either a buy or sell amount |
| 1007 | The client reference for this payment is not valid |
| 1008 | No payments found |
| 1009 | Please provide a valid purpose of payment |
| 1010 | Please provide the Target Payment Date |
| 1011 | The amount is not valid |
| 1012 | The quote has expired |
| 1013 | This contract has already been approved |
| 1014 | This contract has been cancelled |
| 1015 | We can't provide a quote due to payment issues on the contract |
| 1016 | Cannot approve, contract has payment issues |
| 1017 | Please create a quote |
| 1018 | The payment reference isn't valid |
| 1019 | We can't provide a quote as you've reached your quote limit |
| 1020 | We can't find this contract |
| 1021 | Unable to create quote |
| 1022 | We can't find the quote |
| 1023 | Unable to create contract |
| 1024 | Please provide either a buy or sell amount, not both |
| 1025 | MPT header not found for fx contract |
| 1026 | Only unconfirmed contracts can be updated |
| 1027 | Client account not found |
| 1032 | Unable to create quote because the market is closed |
| 1033 | This currency is not available to buy for this account |
| 1034 | This currency is not available to sell for this account |
| 1035 | Must be a tradeable currency for the account |
| 1036 | Invalid or missing purpose of payment text |
| 1037 | Amount has incorrect number of decimal places |
| 1038 | Same currency fee is not defined for this currency for the client |
| 1039 | Sorry, you cannot hold or view balance in this currency |
| 1042 | Sorry, you cannot update this quote |
| Code | Description |
|---|
| 2000 | Invalid or missing recipient |
| 2001 | Missing recipient account number |
| 2002 | Missing recipient type |
| 2003 | Duplicate client reference |
| 2004 | Recipient has been deactivated. |
| 2005 | The field is not required and should be removed from the request. |
| Code | Description |
|---|
| 2501 | The CreatedAfter date must be earlier than the CreatedBefore date |
| 2502 | The ModifiedAfter date must be earlier than the ModifiedBefore date |
| 2503 | The BatchSize exceeds the maximum batch size of 500. |
| 2504 | The minimum BatchSize is 1. |
| 2505 | The Skip value should be 0 or more. |
| Code | Description |
|---|
| 3001 | Invalid or missing account reference type |
| 3002 | Invalid or missing recipient name |
| 3003 | Invalid or missing recipient email address |
| 3004 | Invalid or missing recipient address country code |
| 3005 | Invalid or missing recipient address line |
| 3006 | Invalid or missing recipient address |
| 3007 | Invalid or missing recipient address locality |
| 3008 | Invalid or missing recipient address region |
| 3009 | Invalid or missing recipient address postcode |
| 3010 | Invalid or missing ISO_3166 standard recipient address region |
| 3011 | Invalid or missing recipient address line1 |
| 3012 | Invalid or missing recipient address line2 |
| 3013 | Invalid or missing recipient id country |
| 3014 | Invalid or missing recipient id type |
| 3015 | Invalid or missing recipient id number |
| 3016 | Invalid or missing recipient tax number |
| 3017 | Invalid or missing recipient client reference |
| Code | Description |
|---|
| 4001 | We couldn't find a valid bank account matching with the provided account information |
| 4002 | Please provide a valid bank account for your recipient |
| 4003 | Please provide a valid bank account name for your recipient |
| 4004 | Please provide a valid bank account number for your recipient |
| 4005 | Please provide a valid sort code for your recipient |
| 4006 | Please provide a valid IBAN for your recipient |
| 4007 | Please provide a valid national clearing code for your recipient |
| 4008 | We couldn't find a valid bank account matching with the provided account information |
| 4009 | We couldn't find a valid bank account matching with the provided account information for the intermediary bank |
| 4010 | Please provide a valid intermediary bank account for your recipient |
| 4011 | Please provide a valid intermediary bank account name for your recipient |
| 4012 | Please provide a valid intermediary bank account number for your recipient |
| 4013 | Please provide a valid intermediary bank account sort code for your recipient |
| 4014 | Please provide a valid BIC for your recipient |
| 4015 | Please provide a valid intermediary bank BIC for your recipient |
| 4016 | We can't find this bank |
| 4017 | We can't find this intermediary bank |
| 4018 | Please provide a valid country code for your recipient's bank account |
| 4019 | Please provide a valid country code for the intermediary bank account |
| 4020 | We can't find this bank account. Please make sure you've entered the IBAN, BIC or NCC correctly. |
| 4021 | We couldn't find a valid bank account matching with the provided account information for the intermediary bank |
| 4022 | Please provide a valid national clearing code for the intermediary bank |
| 4023 | Please provide a valid bank account type |
| Code | Description |
|---|
| 5001 | Client reference for payment must be unique |
| 5002 | Client reference for payment already used |
| Code | Description |
|---|
| 6001 | Not possible to settle in this currency |
| 6002 | Not possible to make payments in this currency |
| 6003 | Not possible to make payments in this country |
| 6004 | Payment requires extra detail |
| 6005 | Payment requires recipient phone number |
| 6006 | Payment requires a valid purpose of payment |
| 6007 | Payment requires recipient email address |
| 6008 | Payment requires recipient name |
| 6009 | Specifying both a BIC and NCC is invalid |
| 6010 | Specified BIC country does not match the destination country |
| 6011 | Specified IBAN country does not match the destination country |
| 6012 | Specified intermediary BIC country does not match the intermediary bank country |
| 6013 | Specified NCC not valid for destination country |
| 6014 | Payments are not allowed to this recipient for this currency |
| 6015 | Direct Debit not allowed for same currency payments |
| 6016 | Please provide a valid recipient phone number |
| 6017 | Payments cannot be attached to this type of contract |
| 6018 | Failed to attach payments to contract |
| 6022 | Payment(s) already exists for the requested recipient(s) |
| 6023 | Recipient currency does not match the bought currency of the contract |
| 6025 | The 'Attach a Recipient to a Contract' feature isn't available for this transaction |
| 6026 | Sorry, you can't have multiple recipients for this contract |
| 6027 | This payment cannot be completed. Please contact Xe for support. |
| Code | Description |
|---|
| 7001 | Webhook not found |
| 7002 | Failed to update webhook |
| 7003 | Failed to create webhook |
| 7004 | Failed to delete webhook |
| 7005 | WebhookAuditLog not found |
| 7006 | Webhook request has duplicate headers |
| Code | Description |
|---|
| 8001 | Registered recipient not found |
| 8002 | Not possible to change registered recipient type |
| 8003 | Not possible to change registered recipient currency |
| 8004 | Not possible to change registered recipient bank country |
| Code | Description |
|---|
| 9001 | No purpose of payments found |
| 9002 | Purpose of payment not found for the code specified |
| Code | Description |
|---|
| 9501 | Invalid or missing Industry Type Category Code |
| 9502 | Invalid or missing Industry Type Code |
| Code | Description |
|---|
| 9601 | Invalid or missing Industry Type Category Code |
| Code | Description |
|---|
| 9701 | Bank account id must be provided |
| 9702 | Bank account id does not exist for the client |
| 9703 | Bank account id is not verified |
| 9704 | Bank account id is blocked/disabled |
| 9705 | Bank account id is for another sell currency |
| 9706 | DirectDebit settlement method is not allowed |
| 9707 | Business unit id is not valid |
| Code | Description |
|---|
| 9721 | Payment limits error |
| 9722 | Sorry, this currency is not available. |
| 9723 | The amount is below the minimum amount required allowed. Please increase the amount to continue. |
| 9724 | The amount is above the maximum amount allowed. Please reduce the amount to continue. |
| 9725 | Bank account id is for another sell currency |
| 9726 | DirectDebit settlement method is not allowed |
| 9727 | This amount exceeds the limit for this currency. Please reduce the amount to continue. |
| 9728 | You've reached your combined transactional limit. Please contact us to increase your limit. |
| 9729 | You've reached your daily trade amount limit. Please contact us to increase your limit. |
| 9730 | You've reached the maximum number of daily direct debit trades. Please contact us to increase your limit. |
| 9731 | You've reached your daily direct debit amount limit. Please contact us to increase your limit. |
| 9732 | You've reached the maximum amount you can send by direct debit in this period. Please contact us to increase your limit. |
| 9733 | Sorry, you can't settle by this method. Please choose a different settlement method. |
| 9734 | Sorry, we can't deliver to this method. Please choose a different delivery method. |
| Code | Description |
|---|
| 10011 | We can't provide a quote as the market is closed. Please try again on the next working day. |
| 10013 | We can't provide a quote as the currency is closed for dealing. Please try again on the next working day. |
| 10033 | Invalid recipient details. |
| 10050 | Please make sure that the buy and sell currencies are the same |
| 10051 | Sorry, same currency transfers aren't available for this currency |
| 10052 | Please contact us to enable same currency transfers for your account |
| 10053 | The quoted value date has been adjusted and does not match the originally requested value date |
| 10054 | Forward contracts aren't enabled on your account. Please contact Xe |
| 10055 | Value date exceeds max forward days as per currency |
| 10056 | Currency Accounts aren't enabled on your account yet. Please contact us for more information. |
| 10057 | Buy amount is below minimum balance deposit amount supported by currency. |
| 10058 | Buy amount is above maximum balance deposit amount supported by currency. |
| 10082 | Insufficient funds on balance for a particular currency. |
| 10084 | This currency can't be held as a balance. |
| 10097 | You can only convert a balance if the currencies are different. |
| 10099 | Please set the autoAdjustAmountToRemainingBalance to 'true' for one payment. |
| 10300 | The sum of the payment amounts is greater than the amount requested. |
| 10301 | The sum of the payment amounts must equal the buy amount. |
| 10302 | There is no amount remaining for this payment. |
| Code | Description |
|---|
| 10201 | The link for the terms and conditions is not found. |