{"openapi":"3.0.0","info":{"version":"1.3.35","title":"Versapay API Reference","contact":{"name":"Versapay Support","url":"https://www.versapay.com/support","email":"support@versapay.com"},"x-logo":{"url":"https://developers.versapay.com/images/logo.png"},"termsOfService":"https://www.versapay.com/terms-of-use","license":{"name":"Copyright 2022 Versapay. All Rights Reserved."}},"servers":[{"url":"https://secure.versapay.com","description":"Production"},{"url":"https://uat.versapay.com","description":"UAT"}],"tags":[{"name":"Overview","description":"The Versapay API offers operations in support of its flagship products:\n* Collaborative AR (formerly ARC) - accounts receivable platform with automated invoicing, effective collaboration, flexible payments and cash application to improve efficiency and customer relationships.\n\n * Importing & exporting customers, invoices, and payments.\n\n * Monitoring file based imports/batches.\n\n * Importing & exporting orders and processing order based payment transactions.\n\n * Ecommerce integrations.\n\n * Moving funds using transactions and pre-authorized debit agreements.\n\n * A secure hosted checkout for accepting payments through your website or email.\n\nPlease contact us at support@versapay.com for support & setup of A/R invoicing integration, hosted checkout, and/or payment acceptance.\n"},{"name":"Versioning & Compatibility","description":"The current API version is `Versapay API Reference (1.3.35)`.\n\nVersapay commits to maintaining backward compatibility and existing API endpoints with each released version updating existing endpoints and/or introducing new endpoints.\n\nShould Versapay require deprecation of a published API, Versapay will work with its API clients/users to confirm specific EOL/migration timelines with ample lead times, as well as endpoint migration strategies.\n"},{"name":"Environments","description":"The UAT environment is a useful sandbox for integration testing where transaction settlements are simulated using test account numbers and test dollar amounts.\n\n`https://uat.versapay.com`\n\nOnce integration testing is complete via the UAT environment, start sending your requests to the production URL to start moving money and/or integrating with Versapay.\n\n`https://secure.versapay.com`\n"},{"name":"Rate Limits","description":"The standard rate limit is 1500 requests per minute per IP address, but Versapay reserves the right to raise or lower that limit based on network conditions. When the rate limit is exceeded, APIs will return error `HTTP 1015 you are being rate limited`. Partner- or customer-specific rate limits can be established by special agreement.\n"},{"name":"Authentication","description":"Visit your account settings in `UAT` (https://uat.versapay.com/account) or `Production` (https://secure.versapay.com/account) to setup API credentials needed for authentication as well as webhooks to receive relevant callbacks from Versapay transaction processing.\n\nYou can generate/disable your API credentials as often as necessary for security reasons.\n\nIf you do not have an account, please contact Versapay Support for support & setup of AR invoicing integration, hosted checkout and/or payment acceptance for partner and/or API credential setup.\n\n## API Token and API Key\nAPI requests are authenticated using `API Token & Key` via [HTTPS Basic Access Authentication](https://en.wikipedia.org/wiki/Basic_access_authentication).
Security Scheme Type HTTPS
HTTPS Authorization Scheme basic
\n\nSimply provide the `API Token & Key` values as the `user` and `password` parameters, using cURL for instance:\n\n`curl -u \"Nvax...:UN0I...\" -X POST https://secure.versapay.com/api/...`\n\n## JWT Token\nAlternatively, API requests can also be authenticated using `JWT Token` via [HTTPS Bearer Authentication](https://en.wikipedia.org/wiki/JSON_Web_Token).
Security Scheme Type HTTPS
HTTP Authorization Scheme bearer JWT
\n`JWT Tokens`, automatically generated alongside `API Token & Key`, are displayed along with expiration in account settings as well as via authenticated `/api/whoami`, see `Authentication` _Echo identity and account profile settings_\n\nSimply provide the `JWT Token` in the authorization header, using cURL for instance:\n\n`curl -H \"Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbiI6Im54eDFaSjgzeXRNNmhtb3NGVExCIiwiZXhwIjoxNzEyOTU5NDA5fQ.adV6U1vW69Ypskt61uPL8hZ-4muvtM4FLM48QN6iCc4\" -X POST https://secure.versapay.com/api/...`\n"},{"name":"Testing Order Transactions","description":"In the uat environment, the following test account numbers can be used provided your account has been setup for payment acceptance.\nPlease contact support@versapay.com for support & setup questions related to payment acceptance.\n\n## ACH Bank Account Numbers\n|Routing|Number|\n|:--|:--|\n| 122105278 | 0000000016 |\n\n## Credit Card Numbers\nAny future dated expiry month/year for the following:\n\n|Brand|Number|\n|:--|:--|\n| Visa | 4895281000000006 |\n| Visa | 4264280001234500 (will always decline) |\n| Mastercard | 5541032000004422 |\n| Discover | 6011000990911111 |\n| American Express (Amex) | 341111597242000 |\n\nThe following CVV values can be used to test CVV reponse codes:\n\n|CVV|Code|Description|\n|:--|:--|:--|\n| 123 | P | Not Processed |\n| 234 | M | Match |\n| 345 | N | No Match |\n| 456 | S | CVV value should be on the card but the merchant has indicated that it is not present |\n| 567 | U | Issuer not certified for CVV processing |\n| 6789 (Amex) | M | Match |\n| 1011 (Amex) | N | No Match |\n| 1213 (Amex) | P | Not Processed |\n| Any other number | M | Match |\n\nThe following address values can be used to test AVS reponse codes:\n\n|Postal/Zip|Address|Code|Response|\n|:--|:--|:--|:--|\n| 80801 | 234 Elm Street | A | Address match; zip no match |\n| 80802 | 234 Elm Street | G | Global non-AVS participant |\n| 80803 | 234 Elm Street | N | Address and zip do not match |\n| 80804 | 234 Elm Street | R | System unavailable or timed out |\n| 80805 | 234 Elm Street | S | Service not supported: Issuer does not support AVS and Visa |\n| 80806 | 234 Elm Street | U | Unavailable: Address information not verified for domestic transactions |\n| 808000000 | 234 Elm Street | W | 9-digit zip matches; address does not match |\n| 808000000 | 234 Elm Street | X | 9-digit zip and address match |\n| 80809 | 234 Elm Street | Y | 5-digit zip and address match |\n| 80810 | 234 Elm Street | Z | 5-digit zip matches; address does not match |\n| 80815 | 234 Elm Street | I | Address information not verified for international transaction |\n| 80818 | 234 Elm Street | E | AVS service not supported |\n| K1A0A9 | 234 Elm Street | D | Zip and address match (International) |\n| L6Y2N4 | 234 Elm Street | M | Zip and address match (International) |\n| K0K2T0 | 234 Elm Street | P | Zip matches; address not verified because of incompatible formats |\n| Any other zip | Any other address | Y | 5-digit zip and address match |\n\n## Declines\nThe number of cents in the transaction amount can trigger a decline response in UAT.\nIf the transaction amount ends in `.01` (e.g., $1.01 or $40.01), the transaction will decline.\nIf a `void` transaction amount ends in `.02` (e.g., $1.02 or $40.02), the `void` transaction will decline.\n"},{"name":"Watermark & Limit","description":"The API offers polling based endpoints to supplement/alternative to webhook integration. The requisite GET endpoints for customer, invoice, payment, and settlement reporting accept a \"watermark\" option to ensure that data more recent than the provided watermark is retrieved.\n\nThey also support a limit argument, which defaults to 100 items -- and are capped up to 2500 for performance reasons. Otherwise, the limit can be used to draw 1-2500 items at a time depending on the integrators need and performance boundaries.\n\nThe watermark & limit are specified as part of the API call e.g. ` GET /api/exports/open_invoices?watermark=13207500&limit=5`\n\nThe watermark is typically an 8-byte integer unless otherwise specified. The limit is an integer between 1 and 2500.\n\n## API Response Structure\n\nThe general response structure of these API are an ordered hash of records, whose key/index is a watermark value.\n\nThe iteration pattern would be, for instance:\n\n```ruby\nlast_watermark = 0\njson = GET /api/...?watermark={last_watermark}\nfor each watermark_key in json.keys\n\n record = json[watermark_key]\n\n last_watermark = watermark_key if watermark_key > last_watermark\n\n```\nOtherwise, an API response may be a flat array list, where the watermark value is a key in the array item record, just the same:\n\n```ruby\nlast_watermark = 0\njson = GET /api/...?watermark={last_watermark}\nfor each record in json\n\n watermark_key = record[\"watermark\"]\n\n last_watermark = watermark_key if watermark_key > last_watermark\n\n```\nThe last watermark key (or last watermark attribute where echo'd on a record) in the result set can be used as the argument to the next call e.g.\n- `GET /api/exports/open_invoices`\n- `GET /api/exports/open_invoices?limit=2`\n- `GET /api/exports/open_invoices?watermark=13207500&limit=7`\n\n## API Response Structure - Flat Array List of Records\n\nThe flat array list response structure can be explicitly requested via `list=true` URL argument.\n"},{"name":"Ecommerce Integration","description":"The Versapay e-commerce solution is composed of several components. First, is a server-side API that allows your application to configure a new payment session, manage customer wallets, create orders, and initiate payments. In addition, there is a client-side JavaScript SDK that enables your web application to accept secure payment data via an iframe hosted by Versapay. Your sensitive payment data will not transit your application when you use the iframe, so your application will have a reduced PCI scope.\n\nIn order to accept a payment, the general flow is to first create a session using the server-side API. Once a session ID has been generated by the Versapay server and returned to your application, your client-side code can use that session ID to initialize the Versapay payment SDK, which will, in turn, render the iframe. Next, the customer will interact with the iframe to specify a payment method. The SDK will return a token representing that payment method to your client-side code. Your client-side code must return the token to your server-side code, which will then use the original session ID and the token to create an order and take a payment. Finally, your ERP or order fulfillment system will query the Versapay cloud platform for new orders so that they may be created and fulfilled via your standard workflow.\n\nFor more information see [Ecommerce API](https://developers.versapay.com/ecommerce).\n"},{"name":"Onboarding","description":"Onboarding supports the automated process of applying for merchant services. Contact support@versapay.com for support & setup of supplier onboarding partner credentials.\n"},{"name":"Wallets","description":"The Wallet entity holds vaulted & secured payment methods owned by a customer (buyer/payor) that can be used to make payments via Collaborative AR (online Portals, AutoPay, Pay Now), Order Transactions (Ecomm & ERP based suppliers), and Invoicing Payments (via Partner buyer networks including Virtual Card Connect). Contact support@versapay.com for support & setup for Wallet access and payment transaction enablement in relation to licensed product components.\n"},{"name":"Orders","description":"The Order entity represents the sales document in the ERP system. The fields in the ERP system should be aligned as closely as possible with the fields in the order entity, as the gateway will use these fields for credit card interchange optimization. Contact support@versapay.com for support & setup for Order and/or Order Transactions enablement.\n"},{"name":"Order Transactions","description":"Order-based card/ACH and card present EMV payment transactions include verify, authorize, capture, sale, void, return refund, and return credit transaction types. If participating in a gift card program, gift cards can be used in sale, void, refund transaction types. Contact support@versapay.com for support & setup for Order Transactions enablement.\n## Credit Card Payments\nThere are two types of credit card payments: sale and delayed capture. Sale payments occur when the merchant wishes to accept a payment for goods or services that have already been shipped or provided to the cardholder. A sale is a financial transaction, and the movement of funds will be initiated in response to a sale request. Delayed capture payments are used when there is a separation between accepting an order and fulfilling that order. With delayed capture, the credit card is first authorized for the estimated order total. The authorization reserves funds on the cardholder’s account for the merchant but does not initiate a movement of funds. Once the products or services are ready to be delivered to the cardholder, the authorization is captured for the final amount. The capture request initiates the movement of funds.\n## ACH Payments\nACH payments are bank-to-bank transfers of funds. Unlike credit card payments, ACH payments only have one type – sale, and there is no prior authorization. Therefore, sale amounts are final and cannot be adjusted after the fact. ACH payments assume success, and if there is a problem with the funding source, like with a bounced paper check, the originator will be notified of a rejection several days after the payment attempt.\n## EFT Payments\nEFT payments are bank-to-bank transfers of funds. Unlike credit card payments, EFT payments only have one type – sale, and there is no prior authorization. Therefore, sale amounts are final and cannot be adjusted after the fact. EFT payments assume success, and if there is a problem with the funding source, like with a bounced paper check, the originator will be notified of a rejection several days after the payment attempt.\n## Gift Card Payments\nProvisioned gift cards can be activated/enabled (or deactivated/disabled) as well as have their balances loaded/re-loaded with an amount. Contact support@versapay.com for support & setup for Gift Card acceptance.\n## Point-of-Sale/Card Present EMV Payments\nCard Present EMV payment transactions require a Versapay certified point-of-sale terminal. In addition to the card not present transaction types, the following payment transaction types are also supported: device setup, request signature, and cancel. Contact support@versapay.com for support & setup for POS/CP EMV enablement.\n"},{"name":"Gift Cards","description":"Provisioned gift cards can be activated/enabled (or deactivated/disabled) as well as have their balances loaded/re-loaded with an amount. Contact support@versapay.com for support & setup for Gift Card acceptance.\n"},{"name":"Card Present EMV","description":"Card Present EMV payment transactions require a Versapay certified point-of-sale terminal. Contact support@versapay.com for support & setup for POS/CP EMV enablement.\n"},{"name":"Reference Data","description":"For convenience purposes only, Versapay can supply third party reference data to its partners and users. This data can be used to implement client-side tooling (e.g., fraud mitigation services), but it may not be redistributed. The accuracy and completeness of this third party data cannot be guaranteed and is for informational and convenience purposes only. Contact support@versapay.com for eligibility for reference data enablement.\n"},{"name":"Settlement Reporting","description":"Settlement Reporting includes retrieval of monthly statements, daily deposit amounts (including fee information), transaction exceptions (ACH reject/return & CC chargeback), and transaction details. Contact support@versapay.com for payment acceptance onboarding support & setup and eligibility for Settlement Reporting enablement.\n"},{"name":"Autopay","description":"\nAutopays are a digital analog to paper pre-authorized debit agreements that businesses could use, for instance, for monthly billing.\n"},{"name":"Customers","description":"As a supplier your customers are the entities that are invoiced.\n\n## Webhooks\n\nWhen using Webhooks, your application will be notified when key events are triggered for a customer.\n"},{"name":"Invoices","description":"As a supplier invoices are your receivables.\n\n## Webhooks\n\nWhen using Webhooks, your application will be notified when key events are triggered for an invoice.\n"},{"name":"Invoicing Payments","description":"As a supplier a payments are made by customers for invoices issued to them.\n\n## Webhooks\n\nWhen using Webhooks, your application will be notified when key events are triggered for a payment.\n"},{"name":"Divisions","description":"As a supplier divisions are used to group your invoices.\n"},{"name":"Notifications","description":"As a supplier you can notify customers about their invoices.\n"},{"name":"Collaboration","description":"As a supplier your customers collaborate with you through comments about invoices and/or payments.\n"},{"name":"File Imports","description":"As a supplier you can upload customer, invoice, and payment data in CSV file formats.\n"},{"name":"Webhooks","description":"Versapay uses the [Webhook](http://www.webhooks.org/) pattern to POST updates to a HTTP (port 80) or HTTPS (port 443) URL you specify.\n\n## HTTP Acknowledgement\n\nThe specified URL must return a status code of 200 otherwise Versapay will continue attempting to deliver the POST up to a system defined number of attempts.\n\n## Idempotency\n\nA webhook consumer must be idempotent in receiving replayed/duplicated webhook payload transmissions which may arise as a result of subscription configuration and event timing and/or retry scenarios.\n\n## Viewing Portal\n\nYou can view details for the latest notifications sent to your application by visiting `/developers/webhook_responses` in [uat](https://uat.versapay.com//developers/webhook_responses) or [production](https://secure.versapay.com//developers/webhook_responses).\n\n## Entity Payloads\nWebhooks can receive updates for the following `Collaborative AR` entities:\n\n* Recent events for any **Customer** part of your supplier account. The request parameters will contain the same attributes as returned by viewing a customer via `GET /api/exports/customer/{identifier}`.\n\n* Recent events for any **Invoice** part of your supplier account. The request parameters will contain the same attributes as returned by viewing an invoice via `GET /api/exports/invoice/{number_or_id}`.\n\n* Recent events for any **Payment** part of your supplier account. The request parameters will contain the same attributes as returned by viewing a payment via `GET /api/exports/payment/{reference_or_token}`.\n\n## HMAC Signatures for Collaborative AR\n\nVersapay will send a [HMAC-SHA256](https://en.wikipedia.org/wiki/HMAC) signature attribute to all webhook notification request headers under the key `X-Versapay-Signature`\n\nTo verify the authenticity of received webhook notifications:\n\n1. Calculate the HMAC-SHA256 of the JSON request body using your Versapay signing key (which is displayed on your webhook account settings) and Base64 the result.\n2. URL Encode the HMAC and compare the result to the value of the original signature found in the request header\n\n```javascript\n/* Example of HMAC-SHA256 signature calculation - using JavaScript/Express our POST payload is accessible via req.body */\nconst express = require('express');\nconst bodyParser = require('body-parser');\nconst crypto = require('crypto');\nconst app = express();\n\napp.use(bodyParser.json());\napp.use(bodyParser.urlencoded({ extended: true }));\n\napp.post('/webhook', (req, res) => {\n let original_signature = req.headers['x-versapay-signature'];\n let webhook_signing_key = 'v7aJHjbbxASKiwDW5wq6';\n let raw_request_body = JSON.stringify(req.body);\n let hmac = crypto.createHmac('sha256', webhook_signing_key).update(raw_request_body).digest('base64');\n let expected_signature = encodeURIComponent(hmac + \"\\n\")\n console.log(`original signature: ${original_signature}`);\n console.log(`expected signature: ${expected_signature}`);\n console.log(`authentic? ${expected_signature === original_signature}`);\n});\n```\n","x-traitTag":true}],"x-tagGroups":[{"name":"Versapay API","description":"Introduction to the Versapay API.","tags":["Overview","Versioning & Compatibility","Environments","Rate Limits","Authentication","Webhooks","Watermark & Limit"]},{"name":"Collaborative AR","description":"Operations available for Collaborative AR integration.","tags":["Reference Data","Onboarding","Ecommerce Integration","Orders","Order Transactions","Testing Order Transactions","Gift Cards","Card Present EMV","Settlement Reporting","Wallets","Customers","Invoices","Autopay","Invoicing Payments","Divisions","Notifications","Collaboration","File Imports"]}],"paths":{"/api/whoami":{"get":{"tags":["Authentication"],"summary":"Echo identity and account profile settings","description":"Lists key account profile settings configured for the authenticated account\n","parameters":[{"name":"options[jwt_expiry]","in":"query","description":"Number of days (1-365) until JWT expiration, default 30.","schema":{"type":"integer"}}],"operationId":"whoami","responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"object","properties":{"whoami":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Whoami"}}}},"examples":{"whoamis":{"value":{"whoami":{"XbkkoXbkKOXbkKoXBkkOO":{"token":"2ABCDEFFF2ABC","name":"CDS Client UAT","sender_identifier":"cdscliuat","jwt":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbiI6Im54eDFaSjgzeXRNNmhtb3NGVExCIiwiZXhwIjoxNzEyOTU5NDA5fQ.adV6U1vW69Ypskt61uPL8hZ-4muvtM4FLM48QN6iCc4","jwt_exp":1712959409,"currency":"usd","preferred_language":"en","business_number":"333-222-3000","address_1":"PO Box 2840","address_2":"","postal_code":"76902","city":"San Angelo","province":"TX","country":"US","branding_partner":null,"branding_partner_config":null,"external_link":"xyz123abc789","divisions":[{"division_code":"AcmeTX","division_name":"Acme Texas","parent_code":"Acme Global","company_name":"Acme Texas Division","address":{"address_1":"123 Main St","address_2":"Suite 100","postal_code":"45123","city":"Dallas","province":"TX","country":"US"}},{"division_code":"AcmeON","division_name":"Acme Ontario","parent_code":"Acme Global","company_name":"Acme Ontario Division","address":{"address_1":"123 North Ave","address_2":"Suite N","postal_code":"M4B2J8","city":"Toronto","province":"ON","country":"CA"}},{"division_code":"AcmeCO","division_name":"Acme Colorado","parent_code":null,"company_name":null,"address":{"address_1":null,"address_2":null,"postal_code":null,"city":null,"province":null,"country":null}},{"division_code":"AcmeCA","division_name":"Acme California","parent_code":null,"company_name":"Acme Calif Division","address":{"address_1":"100 Oak Ave","address_2":null,"postal_code":"89001","city":"San Diego","province":"CA","country":"US"}}],"merchant_accounts":[{"token":"MA28S4KCJLAJ","acceptable_cards":["master","visa","american_express","discover"],"deposit_accounts":[{"purpose":"primary","deposit_account_routing_number":"678","deposit_account_masked_number":"XX7888","deposit_routing_account_hash_function":"sha-1","deposit_routing_account_hash":"64984fa69d3aaeb30f77407bb08ada8e6dcfcf41"},{"purpose":"fees","deposit_account_routing_number":"555","deposit_account_masked_number":"XX5555","deposit_routing_account_hash_function":"sha-1","deposit_routing_account_hash":"64984fa69d3aaeb30f77407bb08ada8e6dcfcf55"}],"currency":"usd","deposit_account_routing_number":"031201360","nickname":"settlement","gl_account":null,"reference_token":"1234321:2024-09-01T08:27:45","mid":null,"tid":null,"is_default":true,"deposit_account_masked_number":"XXX4567","deposit_routing_account_hash_function":"sha-1","deposit_routing_account_hash":"cb0f864628972ad90dc08ed44e1099c7005936ca"},{"token":"MA7NLMGDG9F4","acceptable_cards":["master","visa","american_express","discover"],"deposit_accounts":[{"purpose":"primary","deposit_account_routing_number":"678","deposit_account_masked_number":"XX7888","deposit_routing_account_hash_function":"sha-1","deposit_routing_account_hash":"64984fa69d3aaeb30f77407bb08ada8e6dcfcf41"},{"purpose":"fees","deposit_account_routing_number":"555","deposit_account_masked_number":"XX5555","deposit_routing_account_hash_function":"sha-1","deposit_routing_account_hash":"64984fa69d3aaeb30f77407bb08ada8e6dcfcf55"}],"currency":"usd","deposit_account_routing_number":"031201360","nickname":"settlement-2","gl_account":null,"reference_token":"1234321:2024-09-02T06:14:33","mid":null,"tid":null,"is_default":true,"deposit_account_masked_number":"XXX4568","deposit_routing_account_hash_function":"sha-1","deposit_routing_account_hash":"52dfefa6082a07eb1689b40b99686690d1995e58"},{"token":"MA1F8B2E87AM","acceptable_cards":["master","visa","american_express","discover"],"deposit_accounts":[{"purpose":"primary","deposit_account_routing_number":"678","deposit_account_masked_number":"XX7888","deposit_routing_account_hash_function":"sha-1","deposit_routing_account_hash":"64984fa69d3aaeb30f77407bb08ada8e6dcfcf41"},{"purpose":"fees","deposit_account_routing_number":"555","deposit_account_masked_number":"XX5555","deposit_routing_account_hash_function":"sha-1","deposit_routing_account_hash":"64984fa69d3aaeb30f77407bb08ada8e6dcfcf55"}],"currency":"usd","deposit_account_routing_number":null,"nickname":null,"gl_account":null,"reference_token":null,"mid":null,"tid":null,"is_default":false,"deposit_account_masked_number":"","deposit_routing_account_hash_function":"sha-1","deposit_routing_account_hash":"da39a3ee5e6b4b0d3255bfef95601890afd80709"}],"settlement_bank_accounts":[{"routing_number":"122105278","token":"BA9DZBGGJGY1","account_type":"checking","currency":"usd","nickname":null,"reference_token":"1234321:2024-09-01T08:27:45","masked_account_number":"XXXXX6789","routing_account_hash_function":"sha-1","routing_account_hash":"95d63eb2e03b71d1971884ec9678bcf74623b2bf","is_default":true,"address":{"address_1":"","address_2":"","city":"","province":null,"postal_code":"","country":"US"}},{"routing_number":"122000247","token":"BA7QBIQMUMQB","account_type":"checking","currency":"usd","nickname":null,"reference_token":"1234321:2024-09-02T06:14:33","masked_account_number":"XXXXXX1152","routing_account_hash_function":"sha-1","routing_account_hash":"384516d914a878c8280b132d22e567dc64e67676","is_default":false,"address":{"address_1":"","address_2":"","city":"","province":null,"postal_code":"","country":"US"}},{"routing_number":"999999999","token":"BA9K62MMRTSS","account_type":"checking","currency":"usd","nickname":null,"reference_token":null,"masked_account_number":"XXXXX9999","routing_account_hash_function":"sha-1","routing_account_hash":"6cbe786bc66848acf8a3e539e0899809059af8a5","is_default":false,"address":{"address_1":"501 S 8th St","address_2":"","city":"Minneapolis","province":"MN","postal_code":"55404","country":"US"}}],"terminal_processors":[{"currency":"usd","token":"POS47JAV3VDE","deposit_account_routing_number":"00351234","nickname":"usdnick","gl_account":"76001","mid":"1452323678","tid":"4","is_default":true,"deposit_account_masked_number":"XXXX4567","deposit_routing_account_hash_function":"sha-1","deposit_routing_account_hash":"da39a3ee5e6b4b0d3255bfef95601890afd80709"},{"currency":"cad","token":"POS47JAV7TGU","deposit_account_routing_number":"00354321","nickname":"cadnick","gl_account":"76003","mid":"1452343565","tid":"7","is_default":true,"deposit_account_masked_number":"XXXX9876","deposit_routing_account_hash_function":"sha-1","deposit_routing_account_hash":"eced46533e6abaa907cd125fb91dcf76026fa02c"},{"currency":"eur","token":"POS6RPXDYYYU","deposit_account_routing_number":"000000000","nickname":"eurnick","gl_account":"76002","mid":"1452343564","tid":"9","is_default":true,"deposit_account_masked_number":"XXXX5678","deposit_routing_account_hash_function":"sha-1","deposit_routing_account_hash":"a8105df0a9f85df19b125f4a8b4d4ea282f706af"}],"gift_cards":[{"currency":"eur","token":"GCP8IGHJIWM8","deposit_account_routing_number":"000000000","nickname":"","gl_account":"","mid":"","tid":"","is_default":true,"deposit_account_masked_number":"","deposit_routing_account_hash_function":"sha-1","deposit_routing_account_hash":""},{"currency":"usd","token":"GCP2I57ZLEDY","deposit_account_routing_number":"","nickname":"","gl_account":"","mid":"","tid":"","is_default":true,"deposit_account_masked_number":"","deposit_routing_account_hash_function":"sha-1","deposit_routing_account_hash":""},{"currency":"cad","token":"GCP2I57Z3ZSB","deposit_account_routing_number":"","nickname":"","gl_account":"","mid":"","tid":"","is_default":true,"deposit_account_masked_number":"","deposit_routing_account_hash_function":"sha-1","deposit_routing_account_hash":""}],"autopay_api_enabled":false,"arc_payment_match_mode":"off","erp_payment_match_mode":"on","external_payment_match_mode":"off","erp_payment_auto_match_mode":false,"external_payment_auto_match_mode":false}}}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/onboarding/v1/terms":{"get":{"tags":["Onboarding"],"summary":"Retrieves rates and terms for merchant services","operationId":"getTerms","description":"The system will return the rates, terms, and conditions for merchant services\n","parameters":[{"in":"query","name":"locale","description":"pass an optional country and language","required":false,"schema":{"$ref":"#/components/schemas/Locale"}}],"responses":{"200":{"description":"terms parameters","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationParameters"}}}},"400":{"description":"bad input parameter"}}}},"/api/onboarding/v1/applications":{"post":{"tags":["Onboarding"],"summary":"Create a new application","operationId":"addApplication","description":"Adds an application to the system","responses":{"201":{"description":"application created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCreatedResponse"}}}},"400":{"description":"invalid input, object invalid","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationErrorResponse"}}}},"409":{"description":"an existing item already exists"}},"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Application"}}},"description":"Inventory item to add"}}},"/api/onboarding/v1/applications/{id}":{"get":{"tags":["Onboarding"],"summary":"Get application status","operationId":"getApplicationStatus","description":"Get the status of an existing application","parameters":[{"name":"id","in":"path","description":"Application Token","required":true,"schema":{"$ref":"#/components/schemas/ApplicationToken"}}],"responses":{"200":{"description":"application status","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationStatusResponse"}}}},"404":{"description":"application not found"}}}},"/api/onboarding/v1/applications/search/{id}":{"get":{"tags":["Onboarding"],"summary":"Find the application token of an existing application","operationId":"getApplicationToken","description":"Find the application token of an existing applications using the reference token supplied during the create application process","parameters":[{"name":"id","in":"path","description":"Reference Token","required":true,"schema":{"$ref":"#/components/schemas/ReferenceToken"}}],"responses":{"200":{"description":"application token","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApplicationCreatedResponse"}}}},"404":{"description":"application not found"}}}},"/api/onboarding/v1/application_steps":{"post":{"tags":["Onboarding"],"summary":"Record a Completed Step of a Merchant Application","operationId":"addApplicationSteps","description":"Record a completed step of the merchant application process as an integer value. A value of 99 indicates the submission of the full application.","responses":{"201":{"description":"Created (record was inserted successfully)"},"400":{"description":"Bad Request"},"401":{"description":"Unauthorized"}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["reference_token","step_number","message"],"properties":{"reference_token":{"type":"string","format":"guid","example":"7654321:2023-10-04T14:52:37","description":"Specify a unique GUID as a client reference to the application. This same reference_token is used for all steps of the same application.","maxLength":36},"step_number":{"type":"integer","description":"Use values 1,2,3… to indicate steps of the process; 99 indicates the final step of the application","example":"1"},"message":{"type":"string","description":"Description of the step","example":"Step 1 Completed","maxLength":255}}}}}}}},"/api/imports/order":{"post":{"tags":["Orders"],"summary":"Create an order","description":"Create an order.

\nThe set of attributes to send in the request body may vary based on the account configuration. Please contact the implementation specialist for more information.

\n","operationId":"createOrder","requestBody":{"description":"Order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"responses":{"201":{"description":"Created, a JSON showing Order, OrderItems","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"1 order 1 order item(s)"},"identifier":{"type":"string","example":"ABCD"},"order":{"type":"string","$ref":"#/components/schemas/Order"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message","example":"You need to sign in or create an account before continuing."}}}}}},"412":{"description":"Precondition Failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string","description":"Error message"}}}}}}},"patch":{"tags":["Orders"],"summary":"Update an order","description":"Updates an order identified by its \"identifier\".

\nThe set of attributes to send in the request body may vary based on the account configuration. Please contact the implementation specialist for more information.

\n","operationId":"updateOrder","requestBody":{"description":"Order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Order"}}}},"responses":{"201":{"description":"Created, a JSON showing Order, OrderItems","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"1 order 1 order item(s)"},"identifier":{"type":"string","example":"ABCD"},"order":{"type":"string","$ref":"#/components/schemas/Order"}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message","example":"You need to sign in or create an account before continuing."}}}}}},"412":{"description":"Precondition Failed","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string","description":"Error message"}}}}}}}},"/api/exports/orders":{"get":{"tags":["Orders"],"summary":"Export Orders","description":"Orders that have been created since watermark, limited to 100 records at a time.

A consumer should store the last `id` value of each response and include it as the watermark parameter for subsequent calls.\n","parameters":[{"name":"watermark","in":"query","description":"The value to base a subsequent extract of the next 100 items.","schema":{"$ref":"#/components/schemas/Watermark"}},{"name":"list","in":"query","description":"See Watermark & Limit for more information on response structure.","schema":{"type":"boolean","example":true}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"object","example":{"orders":{"6":{},"7":{}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message","example":"You need to sign in or create an account before continuing."}}}}}}}}},"/api/exports/orders/published":{"get":{"tags":["Orders"],"summary":"Export Orders Published","description":"Orders that have been published (excluding draft orders) since watermark, limited to 100 records at a time.

A consumer should store the last `id` value of each response and include it as the watermark parameter for subsequent calls.\n","parameters":[{"name":"watermark","in":"query","description":"The value to base a subsequent extract of the next 100 items.","schema":{"$ref":"#/components/schemas/Watermark"}},{"name":"list","in":"query","description":"See Watermark & Limit for more information on response structure.","schema":{"type":"boolean","example":true}},{"name":"options[extended_attributes]","in":"query","required":false,"description":"When this option (options[extended_attributes][key1]=value1) is present, e.g options[extended_attributes][ecommerce_indicator]=true then only published matching('ecommerce_indicator=true') orders are returned in the result.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"object","example":{"orders":{"6":{},"7":{}}}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message","example":"You need to sign in or create an account before continuing."}}}}}}}}},"/api/exports/order/{identifier}":{"get":{"tags":["Orders"],"summary":"Export/View an Order","description":"View an order and its item details.

\n\nThe path parameter `identifier` is matched to the order's identifier.\n","parameters":[{"name":"identifier","in":"path","required":true,"description":"The order identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"object","properties":null,"$ref":"#/components/schemas/Order"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message","example":"You need to sign in or create an account before continuing."}}}}}}}}},"/api/reference_data/v1/response_codes":{"get":{"tags":["Reference Data"],"summary":"Retrieve list of supported error response codes","description":"View the list of possible error response codes that may be returned as part of a `response_code` key (and/or `gateway_error_*` related keys) in Order Transactions API. For instance the following response payload highlights a `211` response code:\n\n```\n{\n \"success\": false,\n \"transaction\": \"8ATB...586N\",\n \"authorization\": \"5dl1...ady5\",\n \"gateway_token\": \"71...77\",\n \"order\": \"12345\",\n \"wallet\": \"2ZW4...8Q6V\",\n \"credit_card\": \"CC4X...WXGX\",\n \"transactions\": [\n {\n \"token\": \"...\",\n \"amount_in_cents\": 13151,\n \"type\": \"transaction\",\n \"transaction_type\": \"request_money\",\n \"state\": \"declined\",\n \"created_at\": \"2023-11-14T12:13:29-05:00\",\n \"step_types\": [\n \"TransactionSteps::CardSaleStep\"\n ],\n \"action\": \"sale\",\n \"payment_method\": \"credit_card\",\n \"wallet\": \"2ZW4...8Q6V\",\n \"credit_card\": \"CC4X...WXGX\",\n \"settlement_token\": \"MA4P...LD5P\",\n \"currency\": \"usd\",\n \"approved_amount_cents\": 0,\n \"fee_amount_cents\": 0,\n \"fee_exempt\": true,\n \"gateway_response\": {...},\n \"gateway_token\": \"7126377\",\n \"gateway_authorization_response\": \"520.014: INVALID ACCOUNT NUMBER\",\n \"gateway_error_scope\": \"tpro4\",\n \"gateway_error_code\": \"520.014\",\n \"gateway_error_message\": \"INVALID ACCOUNT NUMBER\",\n \"authorization_response\": \"500\",\n \"avs_response\": \"Z\",\n \"credit_card_bin\": \"410040\",\n \"credit_card_masked_number\": \"XXXXXXXXXXXX9700\",\n \"credit_card_brand\": \"visa\",\n \"credit_card_expiry\": \"082026\"\n }\n ],\n \"response_code\": 211\n}\n```\nThe /api/reference_data/v1/response_codes payload reports `211` as follows:\n```\n{\n \"code\": 211,\n \"description\": \"Account number invalid\"\n}\n```\n","responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ResponseCode"}}}}}}}},"/api/reference_data/v1/country_codes":{"get":{"tags":["Reference Data"],"summary":"Retrieve list of countries and mapped provinces","description":"Get the list of country codes and mapped provinces.","responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponseCountryCodes"}}}}}}},"/api/reference_data/v1/bin":{"get":{"tags":["Reference Data"],"summary":"Get Bank Identification Number (BIN) reference data","description":"View the Bank Identification Number (BIN) reference data, including bank names, phone number, URLs, country, brand and card types.\n","responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BIN"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message","example":"You need to sign in or create an account before continuing."}}}}}}}}},"/api/reference_data/v1/bin/{bin}":{"get":{"tags":["Reference Data"],"summary":"Get Bank Identification Number (BIN) reference data","description":"View the Bank Identification Number (BIN) reference data for a given bin number, including bank names, phone number, URLs, and card types.\n","parameters":[{"name":"bin","in":"path","description":"Bank Identification Number. It has to have of at least 6 digits.","required":true,"schema":{"$ref":"#/components/schemas/BankIdentificationNumber"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"object","properties":null,"$ref":"#/components/schemas/BIN"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message","example":"You need to sign in or create an account before continuing."}}}}}}}}},"/api/gateway/v1/wallets/search":{"get":{"tags":["Wallets"],"summary":"Search Accessible Wallets","description":"Accessible wallets can be searched by contact email, customer identifier, fund token, or vault token.","parameters":[{"name":"type","in":"query","required":true,"description":"The type of search `email|customer|fund|vault`","schema":{"type":"string","example":"email"}},{"name":"locator","in":"query","required":true,"description":"The value used for search according to the type.","schema":{"type":"string","example":"salesdemo@versapay.com"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"object","properties":{"wallets":{"type":"array","items":{"$ref":"#/components/schemas/Wallet"}}}},"examples":{"list_of_wallets":{"$ref":"#/components/examples/list_of_wallets"}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/gateway/v1/wallets":{"post":{"tags":["Wallets"],"summary":"Create Wallet Empty/Payment Method","description":"Create a new wallet (empty) and/or a new wallet with a payment method.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletRequest"},"examples":{"wallet_empty_ghost":{"summary":"Create empty wallet (ghost customer)","value":{}},"wallet_empty_contact":{"summary":"Create empty wallet (ghost customer and contact)","value":{"contact":{"first_name":"Carey","last_name":"Price","email":"price@habs.com"}}},"wallet_empty_customer1":{"summary":"Create empty wallet w/ new invoicing customer","value":{"customer":{"name":"Montreal Canadiens"}}},"wallet_empty_customer2":{"summary":"Create empty wallet w/ existing invoicing customer reference","value":{"customer":{"identifier":"C1234"}}},"wallet_empty_customer3":{"summary":"Create empty wallet w/ existing invoicing customer reference (short form)","value":{"customer":"C1234"}},"wallet_empty_customer_contact":{"summary":"Create empty wallet w/ existing invoicing customer and contact","value":{"customer":{"identifier":"C1234"},"contact":{"first_name":"Carey","last_name":"Price","email":"price@habs.com"}}},"wallet_new_ghost_card":{"summary":"New wallet (ghost) with credit card","value":{"credit_card":{"name":"FRANK SMITH","expiry_month":8,"expiry_year":2020,"card_number":"5420923878724339","cvv":"123","address":{"address_1":"123 Abc St","city":"Beverly Hills","province":"CA","postal_code":"90210","country":"US"}}}},"wallet_new_ghost_bank":{"summary":"New wallet (ghost) with bank account","value":{"bank_account":{"currency":"USD","account_type":"checking","account_holder":"Tim Coffee Ltd","account_number":"144155167","routing_number":"121000248","external_name":"BANK","external_number":"777","address":{"address_1":"123 Abc St","city":"Beverly Hills","province":"CA","postal_code":"90210","country":"US"}}}},"wallet_new_contact_card":{"summary":"New wallet (ghost customer and contact) with credit card","value":{"contact":{"email":"frank@smith.com","first_name":"Frank","last_name":"Smith"},"credit_card":{"name":"FRANK SMITH","expiry_month":8,"expiry_year":2020,"card_number":"5420923878724339","cvv":"123","address":{"address_1":"123 Abc St","city":"Beverly Hills","province":"CA","postal_code":"90210","country":"US"}}}},"wallet_new_contact_bank":{"summary":"New wallet (ghost customer and contact) with bank account","value":{"contact":{"email":"frank@smith.com","first_name":"Frank","last_name":"Smith"},"bank_account":{"currency":"USD","account_type":"checking","account_holder":"Tim Coffee Ltd","account_number":"144155167","routing_number":"121000248","external_name":"BANK","external_number":"777","address":{"address_1":"123 Abc St","city":"Beverly Hills","province":"CA","postal_code":"90210","country":"US"}}}},"wallet_new_customer_contact_card":{"summary":"New wallet existing invoicing customer and contact with credit card","value":{"customer":{"identifier":"C1234","name":"Starblux"},"contact":{"email":"frank@smith.com","first_name":"Frank","last_name":"Smith"},"credit_card":{"name":"FRANK SMITH","expiry_month":8,"expiry_year":2020,"card_number":"5420923878724339","cvv":"123","address":{"address_1":"123 Abc St","city":"Beverly Hills","province":"CA","postal_code":"90210","country":"US"}}}},"wallet_new_customer_contact_bank":{"summary":"New wallet existing invoicing customer and contact with bank account","value":{"customer":{"identifier":"C1234","name":"Starblux"},"contact":{"email":"frank@smith.com","first_name":"Frank","last_name":"Smith"},"bank_account":{"currency":"USD","account_type":"checking","account_holder":"Tim Coffee Ltd","account_number":"144155167","routing_number":"121000248","external_name":"BANK","external_number":"777","address":{"address_1":"123 Abc St","city":"Beverly Hills","province":"CA","postal_code":"90210","country":"US"}}}},"wallet_known_customer_contact_card1":{"summary":"Add credit card to a known wallet via reference (short form)","value":{"wallet":"77A81025AC3A","customer":{"identifier":"C1234","name":"Starblux"},"contact":{"email":"frank@smith.com","first_name":"Frank","last_name":"Smith"},"credit_card":{"name":"FRANK SMITH","expiry_month":8,"expiry_year":2020,"card_number":"5420923878724339","cvv":"123","address":{"address_1":"123 Abc St","city":"Beverly Hills","province":"CA","postal_code":"90210","country":"US"}}}},"wallet_known_customer_contact_card2":{"summary":"Add credit card to a known wallet via reference (long form)","value":{"wallet":{"token":"77A81025AC3A"},"customer":{"identifier":"C1234","name":"Starblux"},"contact":{"email":"frank@smith.com","first_name":"Frank","last_name":"Smith"},"credit_card":{"name":"FRANK SMITH","expiry_month":8,"expiry_year":2020,"card_number":"5420923878724339","cvv":"123","address":{"address_1":"123 Abc St","city":"Beverly Hills","province":"CA","postal_code":"90210","country":"US"}}}}}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletResponse"},"examples":{"new_wallet_empty":{"$ref":"#/components/examples/new_wallet_empty"},"new_wallet_fund":{"$ref":"#/components/examples/new_wallet_fund"}}}}},"412":{"$ref":"#/components/responses/WalletErrors"}}}},"/api/gateway/v1/wallets/{wallet_token}":{"get":{"tags":["Wallets"],"summary":"View Wallet","description":"View specific wallet given its wallet identifier/token.","parameters":[{"name":"wallet_token","in":"path","required":true,"description":"The wallet identifier/token","schema":{"type":"string","example":"77A81025AC3A"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"object","properties":{"wallets":{"type":"array","description":"List of wallets.","items":{"$ref":"#/components/schemas/Wallet"}}}}}}},"412":{"$ref":"#/components/responses/WalletErrors"}}}},"/api/gateway/v1/wallets/{wallet_token}/methods":{"post":{"tags":["Wallets"],"summary":"Add Payment Methods to Known Wallet","description":"Add payment methods to a known wallet given its identifier/token.","parameters":[{"name":"wallet_token","in":"path","required":true,"description":"The wallet identifier/token","schema":{"type":"string","example":"77A81025AC3A"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletPaymentMethodRequest"},"examples":{"wallet_known_new_card":{"summary":"Add credit card","value":{"credit_card":{"name":"FRANK SMITH","expiry_month":8,"expiry_year":2020,"card_number":"5420923878724339","cvv":"123","address":{"address_1":"123 Abc St","city":"Beverly Hills","province":"CA","postal_code":"90210","country":"US"}}}},"wallet_known_import_card":{"summary":"Add credit card (importing from prior Vault tokenized card number)","value":{"credit_card":{"name":"FRANK SMITH","expiry_month":8,"expiry_year":2020,"brand":"mastercard","last_4_digits":"4339","gateway_token":"4f7b9f2c-20f8-4265-a26c-ff0e4dadeec7","address":{"address_1":"123 Abc St","city":"Beverly Hills","province":"CA","postal_code":"90210","country":"US"}}}},"wallet_known_new_bank":{"summary":"Add bank account","value":{"bank_account":{"currency":"USD","account_type":"checking","account_holder":"Tim Coffee Ltd","account_number":"144155167","routing_number":"121000248","external_name":"BANK","external_number":"777","address":{"address_1":"123 Abc St","city":"Beverly Hills","province":"CA","postal_code":"90210","country":"US"}}}},"wallet_known_import_bank":{"summary":"Add bank account (importing from prior Vault tokenized account number)","value":{"bank_account":{"currency":"USD","account_type":"checking","account_holder":"Tim Coffee Ltd","gateway_token":"8f8b8f2c-20f8-4265-a26c-ff0e8dadeec8","routing_number":"121000248","external_name":"BANK","external_number":"777","address":{"address_1":"123 Abc St","city":"Beverly Hills","province":"CA","postal_code":"90210","country":"US"}}}}}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletResponse"}}}},"412":{"$ref":"#/components/responses/WalletErrors"}}}},"/api/gateway/v1/wallets/{wallet_token}/methods/{fund_token}":{"patch":{"tags":["Wallets"],"summary":"Update Payment Method in Wallet","description":"Updates a payment method given its wallet and fund identifier/token.","parameters":[{"name":"wallet_token","in":"path","required":true,"description":"The wallet identifier/token","schema":{"type":"string","example":"77A81025AC3A"}},{"name":"fund_token","in":"path","required":true,"description":"The fund identifier/token","schema":{"type":"string","example":"CC98U7LI8H91"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/WalletPaymentMethodPatch"},"examples":{"patch_card0":{"summary":"Update credit card nickname","value":{"credit_card":{"nickname":"Dividend Platinum"}}},"patch_card1":{"summary":"Lock credit card from future use","value":{"credit_card":{"locked":true}}},"patch_card2":{"summary":"Update credit card expiry","value":{"credit_card":{"expiry_month":8,"expiry_year":2020}}},"patch_card3":{"summary":"Update credit card expiry and address","value":{"credit_card":{"expiry_month":8,"expiry_year":2020,"address":{"address_1":"123 Abc St","city":"Beverly Hills","province":"CA","postal_code":"90210","country":"US"}}}},"patch_bank0":{"summary":"Update bank account nickname and external information","value":{"bank_account":{"external_name":"BANK","external_number":"777","nickname":"Bank of America - Spending"}}},"patch_bank1":{"summary":"Lock bank account from future use","value":{"bank_account":{"locked":true}}},"patch_bank2":{"summary":"Update bank account address","value":{"bank_account":{"address":{"address_1":"123 Abc St","city":"Beverly Hills","province":"CA","postal_code":"90210","country":"US"}}}}}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"object","properties":{"fund_token":{"type":"string","example":"CC98U7LI8H91"}}}}}},"412":{"$ref":"#/components/responses/WalletMethodErrors"}}},"delete":{"tags":["Wallets"],"summary":"Remove Payment Method From Wallet","description":"Removes a payment method from wallet given given its wallet and fund identifier/token.","parameters":[{"name":"wallet_token","in":"path","required":true,"description":"The wallet identifier/token","schema":{"type":"string","example":"77A81025AC3A"}},{"name":"fund_token","in":"path","required":true,"description":"The fund identifier/token","schema":{"type":"string","example":"CC98U7LI8H91"}}],"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"type":"object","properties":{"fund_token":{"type":"string","example":"CC98U7LI8H91"}}}}}},"412":{"$ref":"#/components/responses/WalletMethodErrors"}}}},"/api/exports/wallets":{"get":{"tags":["Wallets"],"summary":"Export Wallets","description":"Payments made to your supplier account from your customers since watermark, limited to 100 payments at a time.

A consumer should store the last `id` value of each response and include it as the watermark parameter for a subsequent calls.\n","parameters":[{"name":"watermark","in":"query","description":"The value to base a subsequent extract of the next 100 items.","schema":{"$ref":"#/components/schemas/Watermark"}},{"name":"list","in":"query","description":"See Watermark & Limit for more information on response structure.","schema":{"type":"boolean","example":true}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"object","properties":{"wallets":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Wallet"}}}},"examples":{"export_wallets":{"$ref":"#/components/examples/export_wallets"}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/exports/wallets/recent":{"get":{"tags":["Wallets"],"summary":"Export Wallets Recently Updated","description":"Payment records that have been updated in the past 7 days, since watermark, limited to 100 records at a time.

A consumer should store the last `id` value of each response and include it as the watermark parameter for subsequent calls.\n","parameters":[{"name":"watermark","in":"query","description":"The value to base a subsequent extract of the next 100 items.","schema":{"$ref":"#/components/schemas/Watermark"}},{"name":"list","in":"query","description":"See Watermark & Limit for more information on response structure.","schema":{"type":"boolean","example":true}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"object","properties":{"wallets":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Wallet"}}}},"examples":{"export_wallets":{"$ref":"#/components/examples/export_wallets"}}}}}}}},"/api/gateway/v1/orders/verify":{"post":{"tags":["Order Transactions"],"summary":"Verify transaction","description":"A Verify transaction serves two purposes. First, it attempts to validate the provided credit card or bank account information. In the case of credit card Verify transactions, the gateway will run a verification transaction to allow the card issuer to confirm that the account is in good standing and that the provided billing address and card verification value (CVV) is correct. In the case of bank accounts, the gateway may attempt to use a negative database of known bad bank accounts or use other fraud protection tools to confirm the validity of the bank account. Second, the Verify transaction returns a token that is safe for the payment application to store and can be used for future transactions without needing to provide the sensitive account information (this effectively equates to having built a Wallet, see the Wallet API section).","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderTransactionRequest"},"examples":{"use_existing_fund":{"$ref":"#/components/examples/use_existing_fund"},"use_existing_credit_card":{"$ref":"#/components/examples/use_existing_credit_card"},"use_existing_credit_card_fee_exempt":{"$ref":"#/components/examples/use_existing_credit_card_fee_exempt"},"use_cp_emv_terminal":{"$ref":"#/components/examples/use_cp_emv_terminal"},"use_cp_emv_terminal_prompt":{"$ref":"#/components/examples/use_cp_emv_terminal_prompt"},"use_new_credit_card":{"$ref":"#/components/examples/use_new_credit_card"},"use_new_bank_account":{"$ref":"#/components/examples/use_new_bank_account"},"use_settlement_routing":{"$ref":"#/components/examples/use_settlement_routing"}}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderTransactionResponse"}}}},"500":{"description":"500 error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnifiedResponse"},"examples":{"declined_invalid_card":{"$ref":"#/components/examples/declined_invalid_card"},"declined":{"$ref":"#/components/examples/declined"},"error":{"$ref":"#/components/examples/error"}}}}}}}},"/api/gateway/v1/orders/sale":{"post":{"tags":["Order Transactions"],"summary":"Sale/Purchase transaction","description":"A Sale transaction is a request to initiate the transfer of funds from the buyer to the supplier. For credit card payments, the gateway will first authorize the transaction before adding the transaction to the settlement batch for capture at the end of the processing day. For ACH payments, the gateway will accept the sale request and add the transaction to the batch.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderTransactionRequest"},"examples":{"use_existing_fund":{"$ref":"#/components/examples/use_existing_fund"},"use_existing_credit_card":{"$ref":"#/components/examples/use_existing_credit_card"},"use_existing_credit_card_fee_exempt":{"$ref":"#/components/examples/use_existing_credit_card_fee_exempt"},"use_cp_emv_terminal":{"$ref":"#/components/examples/use_cp_emv_terminal"},"use_cp_emv_terminal_prompt":{"$ref":"#/components/examples/use_cp_emv_terminal_prompt"},"use_new_credit_card":{"$ref":"#/components/examples/use_new_credit_card"},"use_new_bank_account":{"$ref":"#/components/examples/use_new_bank_account"},"use_gift_card":{"$ref":"#/components/examples/use_gift_card"},"use_settlement_routing":{"$ref":"#/components/examples/use_settlement_routing"}}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderTransactionResponse"}}}},"500":{"description":"500 error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnifiedResponse"},"examples":{"declined_invalid_card":{"$ref":"#/components/examples/declined_invalid_card"},"declined":{"$ref":"#/components/examples/declined"},"error":{"$ref":"#/components/examples/error"}}}}}}}},"/api/gateway/v1/orders/credit":{"post":{"tags":["Order Transactions"],"summary":"Return Credit transaction (unlinked return/refund)","description":"A Credit transaction is a request to initiate the transfer of funds from the supplier back to the buyer and is the opposite of a sale. For credit card payments, the gateway will first authorize the return transaction before adding the transaction to the settlement batch for transmission at the end of the processing day. For ACH payments, the gateway will accept the credit request and add the transaction to the batch.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderTransactionRequest"},"examples":{"use_existing_fund":{"$ref":"#/components/examples/use_existing_fund"},"use_existing_credit_card":{"$ref":"#/components/examples/use_existing_credit_card"},"use_existing_credit_card_fee_exempt":{"$ref":"#/components/examples/use_existing_credit_card_fee_exempt"},"use_cp_emv_terminal":{"$ref":"#/components/examples/use_cp_emv_terminal"},"use_cp_emv_terminal_prompt":{"$ref":"#/components/examples/use_cp_emv_terminal_prompt"},"use_new_credit_card":{"$ref":"#/components/examples/use_new_credit_card"},"use_new_bank_account":{"$ref":"#/components/examples/use_new_bank_account"},"use_settlement_routing":{"$ref":"#/components/examples/use_settlement_routing"}}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderTransactionResponse"}}}},"500":{"description":"500 error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnifiedResponse"},"examples":{"declined_invalid_card":{"$ref":"#/components/examples/declined_invalid_card"},"declined":{"$ref":"#/components/examples/declined"},"error":{"$ref":"#/components/examples/error"}}}}}}}},"/api/gateway/v1/terminal":{"post":{"tags":["Card Present EMV"],"summary":"Issue a direct command to a POS terminal e.g. DeviceSetup, RequestSignature, Cancel, DeviceStatus","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminalRequest"},"examples":{"tc_device_setup":{"$ref":"#/components/examples/tc_device_setup"},"tc_request_signature":{"$ref":"#/components/examples/tc_request_signature"},"tc_cancel":{"$ref":"#/components/examples/tc_cancel"},"tc_device_status":{"$ref":"#/components/examples/tc_device_status"}}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TerminalResponse"},"examples":{"success":{"summary":"Successful terminal command","value":{"success":true}},"fail":{"summary":"Failed terminal command","value":{"success":false}}}}}},"500":{"description":"500 error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnifiedResponse"},"examples":{"declined_invalid_card":{"$ref":"#/components/examples/declined_invalid_card"},"declined":{"$ref":"#/components/examples/declined"},"error":{"$ref":"#/components/examples/error"}}}}}}}},"/api/gateway/v1/gift_card":{"post":{"tags":["Gift Cards"],"summary":"Activate and/or load a gift card balance","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardRequest"},"examples":{"gc_activate":{"$ref":"#/components/examples/gc_activate"},"gc_deactivate":{"$ref":"#/components/examples/gc_deactivate"},"gc_load":{"$ref":"#/components/examples/gc_load"},"gc_activate_load":{"$ref":"#/components/examples/gc_activate_load"}}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardResponse"},"examples":{"success":{"summary":"Successful activation/load","value":{"success":true}},"fail":{"summary":"Failed activation/load","value":{"success":false}}}}}},"500":{"description":"500 error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnifiedResponse"},"examples":{"declined_invalid_card":{"$ref":"#/components/examples/declined_invalid_card"},"declined":{"$ref":"#/components/examples/declined"},"error":{"$ref":"#/components/examples/error"}}}}}}}},"/api/gateway/v1/gift_card/read":{"post":{"tags":["Gift Cards"],"summary":"Read a gift card balance","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardReadRequest"},"examples":{"gc_read":{"$ref":"#/components/examples/gc_read"}}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GiftCardReadResponse"},"examples":{"gc_read_ok":{"summary":"Successful read","value":{"id":"66","token":"04bfe04a-80aa-4779-8388-59396afdfdf7","balance":777,"activated":false,"created_at":"11/3/2021 12:00:00 AM","expires_at":"12/1/2049 12:00:00 AM"}},"gc_read_unknown":{"summary":"Empty/unknown gift card","value":{"balance":0,"activated":false}}}}}},"500":{"description":"500 error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnifiedResponse"},"examples":{"declined_invalid_card":{"$ref":"#/components/examples/declined_invalid_card"},"declined":{"$ref":"#/components/examples/declined"},"error":{"$ref":"#/components/examples/error"}}}}}}}},"/api/gateway/v1/orders/auth":{"post":{"tags":["Order Transactions"],"summary":"Authorization transaction","description":"An Authorize transaction is a non-financial transaction and is used to reserve funds on a buyer’s credit card account. An authorization should be used in scenarios when there will be a delay between taking the order and when the goods or services being purchased will be shipped or delivered to the buyer. In order to collect the funds reserved by an authorization, a subsequent capture request is required. Authorizations, if not captured or voided, will automatically be released by the card issuer in anywhere from two to fourteen days.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderTransactionRequest"},"examples":{"use_existing_fund":{"$ref":"#/components/examples/use_existing_fund"},"use_existing_credit_card":{"$ref":"#/components/examples/use_existing_credit_card"},"use_existing_credit_card_fee_exempt":{"$ref":"#/components/examples/use_existing_credit_card_fee_exempt"},"use_cp_emv_terminal":{"$ref":"#/components/examples/use_cp_emv_terminal"},"use_cp_emv_terminal_prompt":{"$ref":"#/components/examples/use_cp_emv_terminal_prompt"},"use_new_credit_card":{"$ref":"#/components/examples/use_new_credit_card"},"use_new_bank_account":{"$ref":"#/components/examples/use_new_bank_account"},"use_settlement_routing":{"$ref":"#/components/examples/use_settlement_routing"}}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderTransactionResponse"}}}},"500":{"description":"500 error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnifiedResponse"},"examples":{"declined_invalid_card":{"$ref":"#/components/examples/declined_invalid_card"},"declined":{"$ref":"#/components/examples/declined"},"error":{"$ref":"#/components/examples/error"}}}}}}}},"/api/gateway/v1/orders/capture":{"post":{"tags":["Order Transactions"],"summary":"Capture transaction","description":"A Capture transaction initiates the transfer of funds reserved by a prior authorization. When the gateway receives the capture request, it adds the capture to the settlement batch for transmission to the payment processing platform at the end of the processing day.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderTransactionRequest"},"examples":{"prior_transaction_reference":{"$ref":"#/components/examples/prior_transaction_reference"},"use_new_credit_card":{"$ref":"#/components/examples/use_new_credit_card"},"use_existing_credit_card_fee_exempt":{"$ref":"#/components/examples/use_existing_credit_card_fee_exempt"},"use_new_bank_account":{"$ref":"#/components/examples/use_new_bank_account"},"use_cp_emv_terminal":{"$ref":"#/components/examples/use_cp_emv_terminal"},"use_cp_emv_terminal_prompt":{"$ref":"#/components/examples/use_cp_emv_terminal_prompt"},"use_settlement_routing":{"$ref":"#/components/examples/use_settlement_routing"}}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderTransactionResponse"}}}},"500":{"description":"500 error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnifiedResponse"},"examples":{"declined_invalid_card":{"$ref":"#/components/examples/declined_invalid_card"},"declined":{"$ref":"#/components/examples/declined"},"error":{"$ref":"#/components/examples/error"}}}}}}}},"/api/gateway/v1/orders/refund":{"post":{"tags":["Order Transactions"],"summary":"Return refund transaction (linked return/refund)","description":"A Refund transaction is a request to initiate the transfer of funds from the supplier back to the buyer and is based on a prior sale or capture transaction. For credit card payments, the gateway will first authorize the return transaction before adding the transaction to the settlement batch for transmission at the end of the processing day. For ACH payments, the gateway will accept the refund request and add the transaction to the batch.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderTransactionRequest"},"examples":{"prior_transaction_reference":{"$ref":"#/components/examples/prior_transaction_reference"}}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderTransactionResponse"}}}},"500":{"description":"500 error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnifiedResponse"},"examples":{"declined_invalid_card":{"$ref":"#/components/examples/declined_invalid_card"},"declined":{"$ref":"#/components/examples/declined"},"error":{"$ref":"#/components/examples/error"}}}}}}}},"/api/gateway/v1/orders/void":{"post":{"tags":["Order Transactions"],"summary":"Void transaction (linked return/refund)","description":"A Void transaction reverses the effect of a prior transaction when possible. Financial transactions like sales, captures, credits, and refunds can be voided during the same processing day until the gateway transmits the settlement batch. Once the batch has been transmitted, a void is not possible, and the transaction would need to be reversed using a financial transaction (e.g., a sale would need to be reversed with a refund). Void transactions can also reverse the effect of an authorization, either fully or partially. This is useful if the authorization is no longer needed or if the authorization needs to be captured for a lesser amount.","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderTransactionRequest"},"examples":{"prior_transaction_reference":{"$ref":"#/components/examples/prior_transaction_reference"}}}}},"responses":{"200":{"description":"200 response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderTransactionResponse"}}}},"500":{"description":"500 error response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnifiedResponse"},"examples":{"declined_invalid_card":{"$ref":"#/components/examples/declined_invalid_card"},"declined":{"$ref":"#/components/examples/declined"},"error":{"$ref":"#/components/examples/error"}}}}}}}},"/api/funds":{"get":{"summary":"View Your Fund Sources","tags":["Fund Sources"],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FundSource"},"example":[{"type":"bank_account","token":"BA7YQ5881W8Q","name":"TD Canada Trust (2929)","state":"verified"},{"type":"credit_card","token":"CC7HPKMIUP2D","name":"VISA **2224"},{"type":"balance","token":"VPB2VJ7W9UVW","name":"Versapay Account"}]}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/vault/bank":{"post":{"summary":"Vault a Bank Account","description":"Vault a Bank Account for subsequent Transaction Use/Creation","tags":["Fund Sources"],"requestBody":{"description":"Bank account to vault.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccount"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VaultResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"412":{"$ref":"#/components/responses/PreconditionFailed"}}}},"/api/transactions":{"post":{"summary":"Create Transactions","description":"","tags":["Transactions"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transaction"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"412":{"$ref":"#/components/responses/PreconditionFailed"}}},"get":{"summary":"View Transactions","tags":["Transactions"],"parameters":[{"name":"page","in":"query","description":"50 items are displayed per page.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TransactionResponse"}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/transactions/{token_or_unique_reference}":{"get":{"summary":"View a Transaction","tags":["Transactions"],"parameters":[{"name":"token_or_unique_reference","in":"path","required":true,"description":"The transaction identifier (or unique_reference).","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/transactions/{token}/approve":{"post":{"summary":"Approve a Transaction","description":"Approve a `new` or `wait_for_request_approval` transaction.
\nAn API key with administrative access is required to approve a transaction.\n","tags":["Transactions"],"parameters":[{"name":"token","in":"path","description":"The transaction identifier.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fund_token":{"type":"string","description":"Your bank account or balance's **token** attribute. Omitting this option will approve the transaction using your default bank account.\n","example":"5TH3ACC3AU21"}}}}}},"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"412":{"$ref":"#/components/responses/PreconditionFailed"}}}},"/api/transactions/{token}/cancel":{"post":{"summary":"Cancel a Transaction","description":"Cancel a `new`, `wait_for_request_approval` or `wait_for_bank_account_verification` transaction you created. Transactions cannot be cancelled after they have been sent to the bank and are `in_progress`.
\nAn API key with administrative access is required to approve a transaction.\n","tags":["Transactions"],"parameters":[{"name":"token","in":"path","description":"The transaction identifier.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}}},"412":{"$ref":"#/components/responses/PreconditionFailed"}}}},"/api/debit_agreements":{"post":{"summary":"Create an Agreement","description":"","tags":["Agreements"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","description":"Recipient email address.","example":"bob.smith@example.com"},"reference":{"type":"string","description":"Extra useful data to help link transactions to other systems e.g. PO numbers, account numbers etc.","example":"87769089"},"message":{"type":"string","description":"A message describing what the agreement is for.","example":"Debit agreement for order number - 87769089"}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agreement"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"412":{"$ref":"#/components/responses/PreconditionFailed"}}}},"/api/debit_agreements/sent":{"get":{"summary":"View Sent Agreements","tags":["Agreements"],"parameters":[{"name":"page","in":"query","description":"50 items are displayed per page.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Agreement"}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/debit_agreements/received":{"get":{"summary":"View Received Agreements","tags":["Agreements"],"parameters":[{"name":"page","in":"query","description":"50 items are displayed per page.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Agreement"}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/debit_agreements/{token}/approve":{"post":{"summary":"Approve an Agreement","tags":["Agreements"],"parameters":[{"in":"path","name":"token","description":"The agreement identifier.","required":true,"schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"fund_token":{"type":"string","description":"Your bank account or balance's token attribute. Omitting this option will approve the agreement using your default bank account.\n","example":"5TH3ACC3AU21"}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agreement"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"412":{"$ref":"#/components/responses/PreconditionFailed"}}}},"/api/debit_agreements/{token}/cancel":{"post":{"summary":"Cancel an Agreement","tags":["Agreements"],"parameters":[{"in":"path","name":"token","description":"The agreement identifier.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agreement"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/debit_agreements/{token}/reject":{"post":{"summary":"Reject an Agreement","description":"Reject a *pending* agreement by supplying an agreement's *token* attribute and providing a *rejection_reason*.\n","tags":["Agreements"],"parameters":[{"in":"path","name":"token","description":"The agreement identifier.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agreement"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/debit_agreements/{token}/revoke":{"post":{"summary":"Revoke an Agreement","description":"Revoke an *approved* agreement for your account by supplying an agreement's token attribute. The agreement's creator will no longer be able to debit your account using this agreement.\n","operationId":"revokeAgreement","tags":["Agreements"],"parameters":[{"name":"token","in":"path","required":true,"description":"The agreement identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agreement"}}}}}}},"/api/autopay":{"post":{"summary":"Create an Autopay","description":"","tags":["Autopay"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["customer_identifier","fund_token"],"properties":{"autopay_reference":{"oneOf":[{"type":"array","items":{"description":"Optional parameter that can be used to create a Specific AutoPay. This parameter can include one or more values for AutoPay reference","type":"string"},"example":["REF123","REF234"]},{"type":"string","description":"Optional parameter that can be used to create a Specific AutoPay. This parameter can include one value for AutoPay reference or an array for more than one value","example":"REF123"}]},"customer_identifier":{"type":"string","description":"Customer Identifier.","example":"CUS123"},"fund_token":{"type":"string","description":"The fund token to be used for autopay.","example":"TOKEN123"}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutopayCreated"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"412":{"$ref":"#/components/responses/PreconditionFailed"}}},"put":{"summary":"Updates an Autopay","description":"Updates a autopay fund","tags":["Autopay"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["customer_identifier","fund_token","token"],"properties":{"customer_identifier":{"type":"string","description":"Customer Identifier.","example":"CUS123"},"fund_token":{"type":"string","description":"New token of the required fund.","example":"NEWTOKEN123"},"token":{"type":"string","description":"Old token of the required fund.","example":"OLDTOKEN123"}}}}}},"responses":{"201":{"description":"Created"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"412":{"$ref":"#/components/responses/PreconditionFailed"}}},"get":{"summary":"Retrieves Autopays","description":"Gets all the autopay for a customer","tags":["Autopay"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["customer_identifier"],"properties":{"customer_identifier":{"type":"string","description":"Customer Identifier.","example":"CUS123"}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutopayResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"412":{"$ref":"#/components/responses/PreconditionFailed"}}}},"/api/autopay/revoke":{"post":{"summary":"Revoke an Autopay","description":"Revoke an *approved* autopay for your account by supplying an agreement's token attribute. The agreement's creator will no longer be able to debit your account using this autopay agreement.\n","operationId":"revokeAutopay","tags":["Autopay"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["customer_identifier","token"],"properties":{"customer_identifier":{"type":"string","description":"Customer Identifier.","example":"CUS123"},"token":{"type":"string","description":"The token of the autopay agreement.","example":"TOKEN123"}}}}}},"responses":{"200":{"description":"Successful Operation"}}}},"/api/imports/customer":{"post":{"summary":"Create and Update Customer","description":"Create a customer using the following attributes (at minimum by providing values for required attributes). If providing an identifier for an existing customer, its information is updated.

\n*Note: Any additional non-standard attribute will be stored with customer record and available for presentment rendering.*\n","tags":["Customers"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Customer"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"identifier":{"type":"string","example":"C1234"},"message":{"type":"string","example":"1 customer with 3 contacts"}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"412":{"$ref":"#/components/responses/PreconditionFailed"}}}},"/api/exports/customer/{identifier}":{"get":{"summary":"Export/View a Customer","description":"View a customer based on the `identifier` provided.\n","tags":["Customers"],"parameters":[{"name":"identifier","in":"path","required":true,"description":"`identifier` of the customer record.\n","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CustomerResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/NotFoundError"}}}},"/api/exports/customers":{"get":{"summary":"Export Customers","description":"Customer records that have been created since watermark, limited to 100 records at a time.

A consumer should store the last `id` value of each response and include it as the watermark parameter for subsequent calls.\n","tags":["Customers"],"parameters":[{"name":"watermark","in":"query","description":"The value to base a subsequent extract of the next 100 items.","schema":{"$ref":"#/components/schemas/Watermark"}},{"name":"list","in":"query","description":"See Watermark & Limit for more information on response structure.","schema":{"type":"boolean","example":true}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"object","properties":{"customers":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CustomersResponse"}}}},"examples":{"customers":{"value":{"customers":{"20":{"identifier":"megavoice-customer-1","display_number":"megavoice-customer-1","name":"MegavoiceCust","email":"mukmuk@example.com","business_number":null,"first_name":null,"last_name":null,"address_1":null,"address_2":null,"postal_code":null,"city":null,"province":null,"country":"","telephone":null,"fax":null,"status":"","auto_debit":"","invite_sent":null,"signed_up":null,"notification_suppressed":false,"notification_override":false,"paper_invoices":false,"paper_statements":false,"parent_identifier":null,"balance_cents":0,"aging_cents":0,"aging_30_cents":0,"aging_60_cents":0,"aging_90_cents":0,"aging_120_cents":0,"aging_180_cents":0,"aging_older_cents":0,"current_cents":0,"credit_cents":0,"unapplied_payment_cents":0,"prepayment_cents":0,"owing_cents":0,"notes":null,"adp":null,"adp_arc":null,"adp_external":null,"last_contact_date":null,"next_contact_date":null,"credit_limit_cents":null,"account_status":"open","tags":null,"user_tags":null,"external_id":"1","watermark":20}}}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/exports/customers/recent":{"get":{"summary":"Export Customers Recently Updated","description":"Customer records that have been updated in the past 7 days, since watermark, limited to 100 records at a time.

A consumer should store the last `id` value of each response and include it as the watermark parameter for subsequent calls.\n","tags":["Customers"],"parameters":[{"name":"watermark","in":"query","description":"The value to base a subsequent extract of the next 100 items.","schema":{"$ref":"#/components/schemas/Watermark"}},{"name":"list","in":"query","description":"See Watermark & Limit for more information on response structure.","schema":{"type":"boolean","example":true}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"object","properties":{"customers":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/CustomersResponse"}}}},"examples":{"customers":{"value":{"customers":{"20":{"identifier":"megavoice-customer-1","display_number":"megavoice-customer-1","name":"MegavoiceCust","email":"mukmuk@example.com","business_number":null,"first_name":null,"last_name":null,"address_1":null,"address_2":null,"postal_code":null,"city":null,"province":null,"country":"","telephone":null,"fax":null,"status":"","auto_debit":"","invite_sent":null,"signed_up":null,"notification_suppressed":false,"notification_override":false,"paper_invoices":false,"paper_statements":false,"parent_identifier":null,"balance_cents":0,"aging_cents":0,"aging_30_cents":0,"aging_60_cents":0,"aging_90_cents":0,"aging_120_cents":0,"aging_180_cents":0,"aging_older_cents":0,"current_cents":0,"credit_cents":0,"unapplied_payment_cents":0,"prepayment_cents":0,"owing_cents":0,"notes":null,"adp":null,"adp_arc":null,"adp_external":null,"last_contact_date":null,"next_contact_date":null,"credit_limit_cents":null,"account_status":"open","tags":null,"user_tags":null,"external_id":"1","watermark":20}}}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/exports/customer/{identifier}/open_invoices":{"get":{"summary":"Export Open Invoices for a Customer","description":"Invoice records with an open balance for the customer based on the `identifier` provided,\nlimited to 100 records at a time.

A consumer should store the last `watermark` value of each\nresponse and include it as the watermark parameter for subsequent calls.\n","tags":["Customers"],"parameters":[{"name":"identifier","in":"path","required":true,"description":"`identifier` of the customer record.\n","schema":{"type":"string"}},{"name":"watermark","in":"query","description":"The value to base a subsequent extract of the next 100 items.","schema":{"$ref":"#/components/schemas/Watermark"}},{"name":"list","in":"query","description":"See Watermark & Limit for more information on response structure.","schema":{"type":"boolean","example":true}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"number":{"type":"string","description":"Invoice number, unique within a supplier."},"display_number":{"type":"string","description":"Invoice number as displayed to customers."},"currency":{"type":"string","description":"Currency code, based on ISO-4217, in lowercase. E.g. `cad`, `usd`, `aud`"},"amount_cents":{"type":"integer","description":"The invoice amount in cents."},"owing_cents":{"type":"integer","description":"Balance remaining on this invoice or credit memo."},"customer_identifier":{"type":"string","description":"Unique identifier for customer."},"watermark":{"$ref":"#/components/schemas/Watermark"}}}},"example":{"open_invoices":[{"number":"sh763-h3454-dh3432","display_number":"INV1234","currency":"usd","amount_cents":40000,"owing_cents":30000,"customer_identifier":"CUS001","watermark":8123612},{"number":"pq7d2-h3124-jl3937","display_number":"INV5678","currency":"usd","amount_cents":-10000,"owing_cents":-10000,"customer_identifier":"CUS001","watermark":8123615}]}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/NotFoundError"},"412":{"$ref":"#/components/responses/PreconditionFailed"}}}},"/api/invitations":{"post":{"summary":"Issue an invitation","description":"Issue a new contact invitation for the specified customer. The recipient of the invitation will begin to receive other Collaborative AR notifications, subject to the configuration of the supplier.\n\n*Note:* If the provided email is not an existing contact of the specified customer, a new contact will be created.\n","tags":["Customers"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["identifier","email"],"properties":{"identifier":{"type":"string","description":"the `identifier` of the customer to invite the contact to","example":"CUS001"},"email":{"type":"string","description":"Contact email address.","example":"bob.smith@example.com"}}}}}},"responses":{"200":{"description":"Successfully Invited","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFoundError"}}},"delete":{"summary":"Cancel an invitation","description":"Cancel an existing contact invitation for the specified customer.\n\n*Note:* `403` will be returned if the specified customer is closed, or if the specified email was invited by a customer user\n","tags":["Customers"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["identifier","email"],"properties":{"identifier":{"type":"string","description":"the `identifier` of the customer to cancel the invitation for","example":"CUS001"},"email":{"type":"string","description":"Contact email address.","example":"bob.smith@example.com"}}}}}},"responses":{"200":{"description":"Invitation Successfully Cancelled","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/UnauthorizedError"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NotFoundError"}}}},"/api/imports/customers/{identifier}/update_identifier":{"post":{"summary":"Update Customer Identifier","description":"Update a customer's identifier and any associations where identifier is being stored.

*Note:* `412` will be returned if the specified customer cannot be found or the identifier has already been taken.\n","tags":["Customers"],"parameters":[{"name":"identifier","in":"path","required":true,"description":"`identifier` of the customer to be updated.\n","schema":{"type":"string"}}],"requestBody":{"content":{"application/json":{"schema":{"required":["new_identifier"],"properties":{"new_identifier":{"type":"string","description":"Customer's new identifier to be used. Must be unique within supplier.","example":"CUS-1001"}}}}}},"responses":{"200":{"description":"Customer Successfully Updated.","content":{"application/json":{"schema":{"properties":{"message":{"type":"string","description":"Message indicating update successful.","example":"customer identifier updated"},"identifier":{"type":"string","description":"Customer's new identifier.","example":"CUS-1001"}}}}}},"412":{"description":"Precondition failed.","content":{"application/json":{"schema":{"properties":{"importer":{"type":"string","description":"stringified json message containing error.","example":"{:customer=>[\"not found.\"]}"}}}}}}}}},"/api/imports/invoice":{"post":{"summary":"Create and Update Invoice","description":"Create and update invoices. If the invoice already exists when a request is processed, it will be updated. If attachment is provided, will include the document in the invoice.

\nThe set of attributes to send in the request body may vary based on the account configuration. Please contact the implementation specialist for more information.

\n*Note:*\n * *Customer will be created/updated using the customer_* attributes if necessary at time of invoice import.*\n * *Any additional non-standard attribute will be stored with invoice record and available for presentment rendering.*\n","tags":["Invoices"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Invoice"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"identifier":{"type":"string","example":"INV002"},"message":{"type":"string","example":"1 invoice 1 line items"},"pay_url":{"type":"string","example":"https://secure.versapay.com/pay/a25f5d86-552a-4868-907e-e3a5932cff36"},"pay_urls":{"$ref":"#/components/schemas/PaymentUrls"}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"412":{"$ref":"#/components/responses/PreconditionFailed"}}}},"/api/imports/invoice/{invoice_number}/attachment":{"post":{"summary":"Add Invoice Attachment","description":"Add or update a PDF attachment to an existing invoice. The attachment will be included with the invoice and available for customer viewing.

\nThe attachment content must be provided as a base64 encoded string. This endpoint is subject to rate limiting and file size restrictions.

\n### Size Limit\nThe file cannot exceed 25MB.\n","tags":["Invoices"],"parameters":[{"name":"invoice_number","in":"path","required":true,"description":"Invoice `number` or `display_number` of the existing invoice, must align with find_by locator.\n","schema":{"type":"string","example":"INV-NUMBER-1234"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["find_by","file_name","content"],"properties":{"find_by":{"type":"string","description":"Specifies how to match the invoice identifier in the path parameter.\n","enum":["number","display_number"],"example":"number"},"invoice_display":{"type":"boolean","description":"When `true`, the attachment will be displayed as the primary invoice document. When `false` or omitted, the attachment will be included as a supplementary document.\n","default":true,"example":true},"file_name":{"type":"string","description":"Name of the attachment file. Should include the file extension (e.g., .pdf).\n","example":"INV-NUMBER-1234.pdf","maxLength":255},"content":{"type":"string","description":"Base64 encoded content of the PDF attachment. The decoded content cannot exceed 25MB.\n","example":"JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PAovVHlwZSAvQ2F0YWxvZwovUGFnZXMgMiAwIFIKPj4KZW5kb2JqCjIgMCBvYmoKPDwKL1R5cGUgL1BhZ2VzCi9LaWRzIFszIDAgUl0KL0NvdW50IDEKPD4KZW5kb2JqCjMgMCBvYmoKPDwKL1R5cGUgL1BhZ2UKL1BhcmVudCAyIDAgUgovTWVkaWFCb3ggWzAgMCA2MTIgNzkyXQovUmVzb3VyY2VzIDw8Ci9Gb250IDw8Ci9GMSA0IDAgUgo+Pgo+PgovQ29udGVudHMgNSAwIFIKPj4KZW5kb2JqCjQgMCBvYmoKPDwKL1R5cGUgL0ZvbnQKL1N1YnR5cGUgL1R5cGUxCi9CYXNlRm9udCAvSGVsdmV0aWNhCj4+CmVuZG9iago1IDAgb2JqCjw8Ci9MZW5ndGggNDQKPj4Kc3RyZWFtCkJUCi9GMSA4IFRmCjEwIDcwIFRkCihIZWxsbyBXb3JsZCkgVGoKRVQKZW5kc3RyZWFtCmVuZG9iago="}}},"examples":{"add_primary_attachment":{"summary":"Add attachment as primary invoice display using invoice number as the basis for lookup/matching","value":{"find_by":"number","invoice_display":true,"file_name":"INV-NUMBER-1234.pdf","content":"JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PAovVHlwZSAvQ2F0YWxvZwovUGFnZXMgMiAwIFIKPj4KZW5kb2JqCjIgMCBvYmoKPDwKL1R5cGUgL1BhZ2VzCi9LaWRzIFszIDAgUl0KL0NvdW50IDEKPD4KZW5kb2JqCjMgMCBvYmoKPDwKL1R5cGUgL1BhZ2UKL1BhcmVudCAyIDAgUgovTWVkaWFCb3ggWzAgMCA2MTIgNzkyXQovUmVzb3VyY2VzIDw8Ci9Gb250IDw8Ci9GMSA0IDAgUgo+Pgo+PgovQ29udGVudHMgNSAwIFIKPj4KZW5kb2JqCjQgMCBvYmoKPDwKL1R5cGUgL0ZvbnQKL1N1YnR5cGUgL1R5cGUxCi9CYXNlRm9udCAvSGVsdmV0aWNhCj4+CmVuZG9iago1IDAgb2JqCjw8Ci9MZW5ndGggNDQKPj4Kc3RyZWFtCkJUCi9GMSA4IFRmCjEwIDcwIFRkCihIZWxsbyBXb3JsZCkgVGoKRVQKZW5kc3RyZWFtCmVuZG9iago="}},"add_supplementary_attachment":{"summary":"Add attachment as supplementary document using invoice display number as the basis for lookup/matching","value":{"find_by":"display_number","invoice_display":false,"file_name":"supporting_docs.pdf","content":"JVBERi0xLjQKJdPr6eEKMSAwIG9iago8PAovVHlwZSAvQ2F0YWxvZwovUGFnZXMgMiAwIFIKPj4KZW5kb2JqCjIgMCBvYmoKPDwKL1R5cGUgL1BhZ2VzCi9LaWRzIFszIDAgUl0KL0NvdW50IDEKPD4KZW5kb2JqCjMgMCBvYmoKPDwKL1R5cGUgL1BhZ2UKL1BhcmVudCAyIDAgUgovTWVkaWFCb3ggWzAgMCA2MTIgNzkyXQovUmVzb3VyY2VzIDw8Ci9Gb250IDw8Ci9GMSA0IDAgUgo+Pgo+PgovQ29udGVudHMgNSAwIFIKPj4KZW5kb2JqCjQgMCBvYmoKPDwKL1R5cGUgL0ZvbnQKL1N1YnR5cGUgL1R5cGUxCi9CYXNlRm9udCAvSGVsdmV0aWNhCj4+CmVuZG9iago1IDAgb2JqCjw8Ci9MZW5ndGggNDQKPj4Kc3RyZWFtCkJUCi9GMSA4IFRmCjEwIDcwIFRkCihIZWxsbyBXb3JsZCkgVGoKRVQKZW5kc3RyZWFtCmVuZG9iago="}}}}}},"responses":{"200":{"description":"Attachment successfully added/updated","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Confirmation message indicating successful attachment operation","example":"1 attachment for invoice INV-NUMBER-1234"},"identifier":{"type":"string","description":"The file name of the added attachment","example":"INV-NUMBER-1234.pdf"}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/NotFoundError"}}}},"/api/exports/invoice/{number_or_id}":{"get":{"summary":"Export/View an Invoice","description":"View an invoice.

\n\nThe path parameter `number_or_id` is matched to the invoice `number`, `display_number` or `id`, in that order.\n","tags":["Invoices"],"parameters":[{"name":"number_or_id","in":"path","required":true,"description":"`number` or `display_number` or `id` of the invoice record.\n","schema":{"type":"string"}},{"name":"options","in":"query","schema":{"type":"array","items":{"type":"string"}},"required":false,"description":"An array of additional options that determine if extra data should be fetched for the invoice\n"},{"name":"options[payments]","in":"query","schema":{"type":"boolean"},"required":false,"description":"When this option is present: `?options[payments]=true` then an extra attribute is appended to the payload `payments`, this `payments` attribute will contain an array of all the PaymentAmounts associated with the exported invoice. When the supplier is enabled for `line_item_short_pay` then within the payments array there will be a nested structure of `line_item_transactional_amounts` containing the information corresponding to each line item that has been short paid.\n"}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/NotFoundError"}}}},"/api/exports/invoices/recent":{"get":{"summary":"Export Invoices Recently Updated","description":"Invoice records that have been updated in the past 7 days, since watermark, limited to 100 records at a time.

A consumer should store the last `id` value of each response and include it as the watermark parameter for subsequent calls.\n","tags":["Invoices"],"parameters":[{"name":"watermark","in":"query","description":"The value to base a subsequent extract of the next 100 items.","schema":{"$ref":"#/components/schemas/Watermark"}},{"name":"list","in":"query","description":"See Watermark & Limit for more information on response structure.","schema":{"type":"boolean","example":true}},{"name":"options[include_deleted_invoices]","in":"query","schema":{"type":"boolean"},"required":false,"description":"When this option is present: `?options[include_deleted_invoices]=true` then an extra attribute (deleted) is appended for each invoice, and invoices payload will contain both deleted and non-deleted invoices. If `?options[include_deleted_invoices]=false` or not set, only non-deleted invoices will be returned and invoice won't contain deleted attribute.\n"}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"object","properties":{"invoices":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InvoiceResponse"}}}},"examples":{"invoice":{"value":{"invoices":{"13207501":{"number":"sh763-h3454-dh3432","display_number":"INV1234","customer_identifier":"CUS001","amount_cents":40000,"owing_cents":30000,"subtotal_tax1":"$0.00","subtotal_tax2":"$0.00","currency":"usd","date":"2017-11-01","due_date":"2017-12-15","order_date":null,"purchase_order_number":"PO-3847","notes_text":"Thank you for your business","shipping_name":"Acme Inc.","shipping_address":{"address_1":"1 Main Street","address_2":"Suite 600","city":"New York","state":"NY","zip":"90210","country":"US","country_name":"United States","line_1":"1 Main Street, Suite 600","line_2":"New York, NY 90210"},"line_item_attributes":[{"number":"001","description":"Modems","amount_cents":40000,"balance_cents":40000,"quantity":40,"unit_cost_cents":1000,"id":6935660,"identifier":"acme|sh763-h3454-dh3432|001","invoice_id":4344538,"order_key":null,"purchase_order_number":null,"recurring_invoice_id":null,"extended_attributes":{"item_number":"A3947C9878"}}],"auto_debit":true,"division":"770","auto_pay_reference":null,"ref1":null,"ref2":null,"ref3":null,"adjustments_attributes":[{"label":"Surcharge","amount_cents":2000,"id":2212,"invoice_id":4344538,"recurring_invoice_id":null}],"plan_identifier":null,"plan_start_date":null,"plan_end_date":null,"plan_payment_cents":null,"annualized_amount_cents":null,"annualized_effective_date":null,"annualized_expiry_date":null,"external_id":null,"status":"CURRENT","delivery_status":"not_sent","extended_attributes":{"lease_type":"LS","currency_mode":"D"},"summary_invoice_parent":0,"summary_invoice_number":null,"service_rep_email":"john.doe@supplier.com;jane.doe@supplier.com"}}}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/exports/open_invoices":{"get":{"summary":"Export Open Invoices","description":"Invoice records with an open balance, limited to 100 records at a time.

\nA supplier should store the last `watermark` value of each\nresponse and include it as the watermark parameter for subsequent calls.\n","tags":["Invoices"],"parameters":[{"name":"watermark","in":"query","description":"The value to base a subsequent extract of the next 100 items.","schema":{"$ref":"#/components/schemas/Watermark"}},{"name":"list","in":"query","description":"See Watermark & Limit for more information on response structure.","schema":{"type":"boolean","example":true}},{"name":"options[include_deleted_invoices]","in":"query","schema":{"type":"boolean"},"required":false,"description":"When this option is present: `?options[include_deleted_invoices]=true` then an extra attribute (deleted) is appended for each invoice, and invoices payload will contain both deleted and non-deleted invoices. If `?options[include_deleted_invoices]=false` or not set, only non-deleted invoices will be returned and invoice won't contain deleted attribute.\n"}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"object","properties":{"invoices":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InvoiceResponse"}}}},"example":{"invoices":{"13207501":{"identifier":"example|invoice1SZTYMS","number":"invoice1SZTYMS","display_number":"invoice1SZTYMS","amount_cents":249530,"currency":"usd","subtotal_cents":249530,"subtotal1_tax_cents":null,"subtotal2_tax_cents":null,"customer_identifier":"CUS001","date":"2022-08-29","due_date":"2022-08-29","purchase_order_number":"PO-BZMGNZIZ","notes_text":null,"shipping_name":null,"shipping_address_1":null,"shipping_address_2":null,"shipping_city":null,"shipping_state":null,"shipping_zip":null,"auto_debit":1,"division":"ATL","auto_debit_reference":null,"auto_pay_reference":null,"owing_cents":249530,"ref1":null,"ref2":null,"ref3":null,"ref4":null,"external_id":null,"delivery_status":"not_sent","payment_date":null,"receivables_url":"https://versapay.com/receivables/invoices/13207501","discount_expiry_date":null,"discount_rate":null,"discount_amount_cents":0},"13207502":{"identifier":"example|invoice2TRVEPE","number":"invoice2TRVEPE","display_number":"invoice2TRVEPE","amount_cents":-158088,"currency":"usd","subtotal_cents":-158088,"subtotal1_tax_cents":null,"subtotal2_tax_cents":null,"customer_identifier":"CUS002","date":"2022-11-05","due_date":"2022-12-05","purchase_order_number":"PO-SWGHBBRN","notes_text":null,"shipping_name":null,"shipping_address_1":null,"shipping_address_2":null,"shipping_city":null,"shipping_state":null,"shipping_zip":null,"auto_debit":1,"division":"CTL","auto_debit_reference":null,"auto_pay_reference":null,"owing_cents":-158088,"ref1":null,"ref2":null,"ref3":null,"ref4":null,"external_id":null,"delivery_status":"not_sent","payment_date":null,"receivables_url":"https://versapay.com/receivables/invoices/13207502","discount_expiry_date":null,"discount_rate":null,"discount_amount_cents":0}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/notifications/remind/{number_or_id}":{"post":{"summary":"Single Invoice Reminder","description":"Issue an invoice reminder to the relevant recipients for the specified invoice.\n","tags":["Notifications"],"parameters":[{"name":"number_or_id","in":"path","required":true,"description":"`number` or `display_number` or `id` of the invoice record.\n","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/SingleReminderResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/notifications/remind":{"post":{"summary":"Bulk Invoice Reminder","description":"Issue an invoice reminder to the relevant recipients for the specified invoices.\n","tags":["Notifications"],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string"},"description":"A list of `number` or `display_number` or `id` of the invoice records.\n","example":["INV01","INV02","INV03","INV04","INV05","INV06","INV07","INV08","INV09","INV10"]}}}}}},"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"object","$ref":"#/components/schemas/BulkReminderResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/notifications/direct_message":{"post":{"tags":["Notifications"],"summary":"Direct Message","description":"Issue a direct message to just the specified email address regarding the declared object.

**Note: When certain conditions are not met for an `order` the response code `400` will be returned. Conditions are:**\n* must be enabled for supplier\n* must not be a draft\n* owing_cents must be greater than 0\n* deposit_amount_cents must be greater than 0\n* order must belong to a customer\n
**Note: When certain conditions are not met for a `payment_method` the response code `400` will be returned. Conditions are:**\n* customer identifier must be valid for the supplier\n* customer must not be closed or suspended\n* supplier must accept credit cards (toggle enabled in Admin and not disabled via payment rules)\n* customer must not be exempted from credit card payments\n* email must belong to an activated contact (when `create_contact` is `false`)\n* contact must not have a disabled or read-only role\n","requestBody":{"content":{"application/json":{"schema":{"type":"object","required":["email","object_type"],"properties":{"email":{"type":"string","description":"the notification recipient email address. For `payment_method` requests, email must belong to an activated contact (or contact must be created with `create_contact` flag).","example":"email@example.com"},"object_type":{"type":"string","description":"the type of object that is the subject of the notification.
\n`invoice` sends an invoice reminder notification
\n`order` sends an order deposit request
\n`payment_method` sends a request to add a payment card\n","enum":["invoice","order","payment_method"],"example":"invoice"},"object_identifier":{"type":"string","description":"`identifier` of the object that is the subject of the notification.
\n**Required** when `object_type` is `invoice` or `order`.
\n**Not required** when `object_type` is `payment_method` (will be ignored if provided).\n","example":"INV01"},"customer_identifier":{"type":"string","description":"identifier of the customer.
\n**Required** when `object_type` is `payment_method`.
\n**Not required** for `invoice` or `order` (customer is derived from the object itself).\n","example":"CUST001"},"create_contact":{"type":"boolean","description":"when `true` a contact will be created for the specified `email` if it does not already exist and will be activated with Admin role.
\nwhen `false` the contact is required to already exist (will return error if not found) and will be activated if not already activated.\n"},"first_name":{"type":"string","description":"Optional, contact first name"},"last_name":{"type":"string","description":"Optional, contact last name"}}},"examples":{"invoice_reminder":{"summary":"Send invoice reminder","value":{"email":"customer.contact@example.com","object_type":"invoice","object_identifier":"INV001","create_contact":false}},"order_deposit_request":{"summary":"Send order deposit request","value":{"email":"customer.contact@example.com","object_type":"order","object_identifier":"ORD001","create_contact":false}},"payment_method_request":{"summary":"Request to add payment card","value":{"email":"customer.contact@example.com","object_type":"payment_method","customer_identifier":"CUST001","create_contact":true,"first_name":"John","last_name":"Doe"}}}}}},"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"properties":{"errors":{"type":"object","description":"error message(s) for validation failures","examples":[{"base":["Customer is closed."]},{"base":["email must belong to an activated contact"]},{"base":["email belongs to a disabled user"]},{"base":["Contact does not have the required role."]},{"base":["Payment method request was not sent because the contact is not activated, invited or signed up, or does not have the required role."]}]},"error":{"type":"string","description":"error message for business rule violations","examples":["Credit cards are not accepted","Customer exempted from credit card payments"]}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"description":"Not Found","content":{"application/json":{"schema":{"properties":{"error":{"type":"string","description":"error message","example":"Record not found"}}}}}}}}},"/api/imports/payment":{"post":{"summary":"Create a Payment","description":"Create and update external payments.

The set of attributes to send in the request body may vary based on the account configuration. Please contact the implementation specialist for more information.

\nThe request schema for posting a payment for a single invoice is slightly different than that for posting a payment for multiple invoices.\n\nFor instance, sample request for posting payment for a single invoice looks like:\n```\n{\n \"identifier\": \"PMT0010-05\",\n \"invoice_number\": \"INV1234-01\",\n \"amount\": 10000,\n \"currency\": \"usd\",\n \"date\": \"2018-01-10\",\n \"customer_identifier\": \"C1234\",\n \"customer_name\": \"Acme Inc.\",\n \"notes\": \"Notes\",\n \"ref1\": \"1234\",\n \"ref2\": \"PO# 84767\"\n}\n```\n\n*Note: Customer will be created using the customer_* attributes if it doesn’t already exist at the time of payment import.*\n","tags":["Invoicing Payments"],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentImport"}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"identifier":{"type":"string","example":"PMT123"},"message":{"type":"string","example":"1 payment 1 invoice amounts"}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"412":{"$ref":"#/components/responses/PreconditionFailed"}}}},"/api/exports/transaction/{token_or_reference}":{"get":{"summary":"Export/View a Transaction","description":"View an order transaction details.

The path parameter `reference_or_token` is matched to the transaction's `token` or `unique_reference`, in that order. Alias/see `/api/gateway/v1/transaction/{token_or_reference}`\n","tags":["Order Transactions"],"parameters":[{"name":"token_or_reference","in":"path","required":true,"description":"The transaction's `token` or `unique_reference`.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrderTransaction"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/NotFoundError"}}}},"/api/exports/payment/{reference_or_token}":{"get":{"summary":"Export/View a Payment","description":"View a payment.

\n\nThe path parameter `reference_or_token` is matched to the payment's `payment_reference` or `payment_transaction_token`, in that order.\n","tags":["Invoicing Payments"],"parameters":[{"name":"reference_or_token","in":"path","required":true,"description":"The payment's `payment_reference` or `payment_transaction_token`.","schema":{"type":"string"}},{"name":"options[export_payment_tree]","in":"query","schema":{"type":"boolean"},"required":false,"description":"When present: `?options[export_payment_tree]=true` then the optional `payment_tree` attribute is included in the response payload.\n"},{"name":"options[fx]","in":"query","schema":{"type":"boolean"},"required":false,"description":"When present: `?options[fx]=true` then the optional `fx_rate`, `fx_amount`, and `fx_amount_cents` attributes are included in the response payload.\n"}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/NotFoundError"}}}},"/api/exports/payment_amounts":{"get":{"summary":"Export Payment Allocations","description":"Payments made/recorded to your supplier account from your customers since watermark, limited to 100 payment amounts at a time.

A consumer should store the last `id` value of each response and include it as the watermark parameter for a subsequent calls.\n","tags":["Invoicing Payments"],"parameters":[{"name":"watermark","in":"query","description":"The value to base a subsequent extract of the next 100 items.","schema":{"$ref":"#/components/schemas/Watermark"}},{"name":"list","in":"query","description":"See Watermark & Limit for more information on response structure.","schema":{"type":"boolean","example":true}},{"name":"options[fx]","in":"query","schema":{"type":"boolean"},"required":false,"description":"When present: `?options[fx]=true` then the optional `fx_rate`, `fx_amount`, and `fx_amount_cents` attributes are included in the response payload.\n"}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"object","properties":{"payment_amounts":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PaymentAmount"}}}},"examples":{"payment_amount":{"value":{"payment_amounts":{"1591737":{"payment_reference":"4TQRLRCHY7TT","checkout_token":"XYZABADXO7XX","invoice_number":"INV001","date":"2017-12-16","amount":"10.00","plan_fee":"0.00","payment_amount":"10.00","payment_transaction_amount":"10.00","payment_transaction_token":"8MSPMBLBG6VK","payment_method":" (6567)","payment_from_bank_account":true,"payment_from_credit_card":false,"payment_institution_name":null,"payment_credit_card_brand":null,"settlement_token":"MAY7USR7KABC","short_pay_indicator":"Y","payment_note":null,"auto_debit_indicator":"N","invoice_balance":"140.00","payment_timestamp":"2017-12-16T20:18:30-05:00","invoice_division":null,"invoice_division_number":null,"invoice_division_name":null,"pay_to_bank_account":"300987898","pay_to_bank_account_name":" (7898)","customer_identifier":"CUS001","customer_name":"Acme Inc.","status":"PAID","status_reason":"","payment_source":"ARC","payment_code":null,"payment_description":null,"gateway_authorization_code":"TM0FED","purchase_order_number":null,"ref1":null,"ref2":null,"ref3":null,"short_pay_reason_identifier":null,"short_pay_reason":null,"dispute_reason_identifier":null,"dispute_reason":null,"invoice_amount_paid":"30.00","invoice_identifier":"supplier|INV001","invoice_date":"2017-11-01","invoice_external_id":null,"invoice_currency":"usd","invoice_purchase_order_number":"PO-3847","invoice_ref1":null,"invoice_ref2":null,"invoice_ref3":null,"cumulative_customer_amount":"10.00","line_item_transactional_amounts":[{"line_item_number":"001","line_item_payment_amount":"8.00","line_item_balance":"50.00","line_item_short_pay_indicator":"Y","line_item_payment_note":"will pay tomorrow","line_item_short_pay_reason_identifier":null,"line_item_short_pay_reason":null,"line_item_dispute_reason_identifier":null,"line_item_dispute_reason":null},{"line_item_number":"002","line_item_payment_amount":"2.00","line_item_balance":"90.00","line_item_short_pay_indicator":"Y","line_item_payment_note":"will pay tomorrow","line_item_short_pay_reason_identifier":null,"line_item_short_pay_reason":null,"line_item_dispute_reason_identifier":null,"line_item_dispute_reason":null}],"batch_number":"2199312514","batch_amount":"48.25","invoice_display_number":"INV001","invoice_internal_number":"INV001"}}}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/exports/payments":{"get":{"summary":"Export Payments","description":"Payments made/recorded to your supplier account from your customers since watermark, limited to 100 payments at a time.

A consumer should store the last `id` value of each response and include it as the watermark parameter for a subsequent calls.\n","tags":["Invoicing Payments"],"parameters":[{"name":"watermark","in":"query","description":"The value to base a subsequent extract of the next 100 items.","schema":{"$ref":"#/components/schemas/Watermark"}},{"name":"list","in":"query","description":"See Watermark & Limit for more information on response structure.","schema":{"type":"boolean","example":true}},{"name":"options[export_payment_tree]","in":"query","schema":{"type":"boolean"},"required":false,"description":"When present: `?options[export_payment_tree]=true` then the optional `payment_tree` attribute is included in the response payload.\n"},{"name":"options[fx]","in":"query","schema":{"type":"boolean"},"required":false,"description":"When present: `?options[fx]=true` then the optional `fx_rate`, `fx_amount`, and `fx_amount_cents` attributes are included in the response payload.\n"}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"object","properties":{"payments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PaymentResponse"}}}},"examples":{"PAID":{"value":{"payments":{"13367716":{"payment_reference":"92YQ57XNXXW5","date":"2018-11-05","payment_amount":"20.00","payment_transaction_amount":"20.00","payment_method":" (9876)","auto_debit_indicator":"N","payment_timestamp":"2018-11-05T21:51:02-05:00","customer_identifier":"101acme1","customer_name":"ACME Specialties Inc.","status":"PAID","payment_source":"ARC","payment_code":null,"payment_description":null,"gateway_authorization_code":"123456","pay_to_bank_account":"0888111122","pay_to_bank_account_name":" (1122)","status_reason":"","watermark":13367716,"signature":"Dc5oLlk3sxAExI7K77BOyN6AAfvqo5naqYFtyxT7%2BCU%3D%0A"}}}},"DECLINED":{"value":"{\n \"payments\":{\n \"13367716\":{\n \"payment_reference\":\"92YQ57XNXXW5\",\n \"date\":\"2018-11-05\",\n \"payment_amount\":\"20.00\",\n \"payment_transaction_amount\":\"20.00\",\n \"payment_method\":\" (9876)\",\n \"auto_debit_indicator\":\"N\",\n \"payment_timestamp\":\"2018-11-05T21:51:02-05:00\",\n \"customer_identifier\":\"101acme1\",\n \"customer_name\":\"ACME Specialties Inc.\",\n \"status\":\"ERROR (DECLINED)\",\n \"payment_source\":\"ARC\",\n \"payment_code\":null,\n \"payment_description\":null,\n \"gateway_authorization_code\":\"123456\",\n \"pay_to_bank_account\":\"0888111122\",\n \"pay_to_bank_account_name\":\" (1122)\",\n \"status_reason\":\"Invalid routing number.\",\n \"watermark\":13367716,\n \"signature\":\"Dc5oLlk3sxAExI7K77BOyN6AAfvqo5naqYFtyxT7%2BCU%3D%0A\"\n }\n }\n}\n"}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/exports/payments/recent":{"get":{"summary":"Export Payments Recently Updated","description":"Payment records that have been updated in the past 7 days, since watermark, limited to 100 records at a time.

A consumer should store the last `id` value of each response and include it as the watermark parameter for subsequent calls.\n","tags":["Invoicing Payments"],"parameters":[{"name":"watermark","in":"query","description":"The value to base a subsequent extract of the next 100 items.","schema":{"$ref":"#/components/schemas/Watermark"}},{"name":"list","in":"query","description":"See Watermark & Limit for more information on response structure.","schema":{"type":"boolean","example":true}},{"name":"options[export_payment_tree]","in":"query","schema":{"type":"boolean"},"required":false,"description":"When present: `?options[export_payment_tree]=true` then the optional `payment_tree` attribute is included in the response payload.\n"},{"name":"options[fx]","in":"query","schema":{"type":"boolean"},"required":false,"description":"When present: `?options[fx]=true` then the optional `fx_rate`, `fx_amount`, and `fx_amount_cents` attributes are included in the response payload.\n"}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"object","properties":{"payments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PaymentResponse"}}}},"examples":{"PAID":{"value":{"payments":{"13367716":{"payment_reference":"92YQ57XNXXW5","date":"2018-11-05","payment_amount":"20.00","payment_transaction_amount":"20.00","payment_method":" (9876)","auto_debit_indicator":"N","payment_timestamp":"2018-11-05T21:51:02-05:00","customer_identifier":"101acme1","customer_name":"ACME Specialties Inc.","status":"PAID","payment_source":"ARC","payment_code":null,"payment_description":null,"gateway_authorization_code":"123456","pay_to_bank_account":"0888111122","pay_to_bank_account_name":" (1122)","status_reason":"","watermark":13367716,"signature":"Dc5oLlk3sxAExI7K77BOyN6AAfvqo5naqYFtyxT7%2BCU%3D%0A"}}}},"DECLINED":{"value":"{\n \"payments\":{\n \"13367716\":{\n \"payment_reference\":\"92YQ57XNXXW5\",\n \"date\":\"2018-11-05\",\n \"payment_amount\":\"20.00\",\n \"payment_transaction_amount\":\"20.00\",\n \"payment_method\":\" (9876)\",\n \"auto_debit_indicator\":\"N\",\n \"payment_timestamp\":\"2018-11-05T21:51:02-05:00\",\n \"customer_identifier\":\"101acme1\",\n \"customer_name\":\"ACME Specialties Inc.\",\n \"status\":\"ERROR (DECLINED)\",\n \"payment_source\":\"ARC\",\n \"payment_code\":null,\n \"payment_description\":null,\n \"gateway_authorization_code\":\"123456\",\n \"pay_to_bank_account\":\"0888111122\",\n \"pay_to_bank_account_name\":\" (1122)\",\n \"status_reason\":\"Invalid routing number.\",\n \"watermark\":13367716,\n \"signature\":\"Dc5oLlk3sxAExI7K77BOyN6AAfvqo5naqYFtyxT7%2BCU%3D%0A\"\n }\n }\n}\n"}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/imports/division":{"post":{"summary":"Create and Update Division","description":"Create and update divisions. If the division already exists when a request is processed, it will be updated.

\nNote:\n * A Division cannot be deleted if it is:\n * related to any invoices\n * a parent division\n * The parent division must exist in order to add a child division to a hierarchy. Attempting to set an unknown parent code will permit the creation of the new division, but will not create a parent.\n","tags":["Divisions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["code","name"],"properties":{"code":{"type":"string","description":"Division Code used on invoices","example":"DIV1"},"name":{"type":"string","description":"Division Name","example":"Division One"},"external_id":{"type":"string","description":"Optional external identifier for the division","example":"45332"},"deleted":{"type":"boolean","description":"Optional value that indicates if the division is inactive (true) or active (false)","example":false},"parent_code":{"type":"string","description":"Optional value that indicates this is a child of another division. The value must be an existing division code to make this division part of a hierarchy.","example":""}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"identifier":{"type":"string","example":"DIV1"},"message":{"type":"string","example":"1 division"}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"412":{"$ref":"#/components/responses/PreconditionFailed"}}}},"/api/invoices/{invoice_number}/disputes/close":{"post":{"summary":"Close a Dispute","description":"Close the active dispute on the specified invoice.

\nIf the invoice has no active dispute, the request is treated as a no-op and returns a success response with `\"0 disputes closed\"`.

\nAn optional `closer` attribute can be provided to record who closed the dispute, and an optional `comment` attribute will create a closing comment on the dispute.\n","tags":["Collaboration"],"parameters":[{"name":"invoice_number","in":"path","required":true,"description":"The number of the invoice whose dispute should be closed.","schema":{"type":"string","example":"INV1234-01"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"closer":{"type":"string","description":"Name or email address of the person closing the dispute.","example":"supplier@example.com"},"comment":{"type":"string","description":"Closing comment text. If provided, a closing comment will be created and attached to the dispute.","example":"Invoice will be credited. Please pay the rest."}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"type":"object","properties":{"identifier":{"type":"string","example":"INV1234-01"},"message":{"type":"string","example":"1 dispute closed"}}},"examples":{"dispute_closed":{"summary":"Dispute successfully closed","value":{"identifier":"INV1234-01","message":"1 dispute closed"}},"no_active_dispute":{"summary":"No active dispute on the invoice","value":{"identifier":"INV1234-01","message":"0 disputes closed"}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"412":{"$ref":"#/components/responses/PreconditionFailed"}}}},"/api/exports/disputes":{"get":{"summary":"Export Open and Closed Disputes","description":"Open and closed disputes since watermark, limited to 100 disputes at a time per category (open/closed).","tags":["Collaboration"],"parameters":[{"name":"watermark","in":"query","description":"The date/datetime (yyyy-mm-dd, yyyy-mm-ddThh:mm:ss) value to base a subsequent extract of the next 100 open and the next 100 closed disputes.","schema":{"type":"string","example":"2017-12-16T20:44:37"}},{"name":"list","in":"query","description":"See Watermark & Limit for more information on response structure. Note the watermark is a date/datetime, and the response watermark is the dispute.id and is not to be used as the input.","schema":{"type":"boolean","example":true}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"object","properties":{"disputes":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Dispute"}}}},"examples":{"disputes":{"value":{"disputes":{"518":{"closed_at":"2018-01-01T13:06:56-05:00","opened_at":"2017-12-16T20:44:37-05:00","opener":"customer@example.com","closer":"supplier@example.com","opening_comment_text":"Damaged goods. Please correct the amount.","closing_comment_text":"Invoice will be credited. Please pay the rest.","invoice_number":"INV001","invoice_balance":{"usd":12000},"dispute_reason_identifier":null,"dispute_reason_label_en":"","dispute_reason_label_fr":"","opening_comment_users_notified":[],"closing_comment_user_notified":[],"creator_business_name":"Acme Inc.","closer_business_name":"Supplier Corp.","invoice_amount_paid":"30.00","invoice_identifier":"supplier|INV001","invoice_external_id":null}}}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/exports/comments":{"get":{"summary":"Export Customer and Invoice Comments","description":"Customer and invoice comments (including disputes) since watermark, limited to 100 comments at a time.","tags":["Collaboration"],"parameters":[{"name":"watermark","in":"query","description":"The value to base a subsequent extract of the next 100 items.","schema":{"$ref":"#/components/schemas/Watermark"}},{"name":"list","in":"query","description":"See Watermark & Limit for more information on response structure.","schema":{"type":"boolean","example":true}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"object","properties":{"comments":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/Comment"}}}},"examples":{"comments":{"value":{"comments":{"1568":{"identifier":"1568","customer_identifier":"13666","customer_name":"Acme Inc.","comment":"This is a comment","regarding":"Invoice INV-0001","target_users":"","dispute":"N","internal":"Y","timestamp":"2017-09-20T15:09:05-04:00","user":"Bob Smith","email":"bob.smith@example.com","organization":"Acme Inc."}}}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/imports":{"post":{"summary":"Import a CSV File","description":"When uploading a CSV-formatted file it’s helpful to use your language/framework tooling to simplify the [multipart/form-data](https://www.ietf.org/rfc/rfc2388.txt) file upload.\n### Size Limit\nThe file cannot exceed 25MB.\n### Layouts\nPlease contact support@versapay.com or reach out to your implementation specialist for standard inbound CSV file layouts.\n","tags":["File Imports"],"requestBody":{"content":{"multipart/form-data":{"schema":{"properties":{"file":{"type":"string","description":"The file to upload."},"filename":{"type":"string","description":"Name of original file."}}}}}},"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileImport"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}},"x-codeSamples":[{"lang":"cURL","source":"curl \\\n-u \"Nvax...:UN0I...\" \\\n-F \"filename=data.csv\" \\\n-F \"file=@/home/user/Desktop/data.csv\" \\\nhttps://secure.versapay.com/api/imports/\n"},{"lang":"Ruby","source":"file = { :file => File.new('/home/user/Desktop/data.csv') }\nauth = { :basic_auth => { :username => 'Nvax...', :password => 'UN0I...' } }\nHTTMultiParty.post('https://secure.versapay.com/api/imports/', auth.merge( :query => file ))\n"}]},"get":{"summary":"View In-Progress & Completed Batches","description":"View recent in-progress and completed import batches.","tags":["File Imports"],"parameters":[{"name":"page","in":"query","description":"50 items are displayed per page.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FileImport"}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/imports/processing":{"get":{"summary":"View In-Progress Batches","description":"View only recent in-progress import batches.","operationId":"viewInProgressBatches","tags":["File Imports"],"parameters":[{"name":"page","in":"query","description":"50 items are displayed per page.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FileImport"}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/imports/completed":{"get":{"summary":"View Completed Batches","description":"View only recent completed import batches.","operationId":"viewCompletedBatches","tags":["File Imports"],"parameters":[{"name":"page","in":"query","description":"50 items are displayed per page.","schema":{"type":"integer"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FileImport"}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/imports/{id}":{"get":{"summary":"View Batch Details","operationId":"viewBatchDetail","tags":["File Imports"],"parameters":[{"name":"id","in":"path","required":true,"description":"The import batch identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileImport"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/imports/{id}/echo":{"get":{"summary":"View Tokenized Results of File Imported Payment Methods","description":"Tokenized results of file imported payment methods are available up to 24hrs following a fund import. This results file echo's the original input lines - absent the original header line, with sensitive field masking - appending the imported items `wallet token`, `fund token`, and `vault token` - i.e. essential references that can be used for subsequent payment/order transactions API usage.\n","operationId":"viewEchoResults","tags":["File Imports"],"parameters":[{"name":"id","in":"path","required":true,"description":"The import batch identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"text/csv":{"schema":{"type":"string"},"example":"1. Example of credit card import source text/csv:\ncustomer_identifier,name,first_name,last_name,number,expiry,postal_code,create_debit_agreement,auto_debit_reference\n10001,John Doe,John,Doe,4111111111111111,0318,H0H 0H0,Y,POLICY_10001\n10001,John Doe,John,Doe,5473500000000014,0318,H0H 0H0,Y,10001,John Doe,John,Doe,372700699251018,0318,H0H 0H0,N,\n10004,Mary Smith,Mary,Smith,4111111111111111,0318,H0H 0H0,Y,POLICY_10004\n10004,Mary Smith,Mary,Smith,5473500000000014,0318,H0H 0H0,Y,10004,Mary Smith,Mary,Smith,372700699251018,0318,H0H 0H0,N,\n\n2. Example of credit card import results text/csv:\n10001,John Doe,John,Doe,************1111,****,H0H 0H0,Y,POLICY_10001,1L8DN37Y6TL8,CC8KCKWWL8UT,ccuq905fyzruz9\n10001,John Doe,John,Doe,************0014,****,H0H 0H0,Y,,1L8DN37Y6TL8,CC3R9L5BDHI3,ccghc1fsa52tko\n10004,Mary Smith,Mary,Smith,************1111,****,H0H 0H0,Y,POLICY_10004,4JL6FH2L7LKN,CC851RBU5WGJ,ccg8c12dymulm1\n10004,Mary Smith,Mary,Smith,************0014,****,H0H 0H0,Y,,4JL6FH2L7LKN,CC2YDCF82NQK,ccom320nfnozj8"}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/imports/{id}/errors":{"get":{"summary":"View Batch Errors","description":"View the error results for a given batch import. This endpoint returns by default a `json` type response. But you can specify the extension in which you want to see the response, the accepted extensions are `json` and `csv`\n","operationId":"viewBatchError","tags":["File Imports"],"parameters":[{"name":"id","in":"path","required":true,"description":"The import batch identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InvoiceResponse"}}}},"examples":{"message":{"value":{"message":[{"line_number":2,"error":"division id not specified","id":null,"amount_cents":73570,"number":"A00359X","due_date":"2022-08-01","created_at":null,"updated_at":null,"sender_id":4,"customer_id":null,"batch_id":485,"read_at":null,"currency":"cad","company_name":null,"notes_header":null,"notes_text":null,"invoice_style":"Product","date":"2022-07-01","address_id":null,"telephone":null,"fax":null,"currencies":null,"external_id":null,"sent_at":null,"balance_adjustment":null,"owing_cents":73570,"shipping_name":null,"shipping_address_id":null,"purchase_order_number":null,"auto_debit":true,"payment_date":null,"bad_debt_cents":null,"draft":false,"published_at":null,"division_id":null,"identifier":"cadbalance|A00359X","auto_debit_reference":null,"display_number":null,"deleted":false,"deleted_at":null,"insert_token":"8ece9938-dd53-41be-979e-7ed962c9c082","update_token":"8ece9938-dd53-41be-979e-7ed962c9c082","subtotal_cents":73570,"subtotal_tax1":null,"subtotal_tax2":null,"address_1":null,"address_2":null,"city":null,"province":null,"postal_code":null,"balance_mode":true,"disputed":false,"recurring_invoice_id":null,"offer":false,"scheduled_payment_id":null,"paid_by_auto_debit":null,"converted_amount_cents":73570,"converted_owing_cents":73570,"customer_name":null,"net_days":null,"email_delivered_at":null,"email_opened_at":null,"delivery_status":"new","email_not_delivered_reason":null,"ref1":null,"ref2":null,"ref3":null,"match_at":null,"plan_identifier":null,"plan_start_date":null,"plan_end_date":null,"plan_payment_cents":null,"plan_suspended":null,"annualized_amount_cents":null,"annualized_effective_date":null,"annualized_expiry_date":null,"plan_invalid":false,"annualization_history":{},"last_payment_failed":false,"autopay_on_hold":false,"email_sent_at":null,"printed":false,"paper_delivery_state":null,"paper_state_change_at":null,"printer_queued_at":null,"printer_received_at":null,"printer_printed_at":null,"printer_mailed_at":null,"printer_failed_at":null,"printer_failed_message":null,"balance_updated_at":null,"last_payment_at":null,"checkout_payment":false,"approval_status":"none","first_pending_at":null,"summary_invoice_parent":false,"summary_invoice_number":null,"summary_discrepancy_currency":false,"summary_discrepancy_amount":false,"summary_orphan":false,"discount_expiry_date":null,"discount_rate":null,"discount_amount_cents":null,"converted_discount_amount_cents":null,"ref4":null,"line_item_tax_warning":false,"discount_cancelled_at":null,"card_number":null}]}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/exports/invoice_recon/{batch_file_id}":{"get":{"summary":"Export/View Invoice Reconciliation Results","description":"View the most recent, or for a given batch import, invoice reconciliation results.\n","tags":["File Imports"],"parameters":[{"name":"batch_file_id","in":"path","required":true,"description":"Optional, the `id` of the batch file import queued via /api/imports. When not specified the most recent invoice recon results are returned if any.","schema":{"type":"integer"}},{"name":"watermark","in":"query","description":"The value to base a subsequent extract of the next 100 items.","schema":{"$ref":"#/components/schemas/Watermark"}},{"name":"list","in":"query","description":"See Watermark & Limit for more information on response structure.","schema":{"type":"boolean","example":true}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"object","properties":{"reconciliation_invoices":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/InvoiceReconResponse"}}}},"examples":{"reconciliation_invoices":{"value":{"reconciliation_invoices":{"213635737":{"number":"0012","division_code":null,"customer_number":"","customer_name":"","invoice_date":null,"payment_identifier":null,"payment_date":null,"orphaned_payment_amount":"","balance_in_arc":"","balance_in_source_system":"$11,200.00","discrepancy_message":"Invoice Not Present in ARC"}}}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/exports/payment_recon/{batch_file_id}":{"get":{"summary":"Export/View Payment Reconciliation Results","description":"View the most recent, or for a given batch import, payment reconciliation results.\n","tags":["File Imports"],"parameters":[{"name":"batch_file_id","in":"path","required":true,"description":"Optional, the `id` of the batch file import queued via /api/imports. When not specified the most recent invoice recon results are returned if any.","schema":{"type":"integer"}},{"name":"watermark","in":"query","description":"The value to base a subsequent extract of the next 100 items.","schema":{"$ref":"#/components/schemas/Watermark"}},{"name":"list","in":"query","description":"See Watermark & Limit for more information on response structure.","schema":{"type":"boolean","example":true}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"object","properties":{"reconciliation_invoices":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/PaymentReconResponse"}}}},"examples":{"reconciliation_invoices":{"value":{"reconciliation_payments":{"213635737":{"payment_reconciliation_identifier":"7TSX9SFRY","unapplied_amount":"$3,000.00","unapplied_amount_in_source_system":"$90.00","customer_identifier":"CUST123","discrepancy_message":"These fields do not match: Payment date, Payment amount, Applied amount, Unapplied amount","payment_amount":"$3,000.00","payment_amount_in_source_system":"$4,805.87","applied_amount":"$0.00","applied_amount_in_source_system":"$900.00","payment_date":"2021-08-31","payment_date_in_source_system":"2023-08-07"}}}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/gateway/v1/settlement/statements":{"get":{"summary":"Retrieve Monthly Statements","description":"List of monthly statements added since watermark, limited to 100 (default) at a time.","tags":["Settlement Reporting"],"parameters":[{"name":"watermark","in":"query","description":"The value to base a subsequent extract of the next 100 items.","schema":{"$ref":"#/components/schemas/Watermark"}},{"name":"sample","in":"query","description":"Show some sample data","schema":{"type":"boolean","example":true}},{"name":"list","in":"query","description":"See Watermark & Limit for more information on response structure.","schema":{"type":"boolean","example":true}},{"name":"mid","in":"query","description":"account filter by mid or merchant account token.","schema":{"type":"string","example":123456789}},{"name":"enddate_from","in":"query","description":"start date of range filter for the statement period end date (yyyy-mm-dd).","schema":{"type":"string","example":"2023-01-01"}},{"name":"enddate_to","in":"query","description":"end date of range filter for the statement period end date (yyyy-mm-dd).","schema":{"type":"string","example":"2023-06-01"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"object","properties":{"statements":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/MonthlyStatementResponse"}}}},"examples":{"statements":{"value":{"statements":{"2":{"identifier":"2EW5NDMG5347","start_date":"2021-07-01","end_date":"2021-07-31","statement_date":"2021-08-11","merchant_account_token":"7YA5NDMG5347","merchant_account_identifier":"123456789012","watermark":2},"3":{"identifier":"2EW5NDMG5348","start_date":"2021-07-01","end_date":"2021-07-31","statement_date":"2021-08-11","merchant_account_token":"8YA5NDMG5348","merchant_account_identifier":"123456789012","watermark":3},"4":{"identifier":"2EW5NDMG5349","start_date":"2021-08-01","end_date":"2021-08-31","statement_date":"2021-09-11","merchant_account_token":"7YA5NDMG5347","merchant_account_identifier":"123456789012","watermark":4},"5":{"identifier":"2EW5NDMG5340","start_date":"2021-08-01","end_date":"2021-08-31","statement_date":"2021-09-11","merchant_account_token":"8YA5NDMG5348","merchant_account_identifier":"123456789012","watermark":5}}}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/gateway/v1/settlement/statements/{statement_identifier}.{format}":{"get":{"summary":"View Monthly Statement PDF","description":"The generated PDF for a specific monthly statement.","tags":["Settlement Reporting"],"parameters":[{"name":"statement_identifier","in":"path","required":true,"description":"Identifier/token of the monthly statement","schema":{"type":"string","example":"2EW5NDMG5347.pdf, 2EW5NDMG5347.json, sample.pdf"}},{"name":"format","in":"path","required":true,"description":"The format of the statement to retrieve, either 'pdf' or 'json'.","schema":{"type":"string","enum":["pdf","json"],"example":"pdf"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}},"headers":{"Content-Disposition":{"schema":{"type":"string"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/gateway/v1/settlement/batches":{"get":{"summary":"Retrieve Daily Batch Deposits","description":"List of daily batch deposits including fees and transactions.","tags":["Settlement Reporting"],"parameters":[{"name":"watermark","in":"query","description":"The value to base a subsequent extract of the next 100 items.","schema":{"$ref":"#/components/schemas/Watermark"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"object","properties":{"batches":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/SettlementBatchResponse"}}}},"examples":{"batches":{"value":{"batches":[{"token":"5EF5LDMY7627","merchant_account_token":"7YA5NDMG5347","mid":"V-KVFKTT-KM-X-ARA-4M-C","batch_close_date":"2022-01-05","batch_deposit_date":"2022-01-06","batch_net_amount_cents":1123456,"fee_withdrawal_amount_cents":0,"deposit_amount_cents":1123456,"deposit_currency":"usd","deposit_routing_number":"123456780","deposit_account_number":"*3211","deposit_routing_account_hash_function":"sha-1","deposit_routing_account_hash":"64984fa69d3aaeb30f77407bb08ada8e6dcfcf41","fees":[{"token":"6KF7LIOY1975","fee_withdrawal_date":"2022-01-06","fee_amount_cents":12000,"fee_currency":"usd","fee_withdrawal_routing_number":"123456780","fee_withdrawal_account_number":"*3211","fee_routing_account_hash_function":"sha-1","fee_routing_account_hash":"64984fa69d3aaeb30f77407bb08ada8e6dcfcf41","fee_type":"interchange","included_in_batch_deposit":false}],"transactions":[{"token":"2EW5NDMG5348","amount_cents":1000000,"currency":"usd","payment_method":"credit_card","settlement_token":"MA123XYZABCD","transaction_date":"2026-03-04","surcharge_cents":1750},{"token":"21AUED7416QS","amount_cents":123456,"currency":"usd","payment_method":"credit_card","settlement_token":"MA123XYZABCD","transaction_date":"2026-03-04","surcharge_cents":1750,"orders":[{"identifier":"1ESZXPKGAJCK","number":"S-INV102229","amount_cents":123456}],"payments":[{"identifier":"5VKMWCMBNMPZ","display_identifier":"5VKMWCMBNMPZ","amount_cents":123456},{"identifier":"5VKMWCMBNMPZ.REV","display_identifier":"5VKMWCMBNMPZ.REV","amount_cents":-123456}]}],"watermark":2},{"token":"5EF5LDMY7628","merchant_account_token":"8YA5NDMG5348","mid":"V-KVFKTT-KM-X-ARA-4M-C","batch_close_date":"2022-01-05","batch_deposit_date":"2022-01-06","batch_net_amount_cents":2123457,"fee_withdrawal_amount_cents":0,"deposit_amount_cents":1123456,"deposit_currency":"usd","deposit_routing_number":"123456780","deposit_account_number":"*3211","deposit_routing_account_hash_function":"sha-1","deposit_routing_account_hash":"64984fa69d3aaeb30f77407bb08ada8e6dcfcf41","fees":[{"token":"6KF7LIOY1975","fee_withdrawal_date":"2022-01-06","fee_amount_cents":12000,"fee_currency":"usd","fee_withdrawal_routing_number":"123456780","fee_withdrawal_account_number":"*3211","fee_routing_account_hash_function":"sha-1","fee_routing_account_hash":"64984fa69d3aaeb30f77407bb08ada8e6dcfcf41","fee_type":"interchange","included_in_batch_deposit":false}],"transactions":[{"token":"4EW5NDMG5348","amount_cents":2000000,"currency":"usd","payment_method":"credit_card","settlement_token":"MA123XYZABCD","transaction_date":"2026-03-04","surcharge_cents":1750},{"token":"41AUED7416QS","amount_cents":123457,"currency":"usd","payment_method":"credit_card","settlement_token":"MA123XYZABCD","transaction_date":"2026-03-04","surcharge_cents":1750}],"watermark":3}]}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/gateway/v1/settlement/exceptions":{"get":{"summary":"Retrieve Daily Transaction Exceptions","description":"List of exception transactions including ACH return/reject and CC chargeback.","tags":["Settlement Reporting"],"parameters":[{"name":"watermark","in":"query","description":"The value to base a subsequent extract of the next 100 items.","schema":{"$ref":"#/components/schemas/Watermark"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"object","properties":{"exceptions":{"type":"array","description":"List of exception transactions including ACH return/reject and CC chargeback contributing to the deposit batch","items":{"$ref":"#/components/schemas/SettlementExceptionResponse"}}}},"examples":{"exceptions":{"value":{"exceptions":[{"exception_type":"chargeback","exception_description":"Chargeback","exception_date":"2022-01-15","exception_amount_in_cents":500000,"exception_transaction":{"token":"2EW5NDMG5348","amount_in_cents":1000000,"currency":"usd","payment_method":"credit_card","settlement_token":"MA123XYZABCD"},"watermark":2},{"exception_type":"return","exception_description":"R10 CUSTOMER ADVISES NOT AUTHORIZED","exception_date":"2022-01-15","exception_amount_in_cents":1000000,"exception_transaction":{"token":"2EW5NDMG5348","amount_in_cents":1000000,"currency":"usd","payment_method":"credit_card","settlement_token":"MA123XYZABCD"},"watermark":3}]}}}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/gateway/v1/transactions/{token}":{"get":{"summary":"View Transaction Detail","description":"Alias `/api/exports/transaction/{token}`, see `Order Transactions` _View a Transaction_","tags":["Settlement Reporting"],"parameters":[{"name":"token","in":"path","required":true,"description":"The transaction's `token` or `unique_reference`.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TransactionResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"}}}},"/api/gateway/v1/orders/{token}":{"get":{"summary":"View Order Detail","description":"Alias `/api/exports/order/{token}`, see `Orders` _View an Order_","tags":["Settlement Reporting"],"parameters":[{"name":"token","in":"path","required":true,"description":"The order identifier.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"type":"object","properties":null,"$ref":"#/components/schemas/Order"}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message","example":"You need to sign in or create an account before continuing."}}}}}}}}},"/api/gateway/v1/payments/{token}":{"get":{"summary":"View Invoicing Payment Detail","description":"Alias `/api/exports/payment/{token}`, see `Invoicing Payments` _View a Payment_","tags":["Settlement Reporting"],"parameters":[{"name":"token","in":"path","required":true,"description":"The payment's `token` or `payment_transaction_token`.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Operation","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PaymentResponse"}}}},"401":{"$ref":"#/components/responses/UnauthorizedError"},"404":{"$ref":"#/components/responses/NotFoundError"}}}}},"components":{"schemas":{"DepositAccount":{"type":"object","description":"A deposit account","properties":{"purpose":{"type":"string","description":"The purpose of the deposit account"},"deposit_account_routing_number":{"type":"string","description":"The routing number (if USD) of the deposit account associated with the merchant account"},"deposit_account_masked_number":{"type":"string","description":"A masked version of the deposit account number associated with the merchant account"},"deposit_routing_account_hash_function":{"type":"string","description":"The hash function used to mask the routing number and account number"},"deposit_routing_account_hash":{"type":"string","description":"A hash of the deposit routing number and deposit account number"}}},"MerchantAccount":{"type":"object","properties":{"acceptable_cards":{"type":"string","description":"An array of accepted credit cards"},"deposit_accounts":{"type":"array","items":{"$ref":"#/components/schemas/DepositAccount"}},"currency":{"type":"string","enum":["usd","gbp","eur","cad","aud"]},"token":{"type":"string","description":"The merchant account token"},"deposit_account_masked_number":{"nullable":true,"type":"string","description":"A masked version of the deposit account number associated with the merchant account\n"},"deposit_routing_account_hash":{"type":"string","description":"A hash of the deposit routing number and deposit account number\n"},"deposit_routing_account_hash_function":{"type":"string","description":"The hash function used to mask the routing number and account number\n"},"deposit_account_routing_number":{"nullable":true,"type":"string","description":"The routing number (if USD) of the deposit account associated with the merchant account\n"},"nickname":{"nullable":true,"type":"string","description":"Optional value that describes the merchant account\n"},"gl_account":{"nullable":true,"type":"string","description":"Optional value that is the general ledger account number that is associated with the merchant account deposits\n"},"reference_token":{"nullable":true,"type":"string","description":"Optional value that describes the reference token provided by the source of the merchant application that resulted in this merchant account\n"},"mid":{"nullable":true,"type":"string","description":"The merchant id of the merchant account\n"},"tid":{"nullable":true,"type":"string","description":"The terminal id of the merchant account\n"},"is_default":{"type":"boolean","description":"Default account for the account type for the specified currency\n"},"address":{"nullable":true,"type":"object","properties":{"address_1":{"nullable":true,"type":"string"},"address_2":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"province":{"nullable":true,"type":"string","description":"US state or CA province code"},"postal_code":{"nullable":true,"type":"string","description":"US zip code or CA postal code"},"country":{"nullable":true,"type":"string","enum":["US","CA"]}}}}},"BankProcessor":{"type":"object","properties":{"token":{"type":"string","description":"the bank account token"},"currency":{"type":"string","enum":["usd","gbp","eur","cad","aud"]},"account_type":{"description":"checking or savings, defaults checking (required country = US)","type":"string","example":"checking"},"routing_number":{"description":"Financial institution branch/location. If USD, it is the routing number.\n If CAD, it is the concatenated institution number (3 digits) plus transit number (5 digits),\n If AUD, it is the BSB number. If GBP, it is the Sort Code. If EUR, it is “000000000”.\n","type":"string","example":""},"masked_account_number":{"type":"string","description":"a masked version of the account number"},"routing_account_hash_function":{"type":"string","description":"the hash function used to mask the routing number and account number"},"routing_account_hash":{"type":"string","description":"the hash value used to mask the routing number and account number."},"nickname":{"nullable":true,"type":"string","description":"Optional value that describes the bank account\n"},"reference_token":{"nullable":true,"type":"string","description":"Optional value that describes the reference token provided by the source of the merchant application that resulted in this settlement bank account\n"},"gl_number":{"nullable":true,"type":"string","description":"Optional value that is the general ledger account number that is associated with the merchant account deposits\n"},"external_name":{"nullable":true,"type":"string"},"external_number":{"nullable":true,"type":"string"},"is_default":{"type":"boolean","description":"Default account for the account type for the specified currency\n"},"address":{"nullable":true,"type":"object","properties":{"address_1":{"nullable":true,"type":"string"},"address_2":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"province":{"nullable":true,"type":"string","description":"US state or CA province code"},"postal_code":{"nullable":true,"type":"string","description":"US zip code or CA postal code"},"country":{"nullable":true,"type":"string","enum":["US","CA"]}}}}},"TerminalProcessor":{"type":"object","properties":{"currency":{"type":"string","enum":["usd","gbp","eur","cad","aud"]},"token":{"type":"string","description":"The terminal processor token"},"deposit_account_masked_number":{"nullable":true,"type":"string","description":"A masked version of the deposit account number associated with the terminal processor\n"},"deposit_routing_account_hash":{"type":"string","description":"A hash of the deposit routing number and deposit account number\n"},"deposit_routing_account_hash_function":{"type":"string","description":"The hash function used to mask the routing number and account number\n"},"deposit_account_routing_number":{"nullable":true,"type":"string","description":"The routing number (if USD) of the deposit account associated with the terminal processor. If CAD, it is the concatenated institution number (3 digits) plus transit number (5 digits), If AUD, it is the BSB number. If GBP, it is the Sort Code. If EUR, it is “000000000”.\n"},"nickname":{"nullable":true,"type":"string","description":"Optional value that describes the terminal processor\n"},"gl_account":{"nullable":true,"type":"string","description":"Optional value that is the general ledger account number that is associated with the terminal processor deposits\n"},"mid":{"nullable":true,"type":"string","description":"The merchant id of the terminal processor\n"},"tid":{"nullable":true,"type":"string","description":"The terminal id of the terminal processor\n"},"is_default":{"type":"boolean","description":"Default account for the account type for the specified currency\n"}}},"GiftCardProcessor":{"type":"object","properties":{"currency":{"type":"string","enum":["usd","gbp","eur","cad","aud"]},"token":{"type":"string","description":"The gift card processor token"},"deposit_account_masked_number":{"nullable":true,"type":"string","description":"A masked version of the deposit account number associated with the gift card processor\n"},"deposit_routing_account_hash":{"type":"string","description":"A hash of the deposit routing number and deposit account number\n"},"deposit_routing_account_hash_function":{"type":"string","description":"The hash function used to mask the routing number and account number\n"},"deposit_account_routing_number":{"nullable":true,"type":"string","description":"The routing number (if USD) of the deposit account associated with the gift card processor. If CAD, it is the concatenated institution number (3 digits) plus transit number (5 digits), If AUD, it is the BSB number. If GBP, it is the Sort Code. If EUR, it is “000000000”.\n"},"nickname":{"nullable":true,"type":"string","description":"Optional value that describes the gift card processor\n"},"gl_account":{"nullable":true,"type":"string","description":"Optional value that is the general ledger account number that is associated with the gift card processor deposits\n"},"mid":{"nullable":true,"type":"string","description":"The merchant id of the gift card processor\n"},"tid":{"nullable":true,"type":"string","description":"The terminal id of the gift card processor\n"},"is_default":{"type":"boolean","description":"Default account for the account type for the specified currency\n"}}},"Divisions":{"type":"object","properties":{"division_code":{"type":"string","description":"The division code"},"division_name":{"type":"string","description":"The division name"},"parent_code":{"nullable":true,"type":"string","description":"The parent division code of the division"},"company_name":{"nullable":true,"type":"string","description":"The division-specific company_name of the division"},"address_1":{"nullable":true,"type":"string","description":"The division-specific address_1 of the division"},"address_2":{"nullable":true,"type":"string","description":"The division-specific address_2 of the division"},"postal_code":{"nullable":true,"type":"string","description":"The division-specific postal_code of the division"},"city":{"nullable":true,"type":"string","description":"The division-specific city of the division"},"province":{"nullable":true,"type":"string","description":"The division-specific state or province of the division"},"country":{"nullable":true,"type":"string","description":"The division-specific country of the division"}}},"Whoami":{"type":"object","properties":{"token":{"type":"string","description":"Owing account token","example":"1UFLSWHF2HAK"},"jwt":{"type":"string","description":"Token that can be used for `Authorization Bearer` based JWT authentication","example":"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ0b2tlbiI6Im54eDFaSjgzeXRNNmhtb3NGVExCIiwiZXhwIjoxNzEyOTU5NDA5fQ.adV6U1vW69Ypskt61uPL8hZ-4muvtM4FLM48QN6iCc4"},"jwt_exp":{"type":"integer","description":"Expiration date/time of the JWT token in seconds since 1970-01-01T00:00:00Z UTC ignoring leap seconds","example":1712959409},"name":{"type":"string","description":"Owning account name","example":"CDS Netsuite UAT"},"sender_identifier":{"type":"string","description":"Supplier identifier","example":"cdsnsat"},"currency":{"type":"string","description":"Account default/base currency","enum":["usd","eur","gbp","cad","aud"],"example":"usd"},"preferred_language":{"type":"string","description":"Account default/preferred language","enum":["en","fr","es"],"example":"en"},"external_link":{"nullable":true,"type":"string","description":"An external reference provided by the the ERP/partner originating the merchant application associated with this supplier"},"business_number":{"nullable":true,"type":"string","description":"Tax/business number provided during account onboarding","example":"325-223-3000"},"address_1":{"nullable":true,"type":"string"},"address_2":{"nullable":true,"type":"string"},"postal_code":{"nullable":true,"type":"string"},"city":{"nullable":true,"type":"string"},"province":{"nullable":true,"type":"string"},"country":{"nullable":true,"type":"string"},"branding_partner":{"nullable":true,"type":"string","description":"The ERP/partner originating branding identifier"},"branding_partner_config":{"nullable":true,"type":"string","description":"ERP/partner associated configuration settings"},"merchant_accounts":{"type":"array","items":{"$ref":"#/components/schemas/MerchantAccount"}},"settlement_bank_accounts":{"type":"array","items":{"$ref":"#/components/schemas/BankProcessor"}},"terminal_processors":{"type":"array","items":{"$ref":"#/components/schemas/TerminalProcessor"}},"gift_card_processors":{"type":"array","items":{"$ref":"#/components/schemas/GiftCardProcessor"}},"divisions":{"type":"array","items":{"$ref":"#/components/schemas/Divisions"}},"autopay_api_enabled":{"type":"boolean","description":"If `true`, you are eligible to create AutoPay agreements via API"},"arc_payment_match_mode":{"type":"string","description":"C-AR Payment Manual Matching Mode (Off, On - Prepayments Only, On - All Payments)"},"erp_payment_match_mode":{"type":"string","description":"ERP Payments Manual Matching Mode (Off, On, Always Ask Customer)"},"external_payment_match_mode":{"type":"string","description":"External Payments Manual Matching Mode (Off, On, Always Ask Customer)"},"erp_payment_auto_match_mode":{"type":"boolean","description":"ERP Payments Auto Match Mode"},"external_payment_auto_match_mode":{"type":"boolean","description":"External Payments Auto Match Mode"}}},"Locale":{"type":"string","pattern":"^[a-z]{2}-[a-z]{2}$","example":"en-us"},"Currency":{"type":"string","pattern":"^[a-z]{3}$","example":"usd","maxLength":3,"minLength":3},"AccountFees":{"type":"object","required":["per_month_amount"],"properties":{"per_month_amount":{"type":"number","format":"float","example":5.05,"minimum":0}}},"PaymentMethodFees":{"type":"object","required":["description","per_transaction_amount","per_transaction_percent","per_month_amount"],"properties":{"description":{"type":"string","example":"Credit Card"},"per_transaction_amount":{"type":"number","format":"float","example":5.05,"minimum":0},"per_transaction_percent":{"type":"number","format":"float","example":5.05,"minimum":0},"per_month_amount":{"type":"number","format":"float","example":5.05,"minimum":0}}},"Rate":{"type":"object","required":["description","currency_code","url","monthly_account_fees","payment_methods"],"properties":{"description":{"type":"string","example":"Versapay Payment Services"},"currency_code":{"$ref":"#/components/schemas/Currency"},"url":{"type":"string","format":"url","example":"https://www.versapay.com/merchant-services"},"monthly_account_fees":{"$ref":"#/components/schemas/AccountFees"},"payment_methods":{"type":"array","items":{"$ref":"#/components/schemas/PaymentMethodFees"}}}},"URL":{"type":"string","format":"url","example":"https://www.example.com"},"ProhibitedProduct":{"type":"string","example":"Firearms"},"ProhibitedProducts":{"type":"object","properties":{"url":{"$ref":"#/components/schemas/URL"},"prohibited_product_list":{"type":"array","items":{"$ref":"#/components/schemas/ProhibitedProduct"}}}},"TermsAndConditionsText":{"type":"string","example":"This Merchant Services Agreement (this \"Agreement\") is entered into between..."},"TermsAndConditions":{"type":"object","properties":{"url":{"$ref":"#/components/schemas/URL"},"terms_and_conditions_text":{"$ref":"#/components/schemas/TermsAndConditionsText"}}},"Range":{"type":"object","properties":{"from":{"type":"number","example":1000000},"to":{"type":"number","example":1999999,"description":"values are retrieved from GET Terms"}}},"AmountRanges":{"type":"object","properties":{"currency_code":{"$ref":"#/components/schemas/Currency"},"annual_volumes":{"type":"array","items":{"$ref":"#/components/schemas/Range"}},"average_ticket_amounts":{"type":"array","items":{"$ref":"#/components/schemas/Range"}},"high_ticket_amounts":{"type":"array","items":{"$ref":"#/components/schemas/Range"}}}},"ApplicationParameters":{"type":"object","required":["rates","prohibited_products","terms_and_conditions"],"properties":{"rates":{"type":"array","items":{"$ref":"#/components/schemas/Rate"}},"prohibited_products":{"$ref":"#/components/schemas/ProhibitedProducts"},"terms_and_conditions":{"$ref":"#/components/schemas/TermsAndConditions"},"ranges":{"$ref":"#/components/schemas/AmountRanges"}}},"BusinessName":{"type":"string","example":"Acme Corporation"},"TIN":{"type":"string","example":"77-7654567","pattern":"^\\d{2}\\-?\\d{7}$"},"OverrideValidation":{"type":"boolean","example":true},"BusinessTaxIdentifier":{"type":"object","required":["tin"],"properties":{"tin":{"$ref":"#/components/schemas/TIN"},"override_validation":{"$ref":"#/components/schemas/OverrideValidation"}}},"Address":{"type":"object","required":["address1","city","post_code","country"],"properties":{"address1":{"type":"string","example":"1314 NW GLISAN ST","minLength":1,"maxLength":25},"address2":{"type":"string","example":"Apartment 1","maxLength":25},"city":{"type":"string","example":"Portland","minLength":1,"maxLength":20},"state_province":{"type":"string","example":"OR","pattern":"^[a-z]{2}$","maxLength":2,"minLength":2},"post_code":{"type":"string","example":"97209","maxLength":5},"country":{"type":"string","pattern":"^[a-z]{2}$","example":"us","maxLength":2,"minLength":2},"override_validation":{"$ref":"#/components/schemas/OverrideValidation"}}},"OwnershipType":{"type":"string","enum":["Financial Institution","Government","LLC","Non-Profit","Partnership/Gen. Ltd.","Private Corporation","Public Corporation","SEC Regulated Corporation","Sole Proprietorship","Trust"],"example":"Limited Liability Company"},"StockTickerSymbol":{"type":"string","example":"EXMPL","description":"required only if ownership_type = \"Public Corporation\", must be <= 10 characters"},"BusinessType":{"type":"string","enum":["AutoRental","MOTO","ECommerce","Restaurant","Lodging","Retail"],"example":"Restaurant"},"NAICSCode":{"type":"string","pattern":"^[0-9]{6}$","example":"221111"},"Phone":{"type":"string","example":"503-685-4116","description":"cannot begin with 1 or 0"},"Email":{"type":"string","format":"email","example":"me@example.com"},"Date":{"type":"string","format":"date","example":"2022-01-15"},"RangeAnualDirectDebitVolume":{"type":"object","properties":{"from":{"type":"number","example":500000},"to":{"type":"number","example":999999}}},"RangeAverageTicketAmount":{"type":"object","properties":{"from":{"type":"number","example":100},"to":{"type":"number","example":249}}},"RangeHightTicketAmount":{"type":"object","properties":{"from":{"type":"number","example":1000},"to":{"type":"number","example":4999}}},"OverSEMinimum":{"type":"boolean","example":false},"SENumber":{"type":"string","example":"123456789","pattern":"^\\d+","maxLength":10,"description":"must be <= 10 characters"},"ServiceEstablishment":{"type":"object","required":["over_se_minimum"],"properties":{"over_se_minimum":{"$ref":"#/components/schemas/OverSEMinimum"},"se_number":{"$ref":"#/components/schemas/SENumber"}}},"Person":{"type":"object","required":["first_name","last_name","title"],"properties":{"first_name":{"type":"string","example":"Alice","maxLength":25},"middle_initial":{"type":"string","example":"B","minLength":1,"maxLength":1},"last_name":{"type":"string","example":"Smith","maxLength":25},"title":{"type":"string","example":"CFO","maxLength":20}}},"ITIN":{"type":"string","example":"325-98-1975","pattern":"^\\d{3}\\-?\\d{2}\\-?\\d{4}$"},"IndividualTaxIdentifier":{"type":"object","required":["itin"],"properties":{"itin":{"$ref":"#/components/schemas/ITIN"},"override_validation":{"$ref":"#/components/schemas/OverrideValidation"}}},"BirthDate":{"type":"string","format":"date","example":"1972-01-15"},"BusinessOwner":{"type":"object","required":["name","ownership_percentage","individual_tax_id_number","birth_date","home_address","home_phone","email"],"properties":{"name":{"$ref":"#/components/schemas/Person"},"ownership_percentage":{"type":"number","format":"float","example":25,"minimum":25,"maximum":100},"individual_tax_id_number":{"$ref":"#/components/schemas/IndividualTaxIdentifier"},"birth_date":{"$ref":"#/components/schemas/BirthDate"},"home_address":{"$ref":"#/components/schemas/Address"},"home_phone":{"$ref":"#/components/schemas/Phone"},"email":{"$ref":"#/components/schemas/Email"}}},"NonBusinessOwnerControlProng":{"description":"This is a required object when the control_prong is set to Non-Owner\n","type":"object","required":["name","individual_tax_id_number","birth_date","home_address","home_phone","email"],"properties":{"name":{"$ref":"#/components/schemas/Person"},"individual_tax_id_number":{"$ref":"#/components/schemas/IndividualTaxIdentifier"},"birth_date":{"$ref":"#/components/schemas/Date"},"home_address":{"$ref":"#/components/schemas/Address"},"home_phone":{"$ref":"#/components/schemas/Phone"},"email":{"$ref":"#/components/schemas/Email"}}},"ApplicationContact":{"type":"object","required":["name","phone","email"],"properties":{"name":{"$ref":"#/components/schemas/Person"},"phone":{"$ref":"#/components/schemas/Phone"},"email":{"$ref":"#/components/schemas/Email"}}},"ControlProng":{"type":"string","enum":["Owner 1","Owner 2","Owner 3","Owner 4","Non-Owner"],"example":"Non-Owner"},"RoutingNumber":{"type":"string","example":"021100361","pattern":"^\\d{9}$","description":"Must be a valid US Bank ABA Number"},"DemandDepositAccountNumber":{"type":"string","example":"9876543299","pattern":"^\\d+$"},"DDA":{"type":"object","required":["routing_number","account_number"],"properties":{"routing_number":{"$ref":"#/components/schemas/RoutingNumber"},"account_number":{"$ref":"#/components/schemas/DemandDepositAccountNumber"}}},"ReferenceToken":{"type":"string","format":"guid","example":"1c47dece-489b-4521-89db-0a940ac58235","description":"Specify a unique GUID as a client reference to the application","maxLength":36},"Boolean":{"type":"boolean","example":false},"Document":{"type":"object","required":["filename","base64"],"properties":{"filename":{"type":"string","example":"example.pdf"},"base64":{"type":"string","format":"base64","example":"ZXhhbXBsZQ=="},"type":{"type":"string","enum":["Bank Statement","Merchant Statement","Financial Statement","Tax ID Number Verification"],"example":"Bank Statement"}}},"ExternalLink":{"type":"string","description":"An external reference provided by the the ERP/partner originating the merchant application associated with this supplier","example":"xyz123abc789"},"LinkToExisting":{"type":"string","description":"Must match the value of an existing application entry that has previously been submitted","example":"1cb9ca4b-6596-4bac-a24b-8864222cf95d"},"Application":{"type":"object","required":["business_legal_name","business_dba_name","business_tax_id_number","business_physical_address","business_billing_address","ownership_type","business_type","naics_code","business_phone","business_email","business_website","business_established_date","annual_card_volume","annual_direct_debit_volume","average_ticket_amount","high_ticket_amount","american_express_service_establishment","primary_contact","control_prong","deposit_account","reference_token","sells_prohibited_products","agrees_terms_and_conditions","terms_and_conditions"],"properties":{"business_legal_name":{"$ref":"#/components/schemas/BusinessName"},"business_dba_name":{"$ref":"#/components/schemas/BusinessName"},"business_tax_id_number":{"$ref":"#/components/schemas/BusinessTaxIdentifier"},"business_physical_address":{"$ref":"#/components/schemas/Address"},"business_billing_address":{"$ref":"#/components/schemas/Address"},"ownership_type":{"$ref":"#/components/schemas/OwnershipType"},"stock_ticker_symbol":{"$ref":"#/components/schemas/StockTickerSymbol"},"business_type":{"$ref":"#/components/schemas/BusinessType"},"naics_code":{"$ref":"#/components/schemas/NAICSCode"},"business_phone":{"$ref":"#/components/schemas/Phone"},"business_email":{"$ref":"#/components/schemas/Email"},"business_website":{"$ref":"#/components/schemas/URL"},"business_established_date":{"$ref":"#/components/schemas/Date"},"annual_card_volume":{"$ref":"#/components/schemas/Range"},"annual_direct_debit_volume":{"$ref":"#/components/schemas/RangeAnualDirectDebitVolume"},"average_ticket_amount":{"$ref":"#/components/schemas/RangeAverageTicketAmount"},"high_ticket_amount":{"$ref":"#/components/schemas/RangeHightTicketAmount"},"american_express_service_establishment":{"$ref":"#/components/schemas/ServiceEstablishment"},"business_owners":{"type":"array","items":{"$ref":"#/components/schemas/BusinessOwner"},"maxItems":4},"non_business_owner_control_prong":{"$ref":"#/components/schemas/NonBusinessOwnerControlProng"},"primary_contact":{"$ref":"#/components/schemas/ApplicationContact"},"control_prong":{"$ref":"#/components/schemas/ControlProng"},"deposit_account":{"$ref":"#/components/schemas/DDA"},"reference_token":{"$ref":"#/components/schemas/ReferenceToken"},"sells_prohibited_products":{"$ref":"#/components/schemas/Boolean"},"agrees_terms_and_conditions":{"$ref":"#/components/schemas/Boolean"},"terms_and_conditions":{"$ref":"#/components/schemas/TermsAndConditions"},"supporting_documents":{"type":"array","items":{"$ref":"#/components/schemas/Document"}},"locale":{"$ref":"#/components/schemas/Locale"},"external_link":{"$ref":"#/components/schemas/ExternalLink"},"link_to_existing":{"$ref":"#/components/schemas/LinkToExisting"}}},"ApplicationToken":{"type":"string","format":"guid","example":"1c47dece-489b-4521-89db-0a940ac58235"},"ApplicationCreatedResponse":{"type":"object","required":["application_token"],"properties":{"application_token":{"$ref":"#/components/schemas/ApplicationToken"}}},"ErrorMessage":{"type":"string","example":"Please specify a valid value"},"ApplicationAddressError":{"type":"object","required":["field","error_message"],"properties":{"field":{"type":"string","enum":["Owner 1","Owner 2","Owner 3","Owner 4","Business Physical Address","Business Billing Address"],"example":"Owner 1"},"error_message":{"$ref":"#/components/schemas/ErrorMessage"},"address_candidates":{"type":"array","items":{"$ref":"#/components/schemas/Address"}}}},"ApplicationTaxIDError":{"type":"object","required":["field","error_message"],"properties":{"field":{"type":"string","enum":["Owner 1","Owner 2","Owner 3","Owner 4","Business"],"example":"Owner 1"},"error_message":{"$ref":"#/components/schemas/ErrorMessage"}}},"ApplicationError":{"type":"object","required":["field","error_message"],"properties":{"field":{"type":"string"},"error_message":{"$ref":"#/components/schemas/ErrorMessage"}}},"ApplicationErrorResponse":{"type":"object","properties":{"address_errors":{"type":"array","items":{"$ref":"#/components/schemas/ApplicationAddressError"}},"tax_id_errors":{"type":"array","items":{"$ref":"#/components/schemas/ApplicationTaxIDError"}},"field_errors":{"type":"array","items":{"$ref":"#/components/schemas/ApplicationError"}}}},"ApplicationStatus":{"type":"string","enum":["Received","Processing","Provisionally Approved","Approved","On Hold","Closed"],"example":"Received"},"APIToken":{"type":"string","example":"6ySjc8LfeRwqciWK8owT"},"APIKey":{"type":"string","example":"Bl5cgjTnysXxyNyysXiw"},"APICredentials":{"type":"object","required":["api_token","api_key"],"properties":{"api_token":{"$ref":"#/components/schemas/APIToken"},"api_key":{"$ref":"#/components/schemas/APIKey"}}},"ApplicationStatusResponse":{"type":"object","required":["application_status"],"properties":{"application_status":{"$ref":"#/components/schemas/ApplicationStatus"},"api_credentials":{"$ref":"#/components/schemas/APICredentials"}}},"Watermark":{"type":"integer","format":"int64","example":0},"OrderItem":{"type":"object","properties":{"number":{"type":"string","description":"Order line-item number"},"description":{"type":"string","description":"Order line-item description"},"quantity":{"type":"number","description":"Order line-item quantity"},"unit_cost_cents":{"type":"integer","description":"Order line-item unit price in cents."},"amount_cents":{"type":"integer","description":"Order line-item total in cents."},"tax_amount_cents":{"type":"integer","description":"Order line-item tax in cents."},"discount_amount_cents":{"type":"integer","description":"Order line-item discount in cents."},"product_code":{"type":"string","description":"Order line-item product_code."},"category":{"type":"string","description":"Order line-item category."},"attributes":{"type":"object","properties":{},"description":"array of key pair items."},"L3_commodity_code":{"type":"string","description":"Product commodity code (UNSPSC).","example":"12345678"},"L3_unit_of_measure":{"type":"string","description":"Unit of measure (EA, KG, L).","example":"EA"},"L3_discount_amount":{"type":"string","description":"Discount amount.","example":"1.00"},"L3_tax_amount":{"type":"string","description":"Tax amount.","example":"0.50"},"L3_product_code":{"type":"string","description":"Product SKU or internal code.","example":"SKU-001"}},"example":{"number":"1","amount_cents":10000,"description":"description","product_code":"product_code","category":"category","quantity":1,"unit_cost_cents":10000,"tax_amount_cents":100,"discount_amount_cents":0,"orderitem_attr1":"1111111","orderitem2_attr2":"222222"}},"SummaryOrderReference":{"type":"object","description":"Summary reference of known order","properties":{"identifier":{"type":"string","description":"Associated order identifier"},"number":{"type":"string","description":"Associated order number"},"amount_cents":{"type":"number","description":"Associated order amount"}}},"SummaryPaymentReference":{"type":"object","description":"Summary reference of known invoicing payment","properties":{"identifier":{"type":"string","description":"Associated invoicing payment identifier"},"number":{"type":"string","description":"Associated invoicing payment number"},"amount_cents":{"type":"number","description":"Associated invoicing payment amount"}}},"OrderTransaction":{"type":"object","properties":{"token":{"type":"string","description":"Transaction token"},"amount_in_cents":{"type":"number","description":"Transaction amount in cents"},"message":{"type":"string","description":"Applies to payport transactions"},"link_url":{"type":"string","description":"Applies to payport transactions"},"type":{"type":"string","description":"Literal for payport transaction compatibility 'transaction'"},"transaction_type":{"type":"string","description":"Literal for payport transaction compatibility 'request_money'"},"email":{"type":"string","description":"TBD"},"state":{"type":"string","description":"See the lifecycle states of transaction settlement"},"currency":{"type":"string","description":"Currency code, based on ISO-4217. E.g. `CAD`, `USD`, `AUD`"},"payment_method":{"type":"string","enum":["credit_card","bank_account","gift_card","pos_terminal"]},"settlement_token":{"type":"string","description":"Token corresponding to the settlement routing/processor profile as enumerated in whoami eg bank transfer processor for ACH/EFT, merchant account for CC, gift card processor, pos/terminal processor"},"transaction_reference":{"type":"string","nullable":true,"description":"N/A for payport transaction compatibility"},"unique_reference":{"type":"string","nullable":true,"description":"N/A for payport transaction compatibility"},"from_account":{"type":"string","description":"Name of the customer (or card/account holder) from which payment is made"},"to_account":{"type":"string","description":"Name of the supplier receiving payment"},"process_on":{"type":"string","nullable":true,"format":"date","description":"N/A for payport transaction compatibility"},"created_by_user":{"type":"string","description":"Name of the user otherwise the API token appears if the transaction was created with the api."},"auto_withdraw":{"type":"boolean","description":"N/A for payport transaction compatibility"},"auto_withdrawal_token":{"type":"string","nullable":true,"description":"N/A for payport transaction compatibility"},"action":{"type":"string","description":"Transaction type/action performed","enum":["verify","sale","credit","auth","capture","refund","void"]},"step_types":{"type":"array","items":{"type":"string"}},"authorization_response":{"type":"string","description":"Authorization response code indicating","enum":["100 (approval)","200 (decline)","400 (error)","500 (unexpected/other)"]},"avs_response":{"type":"string","description":"For credit card payments AVS result code when applicable","enum":["0 (APPROVED/NOT_REQUESTED)","D (V_FULL_MATCH_INTERNATIONAL)","F (V_FULL_MATCH_UK)","M (V_FULL_MATCH)","Y (MATCH_ADDRESS_MATCH_ZIP)","X (MATCH_ADDRESS_MATCH_ZIP9)","A (MATCH_ADDRESS_NO_ZIP)","B (MATCH_ADDRESS_MALFORMED_ZIP)","P (MALFORMED_ADDRESS_MATCH_ZIP)","W (NO_ADDRESS_MATCH_ZIP9)","Z (NO_ADDRESS_MATCH_ZIP)","N (NO_MATCH)","C (MALFORMED_ADDRESS_MALFORMED_ZIP)","S (NOT_SUPPORTED)","G (NOT_AVS_PARTICIPANT)","I (NOT_VERIFIED)","U (NO_DATA_FROM_ISSUER)","R (RETRY)","2 (AMEX_NAME_ADDRESS_ZIP)","3 (AMEX_NAME_ADDRESS)","1 (AMEX_NAME_ZIP)","4 (AMEX_NAME)","6 (AMEX_ADDRESS_ZIP)","7 (AMEX_ADDRESS)","5 (AMEX_ZIP)","8 (AMEX_NO_MATCH)"]},"cvv_response":{"type":"string","description":"For credit card payments CVV result code when applicable","enum":["M (MATCH)","N (NO_MATCH)","P (NOT_PROCESSED)","S (NOT_PRESENT)","U (NOT_CERTIFIED)"]},"gateway_response":{"type":"object","description":"Raw data returned by underlying gateway"},"fx_amount_cents":{"type":"integer","description":"When FX is involved, the amount in cents after conversion by the gateway. Not returned if no FX occurred."},"fx_rate":{"type":"string","description":"When FX is involved, the exchange rate applied by the gateway. Not returned if no FX occurred."},"credit_card":{"type":"object","description":"For credit card payments, raw data returned by underlying gateway","properties":{"token":{"type":"string","description":"Low level token representing the vaulted credit card"}}},"credit_card_bin":{"type":"string","description":"When available, the first six digits of the credit card that identify its brand and issuer"},"credit_card_masked_number":{"type":"string","description":"The credit card number, with all but the last 4 digits replaced with a mask character. Used to verify the last 4 digits and card number length."},"credit_card_brand":{"type":"string","description":"The credit card brand","enum":["master","visa","american_express","discover"]},"credit_card_expiry":{"type":"string","description":"Expiration date string for the credit card, in MMYYYY format"},"bank_account":{"type":"object","description":"For ACH payments, raw data returned by underlying gateway","properties":{"token":{"type":"string","description":"Low level token representing the vaulted credit card"}}},"bank_account_masked_number":{"type":"string","description":"The bank account number, with all but the last 4 digits replaced with a mask character"},"bank_account_routing":{"type":"string","description":"For US bank accounts, the bank routing number"},"bank_account_type":{"type":"string","description":"For US bank accounts, whether the account is a checking or savings account","enum":["checking","savings"]},"bank_account_check_type":{"type":"string","description":"For US bank accounts, whether the account is personal or business","enum":["personal","business"]},"gift_card":{"type":"object","description":"For gift card payments, raw data returned by underlying gateway","properties":{"token":{"type":"string","description":"Low level token representing the vaulted gift card"}}},"terminal":{"type":"object","description":"For CP EMV terminal payments, raw data returned by underlying gateway","properties":{"token":{"type":"string","description":"Low level token representing the vaulted terminal card"}}},"orders":{"type":"array","description":"The order associated with this transaction, if any, for reference detail only","items":{"$ref":"#/components/schemas/SummaryOrderReference"}},"payments":{"type":"array","description":"Any C-AR invoicing payments associated with this transaction, if any, for reference detail only","items":{"$ref":"#/components/schemas/SummaryPaymentReference"}}},"example":{"token":"1TQ7L54E5L9R","amount_in_cents":100,"message":null,"link_url":null,"type":"transaction","transaction_type":"request_money","email":"customer+abcmedia@versapay.com","state":"completed","transaction_reference":null,"unique_reference":null,"from_account":"avscvv2b Test","to_account":"ABC Media","process_on":null,"created_by_user":"zoM2xjrzczmgbbGhfHFh","auto_withdraw":false,"auto_withdrawal_token":null,"action":"verify","payment_method":"credit_card","settlement_token":"MAY7USR7KABC","currency":"usd","step_types":["TransactionSteps::CardVerifyStep"],"wallet":"2JN6JSR7IBML","credit_card":"CC9DIRFZE61U","authorization_response":"APPROVAL","avs_response":"A","cvv_response":"N","approved_amount_cents":100,"gateway_response":{"token":"msjhrhcfbily","gateway_token":"39052","authorization_response":"APPROVAL","avs_response":"A","cvv_response":"N","gateway_response":{"response":{"authentication":{"responsestatus":"success","sessionid":"DH6rQ0CRxuScK9ZDJjcuhXBodyadb^ae"},"content":{"refname":"90144","update":[{"customer":{"refname":"customer","responsestatus":"failure","errors":{"error":{"number":"102.021","description":"name is invalid"}}}},{"contact":{"refname":"contact","responsestatus":"failure","errors":{"error":{"number":"102.021","description":"name is invalid"}}}}],"create":[{"customer":{"refname":"customer","responsestatus":"success","id":"10485","name":"avs_cvv2b Test"}},{"contact":{"refname":"contact","responsestatus":"success","id":"11611"}},{"salesdocument":{"refname":"invoice","responsestatus":"success","id":"34054"}},{"transaction":{"refname":"0d18e9e7-f7f6-4ee8-a1f9-6a78219bca01","responsestatus":"success","authorizationcode":"280278","avsresponse":"A","cvvresponse":"N","authorizationresponse":"APPROVAL","id":"39052","hash":"######1111","cardtype.name":"Visa","accountholder":"avs_cvv2b Test","amount":"0.00","account.id":"2013","token":"c500f04b-a61c-44bd-be03-2c3a423cbbaf"}}]}}},"credit_card":{"token":"c500f04b-a61c-44bd-be03-2c3a423cbbaf"}},"orders":[{"identifier":"1ESZXPKGAJCK","number":"1ESZXPKGAJCK","amount_cents":100}],"payments":[{"identifier":"9U4PK6D11H3D","display_identifier":"9U4PK6D11H3D","amount_cents":100}]}},"Order":{"properties":{"watermark":{"$ref":"#/components/schemas/Watermark","description":"This cannot be an imported attribute, the import will fail"},"identifier":{"type":"string","description":"order identifier, this may be imported or if not provided it will be generated by cds"},"number":{"type":"string","description":"Order number, may be unique within supplier., supplied by client."},"currency":{"type":"string","description":"Currency code, based on ISO-4217. E.g. `CAD`, `USD`, `AUD`"},"amount_cents":{"type":"integer","description":"amount of order in cents."},"date":{"type":"string","description":"order date"},"billing_name":{"type":"string","description":"The billing addressee"},"billing_address":{"type":"string","description":"The first line of the billing street address"},"billing_address2":{"type":"string","description":"The second line of the billing street address"},"billing_city":{"type":"string","description":"The billing city"},"billing_country":{"type":"string","description":"The 3-character alphabetic ISO billing country code"},"billing_email":{"type":"string","description":"The billing email address associated with the addressee"},"billing_telephone":{"type":"string","description":"The billing phone number associated with the addressee"},"billing_postalcode":{"type":"string","description":"The billing post code or ZIP code"},"billing_state_province":{"type":"string","description":"The billing state or province"},"shipping_name":{"type":"string","description":"The shipping addressee"},"shipping_address":{"type":"string","description":"The first line of the shipping street address"},"shipping_address2":{"type":"string","description":"The second line of the shipping street address"},"shipping_city":{"type":"string","description":"The shipping city"},"shipping_country":{"type":"string","description":"The 3-character alphabetic ISO shipping country code"},"shipping_email":{"type":"string","description":"The shipping email address associated with the addressee"},"shipping_telephone":{"type":"string","description":"The shipping phone number associated with the addressee"},"shipping_postalcode":{"type":"string","description":"The shipping post code or ZIP code"},"shipping_state_province":{"type":"string","description":"The shipping state or province"},"customer_identifier":{"type":"string","description":"customer identifier, if it was imported"},"draft":{"type":"boolean","description":"if true order is a draft else can be published"},"settlement_token":{"type":"string","description":"A settlement token reference (see whoami response structure) representing the merchant/bank processor configuration that should be used for transaction settlement.","example":"MA123XYZABCD"},"attributes":{"type":"object","properties":{},"description":"array of key pair items."},"L3_po_number":{"type":"string","description":"Purchase order number.","example":"PO12345"},"L3_tax":{"type":"string","description":"Total tax amount.","example":"5.00"},"L3_duty":{"type":"string","description":"Duty amount (if applicable).","example":"2.00"},"L3_shipping":{"type":"string","description":"Shipping amount.","example":"1.50"},"L3_ship_from_zip":{"type":"string","description":"Origin ZIP code.","example":"90210"},"L3_ship_from_country":{"type":"string","description":"Origin country code (ISO-2).","example":"US"},"order_items":{"type":"array","items":{"$ref":"#/components/schemas/OrderItem"}},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/OrderTransaction"}}},"example":{"watermark":1,"identifier":"ABCDF","number":"sh763-h3454-dh3432","amount_cents":20000,"currency":"cad","date":"2020-11-01","shipping_name":"Acme Inc.","shipping_address":"123 First Lane","shipping_address2":"Suite 600","shipping_city":"New York","shipping_state_province":"NY","shipping_country":"USA","shipping_email":"acme@gmail.com","shipping_telephone":"555-555-5555","shipping_postalcode":"90210","billing_name":"Acme Inc.","billing_address":"123 First Lane","billing_address2":"Suite 600","billing_city":"New York","billing_state_province":"NY","billing_country":"USA","billing_email":"acme@gmail.com","billing_telephone":"555-555-5555","billing_postalcode":"90210","order_att1":"att1value1","order_att2":"att1value2","customer_identifier":"123","draft":false,"order_items":[{"number":"1","amount_cents":10000,"description":"description","product_code":"product_code","category":"category","quantity":1,"unit_cost_cents":10000,"tax_amount_cents":100,"discount_amount_cents":0,"orderitem_attr1":"1111111","orderitem2_attr2":"222222"},{"number":"2","amount_cents":20000,"description":"description","product_code":"product_code","category":"category","quantity":1,"unit_cost_cents":20000,"tax_amount_cents":200,"discount_amount_cents":0,"orderitem_attr1":"32222222","orderitem2_attr2":"422222"}],"transactions":[]}},"ResponseCode":{"type":"object","properties":{"code":{"type":"string","example":100},"description":{"type":"string","example":"Approved"}}},"ResponseCountryCodes":{"type":"object","properties":{"countries":{"type":"object","description":"Mapping of country codes (ISO alpha-2) to country names","additionalProperties":{"type":"string","example":"Canada"},"example":{"CA":"Canada","US":"United States","AU":"Australia","AF":"Afghanistan","AX":"Åland Islands"}},"provinces":{"type":"object","description":"Mapping of country codes to a list of provinces/states codes and names","additionalProperties":{"type":"array","items":{"type":"object","additionalProperties":{"type":"string"},"example":{"NSW":"New South Wales"}},"example":[{"ACT":"Australian Capital Territory"},{"NSW":"New South Wales"},{"VIC":"Victoria"}]},"example":{"CA":[{"ON":"Ontario"},{"QC":"Quebec"}],"US":[{"CA":"California"},{"NY":"New York"},{"TX":"Texas"}],"AU":[{"ACT":"Australian Capital Territory"},{"NSW":"New South Wales"},{"VIC":"Victoria"}]}}}},"BankIdentificationNumber":{"type":"string","maxLength":8,"minLength":6,"pattern":"^\\d{6,8}$","example":"411111"},"BankCardType":{"type":"string","example":"CREDIT"},"CountryAlpha3Code":{"type":"string","pattern":"^[A-Z]{3}$","example":"USA","maxLength":3,"minLength":3,"description":"The uppercase 3-character ISO country code"},"BankCardCategory":{"type":"string","example":"PREPAID"},"BankCardBrand":{"type":"string","example":"VISA"},"BankName":{"type":"string","example":"BANK OF VERSAPAY"},"BIN":{"type":"object","properties":{"url":{"$ref":"#/components/schemas/URL"},"bin":{"$ref":"#/components/schemas/BankIdentificationNumber"},"phone":{"$ref":"#/components/schemas/Phone"},"type":{"$ref":"#/components/schemas/BankCardType"},"country":{"$ref":"#/components/schemas/CountryAlpha3Code"},"category":{"$ref":"#/components/schemas/BankCardCategory"},"brand":{"$ref":"#/components/schemas/BankCardBrand"},"bank":{"$ref":"#/components/schemas/BankName"}}},"CreditCard":{"type":"object","properties":{"token":{"type":"string","description":"Fund token identifying the credit card","example":"CC54QRN1CLDX"},"gateway_token":{"type":"string","description":"Vault token representing the underlying secured/tokenized primary account number (PAN)"},"cardholder":{"type":"string"},"card_number":{"type":"string","description":"Display name of payment method"},"display_name":{"type":"string","description":"Display name of payment method"},"nickname":{"type":"string"},"expiry_month":{"type":"integer"},"expiry_year":{"type":"integer"},"is_debit":{"type":"boolean"},"is_default":{"type":"boolean","description":"Indicates if this payment method is a wallet default (used by ERP only supplier integrations)"},"is_single_use":{"type":"boolean","description":"Indicates if this payment method is eligible for single use (used by ERP only supplier integrations)"},"brand":{"type":"string"},"created":{"type":"string","format":"date-time"},"locked":{"type":"boolean","description":"Indicates if the payment method is visible but locked from being used"},"inactive":{"type":"boolean","description":"Indicates if the payment method is deleted"},"last_transaction_date":{"type":"string","format":"date-time"},"last_transaction":{"type":"string","description":"Transaction token of the last payment transaction made with this payment method"},"last_payment":{"type":"string","description":"Payment identifier of the last payment transaction made with this payment method"},"address":{"$ref":"#/components/schemas/Address"}}},"BankAccount":{"type":"object","properties":{"currency":{"type":"string","enum":["usd","gbp","eur","cad","aud"]},"business_name":{"description":"Name of account holder.","type":"string","example":"John Doe"},"country":{"description":"CA (default), US, AU","type":"string","example":"CA"},"account_number":{"description":"Bank account number.","type":"string","example":"10101234"},"account_type":{"description":"checking or savings, defaults checking (required country = US)","type":"string","example":"checking"},"institution_number":{"description":"Financial institution number (required country = CA).","type":"string","example":"001"},"branch_number":{"description":"Financial institution branch/transit (required country = CA).","type":"string","example":"03662"},"routing_number":{"description":"Financial institution branch/location (required country = US, AU).","type":"string","example":""},"token":{"type":"string","description":"the bank account token"},"nickname":{"type":"string","description":"optional value that describes the bank account"},"masked_account_number":{"type":"string","description":"a masked version of the account number"},"routing_account_hash_function":{"type":"string","description":"the hash function used to mask the routing number and account number"},"routing_account_hash":{"type":"string","description":"the hash value used to mask the routing number and account number."},"address":{"type":"object","properties":{"address_1":{"type":"string"},"city":{"type":"string"},"province":{"type":"string","description":"US state or CA province code"},"postal_code":{"type":"string","description":"US zip code or CA postal code"},"country":{"type":"string","enum":["US","CA"]}}}}},"ContactReference":{"type":"object","properties":{"email":{"type":"string"}}},"CustomerReference":{"type":"object","properties":{"identifier":{"type":"string","description":"Customer number, must be unique within supplier. Alphanumeric.","example":"C1234"},"contacts":{"type":"array","items":{"$ref":"#/components/schemas/ContactReference"}}}},"Wallet":{"type":"object","properties":{"token":{"type":"string","description":"Token identifying the wallet","example":"77A81025AC3A"},"credit_cards":{"description":"Credit card payment methods in wallet","type":"array","items":{"$ref":"#/components/schemas/CreditCard"}},"bank_accounts":{"description":"Bank account payment methods in wallet","type":"array","items":{"$ref":"#/components/schemas/BankAccount"}},"customers":{"description":"Invoicing customers associated linked/using this wallet","type":"array","items":{"$ref":"#/components/schemas/CustomerReference"}}}},"WalletCustomer":{"type":"object","description":"Invoicing customer reference","required":["identifier"],"properties":{"identifier":{"type":"string","description":"Customer number, must be unique within supplier. Alphanumeric.","example":"C1234"},"name":{"type":"string","description":"Customer name.","example":"Acme Inc."}}},"WalletContact":{"type":"object","description":"Billing contact","required":["email"],"properties":{"email":{"type":"string","description":"Email address"},"first_name":{"type":"string"},"last_name":{"type":"string"}}},"WalletCreditCard":{"type":"object","description":"Alternative to fund_token, a credit card object or token reference to an existing credit card","required":["name","expiry_month","expiry_year","card_number","cvv","address"],"properties":{"name":{"type":"string","description":"Cardholder name"},"expiry_month":{"type":"string","description":"2 digit month"},"expiry_year":{"type":"string","description":"4 digit year"},"card_number":{"type":"string","description":"Credit card number"},"cvv":{"type":"string"},"locked":{"type":"boolean"},"nickname":{"type":"string"},"is_default":{"type":"boolean","description":"Indicates if this payment method is a wallet default (used by ERP only supplier integrations)"},"is_single_use":{"type":"boolean","description":"Indicates if this payment method is eligible for single use (used by ERP only supplier integrations)"},"address":{"type":"object","properties":{"address_1":{"type":"string"},"city":{"type":"string"},"province":{"type":"string","description":"US state or CA province code"},"postal_code":{"type":"string","description":"US zip code or CA postal code"},"country":{"type":"string","enum":["US","CA"]}}}}},"WalletBankAccount":{"type":"object","description":"Alternative to fund_token, a bank account object or token reference to an existing credit card","required":["currency","account_type","account_holder","account_number","routing_number","institution_number","branch_number","check_type","address"],"properties":{"currency":{"type":"string","enum":["USD","CAD","AUD","EUR","GBP"]},"account_type":{"type":"string","enum":["checking","savings"]},"account_holder":{"type":"string","description":"Account holder name"},"account_number":{"type":"string","description":"Bank account number"},"routing_number":{"type":"string","description":"For non-CA financial institutions, ABA/bank routing number"},"institution_number":{"type":"string","description":"For CA financial institutions, 3 digit institution code"},"branch_number":{"type":"string","description":"For CA financial institutions, transit/branch number"},"check_type":{"type":"string","enum":["personal","business"]},"external_name":{"type":"string"},"external_number":{"type":"string"},"locked":{"type":"boolean"},"nickname":{"type":"string"},"is_default":{"type":"boolean","description":"Indicates if this payment method is a wallet default (used by ERP only supplier integrations)"},"is_single_use":{"type":"boolean","description":"Indicates if this payment method is eligible for single use (used by ERP only supplier integrations)"},"address":{"type":"object","properties":{"address_1":{"type":"string"},"city":{"type":"string"},"province":{"type":"string","description":"US state or CA province code"},"postal_code":{"type":"string","description":"US zip code or CA postal code"},"country":{"type":"string","enum":["US","CA"]}}}}},"WalletRequest":{"type":"object","properties":{"customer":{"$ref":"#/components/schemas/WalletCustomer"},"contact":{"$ref":"#/components/schemas/WalletContact"},"credit_card":{"$ref":"#/components/schemas/WalletCreditCard"},"bank_account":{"$ref":"#/components/schemas/WalletBankAccount"}}},"WalletResponse":{"type":"object","properties":{"wallet_token":{"type":"string","description":"The token representing the wallet."},"fund_token":{"type":"string","nullable":true,"description":"The token representing the fund, if a payment method was added."},"wallets":{"type":"array","description":"List of wallets.","items":{"$ref":"#/components/schemas/Wallet"}}}},"WalletPaymentMethodRequest":{"type":"object","properties":{"credit_card":{"$ref":"#/components/schemas/WalletCreditCard"},"bank_account":{"$ref":"#/components/schemas/WalletBankAccount"}}},"WalletCreditCardPatch":{"type":"object","description":"Alternative to fund_token, a credit card object or token reference to an existing credit card","properties":{"name":{"type":"string","description":"Cardholder name"},"expiry_month":{"type":"string","description":"2 digit month"},"expiry_year":{"type":"string","description":"4 digit year"},"cvv":{"type":"string"},"locked":{"type":"boolean"},"nickname":{"type":"string"},"is_default":{"type":"boolean","description":"Indicates if this payment method is a wallet default (used by ERP only supplier integrations)"},"is_single_use":{"type":"boolean","description":"Indicates if this payment method is eligible for single use (used by ERP only supplier integrations)"},"address":{"type":"object","properties":{"address_1":{"type":"string"},"city":{"type":"string"},"province":{"type":"string","description":"US state or CA province code"},"postal_code":{"type":"string","description":"US zip code or CA postal code"},"country":{"type":"string","enum":["US","CA"]}}}}},"WalletBankAccountPatch":{"type":"object","description":"Alternative to fund_token, a bank account object or token reference to an existing credit card","properties":{"account_type":{"type":"string","enum":["checking","savings"]},"account_holder":{"type":"string","description":"Account holder name"},"check_type":{"type":"string","enum":["personal","business"]},"external_name":{"type":"string"},"external_number":{"type":"string"},"locked":{"type":"boolean"},"nickname":{"type":"string"},"is_default":{"type":"boolean","description":"Indicates if this payment method is a wallet default (used by ERP only supplier integrations)"},"is_single_use":{"type":"boolean","description":"Indicates if this payment method is eligible for single use (used by ERP only supplier integrations)"},"address":{"type":"object","properties":{"address_1":{"type":"string"},"city":{"type":"string"},"province":{"type":"string","description":"US state or CA province code"},"postal_code":{"type":"string","description":"US zip code or CA postal code"},"country":{"type":"string","enum":["US","CA"]}}}}},"WalletPaymentMethodPatch":{"type":"object","properties":{"credit_card":{"$ref":"#/components/schemas/WalletCreditCardPatch"},"bank_account":{"$ref":"#/components/schemas/WalletBankAccountPatch"}}},"OrderTransactionRequest":{"type":"object","properties":{"order":{"type":"object","description":"An order object or a token reference to an existing order"},"contact":{"$ref":"#/components/schemas/WalletContact"},"fund_token":{"type":"string","description":"A token reference to an existing fund (either credit card or bank account)"},"fee_exempt":{"type":"boolean","description":"True indicates that any fee related surcharging should be ignored even if the underlying merchant account is configured as such, false inherits any configured fee related behaviour"},"transaction_reference":{"type":"string","nullable":true,"description":"Extra useful data to help link transactions to other systems e.g. PO numbers, account numbers etc."},"device":{"type":"string","description":"Optional device name depending on gateway boarding & configuration"},"industry":{"type":"string","description":"Optional, if not provided defaults to value specified in gateway/account configuration","enum":["directmarketing","ecommerce","lodging","restaurant","autorental","retail"]},"sec_code":{"type":"string","description":"Optional, for ACH bank transactions, standard entry class code (if not provided defaults to value specified on payment acceptance config; otherwise defaults to PPD if transaction from bank account check_type is personal & CCD if check_type is business)","enum":["CCD","PPD","WEB","POP","TEL"]},"credit_card":{"$ref":"#/components/schemas/WalletCreditCard"},"bank_account":{"$ref":"#/components/schemas/WalletBankAccount"},"gift_card":{"type":"object","description":"Alternative to fund_token, a gift card","properties":{"expiry_month":{"type":"string","description":"2 digit month"},"expiry_year":{"type":"string","description":"4 digit year"},"card_number":{"type":"string","description":"Gift card number"},"pin":{"type":"string"}}}}},"OrderTransactionResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"true|false"},"transaction":{"type":"string","description":"Token referencing this transaction (used for void/refund)"},"order":{"type":"string","description":"Token representing the order"},"wallet":{"type":"string","description":"Token representing the wallet holding the payment method"},"credit_card":{"type":"string","description":"Token representing the payment method"},"bank_account":{"type":"string","description":"Token representing the payment method"},"gift_card":{"type":"string","description":"Token representing the payment method"},"transactions":{"type":"array","items":{"$ref":"#/components/schemas/OrderTransaction"}}},"example":{"success":true,"transaction":"1TQ7L54E5L9R","order":"53HP8ILUK3E8","wallet":"2JN6JSR7IBML","credit_card":"CC9DIRFZE61U","transactions":[{"token":"1TQ7L54E5L9R","amount_in_cents":100,"message":null,"link_url":null,"type":"transaction","transaction_type":"request_money","email":"customer+abcmedia@versapay.com","state":"completed","transaction_reference":null,"unique_reference":null,"from_account":"avscvv2b Test","to_account":"ABC Media","process_on":null,"created_by_user":"zoM2xjrzczmgbbGhfHFh","auto_withdraw":false,"auto_withdrawal_token":null,"action":"verify","payment_method":"credit_card","settlement_token":"MAY7USR7KABC","currency":"usd","step_types":["TransactionSteps::CardVerifyStep"],"wallet":"2JN6JSR7IBML","credit_card":"CC9DIRFZE61U","authorization_response":"APPROVAL","avs_response":"A","cvv_response":"N","approved_amount_cents":100,"gateway_response":{"token":"msjhrhcfbily","gateway_token":"39052","authorization_response":"APPROVAL","avs_response":"A","cvv_response":"N","gateway_response":{"response":{"authentication":{"responsestatus":"success","sessionid":"DH6rQ0CRxuScK9ZDJjcuhXBodyadb^ae"},"content":{"refname":"90144","update":[{"customer":{"refname":"customer","responsestatus":"failure","errors":{"error":{"number":"102.021","description":"name is invalid"}}}},{"contact":{"refname":"contact","responsestatus":"failure","errors":{"error":{"number":"102.021","description":"name is invalid"}}}}],"create":[{"customer":{"refname":"customer","responsestatus":"success","id":"10485","name":"avs_cvv2b Test"}},{"contact":{"refname":"contact","responsestatus":"success","id":"11611"}},{"salesdocument":{"refname":"invoice","responsestatus":"success","id":"34054"}},{"transaction":{"refname":"0d18e9e7-f7f6-4ee8-a1f9-6a78219bca01","responsestatus":"success","authorizationcode":"280278","avsresponse":"A","cvvresponse":"N","authorizationresponse":"APPROVAL","id":"39052","hash":"######1111","cardtype.name":"Visa","accountholder":"avs_cvv2b Test","amount":"0.00","account.id":"2013","token":"c500f04b-a61c-44bd-be03-2c3a423cbbaf"}}]}}},"credit_card":{"token":"qw288x8dmx00"}}}]}},"UnifiedResponse":{"type":"object"},"TerminalRequest":{"type":"object","properties":{"laneid":{"type":"string","description":"Pre-configured lane identifier"},"command":{"type":"string","description":"Supported terminal command","enum":["DeviceSetup","RequestSignature","Cancel","DeviceStatus"]}},"example":{"laneid":"1","command":"DeviceSetup"}},"TerminalResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"true|false"}},"example":{"success":true}},"GiftCardRequest":{"type":"object","properties":{"card_number":{"type":"string","description":"Gift card number"},"expiry_month":{"type":"string","description":"2 digit month"},"expiry_year":{"type":"string","description":"4 digit year"},"pin":{"type":"string","description":"Gift card pin"},"activated":{"type":"string","enum":["true","false"],"description":"When `activated` is provided and `\"true\"` the gift card is activated, and deactivated when `\"false\"`. When `activated` is not provided the activation status is unchanged."},"load_amount_cents":{"type":"integer","description":"Amount in cents to load/add on to existing gift card balance."}}},"GiftCardResponse":{"type":"object","properties":{"success":{"type":"boolean","description":"true|false"}},"example":{"success":true}},"GiftCardReadRequest":{"type":"object","properties":{"card_number":{"type":"string","description":"Gift card number"},"expiry_month":{"type":"string","description":"2 digit month"},"expiry_year":{"type":"string","description":"4 digit year"},"pin":{"type":"string","description":"Gift card pin"}}},"GiftCardReadResponse":{"type":"object","properties":{"id":{"type":"integer","description":"Gift card id"},"token":{"type":"string","description":"Tokenized gift card number that (can be used for order sale transactions instead of card_number)"},"balance":{"type":"integer","description":"Remaining gift card balance"},"activated":{"type":"boolean","description":"true|false"},"created_at":{"type":"string","format":"date","description":"Created timestamp MM/D/YYYY HH:MM:SS AM."},"expires_at":{"type":"string","format":"date","description":"Expiry timestamp MM/D/YYYY HH:MM:SS AM."}},"example":{"id":"66","token":"04bfe04a-80aa-4779-8388-59396afdfdf7","balance":777,"activated":false,"created_at":"11/3/2021 12:00:00 AM","expires_at":"12/1/2049 12:00:00 AM"}},"FundSource":{"type":"object","properties":{"type":{"type":"string","description":"Type of fund:\n * `bank_account` - Bank Account\n * `credit_card` - Credit Card\n * `balance` - Versapay Account\n","enum":["bank_account","credit_card","balance"]},"token":{"type":"string","description":"Fund's unique identifier used to identify fund when using other API calls."},"name":{"type":"string","description":"Masked display name of the fund source."},"state":{"type":"string","enum":["verified","unverified","invalid"],"description":"Returned for bank accounts only."}}},"VaultResponse":{"type":"object","properties":{"type":{"type":"string","description":""},"token":{"type":"string","description":"Token of the funding source which can be used as fund_token when creating a transaction, see 'Create Transactions'."},"name":{"type":"string","description":"Display name of funding source."},"state":{"type":"string","description":""}},"example":{"token":"79VMZNLXCBL9","name":"TD Canada Trust (1234)","type":"bank_account"}},"TransactionResponse":{"type":"object","properties":{"token":{"type":"string","description":"The transaction identifier."},"amount_in_cents":{"type":"integer","description":"Transaction amount in cents."},"email":{"type":"string","description":"Recipient email address."},"message":{"type":"string","description":"A message describing the transaction."},"state":{"type":"string","enum":["new","wait_for_claim","wait_for_request_approval","wait_for_bank_account_verification","rejected","in_progress","error","nsfed","cancelled","completed","completed_but_nsfed"],"description":"Transactions current state, see Transaction Lifecycle."},"from_account":{"type":"string","description":"Name of the originating account."},"to_account":{"type":"string","description":"Name of the recipient account."},"from_fund":{"type":"string","description":"Name of the balance or bank account used when **transaction_type** is 'send' or 'direct_credit'.\n"},"to_fund":{"type":"string","description":"Name of the destination balance or bank account when **transaction_type** is 'request' or 'direct_debit'.\n"},"currency":{"type":"string","description":"Currency code, based on ISO-4217. E.g. `CAD`, `USD`, `AUD`"},"payment_method":{"type":"string","enum":["credit_card","bank_account","gift_card","pos_terminal"]},"settlement_token":{"type":"string","description":"Token corresponding to the to_fund settlement routing/processor profile as enumerated in whoami eg bank transfer processor for ACH/EFT, merchant account for CC, gift card processor, pos/terminal processor"},"transaction_reference":{"type":"string","nullable":true,"description":"Reference value associated with the transaction."},"unique_reference":{"type":"string","description":"Similar to transaction_reference, except it must be unique. Can be used as a duplicate transaction check."},"link_url":{"type":"string","description":"A specified url associated with transaction."},"process_on":{"type":"string","description":"The YYYY-MM-DD date when this transaction will be started."},"created_by_user":{"type":"string","format":"uuid"},"auto_withdraw":{"type":"boolean","description":"If `true` then the transaction will be auto withdrawn the night of completion.\n"},"auto_withdrawal_token":{"type":"string"}},"example":{"token":"79VMZNLXCBL9","amount_in_cents":15000,"message":"Thank you for doing business","link_url":"http://a.link.to/your/invoice","type":"transaction","transaction_type":"send_money","email":"bob.smith@example.com","state":"in_progress","transaction_reference":"Lease 123","unique_reference":null,"from_account":"John Doe","to_account":"Jane Smith","process_on":null,"from_fund":"TD Canada Trust","created_by_user":"Uf6TaxzBMBBT_rXjsrN7"}},"Transaction":{"type":"object","required":["amount_in_cents","email","transaction_type"],"discriminator":{"propertyName":"transaction_type","mapping":{"direct_credit":"./schemas/DirectCreditTransaction","direct_debit":"./schemas/DirectDebitTransaction","request":"./schemas/RequestTransaction","send":"./schemas/SendTransaction"}},"properties":{"transaction_type":{"type":"string"},"amount_in_cents":{"type":"integer","description":"Transaction amount in cents."},"email":{"type":"string","format":"email","description":"Recipient email address."},"message":{"type":"string","description":"A message describing the transaction."},"transaction_reference":{"type":"string","nullable":true,"description":"Extra useful data to help link transactions to other systems e.g. PO numbers, account numbers etc."},"unique_reference":{"type":"string","description":"Similar to transaction_reference, except it must be unique. Can be used as a duplicate transaction check."},"process_on":{"type":"string","format":"date","description":"The date `YYYY-MM-DD` when this transaction should be started."},"auto_withdraw":{"type":"boolean","description":"Set `true` to have transaction auto settle from Versapay balance to the specified bank account the night of completion; `false` to settle directly to Versapay balance. Auto withdraw must be enabled for your account. Only applicable to request and pre_authorized_debit transactions."}},"example":{"transaction_type":"send","amount_in_cents":20000,"email":"bob@example.com","message":"Thank you","transaction_reference":"Order 3487","process_on":"2018-01-05","fund_token":"BA9G329DNFPK"}},"Agreement":{"type":"object","properties":{"token":{"type":"string","description":"The agreement identifier."},"state":{"type":"string","description":"Transaction's current state, see Transaction Lifecycle."},"email":{"type":"string","description":"Recipient email address."},"name":{"type":"string","description":"Recipient name."},"created_by_user":{"type":"string","description":"Name of the user otherwise the API token appears if the transaction was created with the api."},"created_by_account":{"type":"string","description":"Account name of the user otherwise the API token appears if the transaction was created with the api."},"reference":{"type":"string","description":"An optional reference."},"message":{"type":"string","description":"A message describing the agreement."},"rejection_reason":{"type":"string","description":"Message for the creator of an agreement. Set when state is `rejected`.\n"},"type":{"type":"string","description":"Type of agreement - `debit_agreement`.\n"}},"example":{"token":"3TJWJB36M973","state":"pending","name":"John Doe","email":"user@example.com","reference":"Ad 123","message":"Thank you for your business","type":"debit_agreement","created_by_user":"Uf6TaxzBMBBT_rXjsrN7","created_by_account":"Central Media News"}},"AutopayResponse":{"type":"object","properties":{"agreement_token":{"type":"string","description":"The agreement token."},"fund_token":{"type":"string","description":"The funding source token."},"timing":{"type":"string","description":"The payment setup for the autopay config."},"autopay_limit":{"type":"string","description":"Autopay configuration for limit."},"autopay_reference":{"type":"string","description":"The debit agreement reference."},"autopay_inherited_from_customer_identifier":{"type":"string","description":"The customer identifier if the autopay is inherited."},"can_delete":{"type":"boolean","description":"Boolean value to indicate if the cautopay can be deleted via api."}},"example":{"agreement_token":"TOKEN123","fund_token":"TOKEN123","timing":"AutoPay on Due Date","autopay_limit":"None","autopay_reference":"TOKEN123","autopay_inherited_from_customer_identifier":"CUST123","can_delete":true}},"AutopayCreated":{"type":"object","properties":{"token":{"type":"string","description":"The agreement token."}},"example":{"token":"TOKEN123"}},"Contact":{"type":"object","required":["email"],"properties":{"email":{"type":"string","description":"Email address of the contact.","format":"email"},"first_name":{"type":"string","description":"First name of the contact."},"last_name":{"type":"string","description":"Last name of the contact."},"title":{"type":"string","description":"Title of the contact."},"department":{"type":"string","description":"Department of the contact."},"telephone":{"type":"string","description":"Phone number of the contact."},"bulk_activate":{"type":"boolean","description":"If this is `true`, the contact is activated or invited (depending on the account configuration) on import.","default":false}}},"Customer":{"type":"object","required":["identifier","name"],"properties":{"identifier":{"type":"string","description":"Customer number, must be unique within supplier. Alphanumeric.","example":"C1234"},"display_number":{"type":"string","description":"Customer display number, Alphanumeric.","example":"DispNum1234"},"name":{"type":"string","description":"Customer name.","example":"Acme Inc."},"email":{"type":"string","format":"email","description":"Email address of the default contact.","example":"bob.smith@example.com"},"first_name":{"type":"string","description":"First name of the default contact.","example":"Bob"},"last_name":{"type":"string","description":"Last name of the default contact.","example":"Smith"},"notes":{"type":"string","description":"Optional text field up to 64K.","example":"Payment terms will be revised next year."},"address_1":{"type":"string","description":"Billing address line 1.","example":"200 Main Street"},"address_2":{"type":"string","description":"Billing address line 2.","example":"Suite 250"},"city":{"type":"string","description":"Billing address - city.","example":"Toronto"},"province":{"type":"string","description":"Billing address - state or province.","example":"ON"},"postal_code":{"type":"string","description":"Billing address - zip or postal code.","example":"M5M 5M5"},"country":{"type":"string","description":"Billing address - country.","example":"CA"},"telephone":{"type":"string","description":"Customer phone number.","example":"(416) 123-4567"},"fax":{"type":"string","description":"Customer fax number.","example":"(416) 100-1020"},"url":{"type":"string","format":"uri","description":"Customer web site.","example":"www.acmeinc.com"},"business_number":{"type":"string","description":"Customer EIN or Business Number. 20-character alphanumeric.","example":"GS324587987"},"locale":{"type":"string","description":"Customer language, based on ISO 639-1 standard.","enum":["en","fr","es"]},"parent_identifier":{"type":"string","description":"Required if the customer is part of a hierarchy, and this customer has a level (parent) above it. This is the identifier of the customer immediately above this customer in the tree.","example":"P3212"},"pdf_attachment_opt_in":{"type":"boolean","description":"If `true`, the customer will receive PDFs of invoices and attachments with all invoice notifications.","default":false},"account_status":{"type":"string","description":"The status of the customer's account with the supplier.","enum":["open","closed"],"default":"open"},"last_contact_date":{"type":"string","format":"date","description":"The last time the customer was contacted. It is ignored if the customer already has a last contact date and it is more recent than this one.","example":"2017-12-04"},"next_contact_date":{"type":"string","format":"date","description":"The date of the next planned contact with the customer. This always overwrites what is on the customer.","example":"2018-02-15"},"credit_limit_cents":{"type":"integer","description":"The customer's credit limit. This is the maximum value of outstanding invoices before the supplier is alerted, if supplier is configured to monitor this. If the customer is a multi-currency customer, this is the total credit limit converted to a single currency (see next field.)","example":"2000000"},"credit_limit_currency":{"type":"string","description":"Currency of the credit limit. If blank, defaults to the currency of the majority of the customer's invoices. If there are no invoices, defaults to the supplier’s default currency.","example":"CAD"},"credit_rating":{"type":"string","description":"Credit rating for the customer.","example":"AA"},"terms_type":{"type":"string","description":"This field and `terms_value` specify how to set a customer's due date.","enum":["date","day"]},"terms_value":{"type":"integer","description":"This field and `terms_type` specify how to set a customer's invoice due date.\n\nIf terms_type is 'day':\n\n* It means the due date should be days after invoice date.\n* E.g. if terms_value is 30, the due date must be 30 days after the invoice date.\n* It must be a whole number between 0 and 100.\n\nIf terms_type is 'date':\n\n* It means the due date is on a fixed day (terms_value) of the month.\n* E.g. if terms_value is 15, it means the due date should be on the 15th of the month after invoice date.\n* It must be an integer between 1 and 27 inclusive, or -1 to specify the last day of the month, or -2 to specify the second-last day of the month.\n","example":15},"company_bio":{"type":"string","description":"Short description of products and services that the customer offers.","example":"Acme Inc. sells cutting-edge widgets."},"ignores_cc_payment_rules":{"type":"boolean","description":"If this is `true`, it means that the customer is not subject to any credit card payment rules, and is free to use credit cards any time.","default":false,"example":"false"},"notification_suppressed":{"type":"boolean","description":"If this is `true`, all notifications to the customer are suppressed.","default":false,"example":"false"},"tags":{"type":"string","description":"One or more tags separated by semi-colons.","example":"Blue;Green;Yellow"},"external_id":{"type":"string","description":"External (ERP-based) identifier for the customer record."},"external_group_identifier":{"type":"string","description":"External (ERP-based) identifier used to control customer grouping.\n\nIf the supplier is configured for restricted grouping, the system will not permit a user to group customers together that have different values for `external_group_identifier`.\n\nIf the supplier is not configured for restricted grouping, this value is saved but ignored.\n"},"replace_contacts":{"type":"boolean","description":"When `true` for a customer that is re-imported any contacts in the payload that are also in the DB will be updated if they are not signed-up users, and any contacts in the DB that were created by the supplier and are not in the payload will be deleted if not signed up, otherwise they will be disabled.","default":false},"line_item_attributes":{"type":"array","items":{"$ref":"#/components/schemas/Contact"},"example":[{"email":"jane.smith@example.com","first_name":"Jane","last_name":"Smith","telephone":"809-888-1234","title":"Buyer"},{"email":"bob.smith@example.com","first_name":"Bob","last_name":"Smith","title":"Manager","department":"Accounts Payable","telephone":"809-345-9833"},{"email":"steve.jobs@example.com","first_name":"Steve","last_name":"Jobs","title":"CEO"}]}}},"CustomerResponse":{"type":"object","properties":{"identifier":{"type":"string","description":"Customer number, unique within supplier.","example":"CUST-001"},"name":{"type":"string","description":"Customer name.","example":"ABC Inc."},"email":{"type":"string","format":"email","description":"Email address of the default contact.","example":"bob.smith@example.com"},"first_name":{"type":"string","description":"First name of the default contact.","example":"Bob"},"last_name":{"type":"string","description":"Last name of the default contact.","example":"Smith"},"notes":{"type":"string","description":"Optional text field up to 64K.","example":"Payment terms will be revised next year."},"address_1":{"type":"string","description":"Billing address line 1.","example":"1 Bay St."},"address_2":{"type":"string","description":"Billing address line 2.","example":"Suite 200"},"city":{"type":"string","description":"Billing address - city.","example":"Toronto"},"province":{"type":"string","description":"Billing address - state or province.","example":"ON"},"postal_code":{"type":"string","description":"Billing address - zip or postal code.","example":"M5M 5M5"},"country":{"type":"string","description":"Billing address - country.","example":"CA"},"telephone":{"type":"string","description":"Customer phone number.","example":"(416) 123-4567"},"fax":{"type":"string","description":"Customer fax number.","example":"(416) 111-2222"},"business_number":{"type":"string","description":"Customer EIN or Business Number. 20-character alphanumeric.","example":"18889990"},"status":{"type":"string","description":"Customer adoption status.","enum":["Not Activated","Activated","Invited","Express","Signed Up","Paying"]},"auto_debit":{"type":"string","description":"`Y`, if customer has set up an AutoPay agreement. `N` otherwise.\n","enum":["Y","N"],"example":"N"},"invite_sent":{"type":"string","format":"date","description":"The date when invite was sent, in YYYY-MM-DD format.","example":"2018-02-23"},"signed_up":{"type":"string","format":"date","description":"The date when customer user signed up, in YYYY-MM-DD format.","example":"2018-02-24"},"notification_suppressed":{"type":"string","description":"`Y`, if notifications are suppressed for the customer. `N` otherwise.\n","enum":["Y","N"]},"notification_override":{"type":"string","description":"`Y`, if overdue balance notifications are made optional for the customer. `N` otherwise.\n","enum":["Y","N"]},"paper_invoices":{"type":"string","description":"`Y`, if customer receives paper invoices. `N` otherwise.\n","enum":["Y","N"]},"balance":{"type":"string","description":"Total outstanding balance on the customer account.
\n\nNote: This field is prefixed with the currency code, for each currency the customer is transacting in (say, `usd_balance`). This applies to suppliers accepting multicurrency payments.\n","example":"$123.45"},"credit":{"type":"string","description":"Total outstanding credit balance on the customer account.
\n\nNote: This field is prefixed with the currency code, for each currency the customer is transacting in (say, `usd_credit`). This applies to suppliers accepting multicurrency payments.\n","example":"-$123.45"},"current":{"type":"string","description":"Current outstanding balance on the customer account.
\n\nNote: This field is prefixed with the currency code, for each currency the customer is transacting in (say, `usd_current`). This applies to suppliers accepting multicurrency payments.\n","example":"$123.45"},"aging":{"type":"string","description":"Total overdue balance on the customer account.
\n\nNote: This field is prefixed with the currency code, for each currency the customer is transacting in (say, `usd_aging`). This applies to suppliers accepting multicurrency payments.\n","example":"$123.45"},"aging_30":{"type":"string","description":"Balance overdue (1-30 days) on the customer account.
\n\nNote: This field is prefixed with the currency code, for each currency the customer is transacting in (say, `usd_aging_30`). This applies to suppliers accepting multicurrency payments.\n","example":"$123.45"},"aging_60":{"type":"string","description":"Balance overdue (31-60 days) on the customer account.
\n\nNote: This field is prefixed with the currency code, for each currency the customer is transacting in (say, `usd_aging_60`). This applies to suppliers accepting multicurrency payments.\n","example":"$123.45"},"aging_90":{"type":"string","description":"Balance overdue (61-90 days) on the customer account.
\n\nNote: This field is prefixed with the currency code, for each currency the customer is transacting in (say, `usd_aging_90`). This applies to suppliers accepting multicurrency payments.\n","example":"$123.45"},"aging_older":{"type":"string","description":"Balance overdue (91+ days) on the customer account.
\n\nNote: This field is prefixed with the currency code, for each currency the customer is transacting in (say, `usd_aging_older`). This applies to suppliers accepting multicurrency payments.\n","example":"$123.45"},"unapplied_payment":{"type":"string","description":"Total unapplied payment on the customer account.
\n\nNote: This field is prefixed with the currency code, for each currency the customer is transacting in (say, `usd_unapplied_payment`). This applies to suppliers accepting multicurrency payments.\n","example":"$123.45"},"monthly_balance_current":{"type":"string","description":"Total outstanding balance of invoices opened this month on the customer account.
\n\nNote: This applies to suppliers configured for monthly balance aging.
\n\nNote: This field is prefixed with the currency code, for each currency the customer is transacting in (say, `usd_monthly_balance_current`). This applies to suppliers accepting multicurrency payments.\n","example":"$123.45"},"monthly_balance_prior_1":{"type":"string","description":"Total outstanding balance of invoices opened 1 month ago on the customer account.
\n\nNote: This applies to suppliers configured for monthly balance aging.
\n\nNote: This field is prefixed with the currency code, for each currency the customer is transacting in (say, `usd_monthly_balance_prior_1`). This applies to suppliers accepting multicurrency payments.\n","example":"$123.45"},"monthly_balance_prior_2":{"type":"string","description":"Total outstanding balance of invoices opened 2 months ago on the customer account.
\n\nNote: This applies to suppliers configured for monthly balance aging.
\n\nNote: This field is prefixed with the currency code, for each currency the customer is transacting in (say, `usd_monthly_balance_prior_2`). This applies to suppliers accepting multicurrency payments.\n","example":"$123.45"},"monthly_balance_prior_3":{"type":"string","description":"Total outstanding balance of invoices opened 3 months ago on the customer account.
\n\nNote: This applies to suppliers configured for monthly balance aging.
\n\nNote: This field is prefixed with the currency code, for each currency the customer is transacting in (say, `usd_monthly_balance_prior_3`). This applies to suppliers accepting multicurrency payments.\n","example":"$123.45"},"monthly_balance_prior_4":{"type":"string","description":"Total outstanding balance of invoices opened 4 months ago on the customer account.
\n\nNote: This applies to suppliers configured for monthly balance aging.
\n\nNote: This field is prefixed with the currency code, for each currency the customer is transacting in (say, `usd_monthly_balance_prior_4`). This applies to suppliers accepting multicurrency payments.\n","example":"$123.45"},"monthly_balance_prior_5":{"type":"string","description":"Total outstanding balance of invoices opened 5 months ago on the customer account.
\n\nNote: This applies to suppliers configured for monthly balance aging.
\n\nNote: This field is prefixed with the currency code, for each currency the customer is transacting in (say, `usd_monthly_balance_prior_5`). This applies to suppliers accepting multicurrency payments.\n","example":"$123.45"},"monthly_balance_older":{"type":"string","description":"Total outstanding balance of invoices opened 6 or more months ago on the customer account.
\n\nNote: This applies to suppliers configured for monthly balance aging.
\n\nNote: This field is prefixed with the currency code, for each currency the customer is transacting in (say, `usd_monthly_balance_older`). This applies to suppliers accepting multicurrency payments.\n","example":"$123.45"},"adp":{"type":"string","description":"Average days to pay.","example":"100"},"adp_arc":{"type":"string","description":"Average days to pay.","example":"100"},"adp_external":{"type":"string","description":"Average days to pay, outside Versapay.","example":"100"},"last_contact_date":{"type":"string","format":"date","description":"The last time the customer was contacted.","example":"2017-12-04"},"next_contact_date":{"type":"string","format":"date","description":"The date of the next planned contact with the customer.","example":"2018-02-15"},"credit_limit":{"type":"string","description":"The customer's credit limit. If the customer is a multi-currency customer, this is the total credit limit converted to a single currency.","example":"$2000.00"},"oldest_open_invoice":{"type":"string","description":"Oldest outstanding invoice number.","example":"INV-00101"},"oldest_open_invoice_age":{"type":"string","description":"Age (in days) of the oldest outstanding invoice.","example":"31"},"oldest_open_invoice_balance":{"type":"string","description":"Balance of the oldest outstanding invoice.","example":"$123.45"},"last_payment_date":{"type":"string","format":"date","description":"Date when the last payment was made, in YYYY-MM-DD format.","example":"2018-01-31"},"last_payment_amount":{"type":"string","description":"Amount of the last payment.","example":"$123.45"},"last_payment_source":{"type":"string","description":"Source of the last payment.","example":"arc","enum":["arc","external","erp","manual"]},"account_status":{"type":"string","description":"The status of the customer's account with the supplier.","enum":["open","closed"]},"tags":{"type":"string","description":"Semi-colon delimited list of tags imported from ERP on the customer account.","example":"Blue;Green;Yellow"},"user_tags":{"type":"string","description":"Semi-colon delimited list of tags assigned via Portal on the customer account.","example":"Gold;Silver;Bronze"},"divisions_names":{"type":"string","description":"Names of divisions the customer belongs to, separated by semi-colons.","example":"North;South;East"},"divisions_codes":{"type":"string","description":"Codes of divisions the customer belongs to, separated by semi-colons.","example":"010;020;050"},"url":{"type":"string","description":"The URL to the customer details page in Collaborative AR.","example":"https://secure.versapay.com/receivables/customers/10917589"},"group_id":{"type":"string","description":"When a value is present, this customer is part of a group. Customers sharing this value are grouped together."},"external_group_identifier":{"type":"string","description":"External (ERP-based) identifier used to control customer grouping."},"display_number":{"type":"string","description":"Customer display number.","example":"CUST-DN-001"},"root_identifier":{"type":"string","description":"The root identifier within the hierarchy if the customer is part of a hierarchy. Otherwise it is the customer identifier itself.","example":"P0900"},"contacts":{"type":"array","description":"Contacts (and/or corresponding signed up user profile information)","items":{"type":"object","properties":{"email":{"type":"string","description":"Email address of the contact.","format":"email"},"first_name":{"type":"string","description":"First name of the contact."},"last_name":{"type":"string","description":"Last name of the contact."},"telephone":{"type":"string","description":"Phone number of the contact."},"title":{"type":"string","description":"Title of the contact."},"department":{"type":"string","description":"Department of the contact."},"activated_at":{"type":"string","format":"date","description":"Date contact was activated"},"invited_at":{"type":"string","format":"date","description":"Date contact was invited for user access"},"login_at":{"type":"string","format":"date","description":"Date user last signed in as user"},"user_first_name":{"type":"string","description":"First name set on associated user profile"},"user_last_name":{"type":"string","description":"Last name set on associated user profile"},"user_role":{"type":"string","description":"Access role for user"},"user_telephone":{"type":"string","description":"Telephone set on associated user profile"},"user_title":{"type":"string","description":"Title set on associated user profile"},"user_department":{"type":"string","description":"Department set on associated user profile"}}}}},"example":{"identifier":"163627","name":"21st Century Media","business_number":"","first_name":"","last_name":"","email":"customer+21st@versapay.com","address_1":"","address_2":"","postal_code":"","city":"","province":"","country":"","telephone":"","fax":"","status":"Signed Up","auto_debit":"N","invite_sent":"2016-03-29","signed_up":"2016-03-29","notification_suppressed":"N","notification_override":"N","paper_invoices":"N","paper_statements":"N","balance":"$26,185.00","credit":"$0.00","current":"$0.00","unapplied_payment":"$0.00","aging":"$26,185.00","aging_30":"$0.00","aging_60":"$0.00","aging_90":"$0.00","aging_older":"$26,185.00","notes":"","parent_identifier":"161803","parent_name":"Digital First Media","parent_email":"customer+dfm@versapay.com","adp":"","adp_arc":"","adp_external":"","last_contact_date":"","next_contact_date":"","credit_limit":"$0.00","oldest_open_invoice":"5557488","oldest_open_invoice_age":"1726","oldest_open_invoice_balance":"$1,325.00","last_payment_date":"","last_payment_amount":"$0.00","last_payment_source":"","account_status":"open","tags":"","user_tags":"A+ Customer;Tester A;91+ $2500+ Test Tag","divisions_names":"","divisions_codes":"","url":"https://secure.versapay.com/receivables/customers/10917589","group_id":"","external_group_identifier":"","credit_card_fee_exempt":"N","auto_update_cc_expiry":"N","cash_on_delivery":"N","watermark":10917589,"root_identifier":"P0900","contacts":[{"email":"customer+21st@versapay.com","first_name":null,"last_name":null,"telephone":null,"title":null,"department":null,"activated_at":"2016-03-29T18:41:19.000Z","invited_at":"2016-03-29T18:41:19.000Z","login_at":"2016-05-19T19:03:07.000Z","user_first_name":null,"user_last_name":null,"user_role":"admin","user_telephone":null,"user_title":null,"user_department":null},{"email":"dteets@21st-centurymedia.com","first_name":null,"last_name":null,"telephone":null,"title":null,"department":null,"activated_at":null,"invited_at":null,"login_at":null,"user_first_name":null,"user_last_name":null,"user_role":null,"user_telephone":null,"user_title":null,"user_department":null}]}},"CustomersResponse":{"type":"object","properties":{"identifier":{"type":"string","description":"Customer number, unique within supplier."},"display_number":{"type":"string","description":"Customer display number."},"name":{"type":"string","description":"Customer name."},"email":{"type":"string","format":"email","description":"Email address of the default contact."},"business_number":{"type":"string","description":"Customer EIN or Business Number."},"first_name":{"type":"string","description":"First name of the default contact."},"last_name":{"type":"string","description":"Last name of the default contact."},"address_1":{"type":"string","description":"Billing address line 1."},"address_2":{"type":"string","description":"Billing address line 2."},"postal_code":{"type":"string","description":"Billing address - zip or postal code."},"city":{"type":"string","description":"Billing address - city."},"province":{"type":"string","description":"Billing address - state or province."},"country":{"type":"string","description":"Billing address - country."},"telephone":{"type":"string","description":"Customer phone number."},"fax":{"type":"string","description":"Customer fax number."},"status":{"type":"string","description":"Customer adoption status."},"auto_debit":{"type":"string","description":"AutoPay agreement status."},"invite_sent":{"type":"string","format":"date","description":"The date when invite was sent, in YYYY-MM-DD format."},"signed_up":{"type":"string","format":"date","description":"The date when customer user signed up, in YYYY-MM-DD format."},"notification_suppressed":{"type":"boolean","description":"If true, notifications to the customer are suppressed."},"notification_override":{"type":"boolean","description":"If true, overdue balance notifications are made optional."},"paper_invoices":{"type":"boolean","description":"If true, customer receives paper invoices."},"paper_statements":{"type":"boolean","description":"If true, customer receives paper statements."},"parent_identifier":{"type":"string","description":"Identifier of the parent customer in a hierarchy."},"balance_cents":{"type":"integer","description":"Total outstanding balance on the customer account in cents.\n"},"aging_cents":{"type":"integer","description":"Total overdue balance on the customer account in cents.\n"},"aging_30_cents":{"type":"integer","description":"Balance overdue (1-30 days) on the customer account in cents.\n"},"aging_60_cents":{"type":"integer","description":"Balance overdue (31-60 days) on the customer account in cents.\n"},"aging_90_cents":{"type":"integer","description":"Balance overdue (61-90 days) on the customer account in cents.\n"},"aging_120_cents":{"type":"integer","description":"Balance overdue (91-120 days) on the customer account in cents.\n"},"aging_180_cents":{"type":"integer","description":"Balance overdue (121-180 days) on the customer account in cents.\n"},"aging_older_cents":{"type":"integer","description":"Balance overdue (181+ days) on the customer account in cents.\n"},"current_cents":{"type":"integer","description":"Current outstanding balance in cents.\n"},"credit_cents":{"type":"integer","description":"Total outstanding credit balance on the customer account in cents.\n"},"unapplied_payment_cents":{"type":"integer","description":"Total unapplied payment on the customer account in cents.\n"},"prepayment_cents":{"type":"integer","description":"Total prepayment on the customer account in cents.\n"},"owing_cents":{"type":"integer","description":"Total owing balance in cents."},"notes":{"type":"string","description":"Optional notes."},"adp":{"type":"string","description":"Average days to pay."},"adp_arc":{"type":"string","description":"Average days to pay (checkout)."},"adp_external":{"type":"string","description":"Average days to pay (external)."},"last_contact_date":{"type":"string","format":"date","description":"Last contact date."},"next_contact_date":{"type":"string","format":"date","description":"Next planned contact date."},"credit_limit_cents":{"type":"integer","description":"Credit limit in cents."},"account_status":{"type":"string","description":"Account status (open/closed)."},"tags":{"type":"string","description":"Semi-colon delimited list of imported tags."},"user_tags":{"type":"string","description":"Semi-colon delimited list of user-assigned tags."},"attributes_marshal":{"type":"object","description":"Additional attributes."},"external_id":{"type":"string","description":"External (ERP-based) identifier for the customer record."}}},"LineItem":{"type":"object","properties":{"number":{"type":"string","description":"Invoice line-item number"},"description":{"type":"string","description":"Invoice line-item description"},"order_key":{"type":"string","description":"Sequence number for the line-item to order-by when rendering on the invoice."},"purchase_order_number":{"type":"string","description":"Purchase order number at the line-item level."},"quantity":{"type":"number","description":"Invoice line-item quantity"},"unit_cost_cents":{"type":"integer","description":"Invoice line-item unit price in cents."},"amount":{"type":"integer","description":"Invoice line-item total in cents."},"balance_cents":{"type":"integer","description":"Line-item balance in cents. Applicable if accepting short payments at line-item level."},"L3_commodity_code":{"type":"string","description":"Product commodity code (UNSPSC).","example":"12345678"},"L3_unit_of_measure":{"type":"string","description":"Unit of measure (EA, KG, L).","example":"EA"},"L3_discount_amount":{"type":"string","description":"Discount amount.","example":"1.00"},"L3_tax_amount":{"type":"string","description":"Tax amount.","example":"0.50"},"L3_product_code":{"type":"string","description":"Product SKU or internal code.","example":"SKU-001"}}},"Invoice":{"type":"object","required":["number","customer_identifier"],"properties":{"number":{"type":"string","description":"Invoice number, must be unique within supplier."},"display_number":{"type":"string","description":"Invoice number as displayed to customers. Optional if this is the same as `number`.\n"},"currency":{"type":"string","description":"Currency code, based on ISO-4217. E.g. `CAD`, `USD`, `AUD`"},"amount":{"type":"integer","description":"The invoice amount in cents."},"replace_line_items":{"type":"boolean","description":"When provided and True, line items in the DB that are not in the input file will be deleted."},"amount_override":{"type":"boolean","description":"When provided and True, the amount provided in an update import will overwrite the amount that would normally be calculated from line items."},"suppress_notifications":{"type":"boolean","description":"When provided and True, invoice-related notifications will not be sent to the customer or the subscribed supplier user for this invoice. The default is False"},"attachment":{"description":"When provided, it uses the provided inline pdf (as base64) as the invoice template/rendering.","type":"object","properties":{"content":{"description":"Base64 encoded pdf string","type":"string","example":"SSBhbSBhIGJhYnkgc2hhcms="},"file_name":{"description":"File name","type":"string","example":"test211.pdf"}}},"subtotal_tax1":{"type":"integer","description":"Tax amount in cents."},"subtotal_tax2":{"type":"integer","description":"Additional field to carry tax amount (in cents). For example, when invoice shows state (provincial) and federal taxes."},"customer_identifier":{"type":"string","description":"Unique identifier for customer."},"date":{"type":"string","format":"date","description":"Invoice date, YYYY-MM-DD, based on ISO-8601."},"order_date":{"type":"string","format":"date","description":"Order date, YYYY-MM-DD."},"due_date":{"type":"string","format":"date","description":"Invoice due date, YYYY-MM-DD."},"purchase_order_number":{"type":"string","description":"Purchase order number."},"notes_text":{"type":"string","description":"Optional text field up to 64K."},"shipping_name":{"type":"string","description":"Shipping address: recipient name"},"shipping_address_1":{"type":"string","description":"Shipping address: line 1"},"shipping_address_2":{"type":"string","description":"Shipping address: line 2"},"shipping_city":{"type":"string","description":"Shipping address: city"},"shipping_province":{"type":"string","description":"Shipping address: state or province. Based on the second part (after hyphen) of codes in ISO 3166-2 standard. E.g. \"ON\" for Ontario, \"CA\" for California"},"shipping_postal_code":{"type":"string","description":"Shipping address: zip or postal code"},"shipping_country":{"type":"string","description":"Shipping address: country"},"line_item_attributes":{"type":"array","description":"Details of each line-item for the invoice. Any additional non-standard attribute will be stored with the line-item record and available for presentment rendering.","items":{"$ref":"#/components/schemas/LineItem"}},"auto_debit":{"type":"string","description":"Explicitly states whether an invoice, having an owing/open balance, `Y` would be auto-paid via its customer pre-authorized agreement or `N` to be paid manually by customer. With integrations managing daily invoice synchronization, this attribute is normally excluded altogether - unless explicitly intending to mark `N` for manual customer payment consideration - since the Collaborative AR platform may also manage this invoice flag in conjunction with customer AutoPay profile settings. For more information contact support@versapay.com\n","enum":["Y","N"]},"division":{"type":"string","description":"Division Code. Required only if supplier supports divisions.\n\nIf supplier supports divisions and is configured for dynamic division creation, this value is used to create a new division if one does not already exist.\n"},"division_name":{"type":"string","description":"Division Name. Optional value. Relevant only if supplier supports divisions and is configured for dynamic division creation, otherwise ignored.\n\nThis value is assigned to the name of a newly created division. Existing divisions will not be updated by this value.\n"},"auto_debit_reference":{"type":"string","description":"For AutoPay agreements that reference a policy# or contract#, etc., specify that number."},"owing_cents":{"type":"integer","description":"Balance remaining on this invoice or credit memo.\n\nRequired if supplier is configured for Balance Sync, otherwise ignored.\n"},"ref1":{"type":"string","description":"A reference that is meaningful to the customer, e.g. Policy number, contract number, etc."},"ref2":{"type":"string","description":"As above."},"ref3":{"type":"string","description":"As above."},"adjustments_attributes":{"type":"array","description":"Adjustments such as Fuel Surcharge.","items":{"type":"object","properties":{"label":{"type":"string","description":"Label for adjustment amount."},"amount":{"type":"integer","description":"Adjustment amount in cents."}}}},"plan_identifier":{"type":"string","description":"Payment plan template identifier. If populated, this puts the invoice on a payment plan.\n\nRequired if supplier is configured for payment plans.\n"},"plan_start_date":{"type":"string","format":"date","description":"Payment plan start date. Required if supplier is configured for payment plans."},"plan_end_date":{"type":"string","format":"date","description":"Payment plan end date. Required if supplier is configured for payment plans."},"plan_payment_cents":{"type":"integer","description":"Payment plan recurring payment amount. Required if supplier is configured for payment plans."},"annualized_amount_cents":{"type":"integer","description":"The annual invoice amount. When this is populated, the importer will calculate a pro-rated invoice amount based on the next two dates.\n\nRequired if the supplier is configured for payment plans.\n"},"annualized_effective_date":{"type":"string","format":"date","description":"The date that the annualized_amount takes effect. Mandatory if annualized_amount is populated."},"annualized_expiry_date":{"type":"string","format":"date","description":"The end date of the period for which the annualized_amount is in effect.\n\nMandatory if annualized_amount is populated. The difference between this date and the effective date (inclusive) is used to pro-rate the invoice amount or any adjustments to the amount.\n"},"external_id":{"type":"string","description":"Optional external identifier for the invoice to be included in payment exports."},"summary_invoice_parent":{"type":"string","description":"Flag that indicates if the invoice is a summary invoice. Default is 0 (invoice is not a summary invoice)."},"summary_invoice_number":{"type":"string","description":"If the invoice in the row is a child of a summary invoice, that summary invoice's identifier appears here."},"service_rep_email":{"type":"string","description":"One or more supplier user email addresses (semi-colon delimited) that will be used for notification routing eg when in dispute each specified rep is notified only."},"discount_amount_cents":{"type":"integer","description":"Amount in cents of already computed discount. Requires supplier discount configuration to be enabled."},"discount_rate":{"type":"number","format":"float","description":"Floating point rate of discount. For example, .05 represents 5%. The importer will calculate discount_amount_cents based on this field and the invoice amount. Note: if this field is provided, the amount will always be calculated, even if discount_amount_cents is provided. Therefore only include this field if the intention is to have the importer calculate. Requires supplier discount configuration to be enabled."},"discount_expiry_date":{"type":"string","format":"date","description":"The date by which the discount should expire. Requires supplier discount configuration to be enabled."},"echo":{"type":"string","description":"Optional setting. When set to `pay_urls` it ensures pay_url and pay_urls are echoed in the response."},"L3_po_number":{"type":"string","description":"Purchase order number.","example":"PO12345"},"L3_tax":{"type":"string","description":"Total tax amount.","example":"5.00"},"L3_duty":{"type":"string","description":"Duty amount (if applicable).","example":"2.00"},"L3_shipping":{"type":"string","description":"Shipping amount.","example":"1.50"},"L3_ship_from_zip":{"type":"string","description":"Origin ZIP code.","example":"90210"},"L3_ship_from_country":{"type":"string","description":"Origin country code (ISO-2).","example":"US"}},"example":{"number":"sh763-h3454-dh3432","display_number":"INV1234","customer_identifier":"CUS001","purchase_order_number":"PO-3847","amount":40000,"currency":"usd","date":"2017-11-01","due_date":"2017-12-15","notes_text":"Thank you for your business","shipping_name":"Acme Inc.","shipping_address_1":"1 Main Street","shipping_address_2":"Suite 600","shipping_postal_code":"90210","shipping_city":"New York","shipping_province":"NY","owing_cents":30000,"discount_amount_cents":39999,"discount_expiry_date":"2017-11-15","replace_line_items":false,"amount_override":false,"line_item_attributes":[{"number":"1","item_number":"A3947C9878","description":"Modems","quantity":40,"unit_cost_cents":1000,"amount":40000}],"echo":"pay_urls"}},"PaymentUrls":{"type":"object","description":"A map of payment URLs mapped to customer email addressed.\n","additionalProperties":{"type":"string","format":"uri"},"example":{"CUS001@example.com":"https://secure.versapay.com/pay/198e7073-53d0-435a-baff-87ce390581c5G"}},"LineItemResponse":{"type":"object","properties":{"number":{"type":"string","description":"Invoice line-item number."},"description":{"type":"string","description":"Invoice line-item description"},"quantity":{"type":"number","description":"Invoice line-item quantity."},"unit_cost_cents":{"type":"integer","description":"Invoice line-item unit price in cents."},"amount_cents":{"type":"integer","description":"Invoice line-item total in cents."},"balance_cents":{"type":"integer","description":"Line-item balance in cents. Applicable if accepting short payments at line-item level."},"id":{"type":"number","description":"Internal id of the line-item record."},"identifier":{"type":"string","description":"Unique internal identifier for the line-item. Applicable if accepting short payments at line-item level."},"invoice_id":{"type":"number","description":"Internal id of the invoice."},"purchase_order_number":{"type":"string","description":"Purchase order number at the line-item level."},"order_key":{"type":"string","description":"Sequence number for the line-item to order-by when rendering on the invoice."},"recurring_invoice_id":{"type":"string","description":"Internal id of the recurring invoice. Applicable if using recurring invoices."},"extended_attributes":{"type":"object","description":"Additional non-standard attribute stored with the line-item record for presentment rendering.","properties":{"key":{"type":"string","description":"Key-value pair of the extended attribute on the line-item."}}}}},"InvoiceResponse":{"type":"object","properties":{"number":{"type":"string","description":"Invoice number, unique within a supplier."},"display_number":{"type":"string","description":"Invoice number as displayed to customers."},"currency":{"type":"string","description":"Currency code, based on ISO-4217, in lowercase. E.g. `cad`, `usd`, `aud`"},"amount_cents":{"type":"integer","description":"The invoice amount in cents."},"subtotal_tax1":{"type":"string","description":"Tax amount, in dollars."},"subtotal_tax2":{"type":"string","description":"Additional field to carry tax amount, in dollars. For example, when invoice shows state (provincial) and federal taxes."},"customer_identifier":{"type":"string","description":"Unique identifier for customer."},"date":{"type":"string","format":"date","description":"Invoice date, YYYY-MM-DD, based on ISO-8601."},"order_date":{"type":"string","format":"date","description":"Order date, YYYY-MM-DD."},"due_date":{"type":"string","format":"date","description":"Invoice due date, YYYY-MM-DD."},"purchase_order_number":{"type":"string","description":"Purchase order number."},"notes_text":{"type":"string","description":"Optional text field up to 64K."},"shipping_name":{"type":"string","description":"Shipping address: recipient name"},"shipping_address":{"type":"object","description":"Shipping address","properties":{"address_1":{"type":"string","description":"Shipping address, line 1"},"address_2":{"type":"string","description":"Shipping address, line 2"},"city":{"type":"string","description":"Shipping address: city"},"state":{"type":"string","description":"Shipping address: state or province. Based on the second part (after hyphen) of codes in ISO 3166-2 standard. E.g. \"ON\" for Ontario, \"CA\" for California"},"country":{"type":"string","description":"Shipping country code. E.g. \"US\" for USA."},"country_name":{"type":"string","description":"Shipping country name."},"zip":{"type":"string","description":"Shipping address: zip or postal code"},"line_1":{"type":"string","description":"Single line combining shipping `address_1` and `address_2`.\n"},"line_2":{"type":"string","description":"Single line combining shipping `city`, `state` and `zip`.\n"}}},"line_item_attributes":{"type":"array","description":"Details of each line-item for the invoice.","items":{"$ref":"#/components/schemas/LineItemResponse"}},"auto_debit":{"type":"boolean","description":"`true` (invoice is to be auto-paid if customer has pre-authorized payment) or `false` (invoice is to be paid manually by customer)\n"},"division":{"type":"string","description":"Division code, applicable when supplier supports divisions."},"auto_pay_reference":{"type":"string","description":"Reference number associated to the invoice, used in AutoPay agreements."},"owing_cents":{"type":"integer","description":"Balance remaining on this invoice or credit memo."},"status":{"type":"string","description":"The status of the invoice. Can be one of `DRAFT`, `CURRENT`, `OVERDUE`, `PARTIAL`, `PAID`, `CREDIT` or `CLOSED`.\n","enum":["DRAFT","CURRENT","OVERDUE","PARTIAL","PAID","CREDIT","CLOSED"]},"delivery_status":{"type":"string","description":"The delivery status of the invoice. Statuses in the API map to those in the UI as follows:
\n\nThe email delivery statuses in the API reflect the following statuses from UI:\n\n|API Status|Status in the UI|\n|:--|:--|\n|`new`|\"Not Tracked\"|\n|`not_sent`|\"Available\"|\n|`sent`|\"Email Sent\"|\n|`delivery_unknown`|\"Delivery Unknown\"|\n|`not_delivered`|\"Not Delivered\"|\n|`delivered`|\"Email Delivered\"|\n|`opened`|\"Email Opened\"|\n|`clicked`|\"Viewed\"|\n","enum":["new","not_sent","sent","delivery_unknown","not_delivered","opened","clicked"]},"ref1":{"type":"string","description":"A reference that is meaningful to the customer, e.g. Policy number, contract number, etc."},"ref2":{"type":"string","description":"As above."},"ref3":{"type":"string","description":"As above."},"adjustments_attributes":{"type":"array","description":"Adjustments such as Fuel Surcharge or Discount on the invoice.","items":{"type":"object","properties":{"label":{"type":"string","description":"Label for adjustment amount."},"amount_cents":{"type":"integer","description":"Adjustment amount in cents."},"id":{"type":"integer","description":"Internal id of the adjustment."},"invoice_id":{"type":"integer","description":"Internal id of the invoice."},"recurring_invoice_id":{"type":"integer","description":"Internal id of the recurring invoice. Applicable when supplier is configured to create recurring invoices."}}}},"plan_identifier":{"type":"string","description":"Payment plan template identifier. Applicable when supplier is configured for payment plans."},"plan_start_date":{"type":"string","format":"date","description":"Payment plan start date. Applicable when supplier is configured for payment plans."},"plan_end_date":{"type":"string","format":"date","description":"Payment plan end date. Applicable when supplier is configured for payment plans."},"plan_payment_cents":{"type":"integer","description":"Payment plan recurring payment amount in cents. Applicable when supplier is configured for payment plan."},"annualized_amount_cents":{"type":"integer","description":"The annual invoice amount in cents. Applicable if the supplier is configured for payment plans."},"annualized_effective_date":{"type":"string","format":"date","description":"The date that the annualized_amount takes effect. Applicable if the supplier is configured for payment plans."},"annualized_expiry_date":{"type":"string","format":"date","description":"The end date of the period for which the annualized_amount is in effect. Applicable if the supplier is configured for payment plans."},"external_id":{"type":"string","description":"Optional external identifier for the invoice to be included in payment exports."},"extended_attributes":{"type":"object","description":"Additional non-standard attribute stored with the invoice record for presentment rendering.","properties":{"key":{"type":"string","description":"Key-value pair of the extended attribute on the invoice."}}},"summary_invoice_parent":{"type":"string","description":"Flag that indicates if the invoice is a summary invoice. Default is 0 (invoice is not a summary invoice)."},"summary_invoice_number":{"type":"string","description":"If the invoice in the row is a child of a summary invoice, that summary invoice's identifier appears here."},"service_rep_email":{"type":"string","description":"One or more supplier user email addresses (semi-colon delimited) that will be used for notification routing eg when in dispute each specified rep is notified only."},"pay_url":{"type":"string","description":"The URL to the anonymous click-to-pay page. This value is provided only for open invoices in an owing position."},"pay_urls":{"type":"object","description":"Context sensitive URLs to click-to-pay page, keyed by recipient email addresses. These values are only provided for open invoices in an owing position.","properties":{"key":{"type":"string","description":"Key-value pair of the context sensitive click-to-pay URLs."}}},"deleted":{"type":"boolean","description":"Indicates if the invoice has been deleted, this is optional and only present based on request parameter."}},"example":{"number":"sh763-h3454-dh3432","display_number":"INV1234","customer_identifier":"CUS001","amount_cents":40000,"owing_cents":30000,"subtotal_tax1":"$0.00","subtotal_tax2":"$0.00","currency":"usd","date":"2017-11-01","due_date":"2017-12-15","order_date":null,"purchase_order_number":"PO-3847","notes_text":"Thank you for your business","shipping_name":"Acme Inc.","shipping_address":{"address_1":"1 Main Street","address_2":"Suite 600","city":"New York","state":"NY","zip":"90210","country":"US","country_name":"United States","line_1":"1 Main Street, Suite 600","line_2":"New York, NY 90210"},"line_item_attributes":[{"number":"001","description":"Modems","amount_cents":40000,"balance_cents":40000,"quantity":40,"unit_cost_cents":1000,"id":6935660,"identifier":"acme|sh763-h3454-dh3432|001","invoice_id":4344538,"order_key":null,"purchase_order_number":null,"recurring_invoice_id":null,"extended_attributes":{"item_number":"A3947C9878"}}],"auto_debit":true,"division":"770","auto_pay_reference":null,"ref1":null,"ref2":null,"ref3":null,"adjustments_attributes":[{"label":"Surcharge","amount_cents":2000,"id":2212,"invoice_id":4344538,"recurring_invoice_id":null}],"plan_identifier":null,"plan_start_date":null,"plan_end_date":null,"plan_payment_cents":null,"annualized_amount_cents":null,"annualized_effective_date":null,"annualized_expiry_date":null,"external_id":null,"status":"CURRENT","delivery_status":"not_sent","extended_attributes":{"lease_type":"LS","currency_mode":"D"},"summary_invoice_parent":0,"summary_invoice_number":null,"service_rep_email":"john.doe@supplier.com;jane.doe@supplier.com","pay_url":"https://secure.versapay.com/pay/a25f5d86-552a-4868-907e-e3a5932cff36","pay_urls":{"CUS001@example.com":"https://secure.versapay.com/pay/198e7073-53d0-435a-baff-87ce390581c5G"},"payments":[{"payment_reference":"959YTHNMESPV","invoice_number":1,"date":"2022-10-26","amount":870,"plan_fee":0,"payment_amount":870,"payment_transaction_amount":870,"payment_transaction_token":"9559NENM23SK","payment_method":"(0013)","payment_from_bank_account":true,"payment_from_credit_card":false,"payment_institution_name":null,"payment_credit_card_brand":null,"short_pay_indicator":"Y","payment_note":null,"auto_debit_indicator":"N","invoice_balance":5030,"payment_timestamp":"2022-10-26T12:40:36-04:00","invoice_division":"CTL","invoice_division_number":null,"invoice_division_name":"Central","pay_to_bank_account":100007,"pay_to_bank_account_name":"(0007)","settlement_token":"BA7G777DNABC","customer_identifier":"C10","customer_name":"Customer 10 Williamson","status":"PAID","payment_source":"ARC","payment_code":null,"payment_description":null,"gateway_authorization_code":"TM37E6","purchase_order_number":null,"ref1":null,"ref2":null,"ref3":null,"short_pay_reason_identifier":null,"short_pay_reason":null,"dispute_reason_identifier":null,"dispute_reason":null,"invoice_amount_paid":870,"invoice_amount":5900,"invoice_identifier":"global|1","invoice_date":"2022-10-26","invoice_external_id":null,"invoice_currency":"usd","invoice_purchase_order_number":"new_line_item_short_pay_invoice_1","invoice_ref1":null,"invoice_ref2":null,"invoice_ref3":null,"cumulative_customer_amount":870,"checkout_token":"6JQSRWISTPA4","status_reason":null,"payment_transaction_fee":0,"settlement_date":null,"customer_address":null,"payor_name":null,"payor_phone":null,"payor_email":"multi@example.com","cardholder_name":null,"fund_token":"BA1WYKRYHLLS","card_expiry_year":null,"card_expiry_month":null,"order_identifier":null,"order_number":null,"order_document_type":null,"external_payment_number":null,"external_payment_type":null,"ref4":null,"invoice_ref4":null,"watermark":1888,"line_item_transactional_amounts":[{"line_item_number":"8cc21f8a-ddcd-4bfe-915f-3e7480068444","line_item_payment_amount":20,"line_item_balance":0,"line_item_short_pay_indicator":"N","line_item_payment_note":"will pay later","line_item_short_pay_reason_identifier":null,"line_item_short_pay_reason":null,"line_item_dispute_reason_identifier":null,"line_item_dispute_reason":null,"line_item_extended_attributes":{}},{"line_item_number":"214db37e-3b92-4705-960f-ccb585bc0fce","line_item_payment_amount":210,"line_item_balance":0,"line_item_short_pay_indicator":"N","line_item_payment_note":"will pay later","line_item_short_pay_reason_identifier":null,"line_item_short_pay_reason":null,"line_item_dispute_reason_identifier":null,"line_item_dispute_reason":null,"line_item_extended_attributes":{}},{"line_item_number":"a32a21c0-01f0-43b7-be2e-8f45504e5800","line_item_payment_amount":640,"line_item_balance":0,"line_item_short_pay_indicator":"N","line_item_payment_note":"sorry","line_item_short_pay_reason_identifier":null,"line_item_short_pay_reason":null,"line_item_dispute_reason_identifier":null,"line_item_dispute_reason":null,"line_item_extended_attributes":{}}]}]}},"SingleReminderResponse":{"type":"object","properties":{"requested":{"type":"integer","description":"The count of invoices that were requested for reminder."},"sent":{"type":"integer","description":"The count of invoices that initiated a reminder."},"not_found":{"type":"integer","description":"The count of invoices that did not initiate a reminder because the invoice could not be found."},"suppressed":{"type":"integer","description":"The count of invoices that did not initiate a reminder because customer notification is suppressed."},"invoice_suppressed":{"type":"integer","description":"The count of invoices that did not initiate a reminder because the invoice notification is suppressed."},"not_invited":{"type":"integer","description":"The count of invoices that did not initiate a reminder because customer is not enabled to receive emails."},"paid":{"type":"integer","description":"The count of invoices that did not initiate a reminder because the invoice is already paid."},"draft":{"type":"integer","description":"The count of invoices that did not initiate a reminder because the invoice is in a draft state."},"credit":{"type":"integer","description":"The count of invoices that did not initiate a reminder because the invoice is a credit."},"scheduled":{"type":"integer","description":"The count of invoices that did not initiate a reminder because the invoice is currently scheduled for payment."},"on_plan":{"type":"integer","description":"The count of invoices that did not initiate a reminder because the invoice is on a payment plan."}},"example":{"requested":1,"sent":1,"not_found":0,"suppressed":0,"not_invited":0,"paid":0,"draft":0,"credit":0,"scheduled":0,"on_plan":0}},"BulkReminderResponse":{"type":"object","properties":{"requested":{"type":"integer","description":"The count of invoices that were requested for reminder."},"sent":{"type":"integer","description":"The count of invoices that initiated a reminder."},"not_found":{"type":"integer","description":"The count of invoices that did not initiate a reminder because the invoice could not be found."},"suppressed":{"type":"integer","description":"The count of invoices that did not initiate a reminder because customer notification is suppressed."},"invoice_suppressed":{"type":"integer","description":"The count of invoices that did not initiate a reminder because the invoice notification is suppressed."},"not_invited":{"type":"integer","description":"The count of invoices that did not initiate a reminder because customer is not enabled to receive emails."},"paid":{"type":"integer","description":"The count of invoices that did not initiate a reminder because the invoice is already paid."},"draft":{"type":"integer","description":"The count of invoices that did not initiate a reminder because the invoice is in a draft state."},"credit":{"type":"integer","description":"The count of invoices that did not initiate a reminder because the invoice is a credit."},"scheduled":{"type":"integer","description":"The count of invoices that did not initiate a reminder because the invoice is currently scheduled for payment."},"on_plan":{"type":"integer","description":"The count of invoices that did not initiate a reminder because the invoice is on a payment plan."}},"example":{"requested":10,"sent":7,"not_found":1,"suppressed":0,"not_invited":1,"paid":0,"draft":0,"credit":1,"scheduled":0,"on_plan":0}},"PaymentImport":{"type":"object","required":["identifier"],"properties":{"identifier":{"type":"string","description":"Payment identifier; must be unique within supplier. May appear multiple times in a single file if payment was applied to multiple invoices.\n"},"amount_cents":{"type":"integer","description":"The amount of total payment, in cents.\n\nNote: when providing data in a CSV layout this field can also be represented as payment_total; however, in JSON layout this field must be called amount_cents.\n\nNote 2: For the update of a payment originated in Versapay, only the total payment amount without fees, or the total payment amount with fees will be accepted. Any other value will be rejected."},"date":{"type":"string","format":"date","description":"Payment date, in the format YYYY-MM-DD."},"currency":{"type":"string","description":"Currency code, based on ISO-4217."},"invoice_number":{"type":"string","description":"Invoice number associated with this payment (if payment covers single invoice).\nIf payment covers multiple invoices, provide `payment_amounts_attributes` instead.\n"},"payment_code":{"type":"string","description":"Payment code"},"payment_description":{"type":"string","description":"Description corresponding to payment code."},"payment_amounts_attributes":{"type":"array","description":"Applicable only when payment covers multiple invoices.","items":{"type":"object","properties":{"invoice_number":{"type":"string","description":"Invoice number associated with this payment."},"amount":{"type":"integer","description":"Amount paid towards this invoice."},"notes":{"type":"string","description":"Payment note"},"purchase_order_number":{"type":"string","description":"Purchase order number to link this payment to an invoice."},"ref1":{"type":"string","description":"An additional reference number that could link this payment to an invoice. E.g. policy number, contract number, etc."},"ref2":{"type":"string","description":"Same as above."},"ref3":{"type":"string","description":"Same as above."},"line_number":{"type":"string","description":"(Optional) Invoice line item to which this payment amount should apply."},"short_pay_reason_identifier":{"type":"string","description":"Short pay reason code, if set up."},"reason_type":{"type":"string","description":"Indicates the type of short payment. Acceptable values are:\n* `short_pay`: The payment amount is less than expected.\n* `dispute`: A dispute will be opened for the invoice.\n\nNote: If the value is `dispute`, it means an invoice dispute will be initiated."},"match_at":{"type":"string","format":"date","description":"The date when an external payment was matched outside of Versapay and/or via Cash application processing, in the format YYYY-MM-DD."},"remit_invoice_date":{"type":"string","format":"date","description":"Original invoice date supplied with remittance. May or may not match actual invoice."},"remit_invoice_amount_cents":{"type":"integer","description":"Original invoice amount supplied with remittance. May or may not match actual invoice."},"remit_invoice_discount_cents":{"type":"integer","description":"Original invoice discount taken supplied with remittance. May or may not match actual invoice.\n\nWhen part of an external payment, this value will be applied towards the invoice in addition to the value passed in `amount`.\n"},"remit_customer_number":{"type":"string","description":"A customer identifier or number associated with the invoice. This may or may not match what is in Collaborative AR. It is for information purposes only, for manual matching if invoice# is missing."},"remit_customer_name":{"type":"string","description":"A customer name associated with the invoice. This may or may not match what is in Collaborative AR. It is for information purposes only, for manual matching if invoice# is missing."},"division":{"type":"string","description":"Division code, if divisions are set up.\n\nThis value takes precedence over the value specified in the header data.\n"}}}},"division":{"type":"string","description":"Division code, if divisions are set up.\n\nThis value will be used for all `payment_amounts_attributes` that do not specify their own `division` attribute.\n"},"customer_identifier":{"type":"string","description":"Customer identifier."},"customer_name":{"type":"string","description":"Customer name."},"external_payment_type":{"type":"string","description":"When provided identifies this payment as having been processed externally E.g. cash, check/cheque, wire, ACH, Paypal, etc."},"external_payment_number":{"type":"string","description":"When provided identifies this payment as having been processed externally, its value corresponding to the type above. E.g. the actual cheque number."},"payor_bank_branch_number":{"type":"string","description":"Branch (if CAD) or Routing number (if USD). Useful when external_payment_type = check/cheque."},"payor_bank_account_number":{"type":"string","description":"Bank account number. Useful when external_payment_type = check/cheque."},"payor_name":{"type":"string","description":"Name of entity or business making the payment. May or may not be the same as customer name on invoice."},"settlement_date":{"type":"string","format":"date","description":"Settlement date, in the format YYYY-MM-DD."},"external_id":{"type":"string","description":"The internal reference of the payment as originated from a source system, typically used by ERP connectors to aid in synchronizing payment data."}},"example":{"identifier":"PMT001-05","amount_cents":10000,"currency":"usd","date":"2017-12-02","customer_identifier":"CUS001","payment_amounts_attributes":[{"invoice_number":"INV004","amount":8000},{"invoice_number":"INV010","amount":2000}]}},"PaymentAmount":{"type":"object","properties":{"payment_reference":{"type":"string","description":"The payment identifier"},"checkout_token":{"type":"string","description":"Correlation key for payment amounts applied during the same payment portal session"},"invoice_number":{"type":"string","description":"The display number of the invoice for which the payment was made. If the display number is not available, the number of the invoice for which the payment was made."},"date":{"type":"string","format":"date","description":"The payment date, in YYYY-MM-DD format."},"amount":{"type":"string","description":"The amount of the payment applied to the invoice, in dollars and cents."},"plan_fee":{"type":"string","description":"Payment plan fee amount, in dollars and cents, associated to this invoice."},"payment_amount":{"type":"string","description":"The amount of the total payment, excluding fees."},"payment_transaction_amount":{"type":"string","description":"The amount of the total payment, including fees."},"payment_transaction_token":{"type":"string","description":"The payment transaction token."},"payment_method":{"type":"string","description":"The method used to make payment."},"payment_from_bank_account":{"type":"string","description":"`true` if the payment was made using a bank account.\n"},"payment_from_credit_card":{"type":"string","description":"`true` if the payment was made using a credit card.\n"},"payment_institution_name":{"type":"string","description":"Institution name, if the payment was made using a bank account."},"payment_credit_card_brand":{"type":"string","description":"Credit card \"association brand\", if the payment was made using a credit card. Example: VISA, MASTER\n"},"settlement_token":{"type":"string","description":"Token corresponding to the settlement routing/processor profile as enumerated in whoami eg bank transfer processor for ACH/EFT, merchant account for CC, gift card processor, pos/terminal processor"},"short_pay_indicator":{"type":"string","description":"`Y` if a short payment was made.\n"},"payment_note":{"type":"string","description":"Note accompanying the payment."},"auto_debit_indicator":{"type":"string","description":"`Y` if the payment was made via AutoPay agreement.\n"},"invoice_balance":{"type":"string","description":"Remaining balance on the invoice (after the payment is processed)."},"payment_timestamp":{"type":"string","description":"The ISO8601 timestamp corresponding to payment."},"invoice_division":{"type":"string","description":"The division code if any associated with the invoice."},"invoice_division_number":{"type":"string","description":"The external division identifier if any associated with the invoice."},"invoice_division_name":{"type":"string","description":"The division name if any associated with the invoice."},"pay_to_bank_account":{"type":"string","description":"The GL number of the settlement account receiving the payment."},"pay_to_bank_account_name":{"type":"string","description":"The display name of the settlement account receiving the payment."},"customer_identifier":{"type":"string","description":"The invoice customer identifier."},"customer_name":{"type":"string","description":"The invoice customer name."},"status":{"type":"string","description":"The payment status.","enum":["IN PROGRESS","PAID (UNVERIFIED)","REVERSAL","ERROR (NSF)","ERROR (DECLINED)","PAID"]},"status_reason":{"type":"string","description":"Additional information explaining when the payment has failed."},"payment_source":{"type":"string","description":"The source of the payment."},"payment_code":{"type":"string","description":"The back office payment code (applicable to externally sourced payments)."},"payment_description":{"type":"string","description":"The back office payment description (applicable to externally sourced payments)."},"gateway_authorization_code":{"type":"string","description":"The underlying gateway authorization code."},"purchase_order_number":{"type":"string","description":"The purchase order number entered at the time of making a prepayment."},"ref1":{"type":"string","description":"The reference number or string entered at the time of making a prepayment."},"ref2":{"type":"string","description":"Same as above."},"ref3":{"type":"string","description":"Same as above."},"short_pay_reason_identifier":{"type":"string","description":"Short pay reason code, if set up."},"short_pay_reason":{"type":"string","description":"Short pay reason description, if set up."},"dispute_reason_identifier":{"type":"string","description":"Dispute reason code, if set up."},"dispute_reason":{"type":"string","description":"Dispute reason description, if set up."},"invoice_amount_paid":{"type":"string","description":"The total amount of payments, in dollars and cents, made to date via Collaborative AR towards this invoice."},"invoice_identifier":{"type":"string","description":"The identifier of the invoice for which the payment was made."},"invoice_date":{"type":"string","format":"date","description":"Invoice date, in the format YYYY-MM-DD."},"invoice_external_id":{"type":"string","description":"The external identifier/reference, if any, of the invoice for which the payment was made."},"invoice_currency":{"type":"string","description":"The currency of the invoice for which the payment was made."},"invoice_purchase_order_number":{"type":"string","description":"The purchase order number associated to the invoice."},"invoice_ref1":{"type":"string","description":"Reference number or string associated to the invoice."},"invoice_ref2":{"type":"string","description":"Same as above."},"invoice_ref3":{"type":"string","description":"Same as above."},"cumulative_customer_amount":{"type":"string","description":"The total payment processed for *this* customer under *this* `payment_reference`.\n"},"display_identifier":{"type":"string","description":"The value of display_identifier that was provided for the payment; if this was null, this will be the the value of the payment_reference"},"line_item_transactional_amounts":{"type":"array","items":{"type":"object","properties":{"line_item_number":{"type":"string","description":"Invoice line-item number"},"line_item_payment_amount":{"type":"string","description":"The amount of the payment applied to the line-item, in dollars and cents."},"line_item_balance":{"type":"string","description":"Remaining balance on the line-item (after the payment is processed), in dollars and cents."},"line_item_short_pay_indicator":{"type":"string","description":"`Y` if a short payment was made.\n"},"line_item_payment_note":{"type":"string","description":"Note accompanying the payment at the line-item level."},"line_item_short_pay_reason_identifier":{"type":"string","description":"Short pay reason code, if set up."},"line_item_short_pay_reason":{"type":"string","description":"Short pay reason description, if set up."},"line_item_dispute_reason_identifier":{"type":"string","description":"Dispute reason code, if set up."},"line_item_dispute_reason":{"type":"string","description":"Dispute reason description, if set up."}}},"description":"Payments applied to invoice line-items. Applicable if accepting short payments at line-item level.\n"},"batch_number":{"type":"string","description":"The batch number associated with the payment, if any. If none, the value will be null."},"batch_amount":{"type":"string","description":"The batch amount of the batch associated with the payment, if any. If none, the value will be an empty string \"\""},"invoice_display_number":{"type":"string","description":"The display number of the invoice for which the payment was made."},"invoice_internal_number":{"type":"string","description":"The number of the invoice for which the payment was made."},"fx_rate":{"type":"string","description":"Optional. The exchange rate used for the payment."},"fx_amount":{"type":"string","description":"Optional. The amount of the payment in the gateway currency."},"fx_amount_cents":{"type":"number","description":"Optional. The amount of the payment in the gateway currency in cents."}}},"PaymentResponse":{"type":"object","properties":{"payment_reference":{"type":"string","description":"The payment identifier"},"date":{"type":"string","format":"date","description":"The payment date, in YYYY-MM-DD format."},"payment_amount":{"type":"string","description":"The amount of the total payment, excluding fees."},"payment_transaction_amount":{"type":"string","description":"The amount of the total payment, including fees."},"payment_method":{"type":"string","description":"The method used to make payment."},"auto_debit_indicator":{"type":"string","description":"`Y` if the payment was made via AutoPay agreement.\n"},"payment_timestamp":{"type":"string","description":"The ISO8601 timestamp corresponding to payment."},"customer_identifier":{"type":"string","description":"The invoice customer identifier."},"customer_name":{"type":"string","description":"The invoice customer name."},"status":{"type":"string","description":"The payment status.","enum":["IN PROGRESS","PAID (UNVERIFIED)","REVERSAL","ERROR (NSF)","ERROR (DECLINED)","PAID"]},"status_reason":{"type":"string","description":"Additional information explaining when the payment has failed."},"payment_source":{"type":"string","description":"The source of the payment."},"payment_code":{"type":"string","description":"The back office payment code (applicable to externally sourced payments)."},"payment_description":{"type":"string","description":"The back office payment description (applicable to externally sourced payments)."},"gateway_authorization_code":{"type":"string","description":"The underlying gateway authorization code."},"pay_to_bank_account":{"type":"string","description":"The GL number of the settlement account receiving the payment."},"pay_to_bank_account_name":{"type":"string","description":"The display name of the settlement account receiving the payment."},"display_identifier":{"type":"string","description":"The value of display_identifier that was provided for the payment; if this was null, this will be the the value of the payment_reference"},"payment_amounts":{"type":"array","description":"Payments applied to invoices and line-items.","items":{"$ref":"#/components/schemas/PaymentAmount"}},"batch_number":{"type":"string","description":"The batch number associated with the payment, if any. If none, the value will be null."},"batch_amount":{"type":"string","description":"The batch amount of the batch associated with the payment, if any. If none, the value will be an empty string \"\""},"payment_tree":{"type":"object","description":"Hierarchy of related payments, optionally added to response based on request parameters.","properties":{"root":{"type":"string","description":"The payment identifier of the root of the payment tree.\n\nFor a standalone payment, this will match the `payment_reference` attribute."},"children":{"description":"The payment identifier(s) of the related credit and discount payments.\n\nFor a standalone payment, this will be an empty array.\n","type":"array","items":{"type":"string"}}}},"fx_rate":{"type":"string","description":"Optional. The exchange rate used for the payment."},"fx_amount":{"type":"string","description":"Optional. The amount of the payment in the gateway currency."},"fx_amount_cents":{"type":"number","description":"Optional. The amount of the payment in the gateway currency in cents."}}},"Dispute":{"type":"object","properties":{"closed_at":{"type":"string","format":"date-time","description":"Date and time when dispute was closed."},"opened_at":{"type":"string","format":"date-time","description":"Date and time when dispute was opened."},"opener":{"type":"string","description":"Name or email address of the user who opened the dispute."},"closer":{"type":"string","description":"Name or email address of the user who closed the dispute."},"opening_comment_text":{"type":"string","description":"Comment text when the dispute was opened."},"closing_comment_text":{"type":"string","description":"Comment text when the dispute was closed."},"invoice_number":{"type":"string","description":"Invoice number against which dispute was opened."},"invoice_amount_paid":{"type":"string","description":"The total amount of payments, in dollars and cents, made to date via Collaborative AR towards this invoice."},"invoice_balance":{"type":"object","description":"Invoice balance, in cents.","additionalProperties":{"type":"integer"}},"dispute_reason_identifier":{"type":"string","description":"Dispute reason code, if set up."},"dispute_reason_label_en":{"type":"string","description":"Dispute reason label in English. Applicable when dispute reason codes are set up in the account."},"dispute_reason_label_fr":{"type":"string","description":"Dispute reason label in French. Applicable when dispute reason codes are set up in the account."},"opening_comment_users_notified":{"type":"array","items":{"type":"string"},"description":"Names or email addresses of users notified when opening dispute."},"closing_comment_user_notified":{"type":"array","items":{"type":"string"},"description":"Name or email addresses of users notified when closing dispute.\n\n_Note: When the dispute is still open, `closing_comment_user_notified` is an empty string (`\"\"`), not an array._\n"},"creator_business_name":{"type":"string","description":"Business name of the organization that `opener` represents."},"closer_business_name":{"type":"string","description":"Business name of the organization that `closer` represents."},"invoice_identifier":{"type":"string","description":"Internal unique identifier for the invoice record."},"invoice_external_id":{"type":"string","description":"External identifier for the invoice record."}}},"Comment":{"type":"object","properties":{"identifier":{"type":"string","description":"Unique identifier for comment"},"customer_identifier":{"type":"string","description":"Customer number"},"customer_name":{"type":"string","description":"Customer name"},"regarding":{"type":"string","description":"Invoice number (if applicable) associated to the comment."},"target_users":{"type":"string","description":"List of users that the comment specifically targets, separated by semi-colons."},"dispute":{"type":"string","description":"`Y` if the comment opened is a dispute. `N` otherwise.\n"},"internal":{"type":"string","description":"`Y` if the comment is internal. `N` otherwise.\n"},"timestamp":{"type":"string","format":"date-time","description":"'Date and time when the comment was created, based on ISO 8601 standard. Format: YYYY-MM-DDTHH:MM:SS+HH:MM'\n"},"user":{"type":"string","description":"Name of the user who create the comment. First and last name, if available. Otherwise, email address."},"email":{"type":"string","description":"Email of the user who created the comment."},"organization":{"type":"string","description":"Name of the user's organization – supplier's name or the customer's name.

Note that for comments made by customers, the customer_name and organization will have the same value. When the supplier made the comment, this field will hold the supplier business name.\n"}}},"FileImport":{"type":"object","properties":{"id":{"type":"string","description":"The import batch identifier.","example":21877},"file_name":{"type":"string","description":"The original filename of the raw file.","example":"invoices.csv"},"file_size":{"type":"integer","description":"The original size of the raw file in bytes.","example":1024},"file_content_type":{"type":"string","description":"The MIME/content-type of the raw file.","example":"text/plain"},"file_fingerprint":{"type":"string","description":"The fingerprint/hash representing the raw file contents.","example":"bf817b5548d69f6a3a49b6bb872fb906"},"file_errors_count":{"type":"string","description":"Number of records that failed import due to data error","example":5},"error":{"type":"string","description":"The error message corresponding to a failed import.","example":""},"result_message":{"type":"string","description":"Result of batch import.","example":"5487 invoices"},"complete_at":{"type":"string","description":"The ISO8601 timestamp corresponding to completion of the import.","example":"2016-08-30T15:39:30-04:00"}}},"InvoiceReconResponse":{"type":"object","properties":{"number":{"type":"string","description":"The invoice number.","example":12},"division_code":{"type":"string","description":"The division code associated with the invoice.","example":"HOM"},"customer_number":{"type":"string","description":"The customer identifier associated with the invoice.","example":1024},"customer_name":{"type":"string","description":"The customer name associated with the invoice.","example":"Starblux Ltd"},"invoice_date":{"type":"string","description":"The invoice date.","example":"2021-12-31"},"payment_identifier":{"type":"string","description":"The identifier of any detected parked/orphan payment associated with the invoice."},"payment_date":{"type":"string","description":"The date of any detected parked/orphan payment associated with the invoice."},"orphaned_payment_amount":{"type":"string","description":"The amount of any detected parked/orphan payment associated with the invoice.","example":"$11,200.00"},"balance_in_arc":{"type":"string","description":"The invoice balance.","example":"$11,200.00"},"balance_in_source_system":{"type":"string","description":"The invoice balance in source/provided.","example":"$11,200.00"},"discrepancy_message":{"type":"string","description":"Message explaining the discrepancy.","example":"Invoice Not Present in ARC"}}},"PaymentReconResponse":{"type":"object","properties":{"payment_reconciliation_identifier":{"type":"string","description":"Identifier of the payment"},"unapplied_amount":{"type":"string","description":"The unapplied amount from total payment amount in Versapay."},"unapplied_amount_in_source_system":{"type":"string","description":"The unapplied amount from total payment amount in source/provided."},"customer_identifier":{"type":"string","description":"The customer number recorded on the payment in Versapay.","example":"CUST123"},"discrepancy_message":{"type":"string","description":"Message explaining the discrepancy.","example":"Payment Not Present in Versapay."},"payment_amount":{"type":"string","description":"Optional, The payment amount in Versapay if present in uploaded recon csv."},"payment_amount_in_source_system":{"type":"string","description":"Optional, The payment amount in source/provided if present in uploaded recon csv."},"applied_amount":{"type":"string","description":"Optional, The amount applied from total payment amount in Versapay if present in uploaded recon csv."},"applied_amount_in_source_system":{"type":"string","description":"Optional, The amount applied from total payment amount in source/provided if present in uploaded recon csv."},"external_payment_number":{"type":"string","description":"Optional, The payment external number in Versapay if present in uploaded recon csv."},"external_payment_number_in_source_system":{"type":"string","description":"Optional, The payment external number in source/provided if present in uploaded recon csv."},"payment_date":{"type":"string","description":"Optional, Payment date in Versapay","example":"2021-12-31"},"payment_date_in_source_system":{"type":"string","description":"Optional, Payment date in source/provided if present in uploaded recon csv.","example":"2021-12-31"},"currency":{"type":"string","description":"Optional, The currency code in Versapay if present in uploaded recon csv."},"currency_in_source_system":{"type":"string","description":"Optional, The currency code in source/provided if present in uploaded recon csv."}}},"MonthlyStatementResponse":{"type":"object","properties":{"identifier":{"type":"string","nullable":false,"description":"Token identifier for the monthly statement."},"start_date":{"type":"string","nullable":false,"description":"Start date of the statement reporting period.","format":"date","example":"2022-01-15"},"end_date":{"type":"string","nullable":false,"description":"End date of the statement reporting period.","format":"date","example":"2022-01-15"},"statement_date":{"type":"string","nullable":false,"description":"Generation date of the statement.","format":"date","example":"2022-01-15"},"merchant_account_token":{"type":"string","nullable":false,"description":"Token identifier representing the owing merchant account."},"merchant_account_identifier":{"type":"string","nullable":false,"description":"MID (merchant identifier) of the owing merchant account."},"watermark":{"$ref":"#/components/schemas/Watermark","description":"Watermark value for subsequent calls."}}},"SummaryBatchTransaction":{"type":"object","description":"Summary reference of known transaction","properties":{"token":{"type":"string","description":"Token identifier for the transaction."},"amount_cents":{"type":"integer","description":"Transaction amount in cents."},"currency":{"type":"string","description":"Currency code, based on ISO-4217. E.g. `CAD`, `USD`, `AUD`"},"transaction_reference":{"type":"string","nullable":true,"description":"Extra useful data to help link transactions to other systems e.g. PO numbers, account numbers etc."},"payment_method":{"type":"string","enum":["credit_card","bank_account","gift_card","pos_terminal"]},"settlement_token":{"type":"string","description":"Token corresponding to the settlement routing/processor profile as enumerated in whoami eg bank transfer processor for ACH/EFT, merchant account for CC, gift card processor, pos/terminal processor"},"transaction_date":{"type":"string","format":"date","description":"Date of the transaction."},"surcharge_cents":{"type":"integer","description":"Surcharge amount in cents."},"fx_account_currency":{"type":"string","description":"Currency of the payment gateway account"},"fx_currency":{"type":"string","description":"Currency of the transaction, according to the payment gateway"},"fx_amount_cents":{"type":"integer","description":"The processed amount in cents after conversion to the gateway account currency"},"fx_rate":{"type":"string","description":"The exchange rate used to convert between the transaction currency and the gateway account currency"},"orders":{"type":"array","description":"The order associated with this transaction, if any, for reference detail only (the order information does not impact settlement deposit batch)","items":{"$ref":"#/components/schemas/SummaryOrderReference"}},"payments":{"type":"array","description":"Any C-AR invoicing payments associated with this transaction, if any, for reference detail only (the invoicing payments information does not impact settlement deposit batch)","items":{"$ref":"#/components/schemas/SummaryPaymentReference"}}}},"SummaryExceptionTransaction":{"type":"object","description":"Summary reference of known transaction","properties":{"token":{"type":"string","description":"Token identifier for the transaction."},"transaction_reference":{"type":"string","nullable":true,"description":"Extra useful data to help link transactions to other systems e.g. PO numbers, account numbers etc."},"amount_in_cents":{"type":"integer","description":"Transaction amount in cents."},"currency":{"type":"string","description":"Currency code, based on ISO-4217. E.g. `CAD`, `USD`, `AUD`"},"payment_method":{"type":"string","enum":["credit_card","bank_account","gift_card","pos_terminal"]},"settlement_token":{"type":"string","description":"Token corresponding to the settlement routing/processor profile as enumerated in whoami eg bank transfer processor for ACH/EFT, merchant account for CC, gift card processor, pos/terminal processor"}}},"SettlementExceptionResponse":{"type":"object","properties":{"exception_type":{"type":"string","description":"Type of exception.","enum":["chargeback","return","reject"]},"exception_description":{"type":"string","description":"Description of the exception_type"},"exception_date":{"type":"string","description":"Date of the exception transaction","format":"date","example":"2022-01-15"},"exception_amount_in_cents":{"type":"integer","description":"Transaction amount in cents."},"exception_transaction":{"$ref":"#/components/schemas/SummaryExceptionTransaction"},"watermark":{"$ref":"#/components/schemas/Watermark","description":"Watermark value for subsequent calls."}}},"SettlementBatchResponse":{"type":"object","properties":{"token":{"type":"string","description":"Token identifier for the monthly statement."},"merchant_account_token":{"type":"string","description":"Token identifier representing the owing merchant account."},"mid":{"type":"string","description":"The merchant id (MID) associated with the batch deposit or withdrawal"},"batch_close_date":{"type":"string","description":"Date batch was marked closed.","format":"date","example":"2022-01-15"},"batch_deposit_date":{"type":"string","description":"Date batch was deposited into deposit account.","format":"date","example":"2022-01-15"},"batch_net_amount_cents":{"type":"integer","description":"Amount in cents, less fees."},"fee_withdrawal_amount_cents":{"type":"integer","description":"Amount in cents, gross fee amount withdrawn separately to the reported batch deposit."},"deposit_amount_cents":{"type":"integer","description":"Amount in cents deposited into deposit account."},"deposit_currency":{"type":"string","description":"Deposit currency","enum":["usd","eur","gbp","cad","aud"],"example":"usd"},"deposit_routing_number":{"type":"string","description":"Deposit account routing number"},"deposit_account_number":{"type":"string","description":"Masked deposit account number"},"deposit_routing_account_hash":{"type":"string","description":"A hash of the deposit account routing number concatenated with the actual/unmasked deposit account number\n"},"deposit_routing_account_hash_function":{"type":"string","description":"The hash function used to mask the deposit routing and account number per deposit_routing_account_hash\n","enum":["sha-1"]},"fees":{"type":"array","items":{"type":"object","properties":{"token":{"type":"string","description":"Token representing the fee transaction"},"fee_type":{"type":"string","enum":["interchange","payfac","network","processor"]},"included_in_batch_deposit":{"type":"boolean","description":"`true` when fees are included in the batch deposit i.e. a single deposit and its processing proceeds less fees; `false` when there is one deposit for the processing proceeds and a separate deposit for fees"},"fee_withdrawal_date":{"type":"string","format":"date","example":"2022-01-15"},"fee_amount_cents":{"type":"integer","description":"Amount in cents, less fees."},"fee_currency":{"type":"string","description":"Fee currency","enum":["usd","eur","gbp","cad","aud"],"example":"usd"},"fee_withdrawal_routing_number":{"type":"string","description":"Fee account routing number"},"fee_withdrawal_account_number":{"type":"string","description":"Masked fee account number"},"fee_routing_account_hash":{"type":"string","description":"A hash of the fee withdrawal account routing number concatenated with the actual/unmasked fee withdrawal account number\n"},"fee_routing_account_hash_function":{"type":"string","description":"The hash function used to mask the fee withdrawal routing and account number per fee_routing_account_hash\n","enum":["sha-1"]}}}},"transactions":{"type":"array","description":"List of transaction amounts contributing to the deposit batch","items":{"$ref":"#/components/schemas/SummaryBatchTransaction"}},"exceptions":{"type":"array","description":"List of exception transactions including ACH return/reject and CC chargeback contributing to the deposit batch","items":{"$ref":"#/components/schemas/SettlementExceptionResponse"}},"watermark":{"$ref":"#/components/schemas/Watermark","description":"Watermark value for subsequent calls."}}}},"responses":{"UnauthorizedError":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message","example":"You need to sign in or create an account before continuing."}}}}}},"WalletErrors":{"description":"Precondition Failed - Wallet related errors","content":{"application/json":{"schema":{"type":"object","properties":{"wallet_token":{"type":"string"},"fund_token":{"type":"string"},"wallets":{"type":"object","properties":{"error":{"type":"string"}}}}},"examples":{"buyer_account_not_found":{"$ref":"#/components/examples/buyer_account_not_found"},"buyer_account_protected":{"$ref":"#/components/examples/buyer_account_protected"},"buyer_customer_not_found":{"$ref":"#/components/examples/buyer_customer_not_found"},"customer_not_found":{"$ref":"#/components/examples/customer_not_found"},"name_unspecified":{"$ref":"#/components/examples/name_unspecified"},"fund_address_unspecified":{"$ref":"#/components/examples/fund_address_unspecified"},"payment_method_not_found":{"$ref":"#/components/examples/payment_method_not_found"},"fund_protected":{"$ref":"#/components/examples/fund_protected"},"fund_not_authorized":{"$ref":"#/components/examples/fund_not_authorized"},"payment_method_inactive":{"$ref":"#/components/examples/payment_method_inactive"},"credit_card_not_found":{"$ref":"#/components/examples/credit_card_not_found"},"gift_card_not_found":{"$ref":"#/components/examples/gift_card_not_found"},"payment_method_conflict":{"$ref":"#/components/examples/payment_method_conflict"}}}}},"WalletMethodErrors":{"description":"Precondition Failed - Wallet payment method related errors","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}},"examples":{"buyer_account_not_found":{"summary":"buyer_account_not_found","value":{"error":"buyer_account_not_found"}},"buyer_account_protected":{"summary":"buyer_account_protected","value":{"error":"buyer_account_protected"}},"buyer_customer_not_found":{"summary":"buyer_customer_not_found","value":{"error":"buyer_customer_not_found"}},"customer_not_found":{"summary":"customer_not_found","value":{"error":"customer_not_found"}},"name_unspecified":{"summary":"name_unspecified","value":{"error":"name_unspecified"}},"fund_address_unspecified":{"summary":"fund_address_unspecified","value":{"error":"fund_address_unspecified"}},"payment_method_not_found":{"summary":"payment_method_not_found","value":{"error":"payment_method_not_found"}},"fund_protected":{"summary":"fund_protected","value":{"error":"fund_protected"}},"fund_not_authorized":{"summary":"fund_not_authorized","value":{"error":"fund_not_authorized"}},"payment_method_inactive":{"summary":"payment_method_inactive","value":{"error":"payment_method_inactive"}},"credit_card_not_found":{"summary":"credit_card_not_found","value":{"error":"credit_card_not_found"}},"gift_card_not_found":{"summary":"gift_card_not_found","value":{"error":"gift_card_not_found"}},"payment_method_conflict":{"summary":"payment_method_conflict","value":{"error":"payment_method_conflict"}}}}}},"PreconditionFailed":{"description":"Precondition Failed","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message","example":"API token does not have permission for this request. Please contact your account administrator."}}}}}},"NotFoundError":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message","example":"ActiveRecord::RecordNotFound"}}}}}},"BadRequest":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message","example":"You have not provided all necessary parameters to make this call."}}}}}},"Forbidden":{"description":"Forbidden","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"Error message","example":"This request is not allowed for this resource."}}}}}}},"examples":{"list_of_wallets":{"summary":"List of wallets","value":{"wallets":[{"token":"77A81025AC3A","credit_cards":[{"token":"CC54QRN1CLDX","gateway_token":"k8oz6mz8w0ma","cardholder":"John Adam","card_number":"Visa **1111","display_name":"Visa **1111","nickname":null,"expiry_month":12,"expiry_year":2025,"is_debit":false,"is_default":false,"brand":"visa","created":"2020-09-02T10:50:54.000-04:00","locked":false,"inactive":false,"last_transaction_date":"2021-03-31T16:48:33.000-04:00","last_transaction":"2SWW4NXAQGEX","last_payment":"3EHSHYGJKK3C","address":{"address_1":null,"address_2":null,"city":null,"state":null,"province":null,"country":null,"country_name":null,"zip":"","postal_code":"","line_1":"","line_2":"","created_at":"2020-09-02T10:50:54.000-04:00","updated_at":"2020-09-02T10:50:54.000-04:00"}}],"bank_accounts":[{"account_holder":"Solupay","branch_number":"","institution_number":"","routing_number":"122000247","sort_code":null,"iban":null,"account_number":" (1156)","nickname":null,"state":"verified","verification_attempts":0,"token":"BA25BVH5HCRI","gateway_token":null,"account_type":"checking","external_name":null,"external_number":null,"display_name":" (1156)","usage":"ap","currency":"usd","domicile":"US","created":"2020-09-02T10:50:02.000-04:00","is_default":false,"locked":false,"check_type":null,"inactive":false,"last_transaction_date":"2021-03-28T18:13:01.000-04:00","last_transaction":"9BY2J2JK5JK3","last_payment":"246X11DST8WL","address":{"address_1":"","address_2":"","city":"","state":null,"province":null,"country":"US","country_name":"USA","zip":"","postal_code":"","line_1":"","line_2":"US","created_at":"2020-09-02T10:50:02.000-04:00","updated_at":"2020-09-02T10:50:02.000-04:00"}}],"customers":[{"identifier":"1715","contacts":[{"email":"jdoe@versapay.com"}]},{"identifier":"1764","contacts":[{"email":"smith@versapay.com"},{"email":"jdoe@versapay.com"}]}]},{"token":"7EVZCIY25G9L","credit_cards":[{"token":"CC3PTIFL9AEI","gateway_token":"92g1xpkeocne","cardholder":"John A. Appseed","card_number":"Visa **1111","display_name":"Visa **1111","nickname":null,"expiry_month":1,"expiry_year":2025,"is_debit":false,"is_default":false,"brand":"visa","created":"2021-05-10T09:27:38.000-04:00","locked":false,"inactive":false,"last_transaction_date":"2021-09-20T11:59:51.000-04:00","last_transaction":"2FUSRN7VMZU9","last_payment":"1QC8WS1GRHMC","address":{"address_1":null,"address_2":null,"city":null,"state":null,"province":null,"country":null,"country_name":null,"zip":"","postal_code":"","line_1":"","line_2":"","created_at":"2021-05-10T09:27:38.000-04:00","updated_at":"2021-05-10T09:27:38.000-04:00"}}],"bank_accounts":[],"customers":[{"identifier":"ARC Customer","contacts":[{"email":"salesdemo@versapay.com"},{"email":"jdoe@versapay.com"}]}]},{"token":"96CYTUXCHRWV","credit_cards":[{"token":"CC7E7XD59YQC","gateway_token":"ns4gzxbvq1ch","cardholder":"test customer","card_number":"Visa **1111","display_name":"Visa **1111","nickname":null,"expiry_month":10,"expiry_year":2025,"is_debit":false,"is_default":false,"brand":"visa","created":"2021-04-23T16:51:43.000-04:00","locked":false,"inactive":false,"last_transaction_date":"2021-04-28T09:16:59.000-04:00","last_transaction":"7BUQR4UZC85V","last_payment":"3TVZ9UF5L7J5","address":{"address_1":null,"address_2":null,"city":null,"state":null,"province":null,"country":null,"country_name":null,"zip":"L6X 0V4","postal_code":"L6X 0V4","line_1":"","line_2":"L6X 0V4","created_at":"2021-04-23T16:51:43.000-04:00","updated_at":"2021-04-23T16:51:43.000-04:00"}}],"bank_accounts":[],"customers":[{"identifier":"ARC Test","contacts":[{"email":"email@gmail.com"},{"email":"salesdemo@versapay.com"},{"email":"jdoe@versapay.com"}]}]},{"token":"3SGYEEUSTLTA","credit_cards":[{"token":"CC66UIZD7MH7","gateway_token":"jhrciteuh7hx","cardholder":"Pam Beesly","card_number":"Visa **1111","display_name":"Visa **1111","nickname":null,"expiry_month":4,"expiry_year":2023,"is_debit":false,"is_default":false,"brand":"visa","created":"2021-04-13T09:24:22.000-04:00","locked":false,"inactive":true,"last_transaction_date":"2021-04-13T09:25:08.000-04:00","last_transaction":"46Y315K2URPR","last_payment":"3D5DESMMYF1P","address":{"address_1":null,"address_2":null,"city":null,"state":null,"province":null,"country":null,"country_name":null,"zip":"","postal_code":"","line_1":"","line_2":"","created_at":"2021-04-13T09:24:22.000-04:00","updated_at":"2021-04-13T09:24:22.000-04:00"}},{"token":"CC1AS2CXH1AX","gateway_token":"531u115q27ms","cardholder":"CBOE Holdings Inc","card_number":"Visa **1111","display_name":"Visa **1111","nickname":null,"expiry_month":3,"expiry_year":2023,"is_debit":false,"is_default":false,"brand":"visa","created":"2021-04-13T09:27:42.000-04:00","locked":false,"inactive":false,"last_transaction_date":"2021-06-03T13:29:05.000-04:00","last_transaction":"8M3SFE1PN7VT","last_payment":"3UVNF2VPVADL","address":{"address_1":null,"address_2":null,"city":null,"state":null,"province":null,"country":null,"country_name":null,"zip":"","postal_code":"","line_1":"","line_2":"","created_at":"2021-04-13T09:27:42.000-04:00","updated_at":"2021-04-13T09:27:42.000-04:00"}}],"bank_accounts":[],"customers":[{"identifier":"Bubba Hoss","contacts":[{"email":"versapayinvoices@gmail.com"},{"email":"jdoe@versapay.com"}]}]}]}},"new_wallet_empty":{"summary":"New empty wallet","value":{"wallet_token":"5EJQM2RL4K2G","fund_token":null,"wallets":[{"token":"5EJQM2RL4K2G","credit_cards":[],"bank_accounts":[],"customers":[{"identifier":"API-PTwDRl1PoialcnEHGv54V7Nj","contacts":[]}]}]}},"new_wallet_fund":{"summary":"New wallet with payment method added","value":{"wallet_token":"5EJQM2RL4K2G","fund_token":"CC54QRN1CLDX","wallets":[{"token":"5EJQM2RL4K2G","credit_cards":[{"token":"CC54QRN1CLDX","gateway_token":"k8oz6mz8w0ma","cardholder":"John Adam","card_number":"Visa **1111","display_name":"Visa **1111","nickname":null,"expiry_month":12,"expiry_year":2025,"is_debit":false,"is_default":false,"brand":"visa","created":"2020-09-02T10:50:54.000-04:00","locked":false,"inactive":false,"last_transaction_date":null,"last_transaction":null,"last_payment":null,"address":{"address_1":null,"address_2":null,"city":null,"state":null,"province":null,"country":null,"country_name":null,"zip":"","postal_code":"","line_1":"","line_2":"","created_at":"2020-09-02T10:50:54.000-04:00","updated_at":"2020-09-02T10:50:54.000-04:00"}}],"bank_accounts":[],"customers":[{"identifier":"API-PTwDRl1PoialcnEHGv54V7Nj","contacts":[]}]}]}},"buyer_account_not_found":{"summary":"buyer_account_not_found","value":{"wallet_token":null,"fund_token":null,"wallets":{"error":"buyer_account_not_found"}}},"buyer_account_protected":{"summary":"buyer_account_protected","value":{"wallet_token":null,"fund_token":null,"wallets":{"error":"buyer_account_protected"}}},"buyer_customer_not_found":{"summary":"buyer_customer_not_found","value":{"wallet_token":null,"fund_token":null,"wallets":{"error":"buyer_customer_not_found"}}},"customer_not_found":{"summary":"customer_not_found","value":{"wallet_token":null,"fund_token":null,"wallets":{"error":"customer_not_found"}}},"name_unspecified":{"summary":"name_unspecified","value":{"wallet_token":null,"fund_token":null,"wallets":{"error":"name_unspecified"}}},"fund_address_unspecified":{"summary":"fund_address_unspecified","value":{"wallet_token":null,"fund_token":null,"wallets":{"error":"fund_address_unspecified"}}},"payment_method_not_found":{"summary":"payment_method_not_found","value":{"wallet_token":null,"fund_token":null,"wallets":{"error":"payment_method_not_found"}}},"fund_protected":{"summary":"fund_protected","value":{"wallet_token":null,"fund_token":null,"wallets":{"error":"fund_protected"}}},"fund_not_authorized":{"summary":"fund_not_authorized","value":{"wallet_token":null,"fund_token":null,"wallets":{"error":"fund_not_authorized"}}},"payment_method_inactive":{"summary":"payment_method_inactive","value":{"wallet_token":null,"fund_token":null,"wallets":{"error":"payment_method_inactive"}}},"credit_card_not_found":{"summary":"credit_card_not_found","value":{"wallet_token":null,"fund_token":null,"wallets":{"error":"credit_card_not_found"}}},"gift_card_not_found":{"summary":"gift_card_not_found","value":{"wallet_token":null,"fund_token":null,"wallets":{"error":"gift_card_not_found"}}},"payment_method_conflict":{"summary":"payment_method_conflict","value":{"wallet_token":null,"fund_token":null,"wallets":{"error":"payment_method_conflict"}}},"export_wallets":{"summary":"Export wallets","value":{"wallets":{"33196":{"token":"E38B7566FE90","credit_cards":[{"token":"CC7ELZ3ZIRHC","gateway_token":"k8oz6mz8w0ma","cardholder":"Eric Tatum","card_number":"Visa **1111","display_name":"Visa **1111","nickname":null,"expiry_month":12,"expiry_year":2025,"is_debit":false,"is_default":false,"brand":"visa","created":"2020-11-16T14:15:12.000-05:00","locked":false,"inactive":false,"last_transaction_date":"2020-11-16T14:15:28.000-05:00","last_transaction":"8QK4BYC5468S","last_payment":"4SZR1ZB2GGFU","address":{"address_1":null,"address_2":null,"city":null,"state":null,"province":null,"country":null,"country_name":null,"zip":"","postal_code":"","line_1":"","line_2":"","created_at":"2020-11-16T14:15:12.000-05:00","updated_at":"2020-11-16T14:15:12.000-05:00"}}],"bank_accounts":[],"customers":[{"identifier":"3106","contacts":[{"email":"eric@solupay.com"},{"email":"pm@versapay.com"}]}],"watermark":33196},"41383":{"token":"3K8ZJ4G663LL","credit_cards":[{"token":"CC2I5LZZ71TG","gateway_token":"ejia1yr1zbht","cardholder":"Candy Cane","card_number":"Visa **1111","display_name":"Visa **1111","nickname":null,"expiry_month":1,"expiry_year":2024,"is_debit":false,"is_default":false,"brand":"visa","created":"2021-02-25T11:45:46.000-05:00","locked":false,"inactive":false,"last_transaction_date":"2021-02-25T11:46:08.000-05:00","last_transaction":"1TTNG7U92AAD","last_payment":"3553VC71RQIE","address":{"address_1":null,"address_2":null,"city":null,"state":null,"province":null,"country":null,"country_name":null,"zip":"12345","postal_code":"12345","line_1":"","line_2":"12345","created_at":"2021-02-25T11:45:46.000-05:00","updated_at":"2021-02-25T11:45:46.000-05:00"}}],"bank_accounts":[],"customers":[{"identifier":"3569","contacts":[{"email":"abcxyz@abc.com"},{"email":"abcxyz123@abc.com"}]}],"watermark":41383},"42327":{"token":"6D99F9JX9NJB","credit_cards":[{"token":"CC1F3BSBLQC1","gateway_token":"ns4gzxbvq1ch","cardholder":"Demo3 NS1","card_number":"Visa **1111","display_name":"Visa **1111","nickname":null,"expiry_month":10,"expiry_year":2025,"is_debit":false,"is_default":false,"brand":"visa","created":"2021-03-03T22:11:21.000-05:00","locked":false,"inactive":false,"last_transaction_date":"2021-03-03T22:26:01.000-05:00","last_transaction":"2ZIMJMFVRG8L","last_payment":"14ZIYYXYEZ38","address":{"address_1":null,"address_2":null,"city":null,"state":null,"province":null,"country":null,"country_name":null,"zip":"","postal_code":"","line_1":"","line_2":"","created_at":"2021-03-03T22:11:21.000-05:00","updated_at":"2021-03-03T22:11:21.000-05:00"}}],"bank_accounts":[],"customers":[{"identifier":"3580","contacts":[{"email":"demo3ns1@abc.com"}]}],"watermark":42327},"42328":{"token":"2GX14AMUHU2B","credit_cards":[{"token":"CC5CGT99ZIU5","gateway_token":"92g1xpkeocne","cardholder":"Jose Parent","card_number":"Visa **1111","display_name":"Visa **1111","nickname":null,"expiry_month":1,"expiry_year":2025,"is_debit":false,"is_default":false,"brand":"visa","created":"2021-03-04T00:31:44.000-05:00","locked":false,"inactive":false,"last_transaction_date":"2021-03-04T00:34:57.000-05:00","last_transaction":"4VV82VHNI6JC","last_payment":"1JBVEQR17U35","address":{"address_1":null,"address_2":null,"city":null,"state":null,"province":null,"country":null,"country_name":null,"zip":"44087","postal_code":"44087","line_1":"","line_2":"44087","created_at":"2021-03-04T00:31:44.000-05:00","updated_at":"2021-03-04T00:31:44.000-05:00"}}],"bank_accounts":[],"customers":[{"identifier":"3589","contacts":[{"email":"joseparent@solupay.com"}]}],"watermark":42328},"42329":{"token":"1XMJTMUGISGI","credit_cards":[],"bank_accounts":[],"customers":[{"identifier":"3590","contacts":[{"email":"josechild@solupay.com"}]}],"watermark":42329}}}},"use_existing_fund":{"summary":"Amount to process and fund reference (eg credit card) to pay from","value":{"order":"3SLSC9HX3AHB","amount_cents":4200,"fund_token":"CC98U7LI8H91"}},"use_existing_credit_card":{"summary":"Amount to process and credit card reference to pay from","value":{"order":"3SLSC9HX3AHB","amount_cents":4200,"credit_card":"CC98U7LI8H91"}},"use_existing_credit_card_fee_exempt":{"summary":"Amount to process and credit card reference to pay from (ignore any configured surcharging rules)","value":{"fee_exempt":true,"order":"3SLSC9HX3AHB","amount_cents":4200,"credit_card":"CC98U7LI8H91"}},"use_cp_emv_terminal":{"summary":"Amount to process via terminal (card present emv)","value":{"order":"3SLSC9HX3AHB","amount_cents":4200,"contact":{"email":"tim@coffee.com","first_name":"Tim","last_name":"Man"},"terminal":{"laneid":"1","enable_manual_entry":false}}},"use_cp_emv_terminal_prompt":{"summary":"Amount to process via terminal (card present emv) prompting for card number entry via PIN pad","value":{"order":"3SLSC9HX3AHB","amount_cents":4200,"contact":{"email":"tim@coffee.com","first_name":"Tim","last_name":"Man"},"terminal":{"laneid":"1","enable_manual_entry":true}}},"use_new_credit_card":{"summary":"Amount to process and full credit card details to pay from","value":{"order":"3SLSC9HX3AHB","amount_cents":4200,"contact":{"email":"tim@coffee.com","first_name":"Tim","last_name":"Man"},"credit_card":{"name":"Tim Man","expiry_month":12,"expiry_year":2025,"card_number":"4111111111111111","cvv":"123","address":{"address_1":"123 Abc St","city":"Beverly Hills","province":"CA","postal_code":"90210","country":"US"}}}},"use_new_bank_account":{"summary":"Amount to process and bank account details to pay from","value":{"order":"3SLSC9HX3AHB","amount_cents":4200,"contact":{"email":"tim@coffee.com","first_name":"Tim","last_name":"Man"},"bank_account":{"currency":"USD","account_type":"checking","account_holder":"Tim Coffee Ltd","account_number":"144155167","routing_number":"121000248","external_name":"BANK","external_number":"777","address":{"address_1":"123 Abc St","city":"Beverly Hills","province":"CA","postal_code":"90210","country":"US"}}}},"use_settlement_routing":{"summary":"Use specific merchant account settlement route to pay order (eg credit card)","value":{"order":{"identifier":"3SLSC9HX3AHB","settlement_token":"MA123XYZABCD"},"amount_cents":4200,"fund_token":"CC98U7LI8H91"}},"declined_invalid_card":{"summary":"Decline invalid card","value":{"success":false}},"declined":{"summary":"Gateway declined request","value":{"success":false,"errors":["declined for REASON"]}},"error":{"summary":"Other errors","value":{"success":false,"errors":["order_not_found"]}},"use_gift_card":{"summary":"Amount to process and gift card details to pay from","value":{"order":"3SLSC9HX3AHB","amount_cents":4200,"contact":{"email":"tim@coffee.com","first_name":"Tim","last_name":"Man"},"gift_card":{"name":"Tim Man","expiry_month":12,"expiry_year":2049,"card_number":"4775419990420272","pin":"1234"}}},"tc_device_setup":{"summary":"Device setup","value":{"laneid":"1","command":"DeviceSetup"}},"tc_request_signature":{"summary":"Request signature","value":{"laneid":"1","command":"RequestSignature"}},"tc_cancel":{"summary":"Cancel","value":{"laneid":"1","command":"Cancel"}},"tc_device_status":{"summary":"Device status","value":{"laneid":"1","command":"DeviceStatus"}},"gc_activate":{"summary":"Activate a gift card","value":{"card_number":"4775419990420272","expiry_month":"12","expiry_year":"2049","pin":"1234","activated":"true"}},"gc_deactivate":{"summary":"Deactivate a gift card","value":{"card_number":"4775419990420272","expiry_month":"12","expiry_year":"2049","pin":"1234","activated":"false"}},"gc_load":{"summary":"Load a gift card with 778.50","value":{"card_number":"4775419990420272","expiry_month":"12","expiry_year":"2049","pin":"1234","load_amount_cents":77850}},"gc_activate_load":{"summary":"Activate and load a gift card with 778.50","value":{"card_number":"4775419990420272","expiry_month":"12","expiry_year":"2049","pin":"1234","activated":"true","load_amount_cents":77850}},"gc_read":{"summary":"Read gift card balance","value":{"card_number":"4775419990420272","expiry_month":"12","expiry_year":"2049","pin":"1234"}},"prior_transaction_reference":{"summary":"Directly reference prior transaction and amount to capture","value":{"amount_cents":4200,"transaction":"9HWLBLWXXPRX"}}}}}