Xe Payments API

Xe Payments API — cross-border payment execution for Xe's international money-transfer platform. Documented Swagger 2.0 covering quotes, recipients, tradeable currencies, purposes of payment, transactions, and permissions for sending payments to 200+ countries with a sandbox for integration testing.

OpenAPI Specification

xe-payments-api-openapi.json Raw ↑
{"swagger":"2.0","info":{"version":"1.3.0","title":"Xe.Api.Payments"},"paths":{"/permissions":{"get":{"tags":["Permission"],"summary":"Gets all permissions for the current user.","description":"Sample request:\r\n            \r\n    GET /permissions\r\n            \r\n\\\r\n<details><summary>**The complete set of permissions are**</summary>\r\n* OnlineCardSettlementEnabled\r\n* CanQuote\r\n* CanQuoteAndCreateTransaction\r\n* CanUseOnlineDealing\r\n* CanAccessRecipients\r\n* CanEditOwnAddress\r\n* CanAddRecipient\r\n* CanDeleteRecipient\r\n* ViewPaymentsAwaitingAuthorisation\r\n* CanSubmitPayment\r\n* AllowOnlineForwards\r\n</details>","operationId":"Get","consumes":[],"produces":["text/plain","application/json","text/json"],"parameters":[],"responses":{"200":{"description":"Returns the list of permissions.","schema":{"$ref":"#/definitions/StringArrayResponse"},"examples":{"application/json":["CanQuote","CanQuoteAndCreateTransaction"]}},"500":{"description":"Error getting permissions."}}}},"/purposesofpayment/{currency}":{"get":{"tags":["PurposesOfPayment"],"summary":"Get purposes of payment for given user.","description":"Sample request:\r\n\r\n    Get /purposesofpayment/INR\r\n\r\n\\\r\n<details><summary>**The complete set of purposes of payment for all currencies are**</summary>\r\n* BONUS_SALARY\r\n* CORP_BONUS\r\n* CORP_CHARITY\r\n* CORP_CUSTOMER_PAYMENT\r\n* CORP_DIVIDEND\r\n* CORP_EMPLOYEE_EXPENSES\r\n* CORP_FREIGHT\r\n* CORP_IMPORT_EXPORT\r\n* CORP_INR_BANKERS\r\n* CORP_INR_COOP\r\n* CORP_INR_CREDIT\r\n* CORP_INR_EDUCATIONAL\r\n* CORP_INR_EMI\r\n* CORP_INR_FAMILIES\r\n* CORP_INR_POSTMASTER\r\n* CORP_INR_TAX\r\n* CORP_INR_TRADE\r\n* CORP_INR_TRAVEL\r\n* CORP_INR_UTILTY\r\n* CORP_INSURANCE\r\n* CORP_INVESTMENT\r\n* CORP_INVOICE\r\n* CORP_OPERATING_COST\r\n* CORP_OTHER\r\n* CORP_OUTSOURCING\r\n* CORP_PENSION\r\n* CORP_PROPERTY_BUY_SELL\r\n* CORP_PROPERTY_MANAGEMENT\r\n* CORP_REPATRIATION\r\n* CORP_SALARY\r\n* CORP_SUPPLIER_PAYMENT\r\n* CORP_TAX\r\n* CORP_TRAVEL_SERVICES\r\n* DIVIDEND_PAYMENT\r\n* EXPENSES\r\n* INSURANCE_CLAIMS\r\n* INVOICES\r\n* OTHER\r\n* PENSION\r\n* PRIV_BILL_PAYMENT\r\n* PRIV_BUSINESS_PAYMENT\r\n* PRIV_CHARITY\r\n* PRIV_FAMILY_SUPPORT\r\n* PRIV_GIFT\r\n* PRIV_GOODS_SERVICES\r\n* PRIV_HOLIDAY\r\n* PRIV_INHERITANCE\r\n* PRIV_INR_BANKERS\r\n* PRIV_INR_COOP\r\n* PRIV_INR_CREDIT\r\n* PRIV_INR_EDUCATIONAL\r\n* PRIV_INR_EMI\r\n* PRIV_INR_FAMILIES\r\n* PRIV_INR_HOTELS\r\n* PRIV_INR_MEDICAL\r\n* PRIV_INR_POSTMASTER\r\n* PRIV_INR_TAX\r\n* PRIV_INR_TRADE\r\n* PRIV_INR_TRAVEL\r\n* PRIV_INR_UTILTY\r\n* PRIV_INVESTMENT\r\n* PRIV_LIVING\r\n* PRIV_LOAN_REPAYMENT\r\n* PRIV_MEDICAL\r\n* PRIV_MORTGAGE\r\n* PRIV_OTHER\r\n* PRIV_PENSION\r\n* PRIV_PROPERTY_BUY_SELL\r\n* PRIV_RELOCATION\r\n* PRIV_SALARY\r\n* PRIV_TAX\r\n* PRIV_TEST_TRANSFER\r\n* PRIV_TRAVEL_EXPENSES\r\n* PRIV_TRAVEL_MONEY\r\n* PRIV_TUITION\r\n* PRIV_WEDDING\r\n* PROPERTY_MANAGEMENT\r\n* SALARY\r\n* SUPPLIERS\r\n* TAX\r\n* TEMPORARY_CODE_102\r\n* TEMPORARY_CODE_103\r\n* TRAVEL_SERVICES\r\n</details>","operationId":"Get","consumes":[],"produces":["application/json"],"parameters":[{"name":"currency","in":"path","description":"Currency code to get purposes of payment for.","required":true,"type":"string"}],"responses":{"200":{"description":"Returns list of purposes of payment.","schema":{"$ref":"#/definitions/PurposeOfPaymentListResponse"},"examples":{"application/json":{"content":[{"code":"PRIV_BILL_PAYMENT","allowFreeText":true}]}}},"400":{"description":"Purposes of payment not found for this user","schema":{"$ref":"#/definitions/PurposeOfPaymentListResponse"},"examples":{"application/json":{"message":"Request failed validation.","errors":[{"code":"CURRENCY_VALIDATION","data":[{"key":"currency","value":"Currency is required."}]}]}}},"500":{"description":"Error getting purposes of payment for this user."}}}},"/quotes":{"post":{"tags":["Quote"],"summary":"Creates a quote for the currencies and amount provided.","description":"Sample request:\r\n            \r\n    POST /quotes\r\n            \r\n\\\r\nRequired user rights:\r\n            \r\n    CanQuote","operationId":"Create","consumes":["application/json-patch+json","application/json","text/json","application/*+json"],"produces":["text/plain","application/json","text/json"],"parameters":[{"name":"quoteRequest","in":"body","description":"Details needed to create a quote.","required":false,"schema":{"$ref":"#/definitions/CreateQuoteRequest"}}],"responses":{"200":{"description":"Returns the created quote.","schema":{"$ref":"#/definitions/QuoteResponse"},"examples":{"application/json":{"content":{"quoteId":"Quote_12016fea-5310-32b2-eca3-917c1ad62f87","quoteStatus":2,"quoteStatusText":"Quoted","expiryTimeMilliseconds":14127,"buyCurrency":"GBP","sellCurrency":"USD","baseCurrency":"GBP","rate":"1.7471","inverseRate":"0.5724","rateMovement":"","buyOrSell":"Sell","buyAmount":"57.24","sellAmount":"100.00","fees":"6.90","settlementAmount":"117.50","balanceAmount":"106.90","balanceDueDate":"2019-01-25","securityDeposit":"10.60","securityDepositDueDate":"2019-01-11","valueDate":"2019-01-25","availableDate":""},"warnings":[{"code":"WARN001"}],"information":[{"code":"INFO001"}]}}},"400":{"description":"Request was invalid.","schema":{"$ref":"#/definitions/QuoteResponse"},"examples":{"application/json":{"message":"Request failed validation.","errors":[{"code":"CREATE_QUOTE_REQUEST_VALIDATION","data":[{"key":"BuyCurrency","value":"Currency code must be 3 characters."}]}]}}},"500":{"description":"Error creating quote."}}}},"/quotes/{quoteId}":{"get":{"tags":["Quote"],"summary":"Refreshes a quote to gain an up-to-date quote.","description":"Sample request:\r\n            \r\n    GET /quotes/Quote_123456-1234\r\n    GET /quotes/Quote_123456-1234?refresh=false\r\n\\\r\nRequired user rights:\r\n            \r\n    CanQuote","operationId":"Refresh","consumes":[],"produces":["text/plain","application/json","text/json"],"parameters":[{"name":"quoteId","in":"path","description":"ID of the quote to be refreshed.","required":true,"type":"string"},{"name":"refresh","in":"query","description":"Set to false to return a cached quote if available, or 404 if no cached quote is found.","required":false,"type":"boolean"}],"responses":{"200":{"description":"Returns the refreshed quote.","schema":{"$ref":"#/definitions/QuoteResponse"},"examples":{"application/json":{"content":{"quoteId":"Quote_12016fea-5310-32b2-eca3-917c1ad62f87","quoteStatus":2,"quoteStatusText":"Quoted","expiryTimeMilliseconds":14127,"buyCurrency":"GBP","sellCurrency":"USD","baseCurrency":"GBP","rate":"1.7471","inverseRate":"0.5724","rateMovement":"","buyOrSell":"Sell","buyAmount":"57.24","sellAmount":"100.00","fees":"6.90","settlementAmount":"117.50","balanceAmount":"106.90","balanceDueDate":"2019-01-25","securityDeposit":"10.60","securityDepositDueDate":"2019-01-11","valueDate":"2019-01-25","availableDate":""},"warnings":[{"code":"WARN001"}],"information":[{"code":"INFO001"}]}}},"404":{"description":"Quote not found."},"500":{"description":"Error refreshing quote."}}},"patch":{"tags":["Quote"],"summary":"Updates a quote to change or add more details.","description":"Sample request:\r\n            \r\n    PATCH /quotes/Quote_123456-1234\r\n            \r\n\\\r\nRequired user rights:\r\n            \r\n    CanQuote","operationId":"Update","consumes":["application/json-patch+json","application/json","text/json","application/*+json"],"produces":["text/plain","application/json","text/json"],"parameters":[{"name":"quoteRequest","in":"body","description":"Details to update the quote with. If a value is null then the attribute will not be updated.","required":false,"schema":{"$ref":"#/definitions/UpdateQuoteRequest"}},{"name":"quoteId","in":"path","description":"ID of the quote to be updated.","required":true,"type":"string"}],"responses":{"200":{"description":"Returns the updated quote.","schema":{"$ref":"#/definitions/QuoteResponse"},"examples":{"application/json":{"content":{"quoteId":"Quote_12016fea-5310-32b2-eca3-917c1ad62f87","quoteStatus":2,"quoteStatusText":"Quoted","expiryTimeMilliseconds":14127,"buyCurrency":"GBP","sellCurrency":"USD","baseCurrency":"GBP","rate":"1.7471","inverseRate":"0.5724","rateMovement":"","buyOrSell":"Sell","buyAmount":"57.24","sellAmount":"100.00","fees":"6.90","settlementAmount":"117.50","balanceAmount":"106.90","balanceDueDate":"2019-01-25","securityDeposit":"10.60","securityDepositDueDate":"2019-01-11","valueDate":"2019-01-25","availableDate":""},"warnings":[{"code":"WARN001"}],"information":[{"code":"INFO001"}]}}},"400":{"description":"Request was invalid.","schema":{"$ref":"#/definitions/QuoteResponse"},"examples":{"application/json":{"message":"Request failed validation.","errors":[{"code":"UPDATE_QUOTE_REQUEST_VALIDATION","data":[{"key":"Amount","value":"Must be greater than 0."}]}]}}},"404":{"description":"Quote not found."},"500":{"description":"Error updating quote."}}}},"/recipients":{"get":{"tags":["Recipient"],"summary":"Gets recipients for a currency.","description":"Sample requests:\r\n            \r\n    GET /recipients?currency=GBP\r\n            \r\n\\\r\nRequired user rights:\r\n            \r\n    CanAccessRecipients","operationId":"Get","consumes":[],"produces":["text/plain","application/json","text/json"],"parameters":[{"name":"currency","in":"query","description":"Get recipients for a specific currency.","required":false,"type":"string"}],"responses":{"200":{"description":"Returns the list of recipients.","schema":{"$ref":"#/definitions/RecipientListResponse"},"examples":{"application/json":{"content":[{"id":1234567,"name":"Joe Smith","currency":"GBP","accountNumber":"87654321","accountName":"Joe Smith","bankName":"BankName","bankCountry":"GB","nickname":"Nickname","paymentReference":"Reference","purposeOfPaymentCode":"PRIV_OTHER","purposeOfPaymentFreeText":"Free text","bankAddressLine1":"Bank 1","bankAddressLine2":"Bank 2","bankAddressLine3":"Bank 3","bankBic":"194857","nationalClearingCode":"1235457","addressLine1":"Address1","addressLine2":"Address2","addressLine3":"Address3","email":"Joe.Smith@email.com","intermediaryBankAddressLine1":"IntBank1","intermediaryBankAddressLine2":"IntBank2","intermediaryBankAddressLine3":"IntBank3","intermediaryBankBic":"6582342","intermediaryNationalClearingCode":"6534211","intermediaryBankName":"IntBankName","intermediaryBankAddressCountryCode":"GB","intermediaryAccountNumber":"564245821"}]}}},"400":{"description":"Request was invalid.","schema":{"$ref":"#/definitions/RecipientListResponse"},"examples":{"application/json":{"message":"Invalid currency code.","errors":[{"code":"RECIPIENT001","data":[{"key":"currency","value":"123"}]}]}}},"404":{"description":"No recipients were found."},"500":{"description":"Error getting recipients."}}},"post":{"tags":["Recipient"],"summary":"Creates a recipient with the details provided.","description":"Sample request:\r\n            \r\n    POST /recipients\r\n            \r\n\\\r\nRequired user rights:\r\n            \r\n    CanAddRecipient","operationId":"Create","consumes":["application/json-patch+json","application/json","text/json","application/*+json"],"produces":["text/plain","application/json","text/json"],"parameters":[{"name":"recipientRequest","in":"body","description":"Details needed to create a recipient. The fields that are required, and those that can be included in the request, vary depending on the country and the currency.\r\n             Use GET /recipients/fields/{country}/{currency} to retrieve the valid format for the country/currency combination.","required":false,"schema":{"$ref":"#/definitions/RecipientRequest"}}],"responses":{"200":{"description":"Returns the created recipient.","schema":{"$ref":"#/definitions/RecipientResponse"},"examples":{"application/json":{"content":{"id":1234567,"name":"Joe Smith","currency":"GBP","accountNumber":"87654321","accountName":"Joe Smith","bankName":"BankName","bankCountry":"GB","nickname":"Nickname","paymentReference":"Reference","purposeOfPaymentCode":"PRIV_OTHER","purposeOfPaymentFreeText":"Free text","bankAddressLine1":"Bank 1","bankAddressLine2":"Bank 2","bankAddressLine3":"Bank 3","bankBic":"194857","nationalClearingCode":"1235457","addressLine1":"Address1","addressLine2":"Address2","addressLine3":"Address3","email":"Joe.Smith@email.com","intermediaryBankAddressLine1":"IntBank1","intermediaryBankAddressLine2":"IntBank2","intermediaryBankAddressLine3":"IntBank3","intermediaryBankBic":"6582342","intermediaryNationalClearingCode":"6534211","intermediaryBankName":"IntBankName","intermediaryBankAddressCountryCode":"GB","intermediaryAccountNumber":"564245821"},"warnings":[{"code":"WARN001"}],"information":[{"code":"INFO001"}]}}},"400":{"description":"Request was invalid.","schema":{"$ref":"#/definitions/RecipientResponse"},"examples":{"application/json":{"message":"Request failed validation.","errors":[{"code":"CREATE_RECIPIENT_REQUEST_VALIDATION","data":[{"key":"BankCountryCode","value":"Country code must be 2 characters."}]}]}}},"500":{"description":"Error creating recipient."}}}},"/recipients/{recipientId}":{"delete":{"tags":["Recipient"],"summary":"Delete a recipient.","description":"Sample request:\r\n            \r\n    DELETE /recipients/{recipientId}\r\n            \r\n\\\r\nRequired user rights:\r\n            \r\n    CanDeleteRecipient","operationId":"Delete","consumes":[],"produces":[],"parameters":[{"name":"recipientId","in":"path","description":"Recipient ID of recipient to delete.","required":true,"type":"integer","format":"int32"}],"responses":{"204":{"description":"Recipient has been deleted."},"404":{"description":"Recipient not found."},"500":{"description":"Error occurred while deleting the recipient."}}}},"/recipients/fields/{country}/{currency}":{"get":{"tags":["Recipient"],"summary":"Gets all recipient field definitions for a user for a specified currency and a country.","description":"Sample request:\r\n            \r\n    GET /recipients/fields/AU/GBP\r\n            \r\n\\\r\nRequired user rights:\r\n            \r\n    CanAccessRecipients\r\n            \r\n\\\r\n<details><summary>**Names and descriptions for the fields that can be returned**</summary>\r\n*   ibanOrAccountNumber - Used if either an IBAN, or an domestic Account Number can be provided.\r\n*   accountNumber - Account Number (Domestic - with respect to the Bank Address Country Code) for the recipient's bank account.\r\n*   iban - International Bank Account Number for the recipient's bank account.\r\n*   nationalClearingCode - National Clearing Code for the recipient's bank.\r\n*   bankAccountType - The type of bank account. (NOTE: is looking for an integer value that should map to the values stored for each type, e.g. 10 for Savings)\r\n*   bankBic - Bank Identification Code for the recipient's bank.\r\n*   bankName - Name of the bank for the recipient's account.\r\n*   bankAddressLine1 - Line 1 of the address for the recipient's bank.\r\n*   bankAddressLine2 - Line 2 of the address for the recipient's bank.\r\n*   bankAddressLine3 - Line 3 of the address for the recipient's bank.\r\n*   bankAddressCountryCode - Country code for the recipient's bank.\r\n*   accountName - Name of the recipient on their bank account.\r\n*   email -  Email for the recipient.\r\n*   addressLine1 - Line 1 of the address for the recipient.\r\n*   addressLine2 - Line 2 of the address for the recipient.\r\n*   addressCountryCode - Country code of the address for the recipient.\r\n*   paymentReference - Client specified reference when making payments to the recipient.\r\n*   intermediaryBankNationalClearingCode - National Clearing Code for an intermediary bank.\r\n*   intermediaryBankBic - Bank Identification Code for an intermediary bank.\r\n*   intermediaryBankName - Name of the intermediary bank.\r\n*   intermediaryBankIbanOrAccountNumber - IBAN or Account Number for an intermediary bank.\r\n*   intermediaryBankAddressLine1 - Line 1 of the address for an intermediary bank.\r\n*   intermediaryBankAddressLine2 - Line 2 of the address for an intermediary bank.\r\n*   intermediaryBankAddressLine3 - Line 3 of the address for an intermediary bank.\r\n*   intermediaryBankAddressCountryCode - Country code for an intermediary bank.\r\n*   purposeOfPaymentCode - Default purpose of payment code for the recipient.\r\n*   purposeOfPaymentFreeText - Default purpose of payment free text for the recipient.\r\n*   nickname - Nickname specified by the client.\r\n</details>","operationId":"GetRecipientFieldDefinitions","consumes":[],"produces":["text/plain","application/json","text/json"],"parameters":[{"name":"country","in":"path","description":"Country code to get recipient field definitions for.","required":true,"type":"string"},{"name":"currency","in":"path","description":"Currency code to get recipient field definitions for.","required":true,"type":"string"}],"responses":{"200":{"description":"Returns all Recipient Field definitions.","schema":{"$ref":"#/definitions/RecipientFieldDefinitionsResponse"},"examples":{"application/json":{"content":{"fieldDefinitions":[{"fieldName":"accountName","regEx":"^[a-zA-Z0-9\\s\\(\\)\\+\\-'/\\?\\.:,]{1,70}$","required":false,"fieldType":"Text","allowedValues":[]},{"fieldName":"addressLine1","regEx":"^$|^[a-zA-Z0-9,\\s\\(\\)\\+\\-'/\\?\\.:]{3,35}$","required":false,"fieldType":"Text","allowedValues":[]}],"contentReplacements":{"COUNTRY_CODE":"GB","ACCOUNT_LENGTH":"8"},"errors":{},"infos":{}}}}},"400":{"description":"Request was invalid.","schema":{"$ref":"#/definitions/RecipientFieldDefinitionsResponse"},"examples":{"application/json":{"message":"Request failed validation.","errors":[{"code":"COUNTRY_VALIDATION","data":[{"key":"GBR","value":"Country code must be 2 characters."}]}]}}},"500":{"description":"Error getting all Recipient Field definitions."}}}},"/tradeablecurrencies":{"get":{"tags":["TradeableCurrency"],"summary":"Get tradeable currencies.","description":"Sample request:\r\n\r\n    Get /tradeablecurrencies","operationId":"Get","consumes":[],"produces":["application/json"],"parameters":[],"responses":{"200":{"description":"Returns list of Tradeable currencies.","schema":{"$ref":"#/definitions/TradeableCurrencyListResponse"},"examples":{"application/json":{"content":[{"amountPrecision":2,"isoCode":"AED","name":"UAE Dirham","canBuy":true,"canSell":true}]}}},"404":{"description":"Tradeable currencies not found for this user"},"500":{"description":"Error getting Tradeable currencies."}}}},"/transactions":{"get":{"tags":["Transaction"],"summary":"Gets a list of transactions for the specified page number and page size, filtered by creation date.","description":"Sample request:\r\n            \r\n    GET /transactions?fromDate=2019-01-10","operationId":"GetList","consumes":[],"produces":["text/plain","application/json","text/json"],"parameters":[{"name":"pageNumber","in":"query","description":"The page to return (First page is page 0).","required":false,"type":"integer","format":"int32","default":0},{"name":"pageSize","in":"query","description":"The number of transactions per page.","required":false,"type":"integer","format":"int32","default":4},{"name":"fromDate","in":"query","description":"Date to get transactions from.","required":false,"type":"string","default":"2019-01-01"},{"name":"toDate","in":"query","description":"Date to get transactions up to.","required":false,"type":"string"}],"responses":{"200":{"description":"Returns the specified page of transactions, filtered by creation date.","schema":{"$ref":"#/definitions/TransactionPagedDataResponse"},"examples":{"application/json":{"content":{"content":[{"transactionId":12345678,"isValidTransaction":true,"buyOrSell":"Sell","transactionReference":"C4281953","transactionDate":"2019-01-08","transactionStatus":"Confirmed","workflowState":"AwaitingBalance","buyCurrency":"GBP","buyAmount":57.24,"sellCurrency":"USD","sellAmount":100,"baseCurrency":"GBP","rate":1.7471,"fees":6.9,"feeCurrency":"USD","valueDate":"2019-01-25","payments":[{"amount":57.24,"recipientId":1234567,"reference":"Reference","recipientEmailAddress":"recip@email.co.uk","purposeOfPaymentCode":"PRIV_OTHER","purposeOfPaymentFreeText":"Free text"}],"settlementAccountDetails":{"accountName":"AccountName","accountNumber":"123456789","iban":"GB41ABCD285627869934271","bankName":"BankName","branch":"BranchName","addressLine1":"Address1","addressLine2":"Address2","addressLine3":"Address3","swiftCode":"ABCDGB64","nationalClearingCode":"273841","supportsBPayPayment":false,"bPayPaymentName":"","bPayBillerCode":null},"bPayCustomerReferenceNumber":0,"settlementAmount":117.5,"balanceAmount":106.9,"balanceDueDate":"2019-01-25","securityDeposit":10.6,"securityDepositDueDate":"2019-01-11"},{"transactionId":12345682,"isValidTransaction":true,"buyOrSell":"Buy","transactionReference":"C4287591","transactionDate":"2019-01-27","transactionStatus":"Confirmed","workflowState":"AwaitingBalance","buyCurrency":"GBP","buyAmount":150,"sellCurrency":"USD","sellAmount":262.05,"baseCurrency":"GBP","rate":1.747,"fees":12,"feeCurrency":"USD","valueDate":"2019-01-29","payments":[{"amount":57.24,"recipientId":1234567,"reference":"Reference","recipientEmailAddress":"recip@email.co.uk","purposeOfPaymentCode":"PRIV_OTHER","purposeOfPaymentFreeText":"Free text"}],"settlementAccountDetails":{"accountName":"AccountName","accountNumber":"123456789","iban":"GB41ABCD285627869934271","bankName":"BankName","branch":"BranchName","addressLine1":"Address1","addressLine2":"Address2","addressLine3":"Address3","swiftCode":"ABCDGB64","nationalClearingCode":"273841","supportsBPayPayment":false,"bPayPaymentName":"","bPayBillerCode":null},"bPayCustomerReferenceNumber":0,"settlementAmount":274.05,"balanceAmount":274.05,"balanceDueDate":"2019-01-29","securityDeposit":0,"securityDepositDueDate":""}],"totalRecords":2,"pageSize":4,"pageNumber":0}}}},"400":{"description":"Invalid dates or paging parameters.","schema":{"$ref":"#/definitions/TransactionPagedDataResponse"},"examples":{"application/json":{"message":"fromDate must be earlier than toDate."}}},"404":{"description":"No transactions found."},"500":{"description":"Error getting transactions."}}},"post":{"tags":["Transaction"],"summary":"Creates a transaction for the quote specified.","description":"Sample request:\r\n            \r\n    POST /transactions\r\n            \r\n\\\r\nRequired user rights:\r\n            \r\n    CanQuoteAndCreateTransaction","operationId":"Book","consumes":["application/json-patch+json","application/json","text/json","application/*+json"],"produces":["text/plain","application/json","text/json"],"parameters":[{"name":"transactionRequest","in":"body","description":"Details needed to create a transaction.","required":false,"schema":{"$ref":"#/definitions/CreateTransactionRequest"}}],"responses":{"200":{"description":"Returns the created transaction.","schema":{"$ref":"#/definitions/TransactionResponse"},"examples":{"application/json":{"content":{"transactionId":12345678,"isValidTransaction":true,"buyOrSell":"Sell","transactionReference":"C4281953","transactionDate":"2019-01-08","transactionStatus":"Confirmed","workflowState":"AwaitingBalance","buyCurrency":"GBP","buyAmount":57.24,"sellCurrency":"USD","sellAmount":100,"baseCurrency":"GBP","rate":1.7471,"fees":6.9,"feeCurrency":"USD","valueDate":"2019-01-25","payments":[{"amount":57.24,"recipientId":1234567,"reference":"Reference","recipientEmailAddress":"recip@email.co.uk","purposeOfPaymentCode":"PRIV_OTHER","purposeOfPaymentFreeText":"Free text"}],"settlementAccountDetails":{"accountName":"AccountName","accountNumber":"123456789","iban":"GB41ABCD285627869934271","bankName":"BankName","branch":"BranchName","addressLine1":"Address1","addressLine2":"Address2","addressLine3":"Address3","swiftCode":"ABCDGB64","nationalClearingCode":"273841","supportsBPayPayment":false,"bPayPaymentName":"","bPayBillerCode":null},"bPayCustomerReferenceNumber":0,"settlementAmount":117.5,"balanceAmount":106.9,"balanceDueDate":"2019-01-25","securityDeposit":10.6,"securityDepositDueDate":"2019-01-11"},"warnings":[{"code":"WARN004"}]}}},"400":{"description":"There was an issue with the quote data.","schema":{"$ref":"#/definitions/TransactionResponse"},"examples":{"application/json":{"message":"Quote failed validation.","errors":[{"code":"TRANSACTION001"}]}}},"404":{"description":"Quote for the transaction was not found."},"500":{"description":"Error creating transaction."}}}},"/transactions/{transactionId}":{"get":{"tags":["Transaction"],"summary":"Gets a transaction with the specified ID.","description":"Sample request:\r\n            \r\n    GET /transactions/20258137","operationId":"Get","consumes":[],"produces":["text/plain","application/json","text/json"],"parameters":[{"name":"transactionId","in":"path","description":"ID of the transaction to get.","required":true,"type":"integer","format":"int32"}],"responses":{"200":{"description":"Returns the transaction.","schema":{"$ref":"#/definitions/TransactionResponse"},"examples":{"application/json":{"content":{"transactionId":12345678,"isValidTransaction":true,"buyOrSell":"Sell","transactionReference":"C4281953","transactionDate":"2019-01-08","transactionStatus":"Confirmed","workflowState":"AwaitingBalance","buyCurrency":"GBP","buyAmount":57.24,"sellCurrency":"USD","sellAmount":100,"baseCurrency":"GBP","rate":1.7471,"fees":6.9,"feeCurrency":"USD","valueDate":"2019-01-25","payments":[{"amount":57.24,"recipientId":1234567,"reference":"Reference","recipientEmailAddress":"recip@email.co.uk","purposeOfPaymentCode":"PRIV_OTHER","purposeOfPaymentFreeText":"Free text"}],"settlementAccountDetails":{"accountName":"AccountName","accountNumber":"123456789","iban":"GB41ABCD285627869934271","bankName":"BankName","branch":"BranchName","addressLine1":"Address1","addressLine2":"Address2","addressLine3":"Address3","swiftCode":"ABCDGB64","nationalClearingCode":"273841","supportsBPayPayment":false,"bPayPaymentName":"","bPayBillerCode":null},"bPayCustomerReferenceNumber":0,"settlementAmount":117.5,"balanceAmount":106.9,"balanceDueDate":"2019-01-25","securityDeposit":10.6,"securityDepositDueDate":"2019-01-11"}}}},"400":{"description":"Invalid transaction ID.","schema":{"$ref":"#/definitions/TransactionResponse"},"examples":{"application/json":{"message":"transactionId must be greater than 0."}}},"404":{"description":"Transaction not found."},"500":{"description":"Error getting transaction."}}}}},"definitions":{"StringArrayResponse":{"description":"Generic response returned for each request.\r\n            \r\n\"message\" - Result from the request.\r\n\"content\" - Data returned in the response.\r\n\"errors\" - Issues while processing the request.\r\n\"warnings\" - Potential issues while processing the request or with the response data.\r\n\"information\" - Extra details relating to the response data.\r\n<typeparam name=\"T\">The type of the content.</typeparam>","type":"object","properties":{"content":{"uniqueItems":false,"type":"array","items":{"type":"string"}},"message":{"type":"string"},"errors":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Message"}},"warnings":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Message"}},"information":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Message"}}}},"Message":{"description":"Details for an error or warning that occured during the request or general information from it.\r\n            \r\n\"code\" - Code that can be used to find full details for the message.\r\n\"data\" - Any relevant data that caused the message, if applicable.","type":"object","properties":{"code":{"type":"string"},"data":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/StringStringKeyValuePair"}}}},"StringStringKeyValuePair":{"type":"object","properties":{"key":{"type":"string","readOnly":true},"value":{"type":"string","readOnly":true}}},"PurposeOfPaymentListResponse":{"description":"Generic response returned for each request.\r\n            \r\n\"message\" - Result from the request.\r\n\"content\" - Data returned in the response.\r\n\"errors\" - Issues while processing the request.\r\n\"warnings\" - Potential issues while processing the request or with the response data.\r\n\"information\" - Extra details relating to the response data.\r\n<typeparam name=\"T\">The type of the content.</typeparam>","type":"object","properties":{"content":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/PurposeOfPayment"}},"message":{"type":"string"},"errors":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Message"}},"warnings":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Message"}},"information":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Message"}}}},"PurposeOfPayment":{"type":"object","properties":{"code":{"type":"string"},"allowFreeText":{"type":"boolean"}}},"CreateQuoteRequest":{"description":"Request body for creating a new quote. Quotes expire in around 15 seconds.\r\n\r\nSWIFT characters match the following regular expression: ^[\\r\\n\\sa-zA-Z0-9\\/\\-:,'\\?\\(\\)\\.\\+]*$\r\n            \r\n\"buyCurrency\" - Code of the currency being converted to.\r\n\"sellCurrency\" - Code of the currency provided by the client.\r\n\"buyOrSell\" - 'Buy' or 'Sell': Whether the client is buying or selling the amount of currency.\r\n\"amount\" - Amount of the currency being bought or sold.\r\n\"recipientId\" - Optional: ID of the recipient to make the payment to. Note that this is required for a contract to be updated, so if not provided on creation then the quote will need updating to contain it.\r\n\"reference\" - Optional: Reference for the recipient to identify a transfer. SWIFT characters only.\r\n\"purposeOfPaymentCode\" - Optional: Code for the reason why the client is making the transfer. Cannot be an empty string, if provided. Note that this is required for a contract to be updated, so if not provided on creation then the quote will need updating to contain it.\r\n\"purposeOfPaymentFreeText\" - Optional: If allowed for the code, the client can enter their reason for the transfer in text form. SWIFT characters only.\r\n\"recipientEmailAddress\" - Optional: Email address that will be notified when the payment is made.\r\n\"privateReference\" - Optional: Private reference for the client to identify a transfer. SWIFT characters only.\r\n\"valueDate\" - Optional: yyyy-MM-dd - Effective date of the transfer.","required":["amount","buyOrSell","buyCurrency","sellCurrency"],"type":"object","properties":{"amount":{"format":"double","type":"number"},"buyOrSell":{"type":"string"},"buyCurrency":{"type":"string"},"sellCurrency":{"type":"string"},"recipientId":{"format":"int32","type":"integer"},"reference":{"type":"string"},"purposeOfPaymentCode":{"type":"string"},"purposeOfPaymentFreeText":{"type":"string"},"recipientEmailAddress":{"type":"string"},"privateReference":{"type":"string"},"valueDate":{"type":"string"}},"example":{"amount":100,"buyOrSell":"Sell","buyCurrency":"GBP","sellCurrency":"USD","recipientId":1234567,"reference":"Reference","purposeOfPaymentCode":"CORP_OTHER","purposeOfPaymentFreeText":"Free text","recipientEmailAddress":"recip@email.co.uk","privateReference":"Private reference","valueDate":"2019-01-25"}},"QuoteResponse":{"description":"Generic response returned for each request.\r\n            \r\n\"message\" - Result from the request.\r\n\"content\" - Data returned in the response.\r\n\"errors\" - Issues while processing the request.\r\n\"warnings\" - Potential issues while processing the request or with the response data.\r\n\"information\" - Extra details relating to the response data.\r\n<typeparam name=\"T\">The type of the content.</typeparam>","type":"object","properties":{"content":{"$ref":"#/definitions/Quote"},"message":{"type":"string"},"errors":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Message"}},"warnings":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Message"}},"information":{"uniqueItems":false,"type":"array","items":{"$ref":"#/definitions/Message"}}}},"Quote":{"description":"Details for a quote.\r\n            \r\n\"quoteId\" - ID of the quote.\r\n\"quoteStatus\" - Enum value for the status of the quote.\r\n\"quoteStatusText\" - Text value for the status of the quote.\r\n\"expiryTimeMilliseconds\" - Amount of time until the quote expires.\r\n\"buyCurrency\" - Code of the currency being converted to.\r\n\"sellCurrency\" - Code of the currency provided by the client.\r\n\"baseCurrency\" - Code of the base currency for the currency pair.\r\n\"rate\" - Quoted exchange rate of base currency to the other currency.\r\n\"inverseRate\" - Inverse quoted exchange rate of the currency pair.\r\n\"rateMovement\" - Wh

# --- truncated at 32 KB (52 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/euronet/refs/heads/main/openapi/xe-payments-api-openapi.json