{
  "openapi": "3.0.0",
  "servers": [
    {
      "url": "https://app-sandbox.resolvepay.com/api",
      "description": "Sandbox server"
    }
  ],
  "info": {
    "title": "Resolve API Reference",
    "version": "V5",
    "description": "API Support: [accounts@resolvepay.com](mailto:accounts@resolvepay.com?subject=API)\n\nLegacy (v2) API documentation: [https://app.resolvepay.com/docs/api/v2](https://app.resolvepay.com/docs/api/v2)\n"
  },
  "tags": [
    {
      "name": "Introduction",
      "description": "The Resolve API is organized around [REST](https://en.wikipedia.org/wiki/Representational_state_transfer) principles.\nIt uses predictable resource-oriented URLs, standard HTTP verbs and response codes,\nand accepts and returns [JSON-encoded](https://www.json.org/json-en.html) request and response bodies.\n\nThe current version is **V5**. You can upgrade the version of the API that your\naccount uses within your [merchant settings](https://app.resolvepay.com/dashboard/integrations).\nLegacy (v2) API documentation may be found [here](https://app.resolvepay.com/docs/api/v2).\n",
      "x-traitTag": true
    },
    {
      "name": "Access Keys",
      "x-displayName": "Access Keys",
      "description": "OAuth access keys are created in Merchant Dashboard and can be exchanged for bearer tokens.\n\nUse the `/access-keys/token` endpoint to mint a bearer token from a valid `client_id` and `client_secret`.\n"
    },
    {
      "name": "Webhooks",
      "x-displayName": "Webhooks",
      "description": "Webhooks allow you to receive real-time notifications about events in your Resolve account. When an event occurs, Resolve sends an HTTP POST request to your configured webhook endpoint with details about the event.\n\n## Webhook Event Structure\n\nAll webhook events follow a consistent structure:\n\n```json\n{\n  \"id\": \"4ecbe7f9e8c1c9092c000027\",\n  \"object\": \"invoice\",\n  \"type\": \"invoice.created\",\n  \"occurred_at\": \"2021-05-20T09:23:53+00:00\",\n  \"data\": {\n    \"id\": \"RH5fF9aeQ\"\n  }\n}\n```\n\nThe `data.id` field contains the ID of the object related to the event. You can use this ID to fetch the full object via the corresponding API endpoint.\n\n## Supported Event Types\n\n### Invoice Events\n- **`invoice.created`** - Triggered when a new invoice record is created.\n- **`invoice.balance_updated`** - Triggered when the outstanding balance of an invoice changes (for example, when a payment or credit note is applied).\n\n### Customer Events\n- **`customer.created`** - Triggered when a new customer record is created.\n- **`customer.status_updated`** - Triggered when a customer's status changes (for example, when a customer is submitted for a credit check or enrolled).\n- **`customer.line_amount_updated`** - Triggered when a customer's credit limit amount is updated.\n- **`customer.advance_rate_updated`** - Triggered when a customer's advance rate percentage is updated.\n- **`customer.credit_decision_created`** - Triggered when a new credit decision is created for a customer.\n\n### Payout Events\n- **`payout.created`** - Triggered when a new payout record is created.\n- **`payout.status_changed`** - Triggered when the status of a payout changes (for example, pending, in transit, paid).\n\n## Verifying Webhook Signatures\n\nTo ensure webhook requests are genuine and coming from Resolve, you should verify the webhook signature. Resolve includes a signature in the `x-webhook-signature` header of each webhook request.\n\n### JavaScript Example\n\n```javascript\nconst crypto = require('crypto');\n\nfunction verifyWebhookSignature(payload, signature, secret) {\n  const computedSignature = crypto\n    .createHmac('sha256', secret)\n    .update(JSON.stringify(payload))\n    .digest('hex');\n\n  return crypto.timingSafeEqual(\n    Buffer.from(signature),\n    Buffer.from(computedSignature)\n  );\n}\n\n// Usage in Express.js\napp.post('/webhooks', express.json(), (req, res) => {\n  const signature = req.headers['x-webhook-signature'];\n  const isValid = verifyWebhookSignature(req.body, signature, process.env.WEBHOOK_SECRET);\n\n  if (!isValid) {\n    return res.status(401).send('Invalid signature');\n  }\n\n  // Process the webhook event\n  const event = req.body;\n  console.log('Received event:', event.type);\n\n  res.status(200).send('Webhook received');\n});\n```\n\n## Retry Policy\n\nIf your webhook endpoint doesn't respond successfully (non-2xx status code or connection error), Resolve will automatically retry sending the webhook notification. The retry schedule follows an exponential backoff pattern:\n\n- **1st retry**: 30 seconds after the initial attempt\n- **2nd retry**: 90 seconds after the 1st retry\n- **3rd retry**: 270 seconds (4.5 minutes) after the 2nd retry\n- **4th retry**: 810 seconds (13.5 minutes) after the 3rd retry\n- **5th retry**: 2430 seconds (40.5 minutes) after the 4th retry\n\nAfter the 5th unsuccessful attempt, Resolve will stop retrying and the webhook delivery will be marked as failed.\n\n## Best Practices\n\n- Always verify webhook signatures to ensure the request is from Resolve\n- Respond with a `200` status code as quickly as possible to acknowledge receipt\n- Process webhook events asynchronously if they require time-intensive operations\n- Implement idempotency on your endpoint to handle duplicate events from retries\n- Use the event `id` to track which events you've already processed\n"
    },
    {
      "name": "Invoices",
      "x-displayName": "Invoices",
      "description": "The invoice represents the business transaction between you and your customer. In Resolve, an invoice must be tied to a customer and an advance can be taken on the invoice.\n\nFor an advance to be taken on the invoice, a PDF of the invoice must be uploaded and the associated customer must be approved and have available credit for the amount of the invoice.\n"
    },
    {
      "name": "Customers",
      "x-displayName": "Customers",
      "description": "A customer represents a company that you do business with. For larger companies, there may be several users with access to the customer account that can make purchases with their credit line. For smaller companies, a customer may represent a single individual. Retrieve a customer to get a summary of their total credit line and available credit balance.\n"
    },
    {
      "name": "Charges",
      "x-displayName": "Charges",
      "description": "A charge represents an agreement by the customer to accept credit terms for a transaction. It consists of a charge amount, term length (i.e. 30, 60, 90), and reference to the merchant's original order or purchase order numbers.\n\nThese endpoints are intended for merchants using the [Checkout SDK](/guides/checkout-sdk).\nIf you are not using the Checkout SDK flow, these endpoints are generally not needed.\n"
    },
    {
      "name": "Payouts",
      "x-displayName": "Payouts",
      "description": "A Payout is a transfer of money between the  Merchant and Resolve.\n"
    },
    {
      "name": "Payout Transactions",
      "x-displayName": "Payout Transactions",
      "description": "Payout Transactions are the individual transactions like customer payments, Resolve advances, forwarded payments, etc. that are rolled into a Payout. Each Payout is the sum of one or more transactions. Note that certain fields are only relevant to certain transaction types - e.g.: a Payout Transaction of type `monthly_fee` will have both `customer_id` and `invoice_id` set to `null`.\n"
    },
    {
      "name": "Payments",
      "x-displayName": "Payments",
      "description": "A payment represents a transaction where a customer pays towards their invoices. When a payment is made to Resolve, the customer's available credit balance is increased by the amount of the payment. Payments can be made via various methods including ACH, credit card, check, or wire transfer. Each payment can be applied to one or more invoices.\n"
    },
    {
      "name": "Credit Notes",
      "x-displayName": "Credit Notes",
      "description": "Credit Notes are issued to customers to reduce the amount they owe.\n"
    },
    {
      "name": "Shipments",
      "x-displayName": "Shipments",
      "description": "A shipment represents the fulfillment of goods or services for an invoice. Track shipments to monitor delivery status and fulfillment progress. Shipments can be fulfilled through various methods including shipping providers, self-delivery, customer pickup, or for services-only transactions.\n\n## Supported Couriers\n\nWhile any courier value can be accepted for the `shipment_courier` field, instant verification through the sync endpoint is supported for the following couriers:\n\n### Major Carriers\n- `fedex` - FedEx®\n- `ups` - UPS\n- `usps` - USPS\n- `dhl` - DHL Express\n- `dhl-api` - DHL\n\n### Complete List of Supported Couriers\n\n`fedex`, `ups`, `usps`, `17postservice`, `2go`, `2ebox`, `360lion`, `3jmslogistics`, `4-72`, `4px`, `shipstoresoftware-webhook`, `99minutos`, `aduiepyle`, `a1post`, `a2b-ba`, `aaa-cooper`, `abf`, `acilogistix`, `acscourier`, `acsworldwide`, `ads`, `adsone`, `aex`, `afllog-ftp`, `arihantcourier`, `air21`, `aitworldwide-sftp`, `aitworldwide-api`, `alljoy`, `amsegroup`, `ancdelivers-sftp`, `anserx`, `ao-deutschland`, `ao-courier`, `ao-courier-webhook`, `apc-overnight`, `apc-overnight-connum`, `apc`, `apg`, `ark-logistics`, `ase`, `asigna`, `asm`, `ata`, `atshealthcare`, `atshealthcare-reference`, `activos24-api`, `aderonline`, `adicional`, `aeronet`, `test-courier`, `agediss-sftp`, `agility`, `airmee-webhook`, `airpak-express`, `airspeed`, `allegro`, `alliedexpress`, `allied-express-ftp`, `alphafreight-webhook`, `always-express`, `amazon`, `awest`, `an-post`, `andreani-api`, `anicamboxexpress`, `anjun`, `anteraja`, `aoyue`, `aquiline`, `aramex`, `aramex-api`, `fastway-au-api`, `fastway-au`, `araskargo`, `arco-spedizioni`, `argents-webhook`, `arrow-api`, `arrowxl`, `asendia-de`, `asendia-hk`, `asendia`, `asendia-uk`, `asendia-usa`, `agsystems`, `associated-couriers`, `asyadexpress`, `auexpress`, `australia-post`, `australia-post-api`, `austrian-post`, `austrian-post-registered`, `averitt`, `axlehire`, `axlehire-ftp`, `bh-worldwide`, `b2ceurope`, `bdmnet`, `bjshomedelivery`, `bjshomedelivery-ftp`, `brt-it`, `brt-it-api`, `brt-it-parcelid`, `brt-it-sender-ref`, `btxglobal-ftp`, `buffalo`, `barqexp`, `barsan`, `belpost`, `ibeone`, `bert-fr`, `800bestex`, `besttransport-sftp`, `bestwayparcel`, `bettertrucks`, `bigsmart`, `biocair-ftp`, `birdsystem`, `bleckmann-sftp`, `blinklastmile`, `bluex`, `bluestar`, `bluecare`, `bluedart-api`, `bluedart`, `bneed`, `bollore-logistics-sftp`, `bollore-logistics`, `bombinoexp`, `bomi-br-api`, `bomi`, `bond`, `bondscouriers`, `borderexpress`, `borderless360-webhook`, `boxc`, `box-berry`, `boxcheck-api`, `bpost`, `bpost-api`, `bpost-international`, `braspress-web`, `braunsexpress`, `brazil-correios`, `bring`, `bringer`, `brouwer-transport`, `budbee-webhook`, `bgpost`, `burd`, `cchezvous-sftp`, `cae-delivers`, `cbl-logistica`, `cbl-logistica-api`, `cdek`, `cdek-tr`, `cdldelivers`, `cdldelivers-api`, `ceva`, `ceva-webhook`, `ceva-tracking`, `cfl-logistics`, `cgs-express`, `parcll`, `cj-malaysia-international`, `cj-gls`, `cj-korea-thai`, `cjlogistics`, `cj-hk-international`, `cjpacket`, `cj-philippines`, `ckb-webhook`, `cle-logistics`, `cn-logistics`, `cnexps`, `crlexpress`, `cse`, `ctc-express`, `tourline`, `cacesa`, `cago`, `cainiao`, `cambodia-post`, `canada-post`, `canpar`, `capital`, `cpex`, `cargopartner-api`, `carriers`, `carry-flap`, `castleparcels`, `celeritas-ftp`, `cello-square`, `champion-logistics`, `chazki`, `chienventure-webhook`, `chilexpress-webhook`, `china-ems`, `china-post`, `chitchats`, `choirexpress`, `chronopost-france-webhook`, `chronopost-france`, `chronopost-portugal`, `ec-firstclass`, `city56-webhook`, `citylinkexpress`, `clevy-links`, `clicklink-sftp`, `cloudwish-asia`, `colis-prive`, `colissimo`, `collectplus`, `collectco`, `com1express`, `comet-tech`, `con-way`, `concise-api`, `concise-webhook`, `continental`, `coordinadora`, `coordinadora-api`, `copa-courier`, `cope`, `corporatecouriers-webhook`, `correo-uy`, `correosexpress`, `correosexpress-api`, `spain-correos-es`, `correos-de-mexico`, `costmeticsnow`, `courant-plus`, `courant-plus-api`, `courierit`, `cnwglobal-api`, `courier-plus`, `courierpost`, `couriers-please`, `croshot`, `crossflight`, `cryopdp-ftp`, `cubyn`, `cuckooexpress`, `cyprus-post`, `ceskaposta`, `ceskaposta-api`, `dexpress-webhook`, `dachser-web`, `dachser`, `daiglobaltrack`, `dao365`, `dbschenker-se`, `dbschenker-api`, `dbschenker-b2b`, `dbschenker-iceland-ftp`, `dbschenker-sv`, `ddexpress`, `deliveryontime`, `dex-i`, `dhl-api`, `dhl-reference-api`, `dhl-active-tracing`, `dhl-benelux`, `dhl-sftp`, `dhl`, `dhl-pieceid`, `dhl-freight`, `dhl-pa-api`, `dhl-global-forwarding-api`, `dhl-gt-api`, `dhl-ecommerce-gc`, `dhl-ecommerce-gc-api`, `dhl-hk`, `dhl-ie-sftp`, `dhl-nl`, `dhlparcel-nl`, `dhlparcel-ru`, `dhlparcel-es`, `dhlparcel-uk`, `dhl-poland`, `dhl-es-sftp`, `dhl-es`, `dhl-supplychain-apac`, `dhl-supply-chain-au-sftp`, `dhl-supply-chain-au`, `dhl-supplychain-id`, `dhl-global-mail-asia`, `dhl-global-mail-asia-api`, `dhl-global-mail`, `dhl-global-mail-api`, `dhl-supplychain-in`, `didadi`, `dirmensajeria`, `dksh`, `dmfgroup`, `dms-matrix`, `dnj-express`, `domino`, `dpd`, `dpd-api`, `dpd-at`, `dpd-at-sftp`, `exapaq`, `dpd-de`, `dpd-hk`, `dpd-hungary-web`, `dpd-hungary-ftp`, `dpd-hungary`, `dpd-ireland`, `interlink-express`, `interlink-express-reference`, `dpd-nl-api`, `packs-api`, `dpd-nl`, `dpd-poland`, `dpd-prt`, `dpd-ro`, `dpd-ru-api`, `dpd-ru`, `dpd-sk-sftp`, `dpd-ch-sftp`, `dpd-uk`, `dpd-uk-sftp`, `dpe-express`, `dpe-za`, `dpex`, `szdpex`, `dsv-za-sftp`, `dsv`, `dsv-reference`, `dsv-are-webhook`, `dtd`, `dtdc-au`, `dtdc-express`, `dtdc`, `dx`, `dx-sftp`, `dx-b2b-connum`, `dx-freight`, `daeshin`, `daiichi`, `danniao`, `danske-fragt`, `dashlink-webhook`, `dawnwing`, `dayross`, `dylt`, `dayton-freight`, `dealer-send`, `delhivery-webhook`, `delhivery`, `deliveryourparcel-za`, `deliver-it`, `smartkargo`, `deliveright-webhook`, `deliverr-sftp`, `delnext`, `deltec-courier`, `godependable`, `designertransport-webhook`, `destiny-ftp`, `destiny`, `destiny-webhook`, `detrack`, `detrack-webhook`, `dhl-germany`, `deutsch-post`, `dialogo-logistica-api`, `dialogo-logistica`, `diamondcouriers`, `dimerco`, `directcouriers`, `directcouriers-ftp`, `directfreight-au-ref`, `directlog`, `direx`, `discountpost`, `emega`, `dobropost`, `doordash-webhook`, `doora`, `dynamic-logistics`, `ecms`, `ecoscooting`, `ecexpress`, `efs`, `elta-courier`, `empsexpress`, `ems`, `eu-fleet-solutions`, `myhermes-uk`, `myhermes-uk-api`, `ewe`, `expressone`, `expressone-sv`, `earlybird`, `eastwestcourier-ftp`, `easy-mail`, `easyroutes`, `easyparcel`, `ecargo-asia`, `echo`, `ecofreight`, `ecom-express`, `ekart`, `ekol-api`, `elite-co`, `emirates-post`, `endeavour-delivery`, `energologistic`, `envialia`, `envialia-reference`, `equick-cn`, `eshipping`, `zes-express`, `estafeta`, `estafeta-api`, `estes`, `efwnow-api`, `etomars`, `edf-ftp`, `eurodis`, `europaket-api`, `exelot-ftp`, `expeditors`, `expeditors-api-ref`, `expresssale`, `fan`, `far-international`, `fdsexpress`, `fercam`, `fmx`, `frontdoorcorp`, `fujexp`, `fargood`, `fnf-za`, `fastdespatch`, `fastbox`, `fastrak-th`, `fastship`, `fasttrack`, `aramex-au-api`, `fastway-ireland`, `fastway-nz`, `fastway-za`, `faxecargo`, `fetchr`, `fiege`, `fiege-nl`, `first-flight`, `first-logistics-api`, `firstmile`, `fitzmark-api`, `flashexpress`, `flashexpress-webhook`, `flashexpress-ph-api`, `fleetopticsinc`, `flightlg`, `flipxp`, `fliway-sftp`, `fliway-api`, `flytexpress`, `fonsen`, `forwardair`, `fragilepak-sftp`, `freightquote`, `freterapido`, `fukuyama-sftp`, `fulfilla`, `fulfillmen`, `furdeco`, `gwlogis-api`, `gac-webhook`, `gangbao`, `gba`, `gbs-broker`, `gcx`, `gdex`, `gdpharm-webhook`, `gdpharm`, `gemworldwide`, `geodis-api`, `geodis-sftp`, `geodis-calberson-fr`, `geswl`, `gio-ecourier-api`, `gio-ecourier`, `gls`, `gls-croatia`, `gls-cz`, `gls-slovakia`, `gls-hun-api`, `gls-hun`, `gls-italy-ftp`, `gls-italy`, `dicom`, `gls-netherlands`, `gls-netherlands-webhook`, `gls-netherlands-sftp`, `gls-romania`, `gls-slovenia`, `gls-spain`, `gls-spain-api`, `gls-us`, `gols`, `gps`, `gsi-express`, `gso`, `gtagsm`, `gati-kwe`, `gati-kwe-api`, `gw-world`, `geis`, `gel-express`, `taxydromiki`, `geodis-usa-api`, `gpost`, `ghn`, `goglobalpost`, `globaltranz`, `globavend`, `globegistics`, `glovo`, `general-overnight`, `general-overnight-ftp`, `gopeople`, `gorush`, `gobolt`, `gojavas`, `gojek-webhook`, `grab-webhook`, `grandslamexpress`, `greyhound`, `mazet`, `grupoampm`, `andreani`, `hct-logistics`, `hfd`, `hkd`, `hrparcel`, `hermes-it`, `hsdexpress`, `hsm-global`, `htdkgroup-webhook`, `yycom`, `hubbed`, `hx-express`, `hdb`, `hdb-box`, `hanjin`, `hellenic-post`, `hellmann`, `helthjem`, `helthjem-api`, `heppner-fr`, `heppner`, `hermes-2mann-handling`, `hermes-de`, `hermes-de-ftp`, `hermes-uk-sftp`, `hermes`, `heroexpress`, `hipshipper`, `holisol`, `home-delivery-solutions`, `homelogistics`, `hong-kong-post`, `houndexpress`, `hrvatska-posta`, `hh-exp`, `huantong`, `hunter-express-sftp`, `hunter-express`, `huodull`, `ibventure-webhook`, `icscourier`, `idexpress`, `iml`, `imxmail`, `indopaket`, `intersmarttrans`, `intex-de`, `iordirect`, `postur-is`, `ilyanglogis`, `inpost-uk`, `inpost-paczkomaty`, `intime-ftp`, `india-post`, `india-post-int`, `inexpost`, `nox-nachtexpress`, `nox-nachtexpress-ftp`, `descartes`, `inntralog-sftp`, `instabox-webhook`, `integra2-ftp`, `intel-valley`, `intelcom-ca`, `intelipost`, `international-seur`, `international-seur-api`, `intexpress`, `interparcel-au`, `interparcel-nz`, `interparcel-uk`, `israel-post`, `israel-post-domestic`, `italy-sda`, `ivoy-webhook`, `jtcargo`, `jtexpress`, `jtexpress-ph`, `jtexpress-sg-api`, `simplypost`, `jtexpress-vn`, `j-net`, `jamef-web`, `jcex`, `jd-worldwide`, `jinsung`, `jne`, `jne-api`, `bh-posta`, `js-express`, `jx`, `jam-express`, `janco`, `janio`, `japan-post`, `javit`, `jawar`, `jayonexpress`, `jersey-post`, `jet-ship`, `ltianexp`, `jocom`, `joom-logistics`, `joyingbox`, `jumppoint-api`, `jumppoint`, `k1-express`, `kec`, `abxexpress-my`, `kgmhub`, `kurasi`, `kwe-global`, `kangaroo-my`, `kargomkolay`, `kedaex`, `kerryttc-vn`, `tgx`, `kerry-express-tw-api`, `kerry-logistics`, `kerry-express-th-webhook`, `kerrytj`, `kerry-ecommerce`, `kng`, `logisystems-sftp`, `kinisi`, `kiwi-express-webhook`, `kolay-gelsin`, `komon-express`, `kpost`, `korea-post`, `kronos-webhook`, `kronos`, `ky-express`, `kn`, `kdexp`, `lbcexpress-ftp`, `lbcexpress-api`, `lctbr-api`, `lht-express`, `liccardi-express`, `liefergrun`, `lmparcel`, `ltl`, `la-poste-colissimo`, `lalamove-api`, `lalamove`, `lalamove-plus-api`, `landmark-global-ftp`, `landmark-global`, `lao-post`, `lasership-api`, `lasership`, `latvijas-pasts`, `leader`, `legion-express`, `leman`, `lexship`, `lietuvos-pastas`, `line`, `linkbridge`, `lion-parcel`, `livrapide`, `locus-webhook`, `loggi`, `logisters`, `lwe-hk`, `logoix`, `logwin-logistics`, `logysto`, `lonestar`, `loomis-express`, `lotte`, `luwjistik`, `m-xpress`, `mx-cargo`, `m24logistics-webhook`, `m3logistics`, `mbw`, `collivery`, `metabrasil-webhook`, `misumi-cn`, `mng-kargo`, `mnx`, `mrw-spain`, `mrw`, `mrw-ftp`, `mudita`, `madrooex`, `maergo`, `magyar-posta-api`, `mail-box-etc`, `mailamericas`, `mailplus`, `mailplus-jp`, `mainfreight`, `mainway`, `malaysia-post-posdaftar`, `malaysia-post`, `malca-amit-api`, `malca-amit`, `marken`, `matdespatch`, `matkahuolto`, `medafrica`, `meest`, `fetchr-webhook`, `mensajerosurbanos-api`, `mwd-api`, `mwd`, `aeroflash`, `mexico-redpack`, `mexico-senda-express`, `mhi`, `mikropakket`, `mikropakket-be`, `milkman`, `mobi-br`, `mobiletyreshop-webhook`, `mondialrelay`, `mondialrelay-fr`, `mondialrelay-es`, `moova-webhook`, `moovin`, `morelink`, `morning-express`, `morninglobal`, `mothership-api`, `movianto`, `multientregapanama`, `mydynalogic`, `nmtransfer`, `nacex`, `nacex-spain-reference`, `nacex-spain`, `nox-night-time-express`, `ntilogistics-ftp`, `ntl`, `nytlogistics`, `new-zealand-post`, `naeko-ftp`, `nanjingwoyuan`, `naqel-express`, `national-sameday`, `nationex`, `nationex-ftp`, `nationwide-my`, `navlungo`, `netlogixgroup`, `newzealand-couriers`, `neweggexpress`, `newgistics`, `newgisticsapi`, `nhans-solutions`, `ntlogistics-vn`, `nipost`, `nightline`, `nim-express`, `nimbuspost`, `ninjavan`, `ninjavan-id`, `ninjavan-my`, `ninjavan-thai`, `ninjavan-vn`, `ninjavan-webhook`, `nippon-express-ftp`, `nippon-express`, `norsk-global`, `northline`, `nova-poshta`, `nova-poshtaint`, `nova-poshta-api`, `novofarma-webhook`, `oca-ar`, `ocs`, `ocs-worldwide`, `omlogistics-api`, `osm-worldwide-sftp`, `osm-worldwide`, `otschile`, `oakh`, `obibox`, `okayparcel`, `old-dominion`, `shopolive`, `omniparcel`, `omnirps-webhook`, `omniva-api`, `omniva`, `onway-webhook`, `ontrac`, `ontrac-api`, `oneworldexpress`, `oneclick`, `optimacourier`, `orangeconnex`, `orangeconnex-ftp`, `orangedsinc`, `orangedsinc-ftp`, `overseas-hr`, `ozeparts-shipping`, `p2p-delivery-api`, `trakpak`, `packfleet`, `palexpress`, `parcelone`, `pfcexpress`, `pflogistics`, `pflogistics-ftp`, `phse-api`, `pickupp-mys`, `pickupp-sgp`, `piggyship`, `pil-logistics`, `pittohio`, `taqbin-taiwan`, `mglobal`, `pts`, `ptt-kargo`, `ptt-posta`, `paack-webhook`, `pack-up`, `packaly`, `packeta`, `packlink`, `packs`, `paikeda`, `pakajo`, `palletways`, `pan-asia`, `pandago-api`, `pandago-ph-api`, `pandion`, `pandulogistics`, `panther`, `panther-order-number`, `panther-reference`, `panther-reference-api`, `papa-webhook`, `paper-express`, `paquetexpress`, `parcalogistics-webhook`, `parcalogistics-api`, `pdn-api`, `portless-api`, `parcel-force`, `parcelpost-sg`, `parcelright`, `parceltopost`, `parcel2go`, `parcelpal-webhook`, `parcelpoint`, `parcelinklogistics`, `parcelled-in`, `parcelstars-webhook`, `parcelstars`, `parknparcel`, `passportshipping`, `patheon`, `ppbyb`, `payo`, `payo-webhook`, `pgeon-api`, `pickrr`, `pickup`, `pidge`, `pilot-freight`, `pitney-bowes`, `planzer`, `plycongroup`, `poczta-polska`, `polarspeed`, `pony-express`, `porterex-webhook`, `portugal-ctt`, `portugal-seur`, `pos-indonesia`, `postone`, `post-serbia`, `post-slovenia`, `post56`, `postnl`, `postnl-international`, `postnl-3s`, `danmark-post`, `postnord`, `sweden-posten`, `postplus`, `postaplus`, `poste-italiane`, `poste-italiane-paccocelere`, `posten-norge`, `posti`, `posti-api`, `posta-romana`, `pressiode`, `procarrier`, `promeddelivery`, `productcaregroup-sftp`, `professional-couriers`, `ppl-api`, `ppl`, `purolator`, `purolator-api`, `purolator-international`, `qtrack`, `quantium`, `qintl-api`, `airterra`, `quiqup`, `quiqup-webhook`, `qwintry`, `qxpress`, `raf`, `ramgroup-za`, `ets-express`, `rl-carriers`, `rpd2man`, `rpm`, `rpxlogistics`, `rpxonline`, `rxo-api`, `rzyexpress`, `raben-group`, `raiderex`, `ransa-webhook`, `rcl`, `redjepakketje`, `redur-es`, `relaiscolis`, `rendr-webhook`, `returnmates-webhook`, `rhenus-group`, `rhenus-uk-api`, `rhenus-uk`, `rincos`, `air-canada-global`, `air-canada`, `rixonhk-api`, `roadbull`, `roadrunner-freight`, `roche-internal-sftp`, `rocketparcel`, `routific-webhook`, `royal-mail`, `royal-mail-ftp`, `royal-mail-webhook`, `royalshipments`, `russian-post`, `ruston`, `sailpost`, `sap-express`, `sekologistics`, `seko-sftp`, `showl`, `sf-express-api`, `sf-express`, `sf-express-cn`, `sfb2c`, `sfc`, `sfcservice`, `sglink`, `hotsin-cargo`, `shipa`, `shipter`, `shipxpres`, `shreenandancourier`, `shreetirupati`, `signia-ftp`, `signialogistics-sftp`, `skybox`, `smartcat`, `smsa-express`, `smsa-express-webhook`, `speedex`, `spflylogistica-webhook`, `spoton`, `sprint-pack`, `srekorea`, `srt-transport`, `starken`, `stepforwardfs`, `sto`, `stone3pl`, `szendex`, `safexpress`, `sagawa-api`, `sagawa`, `saia-freight`, `sassy-api`, `saudi-post`, `sberlogistics-ru`, `scotty`, `scudex-express`, `secretlab-webhook`, `seino`, `seino-api`, `sendeo-kargo`, `sending`, `sendit`, `sendle`, `sendy`, `nowlog-api`, `servip-webhook`, `servientrega`, `setel`, `shadowfax`, `dajin`, `ydex`, `kwt`, `sherpa`, `sherpa-webhook`, `ship-it-asia`, `shipentegra`, `shipgate`, `shipglobal-us`, `shipx`, `shipx-api`, `shippie`, `shippify`, `shippit`, `shiprocket`, `spx`, `spx-th`, `shopfans`, `shreeanjanicourier`, `shree-maruti`, `shunbang-express`, `shyplite`, `simpletire-webhook`, `simsglobal`, `singlobal-express`, `singapore-post`, `singapore-speedpost`, `sinotrans`, `siodemka`, `skelton-sftp`, `skyking`, `skyexpress-international`, `skyexpressinternational`, `skynet`, `skynetworldwide`, `skynetworldwide-uae`, `sky-postal`, `skynet-za`, `skynetworldwide-uk`, `sk-posta`, `smooth`, `sntglobal-api`, `sonictl`, `thenile-webhook`, `sapo`, `sefl`, `smtl`, `spanish-seur`, `spanish-seur-ftp`, `spanish-seur-api`, `specialisedfreight-za`, `spectran`, `spedisci`, `speedee`, `speedcouriers-gr`, `speedx`, `speedy`, `speedaf`, `spreetail-api`, `spring-gds`, `stallionexpress`, `star-track-courier`, `star-track-express`, `star-track`, `star-track-webhook`, `starlinks-api`, `statovernight`, `stop-start-api`, `streck-transport`, `sypost`, `superpackline`, `surat-kargo`, `sutton`, `swiship`, `swiship-jp`, `swiss-post`, `swiss-post-ftp`, `swiss-universal-express`, `loginext-webhook`, `t-cat`, `t-cat-api`, `taqbin-hk`, `tasco-my-webhook`, `tck-express`, `tcs-api`, `tcs`, `thedeliverygroup`, `tdn`, `tfm`, `tforce-finalmile`, `tigfreight`, `tipsa`, `tnt`, `tnt-au`, `tntbrasil-web`, `tnt-fr`, `tnt-fr-reference`, `tnt-it`, `tnt-reference`, `tnt-uk`, `tnt-uk-reference`, `tnt-click`, `tarrive`, `thaiparcels`, `trumpcard`, `tvsscs-webhook`, `typ`, `global-express`, `taiwan-post`, `tamergroup-webhook`, `tazmanian-freight`, `teamexpressllc`, `toll-priority`, `team-global-express-webhook`, `teleport-webhook`, `sic-teliway`, `testing-courier`, `thabit-logistics`, `thailand-post`, `thecourierguy`, `customco-api`, `pallet-network`, `thijs-nl`, `thunderexpress`, `tiki`, `tipsa-api`, `tipsa-ref`, `toll-ipec`, `toll-nz`, `tolos`, `tomydoor`, `tonami-ftp`, `esdex`, `topyou`, `tophatterexpress`, `toshi-webhook`, `total-express-api`, `total-express`, `tourline-reference`, `trackon`, `trans-kargo`, `trans2u`, `transmission-nl`, `transvirtual`, `transpak`, `tanet`, `trunkrs-webhook`, `trunkrs`, `trusk`, `tuffnells`, `tuffnells-reference`, `tusklogistics`, `u-envios`, `ubi-logistics`, `ucs`, `uk-mail`, `ucfs-api`, `usf-reddaway`, `uber-webhook`, `ukrposhta`, `uds`, `urb-it`, `courex`, `urbify`, `urgent-cargus`, `virtransport`, `viwo`, `vox`, `value-webhook`, `veho-webhook`, `venipak`, `vesyl`, `vesyl-api`, `viaeurope`, `viaxpress`, `vtfe`, `vnpost`, `vnpost-api`, `viettelpost`, `virtransport-sftp`, `wooyoung-logistics-sftp`, `wspexpress`, `wahana`, `wanbexpress`, `weworldexpress`, `wedo`, `wepost`, `weship-api`, `weship`, `weaship`, `welivery`, `shipwestgate`, `whistl`, `wineshipping`, `wineshipping-webhook`, `wise-express`, `wiseloads`, `wishpost`, `wizmo`, `worldcourier`, `worldnet`, `xdp-uk`, `xdp-uk-reference`, `xgs`, `xl-express`, `xpo-logistics`, `xpo-fr-api`, `xq-express`, `xde-webhook`, `xindus`, `xyy`, `xpedigo`, `xpert-delivery`, `xpost`, `xpressbees`, `xpressen-dk`, `yamato-tw-api`, `ydh-express`, `yrc`, `yto`, `yyexpress`, `yakit`, `taqbin-jp`, `taqbin-sg-api`, `taqbin-sg`, `yanwen`, `yifan`, `elian-post`, `yodel-api`, `yodeldirect`, `yodel`, `yodel-international`, `youparcel`, `yunexpress`, `yunant`, `yundaex`, `yunhuipost`, `yurtici-kargo`, `yusen-sftp`, `yusen`, `zjs-express`, `zto-domestic`, `zto-express`, `zyou`, `cndexpress`, `zajil-express`, `sfplus-webhook`, `zeek`, `zeleris`, `ziingfinalmile`, `zinc`, `zoom-red`, `zoom2u-webhook`, `zuelligpharma-sftp`, `acommerce`, `alphafast`, `cpacket`, `chronodiali-webhook`, `cnwangtong`, `delivere`, `e-courier-webhook`, `ecoutier`, `eparcel-kr`, `epostglobal`, `eshipper`, `etotal`, `etower`, `fairsenden-api`, `forrun`, `gojek`, `hepsijet`, `i-dika`, `i-parcel`, `icumulus-webhook`, `icumulus`, `idexpress-id`, `imile-api`, `ithinklogistics`, `liefery`, `mysendle-api`, `pack-man`, `shopline`, `solistica-api`, `swe`, `trans-o-flex-sftp`, `transligue-web`, `uparcel`, `uship`, `uc56`, `wndirect`, `xmszm`, `ceska-posta`, `winit`, `jd-express`, `jusdasr`, `be`, `padtf`, `pchome-api`, `6ls`, `yingnuo-logistics`, `jindouyun`, `sdh-scm`\n\n**Note:** Using unsupported courier values will still work but verification may be delayed or require manual processing.\n"
    }
  ],
  "components": {
    "securitySchemes": {
      "basicAuth": {
        "description": "HTTP Basic Auth using `merchant_id` as username and the merchant secret key as password.",
        "type": "http",
        "scheme": "basic"
      },
      "bearerAuth": {
        "description": "Bearer token authentication using an OAuth access token minted for an API access key created in Merchant Dashboard.",
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "JWT"
      }
    },
    "schemas": {
      "Customer": {
        "type": "object",
        "description": "The customer object represents a company that you do business with. Retrieve a customer to get a summary of their total credit line and available credit balance.\n",
        "properties": {
          "id": {
            "type": "string",
            "example": "PMMlaE5wbg0"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2020-01-01T00:00:00.750Z",
            "description": "Date the customer was created."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2020-01-01T00:00:00.750Z",
            "description": "Date the customer was last updated."
          },
          "source": {
            "type": "string",
            "enum": [
              "QUICKBOOKS",
              "MERCHANT_USER",
              "ADMIN_USER",
              "APPLICATION",
              "CUSTOMER_USER",
              "API"
            ],
            "example": "MERCHANT_USER"
          },
          "business_address": {
            "type": "string",
            "example": "111 Main Street",
            "description": "Street address of the business' primary location."
          },
          "business_city": {
            "type": "string",
            "example": "San Francisco",
            "description": "City of the business' primary location."
          },
          "business_state": {
            "type": "string",
            "example": "CA",
            "description": "State or province of the business' primary location."
          },
          "business_zip": {
            "type": "string",
            "example": "94104",
            "description": "US zip code of the business' primary location."
          },
          "business_country": {
            "type": "string",
            "example": "US",
            "description": "Country of the business' primary location according to the **ISO 3166-1 alpha 2** standard."
          },
          "business_age_range": {
            "type": "string",
            "example": "5-10",
            "description": "String indicating age of the business in years.",
            "enum": [
              "0-2",
              "2-5",
              "5-10",
              "10+"
            ]
          },
          "business_ap_email": {
            "type": "string",
            "example": "ap@example.com",
            "description": "Email address of the business' accounts payable person or department."
          },
          "business_ap_phone": {
            "type": "string",
            "example": "(202) 456-1414",
            "description": "Phone number of the business' accounts payable person or department."
          },
          "business_ap_phone_extension": {
            "type": "string",
            "example": "123",
            "description": "Phone number extension of the business' accounts payable person or department."
          },
          "business_name": {
            "type": "string",
            "example": "Example, Inc.",
            "description": "Full legal name of the business being applied for."
          },
          "business_trade_name": {
            "type": "string",
            "example": "Example Trading Company",
            "description": "Trade name of the business, if different than `business_name.`"
          },
          "business_phone": {
            "type": "string",
            "example": "(202) 456-1414",
            "description": "Phone number of the business' primary location."
          },
          "business_type": {
            "type": "string",
            "example": "corporation",
            "description": "String indicating the business' type of legal entity.",
            "enum": [
              "sole_prop_or_partnership",
              "llc",
              "corporation",
              "nonprofit",
              "government"
            ]
          },
          "email": {
            "type": "string",
            "format": "email",
            "example": "user@example.com",
            "description": "Email of the customer applying for terms."
          },
          "personal_name_first": {
            "type": "string",
            "example": "James",
            "description": "First name of the person applying on behalf of the business."
          },
          "personal_name_last": {
            "type": "string",
            "example": "Bond",
            "description": "Last name of the person applying on behalf of the business."
          },
          "personal_phone": {
            "type": "string",
            "example": "(202) 456-1414",
            "description": "Personal phone number of the customer representative applying for terms."
          },
          "amount_approved": {
            "type": "integer",
            "format": "int64",
            "example": 10000,
            "description": "Total amount of the credit approved."
          },
          "amount_authorized": {
            "type": "integer",
            "format": "int64",
            "example": 10000,
            "description": "Amount of the credit line reserved for authorized charges."
          },
          "amount_available": {
            "type": "integer",
            "format": "int64",
            "example": 10000,
            "description": "Current amount of the credit line available for purchases."
          },
          "amount_balance": {
            "type": "integer",
            "format": "int64",
            "example": 2000,
            "description": "Current balance on the customer's credit line."
          },
          "amount_unapplied_payments": {
            "type": "integer",
            "format": "int64",
            "example": 1000,
            "description": "Current amount of a customer's unapplied payments."
          },
          "default_terms": {
            "type": "string",
            "nullable": true,
            "description": "Set default terms that will apply to this customer's invoices. Can be overridden when requesting an advance.",
            "enum": [
              "net7",
              "net10",
              "net10th",
              "net15",
              "net20",
              "net30",
              "net45",
              "net60",
              "net75",
              "net90",
              "net120",
              "net180",
              null
            ]
          },
          "advance_rate": {
            "type": "number",
            "format": "double",
            "nullable": true,
            "example": 0.75,
            "minimum": 0,
            "maximum": 1,
            "description": "The advance rate that will be used to determine the amount advanced for this customer's invoices."
          },
          "credit_status": {
            "type": "string",
            "nullable": true,
            "description": "Current credit status of this customer. See <a href=\"#operation/requestCustomerCreditCheck\">#request-a-credit-check</a> for more details.",
            "enum": [
              "approved",
              "hold",
              "declined",
              "pending",
              "deactivated",
              null
            ]
          },
          "net_terms_status": {
            "type": "string",
            "nullable": true,
            "description": "Current net terms enrollment status of this customer. See <a href=\"#operation/fetchCustomer\">#fetchCustomer</a> for more details.",
            "enum": [
              "enrolled",
              "pending_enrollment",
              "enrollment_expired",
              null
            ]
          },
          "net_terms_enrollment_url": {
            "type": "string",
            "nullable": true,
            "example": "www.app.resolvepay.com/merchant-id/activate/123456",
            "description": "The URL for a customer to complete enrollment requirements when net_terms_status is pending_enrollment. See <a href=\"#operation/fetchCustomer\">#fetchCustomer</a> for more details."
          },
          "net_terms_enrollment_expires_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2020-01-01T00:00:00.750Z",
            "description": "The date by which the customer must be enrolled in this net terms offer, not null when net_terms_status is pending_enrollment."
          },
          "credit_check_requested_at": {
            "type": "string",
            "format": "date-time",
            "nullable": true,
            "example": "2020-01-01T00:00:00.750Z",
            "description": "The date a credit check was requested."
          },
          "archived": {
            "type": "boolean",
            "example": false,
            "description": "Boolean indicating if customer is archived."
          },
          "duns_number": {
            "type": "string",
            "nullable": true,
            "example": "00-123-4567",
            "description": "Dun & Bradstreet unique nine-digit identifier for businesses that is associated with a business's Live Business Identity"
          },
          "credit_decisions": {
            "type": "array",
            "description": "Array of credit decisions made for this customer.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string",
                  "example": "abc123",
                  "description": "Unique identifier for the credit decision."
                },
                "created_at": {
                  "type": "string",
                  "format": "date-time",
                  "example": "2020-01-01T00:00:00.750Z",
                  "description": "Date the credit decision was created."
                },
                "decision": {
                  "type": "string",
                  "enum": [
                    "approved",
                    "declined",
                    "hold",
                    "line_adjustment",
                    "deactivate"
                  ],
                  "example": "approved",
                  "description": "The credit decision outcome."
                },
                "amount": {
                  "type": "integer",
                  "format": "int64",
                  "example": 10000,
                  "description": "The credit amount approved."
                },
                "advance_rate": {
                  "type": "number",
                  "format": "double",
                  "example": 0.75,
                  "minimum": 0,
                  "maximum": 1,
                  "description": "The advance rate for this credit decision."
                },
                "decline_code": {
                  "type": "string",
                  "enum": [
                    "no_business_found",
                    "thin_file",
                    "failing_credit",
                    "not_approved_need_more_info",
                    "sole_prop",
                    "applicant_business_association",
                    "merchant_risk",
                    "fraud",
                    "no_us_address",
                    "duplicate",
                    "test_account",
                    "email_verification_freemail",
                    "email_verification_domain",
                    "address_verification",
                    "poor_cash_flow",
                    "additional_info_not_provided",
                    "other"
                  ],
                  "nullable": true,
                  "example": "no_business_found",
                  "description": "Code indicating reason for decline, if applicable."
                },
                "hold_code": {
                  "type": "string",
                  "enum": [
                    "past_due",
                    "failed_payment",
                    "requested_by_customer",
                    "requested_by_merchant",
                    "dispute",
                    "fraud",
                    "churned",
                    "payment_plan",
                    "inactive",
                    "other"
                  ],
                  "nullable": true,
                  "example": "past_due",
                  "description": "Code indicating reason for hold, if applicable."
                }
              }
            }
          }
        }
      },
      "Invoice": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "PMMlaE5wbg0",
            "description": "Unique identifier for the invoice."
          },
          "source": {
            "type": "string",
            "enum": [
              "QUICKBOOKS",
              "MERCHANT_USER",
              "ADMIN_USER",
              "CUSTOMER_USER",
              "API"
            ],
            "example": "MERCHANT_USER"
          },
          "customer_id": {
            "type": "string",
            "description": "ID of the customer being charged."
          },
          "order_number": {
            "type": "string",
            "example": "5055",
            "description": "Order number identifier."
          },
          "number": {
            "type": "string",
            "example": "Inv # 123",
            "description": "Invoice number identifier."
          },
          "po_number": {
            "type": "string",
            "example": "PO-555",
            "description": "PO number identifier."
          },
          "notes": {
            "type": "string",
            "example": "Example of additional notes for Customer.",
            "description": "Additional notes for the Customer"
          },
          "line_items": {
            "type": "array",
            "example": [],
            "description": "Line item data"
          },
          "merchant_invoice_url": {
            "type": "string",
            "example": "https://www.example.com/invoice.pdf",
            "description": "The invoice PDF that you've uploaded to Resolve."
          },
          "resolve_invoice_url": {
            "type": "string",
            "example": "https://www.example.com/resolve-invoice.pdf",
            "description": "Resolve-issued invoice PDF with your invoice attached."
          },
          "resolve_invoice_status": {
            "type": "string",
            "example": "completed",
            "description": "Shows current status of the Resolve-issued invoice PDF.\n\n- `not_generated` - PDF wasn't created or queued for creation. Resolve PDFs\nare generated when an invoice is sent.\n- `processing` - PDF is in the process of being generated. Try to refetch the invoice\nin a minute to get a `resolve_invoice_url` link.\n- `completed` - PDF is generated, `resolve_invoice_url` points to the generated file.\n",
            "enum": [
              "not_generated",
              "processing",
              "completed"
            ]
          },
          "fully_paid": {
            "type": "boolean",
            "example": true,
            "description": "Indicates whether the invoice is fully paid."
          },
          "fully_paid_at": {
            "type": "string",
            "format": "date-time",
            "example": "2020-01-01T00:00:00.730Z",
            "description": "The date the invoice has been fully paid."
          },
          "advanced": {
            "type": "boolean",
            "example": false,
            "description": "Indicates whether the invoice has been advanced."
          },
          "due_at": {
            "type": "string",
            "format": "date-time",
            "example": "2020-02-01T00:00:00.750Z",
            "description": "The current due date for this invoice's payment."
          },
          "original_due_at": {
            "type": "string",
            "format": "date-time",
            "example": "2020-02-01T00:00:00.750Z",
            "description": "The due date for this invoice at the time an advance was issued."
          },
          "invoiced_at": {
            "type": "string",
            "format": "date-time",
            "example": "2020-01-01T00:00:00.750Z",
            "description": "The date this invoice was created in your system of record (Resolve or Quickbooks)."
          },
          "advance_requested": {
            "type": "boolean",
            "example": "false",
            "description": "Indicated if advance was requested."
          },
          "terms": {
            "type": "string",
            "enum": [
              "due_upon_receipt",
              "net7",
              "net10",
              "net10th",
              "net15",
              "net20",
              "net30",
              "net45",
              "net60",
              "net75",
              "net90",
              "net120",
              "net180"
            ],
            "description": "The terms selected for this invoice."
          },
          "amount_payout_due": {
            "type": "number",
            "format": "double",
            "example": 4000,
            "description": "The original amount that Resolve owed on this invoice on the advance date."
          },
          "amount_payout_paid": {
            "type": "number",
            "format": "double",
            "example": 2000,
            "description": "The amount that Resolve has paid out."
          },
          "amount_payout_pending": {
            "type": "number",
            "format": "double",
            "example": 1000,
            "description": "The amount that Resolve has currently pending to be paid out."
          },
          "amount_payout_refunded": {
            "type": "number",
            "format": "double",
            "example": 500,
            "description": "The amount that Resolve has debited from due to refunds."
          },
          "amount_payout_balance": {
            "type": "number",
            "format": "double",
            "example": 500,
            "description": "The amount remaining to be paid out."
          },
          "payout_fully_paid": {
            "type": "boolean",
            "example": false,
            "description": "The status of whether or not this invoice has been fully paid out."
          },
          "payout_fully_paid_at": {
            "type": "string",
            "format": "date-time",
            "example": "2020-01-02T00:00:00.730Z",
            "description": "The date of when this invoice has been fully paid out."
          },
          "amount_balance": {
            "type": "number",
            "format": "double",
            "example": 2000,
            "description": "Current balance due."
          },
          "amount_due": {
            "type": "number",
            "format": "double",
            "example": 4000,
            "description": "Original amount due."
          },
          "amount_refunded": {
            "type": "number",
            "format": "double",
            "example": 0,
            "description": "Amount that has been refunded."
          },
          "amount_pending": {
            "type": "number",
            "format": "double",
            "example": 1000,
            "description": "Amount of total payments pending."
          },
          "amount_paid": {
            "type": "number",
            "format": "double",
            "example": 1000,
            "description": "Amount of total payments applied to this invoice."
          },
          "amount_advance": {
            "type": "number",
            "format": "double",
            "example": 4000,
            "description": "Amount of advance received."
          },
          "amount_additional_advance": {
            "type": "number",
            "format": "double",
            "example": 1000,
            "description": "Amount of additional advance received."
          },
          "amount_advance_fee": {
            "type": "number",
            "format": "double",
            "example": 10.75,
            "description": "Fee for the amount of advance."
          },
          "amount_advance_fee_refund": {
            "type": "number",
            "format": "double",
            "example": 10.75,
            "description": "Refunded fees for the amount of advance."
          },
          "advance_rate": {
            "type": "number",
            "format": "double",
            "example": 0.75,
            "minimum": 0,
            "maximum": 1,
            "description": "The advance rate that was used to determine amount of advance."
          },
          "advanced_at": {
            "type": "string",
            "format": "date-time",
            "example": "2020-01-02T00:00:00.730Z",
            "description": "The date this invoice was advanced."
          },
          "amount_customer_fee_total": {
            "type": "number",
            "format": "double",
            "example": 500,
            "description": "The total amount of customer fees accrued."
          },
          "amount_customer_fee_waived": {
            "type": "number",
            "format": "double",
            "example": 120,
            "description": "The total amount of customer fees waived."
          },
          "amount_customer_fee_paid": {
            "type": "number",
            "format": "double",
            "example": 300,
            "description": "The total amount of customer fees paid."
          },
          "amount_customer_fee_balance": {
            "type": "number",
            "format": "double",
            "example": 80,
            "description": "The current amount of customer fees owed."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2020-01-02T00:00:00.730Z",
            "description": "Date the invoice was created."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2020-01-02T00:00:00.730Z",
            "description": "Date the invoice was last updated."
          },
          "archived": {
            "type": "boolean",
            "example": false,
            "description": "Boolean indicating if invoice is archived."
          },
          "invoice_payment_url": {
            "type": "string",
            "example": "https://app.resolvepay.com/merchant/invoices/PMMlaE5wbg0",
            "description": "Link to make invoice payments."
          },
          "canceled": {
            "type": "boolean",
            "example": false,
            "description": "Indicates whether the invoice is canceled."
          },
          "canceled_at": {
            "type": "string",
            "format": "date-time",
            "example": null,
            "description": "Date the invoice was canceled."
          },
          "voided": {
            "type": "boolean",
            "example": false,
            "description": "Indicates whether the invoice is voided."
          },
          "voided_at": {
            "type": "string",
            "format": "date-time",
            "example": null,
            "description": "Date the invoice was voided."
          },
          "amount_canceled": {
            "type": "number",
            "format": "double",
            "example": 0,
            "description": "Amount that has been canceled."
          },
          "amount_voided": {
            "type": "number",
            "format": "double",
            "example": 0,
            "description": "Amount that has been voided."
          }
        }
      },
      "Payment": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "PMMlaE5wbg0",
            "description": "Unique identifier for the payment."
          },
          "customer_id": {
            "type": "string",
            "example": "X50sgfRd",
            "description": "Unique identifier of the customer that made the payment."
          },
          "source": {
            "type": "string",
            "enum": [
              "api",
              "merchant_user",
              "admin_user",
              "customer_user",
              "payment_gateway",
              "check",
              "guest_checkout"
            ],
            "example": "customer_user",
            "description": "Source of the payment."
          },
          "amount": {
            "type": "number",
            "format": "double",
            "example": 1000,
            "description": "Amount of the payment in USD."
          },
          "method": {
            "type": "string",
            "enum": [
              "check",
              "ach_debit",
              "direct_deposit",
              "card",
              "merchant",
              "unapplied_payment_adjustment",
              "credit_note",
              "adjustment",
              "wire"
            ],
            "example": "ach_debit",
            "description": "Method of payment made by the customer."
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "in_transit",
              "in_review",
              "paid",
              "failed",
              "canceled"
            ],
            "example": "paid",
            "description": "Status of the payment.\n\n- `pending` - Payment is pending processing.\n- `in_transit` - Payment has been processed and is in transit.\n- `in_review` - Payment is being reviewed.\n- `paid` - Payment has been confirmed and applied to the customer's account.\n- `failed` - Payment failed confirmation (e.g., bank transfer or credit card payment rejected).\n- `canceled` - Payment was canceled by request.\n"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2020-01-01T00:00:00.730Z",
            "description": "Date the payment was created."
          },
          "paid_at": {
            "type": "string",
            "format": "date-time",
            "example": "2020-01-02T00:00:00.730Z",
            "description": "Date the payment was confirmed by Resolve and applied to the customer's account."
          },
          "canceled_at": {
            "type": "string",
            "format": "date-time",
            "example": null,
            "description": "Date the payment was canceled by request."
          },
          "failed_at": {
            "type": "string",
            "format": "date-time",
            "example": null,
            "description": "Date the payment failed processing."
          },
          "processed_at": {
            "type": "string",
            "format": "date-time",
            "example": "2020-01-01T12:00:00.730Z",
            "description": "Date the payment was processed by Resolve."
          },
          "scheduled_at": {
            "type": "string",
            "format": "date-time",
            "example": null,
            "description": "Date the payment was scheduled for processing, if applicable."
          },
          "processing_fee": {
            "type": "number",
            "format": "double",
            "example": 25.5,
            "description": "Processing fee for the payment."
          },
          "canceled_code": {
            "type": "string",
            "example": null,
            "description": "Code indicating the reason the payment was canceled."
          },
          "failed_code": {
            "type": "string",
            "example": null,
            "description": "Code indicating the reason the payment failed processing."
          },
          "payment_links": {
            "type": "array",
            "description": "List of records the payment is applied to.",
            "items": {
              "type": "object",
              "properties": {
                "record_id": {
                  "type": "string",
                  "example": "PMMlaE5wbg0",
                  "description": "ID of the record."
                },
                "record_type": {
                  "type": "string",
                  "enum": [
                    "invoice"
                  ],
                  "example": "invoice",
                  "description": "Type of record the payment is applied to."
                },
                "amount": {
                  "type": "number",
                  "format": "double",
                  "example": 500,
                  "description": "Amount applied to this record."
                }
              }
            }
          },
          "created_by_user_id": {
            "type": "string",
            "example": null,
            "description": "ID of the user who created the payment, if applicable."
          }
        }
      },
      "Charge": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "PMMlaE5wbg0",
            "description": "Unique identifier for the charge."
          },
          "amount": {
            "type": "number",
            "format": "double",
            "example": 1000,
            "description": "Authorized amount of the charge in USD."
          },
          "customer_id": {
            "type": "string",
            "example": "X50sgfRd",
            "description": "Unique identifier of the customer."
          },
          "amount_refunded": {
            "type": "number",
            "format": "double",
            "example": 0,
            "description": "Total refunded amount for the charge in USD."
          },
          "canceled": {
            "type": "boolean",
            "example": false,
            "description": "Indicates whether the charge is canceled."
          },
          "canceled_at": {
            "type": "string",
            "format": "date-time",
            "example": null,
            "description": "Date the charge was canceled."
          },
          "captured": {
            "type": "boolean",
            "example": true,
            "description": "Indicates whether the charge has been captured."
          },
          "captured_at": {
            "type": "string",
            "format": "date-time",
            "example": "2020-01-02T00:00:00.730Z",
            "description": "Date the charge was captured."
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2020-01-01T00:00:00.730Z",
            "description": "Date the charge was created."
          },
          "invoice_url": {
            "type": "string",
            "format": "uri",
            "example": "https://example.com/invoice.pdf",
            "description": "URL of the invoice document associated with this charge."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "example": {
              "source": "checkout"
            },
            "description": "Custom metadata attached to the charge."
          },
          "number": {
            "type": "string",
            "example": "ch_100001",
            "description": "Charge number identifier."
          },
          "terms": {
            "type": "string",
            "enum": [
              "due_upon_receipt",
              "net7",
              "net10",
              "net10th",
              "net15",
              "net20",
              "net30",
              "net45",
              "net60",
              "net75",
              "net90",
              "net120",
              "net180"
            ],
            "example": "net30",
            "description": "Payment terms associated with the charge."
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2020-01-02T00:00:00.730Z",
            "description": "Date the charge was last updated."
          },
          "merchant_invoice_id": {
            "type": "string",
            "example": "INabc123",
            "description": "ID of the merchant invoice associated with the charge."
          },
          "order_number": {
            "type": "string",
            "example": "5055",
            "description": "Order number associated with the charge."
          },
          "po_number": {
            "type": "string",
            "example": "PO-555",
            "description": "PO number associated with the charge."
          },
          "fee": {
            "type": "number",
            "format": "double",
            "example": 25.5,
            "description": "Fee amount associated with the charge in USD."
          },
          "fee_refunded": {
            "type": "number",
            "format": "double",
            "example": 0,
            "description": "Refunded fee amount for the charge in USD."
          }
        }
      },
      "CreditNote": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "example": "CNMlaE5wbg0",
            "description": "Unique identifier for the credit note."
          },
          "source": {
            "type": "string",
            "enum": [
              "MERCHANT_USER",
              "ADMIN_USER",
              "API"
            ],
            "example": "MERCHANT_USER",
            "description": "Source of the credit note creation."
          },
          "customer_id": {
            "type": "string",
            "example": "X50sgfRd",
            "description": "ID of the customer associated with the credit note."
          },
          "merchant_id": {
            "type": "string",
            "example": "MER456789",
            "description": "ID of the merchant."
          },
          "invoice_id": {
            "type": "string",
            "example": "PMMlaE5wbg0",
            "description": "ID of the invoice this credit note is associated with."
          },
          "created_by_user_id": {
            "type": "string",
            "example": "USR123456",
            "description": "ID of the user who created the credit note."
          },
          "number": {
            "type": "string",
            "example": "CN-001",
            "description": "Credit note number identifier."
          },
          "amount": {
            "type": "number",
            "format": "double",
            "example": 1000,
            "description": "Total amount of the credit note."
          },
          "amount_balance": {
            "type": "number",
            "format": "double",
            "example": 500,
            "description": "Remaining balance to be applied."
          },
          "amount_paid": {
            "type": "number",
            "format": "double",
            "example": 500,
            "description": "Amount that has been applied/paid out."
          },
          "amount_voided": {
            "type": "number",
            "format": "double",
            "example": 0,
            "description": "Amount that has been voided."
          },
          "amount_payout": {
            "type": "number",
            "format": "double",
            "example": 1000,
            "description": "Total payout amount for the credit note."
          },
          "amount_payout_balance": {
            "type": "number",
            "format": "double",
            "example": 500,
            "description": "Remaining payout balance."
          },
          "amount_payout_paid": {
            "type": "number",
            "format": "double",
            "example": 500,
            "description": "Amount that has been paid out."
          },
          "credit_note_url": {
            "type": "string",
            "example": "https://www.example.com/credit-note.pdf",
            "description": "The credit note PDF that you've uploaded to Resolve."
          },
          "resolve_credit_note_url": {
            "type": "string",
            "example": "https://www.example.com/resolve-credit-note.pdf",
            "description": "Resolve-issued credit note PDF."
          },
          "reason_code": {
            "type": "string",
            "enum": [
              "chargeback",
              "duplicate",
              "fraudulent",
              "requested_by_customer",
              "missing_remittance",
              "overpayment_on_invoice",
              "invoice_was_refunded",
              "double_payment_on_invoice",
              "missing_invoice_in_resolve",
              "credit_transfer",
              "other"
            ],
            "example": "requested_by_customer",
            "description": "The reason code for issuing this credit note."
          },
          "reason_message": {
            "type": "string",
            "example": "Customer returned damaged goods",
            "description": "Additional details explaining the reason for the credit note."
          },
          "voided": {
            "type": "boolean",
            "example": false,
            "description": "Indicates whether the credit note is voided."
          },
          "voided_at": {
            "type": "string",
            "format": "date-time",
            "example": null,
            "description": "Date the credit note was voided."
          }
        }
      },
      "Shipment": {
        "$ref": "#/components/schemas/ShipmentObject"
      },
      "WebhookEndpoint": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the webhook endpoint",
            "example": "whe_abc123def456"
          },
          "merchant_id": {
            "type": "string",
            "description": "The merchant ID associated with this webhook endpoint",
            "example": "mer_xyz789"
          },
          "endpoint_url": {
            "type": "string",
            "format": "uri",
            "description": "The HTTPS URL where webhook events will be sent",
            "example": "https://example.com/webhooks/resolve"
          },
          "topic": {
            "type": "object",
            "description": "The event topic this endpoint is subscribed to",
            "properties": {
              "name": {
                "type": "string",
                "description": "The event topic name",
                "example": "invoice.created"
              },
              "description": {
                "type": "string",
                "description": "Human-readable description of the event topic",
                "example": "Triggered when a new invoice record is created"
              }
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "When this webhook endpoint subscription was created",
            "example": "2021-05-20T09:23:53+00:00"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "When this webhook endpoint subscription was last updated",
            "example": "2021-05-20T09:23:53+00:00"
          }
        }
      },
      "WebhookEvent": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier for the webhook event",
            "example": "4ecbe7f9e8c1c9092c000027"
          },
          "object": {
            "type": "string",
            "description": "The type of object this event relates to (e.g., invoice, customer, payment, payout)",
            "example": "invoice"
          },
          "type": {
            "type": "string",
            "description": "The event type that triggered this webhook",
            "enum": [
              "invoice.created",
              "invoice.balance_updated",
              "customer.status_updated",
              "customer.line_amount_updated",
              "customer.advance_rate_updated",
              "customer.credit_decision_created",
              "customer.created",
              "payment.created",
              "payment.status_changed",
              "payout.created",
              "payout.status_changed"
            ],
            "example": "invoice.created"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "description": "ISO 8601 timestamp of when the event was created",
            "example": "2021-05-20T09:23:53+00:00"
          },
          "data": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "description": "The ID of the object related to the event. You can fetch the full object using this ID via the corresponding API endpoint.",
                "example": "RH5fF9aeQ"
              }
            },
            "required": [
              "id"
            ]
          }
        },
        "required": [
          "id",
          "object",
          "type",
          "created_at",
          "data"
        ]
      },
      "WebhookEventSubscriptions": {
        "type": "object",
        "description": "Object containing boolean flags for each available webhook event topic. Set to true to subscribe to that event, or false to unsubscribe.",
        "properties": {
          "invoice.created": {
            "type": "boolean",
            "description": "Subscribe to invoice creation events",
            "example": true
          },
          "invoice.balance_updated": {
            "type": "boolean",
            "description": "Subscribe to invoice balance update events",
            "example": false
          },
          "customer.created": {
            "type": "boolean",
            "description": "Subscribe to customer creation events",
            "example": true
          },
          "customer.status_updated": {
            "type": "boolean",
            "description": "Subscribe to customer status update events",
            "example": false
          },
          "customer.line_amount_updated": {
            "type": "boolean",
            "description": "Subscribe to customer credit line amount update events",
            "example": false
          },
          "customer.advance_rate_updated": {
            "type": "boolean",
            "description": "Subscribe to customer advance rate update events",
            "example": false
          },
          "customer.credit_decision_created": {
            "type": "boolean",
            "description": "Subscribe to customer credit decision creation events",
            "example": true
          },
          "payment.created": {
            "type": "boolean",
            "description": "Subscribe to payment creation events",
            "example": true
          },
          "payment.status_changed": {
            "type": "boolean",
            "description": "Subscribe to payment status change events",
            "example": true
          },
          "payout.created": {
            "type": "boolean",
            "description": "Subscribe to payout creation events",
            "example": false
          },
          "payout.status_changed": {
            "type": "boolean",
            "description": "Subscribe to payout status change events",
            "example": false
          }
        },
        "additionalProperties": false
      },
      "InvoiceListResponse": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "example": 1
          },
          "limit": {
            "type": "integer",
            "example": 25
          },
          "page": {
            "type": "integer",
            "example": 1
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Invoice"
            }
          }
        }
      },
      "ValidationError": {
        "type": "object",
        "title": "Validation error",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string",
                "description": "A short string, describing error details",
                "example": "Validation error"
              },
              "type": {
                "type": "string",
                "description": "A short string, describing error type",
                "enum": [
                  "validation_error"
                ],
                "example": "validation_error"
              },
              "details": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "path": {
                      "type": "string",
                      "example": "path.to.field",
                      "description": "Path to the field failed validation"
                    },
                    "message": {
                      "type": "string",
                      "example": "`[field]` is required",
                      "description": "Detailed description of the error"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "InvalidRequestError": {
        "type": "object",
        "title": "Invalid request error",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string",
                "description": "A short string, describing error details",
                "example": "[Invalid request message]"
              },
              "type": {
                "type": "string",
                "description": "A short string, describing error type",
                "enum": [
                  "invalid_request"
                ],
                "example": "invalid_request"
              }
            }
          }
        }
      },
      "UnauthorizedError": {
        "type": "object",
        "title": "Unauthorized error",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string",
                "description": "A short string, describing error details",
                "example": "Invalid merchant credentials"
              },
              "type": {
                "type": "string",
                "description": "A short string, describing error type",
                "enum": [
                  "authentication_error"
                ],
                "example": "authentication_error"
              }
            }
          }
        }
      },
      "RateLimitError": {
        "type": "object",
        "title": "Rate limit error",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string",
                "description": "A short string, describing error details",
                "example": "Too many requests"
              },
              "type": {
                "type": "string",
                "description": "A short string, describing error type",
                "enum": [
                  "rate_limit_error"
                ],
                "example": "rate_limit_error"
              }
            }
          }
        }
      },
      "InvoiceRequestAfterSentBase": {
        "type": "object",
        "properties": {
          "terms": {
            "type": "string",
            "description": "The terms selected for this invoice. Terms selected must be available on your account and different terms will be available based on advance_requested.",
            "example": "due_upon_receipt",
            "enum": [
              "due_upon_receipt",
              "net7",
              "net10",
              "net10th",
              "net15",
              "net20",
              "net30",
              "net45",
              "net60",
              "net75",
              "net90",
              "net120",
              "net180"
            ]
          },
          "merchant_invoice_url": {
            "type": "string",
            "format": "url",
            "example": "https://example.com/invoice.pdf",
            "description": "URL for the publicly-accessible invoice PDF."
          },
          "number": {
            "type": "string",
            "example": "R334-097",
            "description": "Invoice number identifier."
          },
          "order_number": {
            "type": "string",
            "example": "09785",
            "description": "Order number identifier."
          },
          "po_number": {
            "type": "string",
            "example": "PO-09785",
            "description": "PO number identifier."
          },
          "notes": {
            "type": "string",
            "example": "Example of additional notes for Customer.",
            "description": "Additional notes for the Customer"
          }
        }
      },
      "InvoiceRequestBeforeSentBase": {
        "type": "object",
        "properties": {
          "customer_id": {
            "type": "string",
            "example": "X50sgfRd",
            "description": "ID of the customer being charged"
          },
          "advance_requested": {
            "type": "boolean",
            "example": "false",
            "description": "The type of invoice. This will determine if this is an advanced or non-advanced invoice."
          }
        }
      },
      "InvoiceRequestAmountBase": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "format": "double",
            "example": 2000,
            "description": "Amount being charged from the customer"
          }
        }
      },
      "InvoiceRequest": {
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/InvoiceRequestAfterSentBase"
          },
          {
            "$ref": "#/components/schemas/InvoiceRequestBeforeSentBase"
          },
          {
            "$ref": "#/components/schemas/InvoiceRequestAmountBase"
          }
        ]
      },
      "InvoiceCreateRequest": {
        "allOf": [
          {
            "type": "object",
            "required": [
              "amount",
              "customer_id",
              "number",
              "merchant_invoice_url"
            ]
          },
          {
            "$ref": "#/components/schemas/InvoiceRequest"
          }
        ]
      },
      "NotFoundError": {
        "type": "object",
        "title": "Not found error",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string",
                "description": "A short string, describing error details",
                "example": "[entity] not found"
              },
              "type": {
                "type": "string",
                "description": "A short string, describing error type",
                "enum": [
                  "not_found_error"
                ],
                "example": "not_found_error"
              }
            }
          }
        }
      },
      "InvoiceUpdateBeforeSent": {
        "title": "Not sent",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/InvoiceRequestAfterSentBase"
          },
          {
            "$ref": "#/components/schemas/InvoiceRequestBeforeSentBase"
          },
          {
            "$ref": "#/components/schemas/InvoiceRequestAmountBase"
          }
        ]
      },
      "InvoiceUpdateAfterSentAdvanced": {
        "title": "Sent with advance",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/InvoiceRequestAfterSentBase"
          }
        ]
      },
      "InvoiceUpdateAfterSentNonAdvanced": {
        "title": "Sent without advance",
        "type": "object",
        "allOf": [
          {
            "$ref": "#/components/schemas/InvoiceRequestAfterSentBase"
          },
          {
            "$ref": "#/components/schemas/InvoiceRequestAmountBase"
          }
        ]
      },
      "CreditNoteListResponse": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "example": 1
          },
          "limit": {
            "type": "integer",
            "example": 25
          },
          "page": {
            "type": "integer",
            "example": 1
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/CreditNote"
            }
          }
        }
      },
      "CreditNoteCreateRequest": {
        "type": "object",
        "required": [
          "invoice_id",
          "amount",
          "reason_code"
        ],
        "properties": {
          "invoice_id": {
            "type": "string",
            "example": "PMMlaE5wbg0",
            "description": "ID of the invoice"
          },
          "amount": {
            "type": "number",
            "format": "double",
            "example": 2000,
            "description": "Amount of the credit note"
          },
          "number": {
            "type": "string",
            "example": "CN-001",
            "description": "Number of the credit note"
          },
          "reason_code": {
            "type": "string",
            "example": "reason_code",
            "enum": [
              "chargeback",
              "duplicate",
              "fraudulent",
              "requested_by_customer",
              "missing_remittance",
              "overpayment_on_invoice",
              "invoice_was_refunded",
              "double_payment_on_invoice",
              "missing_invoice_in_resolve",
              "credit_transfer",
              "other"
            ],
            "description": "Reason code for the credit note"
          },
          "reason_message": {
            "type": "string",
            "example": "reason_message",
            "description": "Reason message for the credit note"
          },
          "credit_note_url": {
            "type": "string",
            "example": "https://example.com/credit_note_url.pdf",
            "description": "URL for the publicly-accessible credit note PDF."
          }
        }
      },
      "CreditNoteAction": {
        "type": "object",
        "properties": {
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "processing",
              "failed",
              "completed"
            ],
            "example": "pending",
            "description": "Status of the credit note action"
          }
        }
      },
      "CustomerList": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "example": 1
          },
          "limit": {
            "type": "integer",
            "example": 25
          },
          "page": {
            "type": "integer",
            "example": 1
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/Customer"
            }
          }
        }
      },
      "CustomerPostRequest": {
        "type": "object",
        "required": [
          "business_address",
          "business_city",
          "business_state",
          "business_zip",
          "business_country",
          "business_name",
          "email",
          "business_ap_email"
        ],
        "properties": {
          "business_address": {
            "type": "string",
            "example": "111 Main Street",
            "description": "Street address of the business' primary location."
          },
          "business_city": {
            "type": "string",
            "example": "San Francisco",
            "description": "City of the business' primary location."
          },
          "business_state": {
            "type": "string",
            "example": "CA",
            "description": "State or province of the business' primary location."
          },
          "business_zip": {
            "type": "string",
            "example": "94104",
            "description": "US zip code of the business' primary location."
          },
          "business_country": {
            "type": "string",
            "format": "ISO 3166-1 alpha 2",
            "example": "US",
            "description": "2-letter country code of the business' primary location, according to the **ISO 3166-1 alpha 2** standard."
          },
          "business_ap_email": {
            "type": "string",
            "format": "email",
            "example": "ap@example.com",
            "description": "Email address of the business' accounts payable person or department."
          },
          "business_ap_phone": {
            "type": "string",
            "example": "(202) 456-1414",
            "description": "Phone number of the business' accounts payable person or department."
          },
          "business_ap_phone_extension": {
            "type": "string",
            "example": "123",
            "description": "Phone number extension of the business' accounts payable person or department."
          },
          "business_name": {
            "type": "string",
            "example": "Example, Inc.",
            "description": "Full legal name of the business being applied for."
          },
          "email": {
            "type": "string",
            "format": "email",
            "example": "user@example.com",
            "description": "Email of the customer applying for terms."
          },
          "default_terms": {
            "type": "string",
            "nullable": true,
            "description": "Default terms invoices will be advanced with.",
            "enum": [
              "net7",
              "net10",
              "net10th",
              "net15",
              "net20",
              "net30",
              "net45",
              "net60",
              "net75",
              "net90",
              "net120",
              "net180",
              null
            ]
          }
        }
      },
      "CustomerPutRequest": {
        "type": "object",
        "properties": {
          "business_address": {
            "type": "string",
            "example": "111 Main Street",
            "description": "Street address of the business' primary location."
          },
          "business_city": {
            "type": "string",
            "example": "San Francisco",
            "description": "City of the business' primary location."
          },
          "business_state": {
            "type": "string",
            "example": "CA",
            "description": "State or province of the business' primary location."
          },
          "business_zip": {
            "type": "string",
            "example": "94104",
            "description": "US zip code of the business' primary location."
          },
          "business_country": {
            "type": "string",
            "example": "US",
            "description": "Country of the business' primary location."
          },
          "business_ap_email": {
            "type": "string",
            "example": "ap@example.com",
            "description": "Email address of the business' accounts payable person or department."
          },
          "business_ap_phone": {
            "type": "string",
            "example": "(202) 456-1414",
            "description": "Phone number of the business' accounts payable person or department."
          },
          "business_ap_phone_extension": {
            "type": "string",
            "example": "123",
            "description": "Phone number extension of the business' accounts payable person or department."
          },
          "business_name": {
            "type": "string",
            "example": "Example, Inc.",
            "description": "Full legal name of the business being applied for."
          },
          "email": {
            "type": "string",
            "format": "email",
            "example": "user@example.com",
            "description": "Email of the customer applying for terms."
          },
          "default_terms": {
            "type": "string",
            "nullable": true,
            "description": "Set default terms that will apply to this customer's invoices. Can be overridden when requesting an advance.",
            "enum": [
              "net7",
              "net10",
              "net10th",
              "net15",
              "net20",
              "net30",
              "net45",
              "net60",
              "net75",
              "net90",
              "net120",
              "net180",
              null
            ]
          }
        }
      },
      "CustomerCreditCheckRequest": {
        "type": "object",
        "required": [
          "amount_requested",
          "has_purchase_history"
        ],
        "properties": {
          "amount_requested": {
            "type": "number",
            "example": 50000,
            "minimum": 1,
            "description": "Request an amount (plus buffer) to cover your customer's purchases over their payment term. This can be increased later."
          },
          "business_description": {
            "type": "string",
            "maxLength": 500,
            "example": "Put a description your customer's business here.",
            "description": "A description of your customer's business.",
            "nullable": true
          },
          "has_purchase_history": {
            "type": "boolean",
            "example": true,
            "description": "Indicates whether this customer has prior purchase history with the merchant. When `true`, the merchant has prior purchase history with this customer."
          },
          "has_purchase_terms_history": {
            "type": "boolean",
            "example": false,
            "description": "Required if `has_purchase_history = true`. Indicates whether this customer has prior purchase history on net terms with the merchant. When `true`, the merchant has prior net terms purchase history with this customer."
          }
        }
      },
      "CreditCheckExistsError": {
        "type": "object",
        "title": "Credit check exists error",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string",
                "description": "A short string, describing error details",
                "example": "Credit check already created for this customer."
              },
              "type": {
                "type": "string",
                "description": "A short string, describing error type",
                "enum": [
                  "invalid_request"
                ],
                "example": "invalid_request"
              }
            }
          }
        }
      },
      "ChargeListResponse": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "example": 1
          },
          "limit": {
            "type": "integer",
            "example": 25
          },
          "page": {
            "type": "integer",
            "example": 1
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Charge"
            }
          }
        }
      },
      "ChargeUpdateRequest": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "format": "double",
            "minimum": 0,
            "example": 1000,
            "description": "Updated amount for the charge."
          },
          "invoice_url": {
            "type": "string",
            "format": "uri",
            "example": "https://example.com/invoice.pdf",
            "description": "Updated invoice URL."
          },
          "order_number": {
            "type": "string",
            "example": "5055",
            "description": "Updated order number."
          },
          "po_number": {
            "type": "string",
            "example": "PO-555",
            "description": "Updated PO number."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "example": {
              "source": "checkout"
            },
            "description": "Metadata to store on the charge."
          },
          "user_id": {
            "type": "string",
            "example": "usr_123",
            "description": "Associated customer user ID."
          },
          "captured": {
            "type": "boolean",
            "example": true,
            "description": "Capture this charge."
          },
          "canceled": {
            "type": "boolean",
            "example": false,
            "description": "Cancel this charge."
          }
        }
      },
      "ChargeCaptureRequest": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "format": "double",
            "minimum": 0,
            "example": 1000,
            "description": "Amount to capture. If omitted, full charge amount is captured."
          },
          "order_number": {
            "type": "string",
            "example": "5055",
            "description": "Optional order number override applied during capture."
          },
          "po_number": {
            "type": "string",
            "example": "PO-555",
            "description": "Optional PO number override applied during capture."
          }
        }
      },
      "IssueAccessKeyTokenRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "client_id",
          "client_secret"
        ],
        "properties": {
          "client_id": {
            "type": "string",
            "description": "OAuth access key client ID returned when the access key was created."
          },
          "client_secret": {
            "type": "string",
            "description": "OAuth access key client secret returned when the access key was created or rotated."
          }
        }
      },
      "AccessKeyTokenResponse": {
        "type": "object",
        "required": [
          "access_token",
          "token_type",
          "expires_in"
        ],
        "properties": {
          "access_token": {
            "type": "string",
            "description": "Bearer token to include in the `Authorization` header."
          },
          "token_type": {
            "type": "string",
            "example": "Bearer"
          },
          "expires_in": {
            "type": "integer",
            "description": "Token lifetime in seconds.",
            "example": 86400
          },
          "scope": {
            "type": "string",
            "description": "Space-delimited scopes granted to the token.",
            "example": "merchant:read merchant:write"
          }
        }
      },
      "ForbiddenError": {
        "type": "object",
        "title": "Forbidden error",
        "properties": {
          "error": {
            "type": "object",
            "properties": {
              "message": {
                "type": "string",
                "description": "A short string, describing error details",
                "example": "API access key expired"
              },
              "type": {
                "type": "string",
                "description": "A short string, describing error type",
                "example": "forbidden_error"
              }
            }
          }
        }
      },
      "PayoutObject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the Payout.",
            "example": "PMMlaE5wbg0"
          },
          "amount_gross": {
            "type": "integer",
            "description": "Total gross amount of all payout transactions",
            "example": 120
          },
          "amount_fee": {
            "type": "integer",
            "description": "Total fee amount of all payout transactions",
            "example": 20
          },
          "amount_net": {
            "type": "integer",
            "description": "Total net amount of all payout transactions.",
            "example": 100
          },
          "status": {
            "type": "string",
            "description": "Current status of the Payout. <br><br> `pending` = the payout is created by Resolve, pending to be sent to our bank. <br> `in_transit` = the payment or payout has been sent to our bank and is pending their execution. <br> `paid` = the payment or payout amount was successfully deposited. <br> `failed` = the payment or payout amount did not successfully deposit. <br> `canceled` = the payment or payout in Resolve's system was not sent to or executed by the bank. <br>",
            "enum": [
              "pending",
              "in_transit",
              "paid",
              "failed",
              "canceled"
            ],
            "example": "pending"
          },
          "retry_payout_id": {
            "type": "string",
            "description": "Payout id being retried.",
            "example": "PMMlaE5wbg0"
          },
          "failed_at": {
            "type": "string",
            "description": "Date time of when the Payout failed.",
            "example": "2022-09-06T03:08:37.508Z"
          },
          "expected_by": {
            "type": "string",
            "description": "Date time of when we expect the Payout to reach the participating entity's bank.",
            "example": "2022-09-06T03:08:37.508Z"
          },
          "transactions_starting_at": {
            "type": "string",
            "description": "This value is the earliest value for payout_transaction.created_at AND payout_transaction.payout_id = payout.id."
          },
          "transactions_ending_at": {
            "type": "string",
            "description": "This value is the latest value for payout_transaction.created_at AND payout_transaction.payout_id = payout.id."
          },
          "canceled_at": {
            "type": "string",
            "description": "Date time of when the Payout was canceled.",
            "example": "2022-09-06T03:08:37.508Z"
          },
          "created_at": {
            "type": "string",
            "description": "Date time of when the Payout was created.",
            "example": "2022-09-06T03:08:37.508Z"
          },
          "updated_at": {
            "type": "string",
            "description": "Date time of when the Payout was last updated.",
            "example": "2022-09-06T03:08:37.508Z"
          }
        }
      },
      "PayoutsLists": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "example": 25
          },
          "page": {
            "type": "integer",
            "example": 1
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/PayoutObject"
            }
          }
        }
      },
      "PayoutTransactionObject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the payout transactions.",
            "example": "AOncfxMnm"
          },
          "payout_id": {
            "type": "string",
            "description": "Resolve payout ID.",
            "example": "gQxGLAowY"
          },
          "type": {
            "type": "string",
            "description": "Type of the payout transaction.",
            "enum": [
              "advance",
              "payment",
              "refund",
              "monthly_fee",
              "annual_fee",
              "non_advanced_invoice_fee",
              "merchant_payment",
              "mdr_extension",
              "credit_note",
              "express_ach_payout_fee",
              "express_ach_payment_fee",
              "mdr_passthrough"
            ],
            "example": "advance"
          },
          "customer_id": {
            "type": "string",
            "description": "Resolve customer ID.",
            "example": "voArW2nSs"
          },
          "customer_name": {
            "type": "string",
            "description": "Name of the customer.",
            "example": "Test name"
          },
          "invoice_id": {
            "type": "string",
            "description": "Resolve invoice ID.",
            "example": "C2vBqxfZ4"
          },
          "invoice_number": {
            "type": "string",
            "example": "R334-097R",
            "description": "Invoice number identifier."
          },
          "order_id": {
            "type": "string",
            "description": "Resolve order ID.",
            "example": "u5WRraCYY"
          },
          "po_number": {
            "type": "string",
            "example": "PO-09785",
            "description": "PO number identifier."
          },
          "amount_gross": {
            "type": "integer",
            "description": "Payout transaction gross amount.",
            "example": 100
          },
          "amount_fee": {
            "type": "integer",
            "description": "Payout transaction fee amount.",
            "example": 3
          },
          "amount_net": {
            "type": "integer",
            "description": "Payout transaction net amount.",
            "example": 97
          },
          "created_at": {
            "type": "string",
            "description": "Date time of when the payout transaction was created.",
            "example": "2022-09-06T03:08:37.508Z"
          },
          "updated_at": {
            "type": "string",
            "description": "Date time of when the payout transaction was last updated.",
            "example": "2022-09-06T03:08:37.508Z"
          }
        }
      },
      "PayoutTransactionsLists": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "example": 25
          },
          "page": {
            "type": "integer",
            "example": 1
          },
          "results": {
            "items": {
              "$ref": "#/components/schemas/PayoutTransactionObject"
            }
          }
        }
      },
      "PaymentListResponse": {
        "type": "object",
        "properties": {
          "count": {
            "type": "integer",
            "example": 1
          },
          "limit": {
            "type": "integer",
            "example": 25
          },
          "page": {
            "type": "integer",
            "example": 1
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/Payment"
            }
          }
        }
      },
      "ShipmentObject": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Unique identifier of the Shipment.",
            "example": "ship_1234567890abcdef"
          },
          "merchant_invoice_id": {
            "type": "string",
            "description": "ID of the associated merchant invoice.",
            "example": "inv_1234567890abcdef"
          },
          "fulfillment_method": {
            "type": "string",
            "description": "Method of fulfillment for the shipment.",
            "enum": [
              "shipping_provider",
              "self_delivery",
              "customer_pickup",
              "services_only"
            ],
            "example": "shipping_provider"
          },
          "shipment_tracking_number": {
            "type": "string",
            "description": "Tracking number provided by the shipping courier.",
            "example": "1Z123E45678901234"
          },
          "shipment_courier": {
            "type": "string",
            "description": "Shipping courier or provider name. While any value can be accepted, instant verification is supported for specific couriers.\n\nSee the [Shipments API documentation](#tag/Shipments) for the complete list of supported couriers.\n",
            "example": "ups"
          },
          "verification_status": {
            "type": "string",
            "description": "Manual or automatic verification status of the shipment.",
            "enum": [
              "verified",
              "pending"
            ],
            "example": "verified"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "description": "Date time when the shipment was created.",
            "example": "2024-01-15T10:30:00Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "description": "Date time when the shipment was last updated.",
            "example": "2024-01-15T14:45:00Z"
          },
          "tracking_status": {
            "type": "string",
            "description": "Current tracking status of the shipment from the courier.",
            "nullable": true,
            "example": "delivered"
          },
          "tracking_substatus": {
            "type": "string",
            "description": "Detailed tracking substatus providing additional context about the shipment's current state.",
            "nullable": true,
            "example": "delivered_001"
          },
          "expected_delivery": {
            "type": "string",
            "format": "date-time",
            "description": "Expected delivery date and time provided by the shipping courier.",
            "nullable": true,
            "example": "2024-01-20T18:00:00Z"
          }
        }
      },
      "ShipmentsList": {
        "type": "object",
        "properties": {
          "limit": {
            "type": "integer",
            "description": "Number of results returned per page.",
            "example": 10
          },
          "page": {
            "type": "integer",
            "description": "Current page number.",
            "example": 1
          },
          "count": {
            "type": "integer",
            "description": "Total number of shipments matching the query.",
            "example": 25
          },
          "results": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/ShipmentObject"
            }
          }
        }
      },
      "ShipmentFile": {
        "type": "object",
        "required": [
          "url",
          "size"
        ],
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "description": "S3 URL of the uploaded file obtained after uploading to the signed URL from `/shipments/sign-upload`.",
            "example": "https://bucket.s3.amazonaws.com/1234567890-document.pdf"
          },
          "size": {
            "type": "integer",
            "description": "File size in bytes.",
            "example": 204800
          },
          "metadata": {
            "type": "object",
            "description": "Optional metadata about the file.",
            "properties": {
              "original_filename": {
                "type": "string",
                "description": "Original filename before upload.",
                "example": "proof_of_delivery.pdf"
              }
            },
            "example": {
              "original_filename": "proof_of_delivery.pdf"
            }
          }
        }
      },
      "ShipmentCreateRequest": {
        "type": "object",
        "required": [
          "merchant_invoice_id"
        ],
        "properties": {
          "merchant_invoice_id": {
            "type": "string",
            "description": "ID of the merchant invoice this shipment belongs to.",
            "example": "inv_1234567890abcdef"
          },
          "fulfillment_method": {
            "type": "string",
            "description": "Method of fulfillment for the shipment. Determines what additional fields are required:\n- `shipping_provider`: Requires `shipment_tracking_number` and `shipment_courier`. File is not allowed.\n- `self_delivery`, `customer_pickup`, `services_only`: Require a `file`. Tracking number and courier are optional.\n",
            "enum": [
              "shipping_provider",
              "self_delivery",
              "customer_pickup",
              "services_only"
            ],
            "default": "shipping_provider",
            "example": "shipping_provider"
          },
          "shipment_tracking_number": {
            "type": "string",
            "description": "Tracking number (required when fulfillment_method is shipping_provider, optional otherwise).",
            "example": "1Z123E45678901234"
          },
          "shipment_courier": {
            "type": "string",
            "description": "Shipping courier (required when fulfillment_method is shipping_provider, optional otherwise). While any value can be accepted, instant verification is supported for specific couriers.\n\nSee the [Shipments API documentation](#tag/Shipments) for the complete list of supported couriers.\n",
            "example": "ups"
          },
          "file": {
            "$ref": "#/components/schemas/ShipmentFile",
            "description": "Proof of delivery file. Required for `self_delivery`, `customer_pickup`, and `services_only` fulfillment methods.\nForbidden for `shipping_provider` fulfillment method.\n\nUse the `/shipments/sign-upload` endpoint to obtain a signed URL for uploading the file to S3, then include the uploaded file details here.\n",
            "example": {
              "url": "https://bucket.s3.amazonaws.com/1234567890-document.pdf",
              "size": 204800,
              "metadata": {
                "original_filename": "proof_of_delivery.pdf"
              }
            }
          }
        }
      },
      "ShipmentUpdateRequest": {
        "type": "object",
        "properties": {
          "merchant_invoice_id": {
            "type": "string",
            "description": "ID of the merchant invoice (must belong to the authenticated merchant).",
            "example": "inv_9876543210fedcba"
          },
          "shipment_tracking_number": {
            "type": "string",
            "description": "Tracking number for the shipment.",
            "example": "1Z987F65432109876"
          },
          "shipment_courier": {
            "type": "string",
            "description": "Shipping courier or provider name. While any value can be accepted, instant verification is supported for specific couriers.\n\nSee the [Shipments API documentation](#tag/Shipments) for the complete list of supported couriers.\n",
            "example": "fedex"
          },
          "file": {
            "$ref": "#/components/schemas/ShipmentFile",
            "description": "Proof of delivery file. Cannot be added for shipments with `shipping_provider` fulfillment method.\n\nUse the `/shipments/sign-upload` endpoint to obtain a signed URL for uploading the file to S3, then include the uploaded file details here.\n",
            "example": {
              "url": "https://bucket.s3.amazonaws.com/1234567890-document.pdf",
              "size": 204800,
              "metadata": {
                "original_filename": "proof_of_delivery.pdf"
              }
            }
          }
        }
      }
    },
    "responses": {
      "InvoiceListResponse": {
        "description": "An object with an array of results containing up to the limit. If no invoices are found, the results array will be empty.\n",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/InvoiceListResponse"
            }
          }
        }
      },
      "InvalidRequestOrValidationResponse": {
        "description": "Bad request error",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/ValidationError"
                },
                {
                  "$ref": "#/components/schemas/InvalidRequestError"
                }
              ]
            }
          }
        }
      },
      "UnauthorizedResponse": {
        "description": "Unauthorized error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/UnauthorizedError"
            }
          }
        }
      },
      "RateLimitResponse": {
        "description": "Rate limit error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/RateLimitError"
            }
          }
        }
      },
      "InvoiceResponse": {
        "description": "An object representing an invoice.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Invoice"
            }
          }
        }
      },
      "NotFoundResponse": {
        "description": "Not found error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/NotFoundError"
            }
          }
        }
      },
      "CreditNoteListResponse": {
        "description": "A paginated list of credit notes.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CreditNoteListResponse"
            }
          }
        }
      },
      "CreditNoteActionResponse": {
        "description": "An object containing the status of the credit note creation request.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CreditNoteAction"
            }
          }
        }
      },
      "CreditNoteResponse": {
        "description": "The credit note object.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CreditNote"
            }
          }
        }
      },
      "CustomerListResponse": {
        "description": "An object with an array of results containing up to the limit. If no customers are found, the results array will be empty.\n",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CustomerList"
            }
          }
        }
      },
      "CustomerResponse": {
        "description": "An object representing the customer.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Customer"
            }
          }
        }
      },
      "UnprocessableEntityResponse": {
        "description": "Unprocessable entity error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/InvalidRequestError"
            }
          }
        }
      },
      "CreditCheckAlreadyExistsResponse": {
        "description": "Credit check already created for this customer",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CreditCheckExistsError"
            }
          }
        }
      },
      "ChargeListResponse": {
        "description": "A paginated list of charges.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ChargeListResponse"
            }
          }
        }
      },
      "ChargeResponse": {
        "description": "An object representing a charge.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Charge"
            }
          }
        }
      },
      "AccessKeyTokenResponse": {
        "description": "Successfully minted bearer token",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/AccessKeyTokenResponse"
            },
            "examples": {
              "default": {
                "value": {
                  "access_token": "eyJ...",
                  "token_type": "Bearer",
                  "expires_in": 86400,
                  "scope": "merchant:read merchant:write"
                }
              }
            }
          }
        }
      },
      "ForbiddenResponse": {
        "description": "Forbidden error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ForbiddenError"
            }
          }
        }
      },
      "PayoutListResponse": {
        "description": "An object with an array of Payouts up to the specified limit.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PayoutsLists"
            }
          }
        }
      },
      "PayoutResponse": {
        "description": "An object representing the created Payout.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PayoutObject"
            }
          }
        }
      },
      "ListPayoutTransactionsResponse": {
        "description": "An object with an array of results containing up to the limit. If no payout transactions are found, the results array will be empty.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PayoutTransactionsLists"
            }
          }
        }
      },
      "PayoutTransactionResponse": {
        "description": "An object representing the created Payout Transaction.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PayoutTransactionObject"
            }
          }
        }
      },
      "PaymentListResponse": {
        "description": "A paginated list of payments.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PaymentListResponse"
            }
          }
        }
      },
      "PaymentResponse": {
        "description": "An object representing a payment.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Payment"
            }
          }
        }
      },
      "ShipmentListResponse": {
        "description": "An object with an array of Shipments up to the specified limit.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ShipmentsList"
            }
          }
        }
      },
      "ShipmentResponse": {
        "description": "An object representing the Shipment.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ShipmentObject"
            }
          }
        }
      },
      "WebhookListResponse": {
        "description": "An object with an array of results containing up to the limit. If no subscriptions are found, the results array will be empty.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "count": {
                  "type": "integer",
                  "description": "Total number of webhook endpoint subscriptions",
                  "example": 3
                },
                "page": {
                  "type": "integer",
                  "description": "Current page number",
                  "example": 1
                },
                "limit": {
                  "type": "integer",
                  "description": "Number of results per page",
                  "example": 25
                },
                "results": {
                  "type": "array",
                  "description": "Array of webhook endpoint objects. Each object represents one endpoint-topic subscription. If an endpoint is subscribed to multiple topics, it will appear multiple times in the array.",
                  "items": {
                    "$ref": "#/components/schemas/WebhookEndpoint"
                  }
                }
              }
            },
            "examples": {
              "multiple_endpoints": {
                "summary": "Response with multiple webhook endpoint subscriptions",
                "value": {
                  "count": 3,
                  "page": 1,
                  "limit": 25,
                  "results": [
                    {
                      "id": "whe_abc123def456",
                      "merchant_id": "mer_xyz789",
                      "endpoint_url": "https://example.com/webhooks/resolve",
                      "topic": {
                        "name": "invoice.created",
                        "description": "Triggered when a new invoice record is created"
                      },
                      "created_at": "2021-05-20T09:23:53+00:00",
                      "updated_at": "2021-05-20T09:23:53+00:00"
                    },
                    {
                      "id": "whe_def456ghi789",
                      "merchant_id": "mer_xyz789",
                      "endpoint_url": "https://example.com/webhooks/resolve",
                      "topic": {
                        "name": "customer.created",
                        "description": "Triggered when a new customer record is created"
                      },
                      "created_at": "2021-05-20T09:23:53+00:00",
                      "updated_at": "2021-05-20T09:23:53+00:00"
                    },
                    {
                      "id": "whe_ghi789jkl012",
                      "merchant_id": "mer_xyz789",
                      "endpoint_url": "https://api.example.com/resolve-events",
                      "topic": {
                        "name": "payout.created",
                        "description": "Triggered when a new payout record is created"
                      },
                      "created_at": "2021-05-21T10:30:00+00:00",
                      "updated_at": "2021-05-21T10:30:00+00:00"
                    }
                  ]
                }
              },
              "empty_list": {
                "summary": "Response with no webhook endpoints configured",
                "value": {
                  "count": 0,
                  "page": 1,
                  "limit": 25,
                  "results": []
                }
              }
            }
          }
        }
      },
      "WebhookResponse": {
        "description": "Successful response with webhook endpoint subscriptions",
        "content": {
          "application/json": {
            "schema": {
              "type": "array",
              "description": "Array of webhook endpoint objects. Each object represents one endpoint-topic subscription created or updated.",
              "items": {
                "$ref": "#/components/schemas/WebhookEndpoint"
              }
            },
            "examples": {
              "created": {
                "summary": "Newly created webhook endpoint subscriptions",
                "value": [
                  {
                    "id": "whe_abc123def456",
                    "merchant_id": "mer_xyz789",
                    "endpoint_url": "https://example.com/webhooks/resolve",
                    "topic": {
                      "name": "invoice.created",
                      "description": "Triggered when a new invoice record is created"
                    },
                    "created_at": "2021-05-20T09:23:53+00:00",
                    "updated_at": "2021-05-20T09:23:53+00:00"
                  },
                  {
                    "id": "whe_def456ghi789",
                    "merchant_id": "mer_xyz789",
                    "endpoint_url": "https://example.com/webhooks/resolve",
                    "topic": {
                      "name": "invoice.balance_updated",
                      "description": "Triggered when the outstanding balance of an invoice changes"
                    },
                    "created_at": "2021-05-20T09:23:53+00:00",
                    "updated_at": "2021-05-20T09:23:53+00:00"
                  },
                  {
                    "id": "whe_ghi789jkl012",
                    "merchant_id": "mer_xyz789",
                    "endpoint_url": "https://example.com/webhooks/resolve",
                    "topic": {
                      "name": "customer.created",
                      "description": "Triggered when a new customer record is created"
                    },
                    "created_at": "2021-05-20T09:23:53+00:00",
                    "updated_at": "2021-05-20T09:23:53+00:00"
                  }
                ]
              },
              "updated": {
                "summary": "Updated webhook endpoint with new event subscriptions",
                "value": [
                  {
                    "id": "whe_abc123def456",
                    "merchant_id": "mer_xyz789",
                    "endpoint_url": "https://example.com/webhooks/resolve",
                    "topic": {
                      "name": "invoice.created",
                      "description": "Triggered when a new invoice record is created"
                    },
                    "created_at": "2021-05-20T09:23:53+00:00",
                    "updated_at": "2021-05-25T14:30:00+00:00"
                  },
                  {
                    "id": "whe_mno123pqr456",
                    "merchant_id": "mer_xyz789",
                    "endpoint_url": "https://example.com/webhooks/resolve",
                    "topic": {
                      "name": "payment.created",
                      "description": "Triggered when a new payment is created"
                    },
                    "created_at": "2021-05-25T14:30:00+00:00",
                    "updated_at": "2021-05-25T14:30:00+00:00"
                  },
                  {
                    "id": "whe_stu789vwx012",
                    "merchant_id": "mer_xyz789",
                    "endpoint_url": "https://example.com/webhooks/resolve",
                    "topic": {
                      "name": "payment.status_changed",
                      "description": "Triggered when the status of a payment changes"
                    },
                    "created_at": "2021-05-25T14:30:00+00:00",
                    "updated_at": "2021-05-25T14:30:00+00:00"
                  }
                ]
              }
            }
          }
        }
      }
    },
    "requestBodies": {
      "InvoiceCreateRequestBody": {
        "description": "Invoice to add to the system.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/InvoiceCreateRequest"
            }
          }
        }
      },
      "InvoiceUpdateRequestBody": {
        "description": "Fields to update an invoice with. Please note, allowed fields depend on whether or not the invoice has been sent.\n",
        "content": {
          "application/json": {
            "schema": {
              "oneOf": [
                {
                  "$ref": "#/components/schemas/InvoiceUpdateBeforeSent"
                },
                {
                  "$ref": "#/components/schemas/InvoiceUpdateAfterSentAdvanced"
                },
                {
                  "$ref": "#/components/schemas/InvoiceUpdateAfterSentNonAdvanced"
                }
              ]
            }
          }
        }
      },
      "CreditNoteCreateRequestBody": {
        "description": "Issue a credit note for an invoice.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CreditNoteCreateRequest"
            }
          }
        }
      },
      "CustomerPostRequestBody": {
        "description": "Customer to add to the system.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CustomerPostRequest"
            }
          }
        }
      },
      "CustomerPutRequestBody": {
        "description": "Fields to update a customer with.\n",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CustomerPutRequest"
            }
          }
        }
      },
      "CustomerRequestCreditCheckBody": {
        "description": "Request a credit check for a customer",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/CustomerCreditCheckRequest"
            }
          }
        }
      },
      "ChargeUpdateRequestBody": {
        "description": "Fields to update on a charge.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ChargeUpdateRequest"
            }
          }
        }
      },
      "ChargeCaptureRequestBody": {
        "description": "Fields used while capturing a charge.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ChargeCaptureRequest"
            }
          }
        }
      },
      "IssueAccessKeyTokenRequestBody": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/IssueAccessKeyTokenRequest"
            },
            "examples": {
              "default": {
                "value": {
                  "client_id": "abc123clientid",
                  "client_secret": "secret-value"
                }
              }
            }
          }
        }
      },
      "CreateShipmentRequest": {
        "description": "Request body for creating a new shipment.",
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ShipmentCreateRequest"
            }
          }
        }
      },
      "UpdateShipmentRequest": {
        "description": "Request body for updating an existing shipment.",
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/ShipmentUpdateRequest"
            }
          }
        }
      },
      "WebhookUpsertRequestBody": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "endpoint_url",
                "events"
              ],
              "properties": {
                "endpoint_url": {
                  "type": "string",
                  "format": "uri",
                  "pattern": "^https://",
                  "description": "The HTTPS URL where webhook events will be sent. Must use HTTPS protocol.",
                  "example": "https://example.com/webhooks/resolve"
                },
                "events": {
                  "$ref": "#/components/schemas/WebhookEventSubscriptions"
                }
              }
            },
            "examples": {
              "basic": {
                "summary": "Subscribe to specific events",
                "value": {
                  "endpoint_url": "https://example.com/webhooks/resolve",
                  "events": {
                    "invoice.created": true,
                    "invoice.balance_updated": true,
                    "customer.created": true,
                    "customer.credit_decision_created": true
                  }
                }
              },
              "unsubscribe": {
                "summary": "Unsubscribe from specific events",
                "description": "Update an existing endpoint to unsubscribe from certain event types by setting them to false. Only events set to true will remain active.",
                "value": {
                  "endpoint_url": "https://example.com/webhooks/resolve",
                  "events": {
                    "invoice.created": true,
                    "invoice.balance_updated": false,
                    "customer.created": true,
                    "customer.status_updated": false,
                    "customer.line_amount_updated": false,
                    "customer.advance_rate_updated": false,
                    "customer.credit_decision_created": false,
                    "payment.created": false,
                    "payment.status_changed": false,
                    "payout.created": false,
                    "payout.status_changed": false
                  }
                }
              }
            }
          }
        }
      },
      "WebhookDeleteRequestBody": {
        "required": true,
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "required": [
                "endpoint_url"
              ],
              "properties": {
                "endpoint_url": {
                  "type": "string",
                  "format": "uri",
                  "pattern": "^https://",
                  "description": "The HTTPS URL of the webhook endpoint to delete",
                  "example": "https://example.com/webhooks/resolve"
                }
              }
            },
            "examples": {
              "basic": {
                "summary": "Delete a webhook endpoint",
                "value": {
                  "endpoint_url": "https://example.com/webhooks/resolve"
                }
              }
            }
          }
        }
      }
    }
  },
  "security": [
    {
      "bearerAuth": []
    },
    {
      "basicAuth": []
    }
  ],
  "paths": {
    "/invoices": {
      "get": {
        "summary": "List all invoices",
        "operationId": "listInvoices",
        "description": "Return a list of invoices.",
        "parameters": [
          {
            "name": "limit",
            "schema": {
              "type": "integer",
              "default": 25,
              "maximum": 100,
              "minimum": 25
            },
            "in": "query",
            "description": "Limit the number of invoices returned."
          },
          {
            "name": "page",
            "schema": {
              "type": "string",
              "default": "1"
            },
            "in": "query",
            "description": "Specify the page of invoices returned."
          },
          {
            "name": "filter",
            "explode": true,
            "style": "deepObject",
            "schema": {
              "type": "object",
              "properties": {
                "number": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "string"
                    }
                  }
                },
                "order_number": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "string"
                    }
                  }
                },
                "po_number": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "string"
                    }
                  }
                },
                "customer_id": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "string"
                    }
                  }
                },
                "created_at": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "gt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "lt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "gte": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "lte": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                },
                "fully_paid": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "boolean"
                    },
                    "ne": {
                      "type": "boolean"
                    }
                  }
                },
                "fully_paid_at": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "gt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "lt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "gte": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "lte": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                },
                "amount_due": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "number"
                    },
                    "gt": {
                      "type": "number"
                    },
                    "lt": {
                      "type": "number"
                    },
                    "gte": {
                      "type": "number"
                    },
                    "lte": {
                      "type": "number"
                    }
                  }
                },
                "amount_balance": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "number"
                    },
                    "gt": {
                      "type": "number"
                    },
                    "lt": {
                      "type": "number"
                    },
                    "gte": {
                      "type": "number"
                    },
                    "lte": {
                      "type": "number"
                    }
                  }
                },
                "amount_pending": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "number"
                    },
                    "gt": {
                      "type": "number"
                    },
                    "lt": {
                      "type": "number"
                    },
                    "gte": {
                      "type": "number"
                    },
                    "lte": {
                      "type": "number"
                    }
                  }
                },
                "amount_refunded": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "number"
                    },
                    "gt": {
                      "type": "number"
                    },
                    "lt": {
                      "type": "number"
                    },
                    "gte": {
                      "type": "number"
                    },
                    "lte": {
                      "type": "number"
                    }
                  }
                },
                "archived": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "boolean"
                    },
                    "ne": {
                      "type": "boolean"
                    }
                  }
                }
              }
            },
            "in": "query",
            "description": "Filter invoices by the specified fields.\n\nFilter semantics: `filter[field][operator]=value`.\n\nAvailable filter operators:\n- `eq` - equal (=)\n- `ne` - not equal (!=)\n- `gt` - greater than (>)\n- `gte` - greater than or equal (>=)\n- `lt` - less than (<)\n- `lte` - less than or equal  (<=)\n\nFiltering is allowed by the following fields:\n  - `number` (`eq`)\n  - `order_number` (`eq`)\n  - `po_number` (`eq`)\n  - `customer_id` (`eq`)\n  - `advance_requested` (`eq`)\n  - `created_at` (`eq`, `gt`, `lt`, `gte`, `lte`)\n  - `fully_paid` (`eq`, `ne`)\n  - `fully_paid_at` (`eq`, `gt`, `lt`, `gte`, `lte`)\n  - `amount_due` (`eq`, `gt`, `lt`, `gte`, `lte`)\n  - `amount_balance` (`eq`, `gt`, `lt`, `gte`, `lte`)\n  - `amount_pending` (`eq`, `gt`, `lt`, `gte`, `lte`)\n  - `amount_refunded` (`eq`, `gt`, `lt`, `gte`, `lte`)\n  - `archived` (`eq`, `ne`)\n\nExample: `filter[number][eq]=100`\n\nNote: filter with the `eq` operator is equivalent to the following filter `filter[field]=value`\n"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/InvoiceListResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Invoices"
        ]
      },
      "post": {
        "summary": "Create an invoice",
        "operationId": "createInvoice",
        "description": "Create a new advanced or non-advanced invoice with the desired terms.",
        "requestBody": {
          "$ref": "#/components/requestBodies/InvoiceCreateRequestBody"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/InvoiceResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Invoices"
        ]
      }
    },
    "/invoices/{invoice_id}": {
      "get": {
        "summary": "Fetch an invoice",
        "operationId": "fetchInvoice",
        "description": "Retrieve an existing invoice by its ID.",
        "parameters": [
          {
            "name": "invoice_id",
            "schema": {
              "type": "string"
            },
            "in": "path",
            "required": true,
            "description": "ID of the invoice to retrieve"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/InvoiceResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Invoices"
        ]
      },
      "put": {
        "summary": "Update an invoice",
        "operationId": "updateInvoice",
        "description": "Update an invoice.",
        "parameters": [
          {
            "name": "invoice_id",
            "schema": {
              "type": "string"
            },
            "in": "path",
            "required": true,
            "description": "ID of the invoice to update"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/InvoiceUpdateRequestBody"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/InvoiceResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Invoices"
        ]
      },
      "delete": {
        "summary": "Delete an invoice",
        "operationId": "deleteInvoice",
        "description": "Delete an invoice.",
        "parameters": [
          {
            "name": "invoice_id",
            "schema": {
              "type": "string"
            },
            "in": "path",
            "required": true,
            "description": "ID of the invoice to delete"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/InvoiceResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Invoices"
        ]
      }
    },
    "/invoices/{invoice_id}/send": {
      "put": {
        "summary": "Send an invoice",
        "operationId": "sendInvoice",
        "description": "Send an invoice to the customer.",
        "parameters": [
          {
            "name": "invoice_id",
            "schema": {
              "type": "string"
            },
            "in": "path",
            "required": true,
            "description": "ID of the invoice to send"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/InvoiceResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Invoices"
        ]
      }
    },
    "/invoices/{invoice_id}/void": {
      "post": {
        "summary": "Void an invoice",
        "operationId": "voidInvoice",
        "description": "Void an invoice.",
        "parameters": [
          {
            "name": "invoice_id",
            "schema": {
              "type": "string"
            },
            "in": "path",
            "required": true,
            "description": "ID of the invoice to void"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/InvoiceResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Invoices"
        ]
      }
    },
    "/invoices/{invoice_id}/cancel": {
      "post": {
        "summary": "Cancel an invoice",
        "operationId": "cancelInvoice",
        "description": "Cancel an invoice.",
        "parameters": [
          {
            "name": "invoice_id",
            "schema": {
              "type": "string"
            },
            "in": "path",
            "required": true,
            "description": "ID of the invoice to cancel"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/InvoiceResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Invoices"
        ]
      }
    },
    "/credit-notes": {
      "get": {
        "summary": "List credit notes",
        "operationId": "listCreditNotes",
        "description": "Return a list of credit notes.",
        "parameters": [
          {
            "name": "limit",
            "schema": {
              "type": "integer",
              "default": 25,
              "maximum": 100,
              "minimum": 25
            },
            "in": "query",
            "description": "Limit the number of credit notes returned."
          },
          {
            "name": "page",
            "schema": {
              "type": "string",
              "default": "1"
            },
            "in": "query",
            "description": "Specify the page of credit notes returned."
          },
          {
            "name": "filter",
            "explode": true,
            "style": "deepObject",
            "schema": {
              "type": "object",
              "properties": {
                "number": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "string"
                    }
                  }
                },
                "customer_id": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "string"
                    }
                  }
                },
                "invoice_id": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "string"
                    }
                  }
                },
                "payment_id": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "string"
                    }
                  }
                },
                "amount": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "number"
                    },
                    "gt": {
                      "type": "number"
                    },
                    "lt": {
                      "type": "number"
                    },
                    "gte": {
                      "type": "number"
                    },
                    "lte": {
                      "type": "number"
                    }
                  }
                },
                "amount_balance": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "number"
                    },
                    "gt": {
                      "type": "number"
                    },
                    "lt": {
                      "type": "number"
                    },
                    "gte": {
                      "type": "number"
                    },
                    "lte": {
                      "type": "number"
                    }
                  }
                },
                "amount_paid": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "number"
                    },
                    "gt": {
                      "type": "number"
                    },
                    "lt": {
                      "type": "number"
                    },
                    "gte": {
                      "type": "number"
                    },
                    "lte": {
                      "type": "number"
                    }
                  }
                }
              }
            },
            "in": "query",
            "description": "Filter credit notes by the specified fields.\n\nFilter semantics: `filter[field][operator]=value`.\n\nAvailable filter operators:\n- `eq` - equal (=)\n- `gt` - greater than (>)\n- `gte` - greater than or equal (>=)\n- `lt` - less than (<)\n- `lte` - less than or equal  (<=)\n\nFiltering is allowed by the following fields:\n  - `number` (`eq`)\n  - `customer_id` (`eq`)\n  - `invoice_id` (`eq`)\n  - `payment_id` (`eq`)\n  - `amount` (`eq`, `gt`, `lt`, `gte`, `lte`)\n  - `amount_balance` (`eq`, `gt`, `lt`, `gte`, `lte`)\n  - `amount_paid` (`eq`, `gt`, `lt`, `gte`, `lte`)\n\nExample: `filter[number][eq]=CN-001`\n\nNote: filter with the `eq` operator is equivalent to the following filter `filter[field]=value`\n"
          },
          {
            "name": "sort",
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id",
                "created_at",
                "-created_at",
                "amount",
                "-amount",
                "amount_balance",
                "-amount_balance"
              ],
              "default": "-created_at"
            },
            "in": "query",
            "description": "Sort credit notes by the specified field. Use `-` prefix for descending order.\n\nAvailable sort fields:\n  - `id`\n  - `created_at`\n  - `amount`\n  - `amount_balance`\n\nExample: `sort=-created_at` (sort by created_at in descending order)\n"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CreditNoteListResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Credit Notes"
        ]
      },
      "post": {
        "summary": "Create a credit note",
        "operationId": "createCreditNote",
        "description": "Create a new credit note.",
        "requestBody": {
          "$ref": "#/components/requestBodies/CreditNoteCreateRequestBody"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/CreditNoteActionResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Credit Notes"
        ]
      }
    },
    "/credit-notes/{credit_note_id}/void": {
      "post": {
        "summary": "Request to void a credit note",
        "operationId": "voidCreditNote",
        "description": "Request to void an existing credit note.",
        "responses": {
          "200": {
            "$ref": "#/components/responses/CreditNoteResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Credit Notes"
        ]
      }
    },
    "/credit-notes/{credit_note_id}": {
      "get": {
        "summary": "Fetch a credit note",
        "operationId": "fetchCreditNote",
        "description": "Retrieve an existing credit note by its ID.",
        "parameters": [
          {
            "name": "credit_note_id",
            "schema": {
              "type": "string"
            },
            "in": "path",
            "required": true,
            "description": "ID of the credit note to retrieve"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CreditNoteResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Credit Notes"
        ]
      }
    },
    "/customers": {
      "get": {
        "summary": "List all customers",
        "operationId": "listCustomers",
        "description": "Return a list of customers.",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 25,
              "maximum": 100,
              "minimum": 25
            },
            "description": "Limit the number of customers returned."
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "1"
            },
            "description": "Specify the page of customers returned."
          },
          {
            "name": "filter",
            "explode": true,
            "style": "deepObject",
            "schema": {
              "type": "object",
              "properties": {
                "email": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "string"
                    }
                  }
                },
                "business_name": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "string"
                    }
                  }
                },
                "created_at": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "gt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "lt": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "gte": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "lte": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                },
                "amount_approved": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "number"
                    },
                    "gt": {
                      "type": "number"
                    },
                    "lt": {
                      "type": "number"
                    },
                    "gte": {
                      "type": "number"
                    },
                    "lte": {
                      "type": "number"
                    }
                  }
                },
                "amount_available": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "number"
                    },
                    "gt": {
                      "type": "number"
                    },
                    "lt": {
                      "type": "number"
                    },
                    "gte": {
                      "type": "number"
                    },
                    "lte": {
                      "type": "number"
                    }
                  }
                },
                "amount_authorized": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "number"
                    },
                    "gt": {
                      "type": "number"
                    },
                    "lt": {
                      "type": "number"
                    },
                    "gte": {
                      "type": "number"
                    },
                    "lte": {
                      "type": "number"
                    }
                  }
                },
                "amount_balance": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "number"
                    },
                    "gt": {
                      "type": "number"
                    },
                    "lt": {
                      "type": "number"
                    },
                    "gte": {
                      "type": "number"
                    },
                    "lte": {
                      "type": "number"
                    }
                  }
                },
                "amount_unapplied_payments": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "number"
                    },
                    "gt": {
                      "type": "number"
                    },
                    "lt": {
                      "type": "number"
                    },
                    "gte": {
                      "type": "number"
                    },
                    "lte": {
                      "type": "number"
                    }
                  }
                },
                "advance_rate": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "number",
                      "format": "double",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "gt": {
                      "type": "number",
                      "format": "double",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "lt": {
                      "type": "number",
                      "format": "double",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "gte": {
                      "type": "number",
                      "format": "double",
                      "minimum": 0,
                      "maximum": 1
                    },
                    "lte": {
                      "type": "number",
                      "format": "double",
                      "minimum": 0,
                      "maximum": 1
                    }
                  }
                },
                "archived": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "boolean"
                    },
                    "ne": {
                      "type": "boolean"
                    }
                  }
                }
              }
            },
            "in": "query",
            "description": "Filter customers by the specified fields.\n\nFilter semantics: `filter[field][operator]=value`.\n\nAvailable filter operators:\n- `eq` - equal (=)\n- `ne` - not equal (!=)\n- `gt` - greater than (>)\n- `gte` - greater than or equal (>=)\n- `lt` - less than (<)\n- `lte` - less than or equal  (<=)\n\nFiltering is allowed by the following fields:\n  - `email` (`eq`)\n  - `business_name` (`eq`)\n  - `created_at` (`eq`, `gt`, `lt`, `gte`, `lte`)\n  - `amount_approved` (`eq`, `gt`, `lt`, `gte`, `lte`)\n  - `amount_available` (`eq`, `gt`, `lt`, `gte`, `lte`)\n  - `amount_authorized` (`eq`, `gt`, `lt`, `gte`, `lte`)\n  - `amount_balance` (`eq`, `gt`, `lt`, `gte`, `lte`)\n  - `amount_unapplied_payments` (`eq`, `gt`, `lt`, `gte`, `lte`)\n  - `advance_rate` (`eq`, `gt`, `lt`, `gte`, `lte`)\n  - `archived` (`eq`, `ne`)\n\nExample: `filter[email][eq]=test@resolvepay.com`\n\nNote: filter with the `eq` operator is equivalent to the following filter `filter[field]=value`\n"
          },
          {
            "name": "sort",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "description": "Sort customers by the specified fields.\n\nThe sort order for each sort field is ascending unless it is prefixed with a minus,\nin which case it is descending.\n\nMultiple sort fields supported by allowing comma-separated sort fields. Sort fields will be applied in the order specified.\n\nSorting is allowed by the following fields: `id`, `created_at`, `amount_approved`, `amount_available`, `business_name`.\n\nExample: `sort=business_name,-created_at`\n"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CustomerListResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Customers"
        ]
      },
      "post": {
        "summary": "Create a customer",
        "operationId": "createCustomer",
        "description": "Create a customer.",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "basicAuth": []
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CustomerPostRequestBody"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/CustomerResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Customers"
        ]
      }
    },
    "/customers/{customer_id}": {
      "get": {
        "summary": "Fetch a customer",
        "operationId": "fetchCustomer",
        "description": "Retrieve an existing customer by its ID.\n\nA successful response to this request will be the Customer entity.\nIf customer enrollment is required, we will return `net_terms_status='pending_enrollment'` and a not null `net_terms_enrollment_url`.\nIf customer enrollment is not required (customer applied through a direct application), we will return `net_terms_status='enrolled'`.\n",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "customer_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "ID of the customer to return"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CustomerResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Customers"
        ]
      },
      "put": {
        "summary": "Update a customer",
        "operationId": "updateCustomer",
        "description": "Update a customer.",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "customer_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "ID of the customer to update"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CustomerPutRequestBody"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/CustomerResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Customers"
        ]
      }
    },
    "/customers/{customer_id}/enroll": {
      "post": {
        "summary": "Enroll a customer",
        "operationId": "enroll-a-customer",
        "deprecated": true,
        "description": "<div style=\"border-sizing: border-box; padding: 10px; background-color: rgba(212, 31, 28, 0.07); color: rgb(212, 31, 28);\">\n  As of <strong>July 2023</strong>, this route has been replaced with a stub response and will soon be deprecated.\n  The <strong>`confirm_enrollment`</strong> status no longer exists and, once approved by Resolve, customers will either be <strong>`enrolled`</strong>\n  (if they applied through an application) or <strong>`pending_enrollment`</strong> (if credit checked).\n</div>\n",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "customer_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "ID of the customer to enroll"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/CustomerResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "422": {
            "$ref": "#/components/responses/UnprocessableEntityResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Customers"
        ]
      }
    },
    "/customers/{customer_id}/credit-check": {
      "post": {
        "summary": "Request a credit check",
        "operationId": "requestCustomerCreditCheck",
        "description": "You may request a credit check on a customer who hasn't previously been credit checked.\nThis endpoint returns no content. You'll be able to see the date you requested the credit check\n(`credit_check_requested_at`) and `credit_status` updated to `pending` or, in the case of an instant decision,\n`approved` or `declined` by fetching the Customer entity.\n\nA `hold` credit status represents when a customer's credit account is over 15 days overdue.\nA `deactivated` credit status represents when a customer's credit account has been deactivated.\n\nWhen a customer's `credit_status` is `approved` - the customer's `net_terms_status`  represents the current state of a customer's enrollment in the approved net terms offer.\nSee <a href=\"#operation/fetchCustomer\">#fetchCustomer</a> for more details.\n\nNote: Except for instant decisions, a decision should be reflected on the Customer entity within 1 business day.\n",
        "security": [
          {
            "bearerAuth": []
          },
          {
            "basicAuth": []
          }
        ],
        "parameters": [
          {
            "name": "customer_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "ID of the customer being submitted for a credit check"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/CustomerRequestCreditCheckBody"
        },
        "responses": {
          "204": {
            "description": "Credit check request accepted."
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "422": {
            "$ref": "#/components/responses/CreditCheckAlreadyExistsResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Customers"
        ]
      }
    },
    "/charges": {
      "get": {
        "summary": "List charges",
        "operationId": "listCharges",
        "description": "Return a paginated list of charges.",
        "parameters": [
          {
            "name": "limit",
            "schema": {
              "type": "integer",
              "default": 100,
              "maximum": 100,
              "minimum": 1
            },
            "in": "query",
            "description": "Limit the number of charges returned."
          },
          {
            "name": "page",
            "schema": {
              "type": "string",
              "default": "1"
            },
            "in": "query",
            "description": "Specify the page of charges returned."
          },
          {
            "name": "search",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "description": "Search across supported charge fields.\n\nSearch is applied to charge and associated record values including:\n`id`, `number`, `merchant_invoice.order_number`, `merchant_invoice.po_number`,\nand customer/merchant identifying fields.\n"
          },
          {
            "name": "order",
            "schema": {
              "type": "string",
              "default": "-created_at"
            },
            "in": "query",
            "description": "Sort charges by field. Prefix with `-` for descending order.\n\nExamples:\n- `order=-created_at`\n- `order=amount`\n"
          },
          {
            "name": "starting_at",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "in": "query",
            "description": "Return charges created at or after this timestamp."
          },
          {
            "name": "ending_at",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "in": "query",
            "description": "Return charges created at or before this timestamp."
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ChargeListResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Charges"
        ]
      }
    },
    "/charges/{charge_id}": {
      "get": {
        "summary": "Fetch a charge",
        "operationId": "fetchCharge",
        "description": "Retrieve an existing charge by its ID.",
        "parameters": [
          {
            "name": "charge_id",
            "schema": {
              "type": "string"
            },
            "in": "path",
            "required": true,
            "description": "ID of the charge to retrieve"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ChargeResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Charges"
        ]
      },
      "put": {
        "summary": "Update a charge",
        "operationId": "updateCharge",
        "description": "Update a charge.",
        "parameters": [
          {
            "name": "charge_id",
            "schema": {
              "type": "string"
            },
            "in": "path",
            "required": true,
            "description": "ID of the charge to update"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/ChargeUpdateRequestBody"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/ChargeResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Charges"
        ]
      }
    },
    "/charges/{charge_id}/capture": {
      "post": {
        "summary": "Capture a charge",
        "operationId": "captureCharge",
        "description": "Capture an authorized charge.",
        "parameters": [
          {
            "name": "charge_id",
            "schema": {
              "type": "string"
            },
            "in": "path",
            "required": true,
            "description": "ID of the charge to capture"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/ChargeCaptureRequestBody"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/ChargeResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Charges"
        ]
      }
    },
    "/charges/{charge_id}/cancel": {
      "post": {
        "summary": "Cancel a charge",
        "operationId": "cancelCharge",
        "description": "Cancel an existing charge.",
        "parameters": [
          {
            "name": "charge_id",
            "schema": {
              "type": "string"
            },
            "in": "path",
            "required": true,
            "description": "ID of the charge to cancel"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ChargeResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Charges"
        ]
      }
    },
    "/access-keys/token": {
      "post": {
        "summary": "Mint an access token",
        "operationId": "issueAccessKeyToken",
        "description": "Exchange an OAuth access key for a bearer token by providing its `client_id` and `client_secret` in the request body.\n",
        "security": [],
        "requestBody": {
          "$ref": "#/components/requestBodies/IssueAccessKeyTokenRequestBody"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/AccessKeyTokenResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "403": {
            "$ref": "#/components/responses/ForbiddenResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Access Keys"
        ]
      }
    },
    "/payouts": {
      "get": {
        "summary": "List Payouts",
        "operationId": "listPayouts",
        "parameters": [
          {
            "name": "filter",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "description": "Filter records by the specified fields.\n  \nFilter semantics: `filter[field][operator]=value`.\n\nAvailable filter operators:\n  - `eq` - equal (=)\n  - `ne` - not equal (!=)\n  - `gt` - greater than (>)\n  - `gte` - greater than or equal (>=)\n  - `lt` - less than (<)\n  - `lte` - less than or equal  (<=)\n\nFiltering is allowed by the following fields:\n  - `status` (`eq`)\n  - `expected_by` (`eq`, `gt`, `lt`, `gte`, `lte`)\n  - `created_at` (`eq`, `gt`, `lt`, `gte`, `lte`)\n\nExample: `filter[created_at][gt]=2022-10-30T14:00:00.000Z`\n\nNote: filter with the `eq` operator is equivalent to the following filter `filter[field]=value`\n"
          },
          {
            "name": "sort",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "description": "Sort records by the specified fields.\n\nThe sort order for each sort field is ascending unless it is prefixed with a minus,\nin which case it is descending.\n\nMultiple sort fields supported by allowing comma-separated sort fields. Sort fields will be applied in the order specified.\n\nSorting is allowed by the following fields: `id`, `created_at`.\n\nExample: `sort=id,-created_at`\n"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PayoutListResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Payouts"
        ]
      }
    },
    "/payouts/{payout_id}": {
      "get": {
        "summary": "Get a Payout",
        "operationId": "getPayout",
        "parameters": [
          {
            "name": "payout_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "ID of the Payout"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PayoutResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Payouts"
        ]
      }
    },
    "/payout-transactions": {
      "get": {
        "summary": "List Payout Transactions",
        "operationId": "listPayoutTransactions",
        "parameters": [
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "default": 25,
              "maximum": 100,
              "minimum": 25
            },
            "description": "Limit the number of payout transactions returned."
          },
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "string",
              "default": "1"
            },
            "description": "Specify the page of payout transactions returned."
          },
          {
            "name": "filter",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "description": "Filter Payout Transactions by the specified fields.\n\nFilter semantics: `filter[field][operator]=value`.\n\nAvailable filter operators:\n- `eq` - equal (=)\n- `ne` - not equal (!=)\n- `gt` - greater than (>)\n- `gte` - greater than or equal (>=)\n- `lt` - less than (<)\n- `lte` - less than or equal  (<=)\n\nFiltering is allowed by the following fields:\n  - `customer_id` (`eq`, `ne`)\n  - `created_at` (`eq`, `gt`, `lt`, `gte`, `lte`)\n  - `payout_id` (`eq`, `ne`)\n  - `invoice_id` (`eq`, `ne`)\n\nExample: `filter[created_at][gte]=2021-01-01T00:00:00.000Z`\n\nNote: filter with the `eq` operator is equivalent to the following filter `filter[field]=value`\n"
          },
          {
            "name": "sort",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "description": "Sort Payout Transactions by the specified fields.\n\nThe sort order for each sort field is ascending unless it is prefixed with a minus,\nin which case it is descending.\n\nMultiple sort fields supported by allowing comma-separated sort fields. Sort fields will be applied in the order specified.\n\nSorting is allowed by the following fields: `id`, `created_at`.\n\nExample: `sort=id,-created_at`\n"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ListPayoutTransactionsResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Payout Transactions"
        ]
      }
    },
    "/payout_transactions/{payout_transaction_id}": {
      "get": {
        "summary": "Get a Payout Transaction",
        "operationId": "getPayoutTransaction",
        "parameters": [
          {
            "name": "payout_transaction_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "ID of the Payout Transaction"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PayoutTransactionResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Payout Transactions"
        ]
      }
    },
    "/payments": {
      "get": {
        "summary": "List payments",
        "operationId": "listPayments",
        "description": "Return a list of payments.",
        "parameters": [
          {
            "name": "limit",
            "schema": {
              "type": "integer",
              "default": 25,
              "maximum": 100,
              "minimum": 25
            },
            "in": "query",
            "description": "Limit the number of payments returned."
          },
          {
            "name": "page",
            "schema": {
              "type": "string",
              "default": "1"
            },
            "in": "query",
            "description": "Specify the page of payments returned."
          },
          {
            "name": "filter",
            "explode": true,
            "style": "deepObject",
            "schema": {
              "type": "object",
              "properties": {
                "customer_id": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "string"
                    }
                  }
                },
                "status": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "string",
                      "enum": [
                        "pending",
                        "in_transit",
                        "in_review",
                        "paid",
                        "failed",
                        "canceled"
                      ]
                    }
                  }
                },
                "amount": {
                  "type": "object",
                  "properties": {
                    "eq": {
                      "type": "number"
                    },
                    "gt": {
                      "type": "number"
                    },
                    "lt": {
                      "type": "number"
                    },
                    "gte": {
                      "type": "number"
                    },
                    "lte": {
                      "type": "number"
                    }
                  }
                }
              }
            },
            "in": "query",
            "description": "Filter payments by the specified fields.\n\nFilter semantics: `filter[field][operator]=value`.\n\nAvailable filter operators:\n- `eq` - equal (=)\n- `gt` - greater than (>)\n- `gte` - greater than or equal (>=)\n- `lt` - less than (<)\n- `lte` - less than or equal  (<=)\n- `after` - after date\n- `before` - before date\n- `start` - start date\n- `end` - end date\n\nFiltering is allowed by the following fields:\n  - `customer_id` (`eq`)\n  - `status` (`eq`)\n  - `amount` (`eq`, `gt`, `lt`, `gte`, `lte`)\n\nExample: `filter[customer_id][eq]=X50sgfRd`\n\nNote: filter with the `eq` operator is equivalent to the following filter `filter[field]=value`\n"
          },
          {
            "name": "sort",
            "schema": {
              "type": "string",
              "enum": [
                "id",
                "-id",
                "created_at",
                "-created_at",
                "amount",
                "-amount"
              ],
              "default": "-created_at"
            },
            "in": "query",
            "description": "Sort payments by the specified field. Use `-` prefix for descending order.\n\nAvailable sort fields:\n  - `id`\n  - `created_at`\n  - `amount`\n\nExample: `sort=-created_at` (sort by created_at in descending order)\n"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PaymentListResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Payments"
        ]
      }
    },
    "/payments/{payment_id}": {
      "get": {
        "summary": "Fetch a payment",
        "operationId": "fetchPayment",
        "description": "Retrieve an existing payment by its ID.",
        "parameters": [
          {
            "name": "payment_id",
            "schema": {
              "type": "string"
            },
            "in": "path",
            "required": true,
            "description": "ID of the payment to retrieve"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/PaymentResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Payments"
        ]
      }
    },
    "/shipments": {
      "get": {
        "summary": "List Shipments",
        "operationId": "listShipments",
        "parameters": [
          {
            "name": "merchant_invoice_id",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "description": "Filter shipments by specific merchant invoice ID.",
            "example": "inv_1234567890abcdef"
          },
          {
            "name": "fulfillment_method",
            "schema": {
              "type": "string",
              "enum": [
                "shipping_provider",
                "self_delivery",
                "customer_pickup",
                "services_only"
              ]
            },
            "in": "query",
            "description": "Filter shipments by fulfillment method.",
            "example": "shipping_provider"
          },
          {
            "name": "verification_status",
            "schema": {
              "type": "string",
              "enum": [
                "verified",
                "pending"
              ]
            },
            "in": "query",
            "description": "Filter shipments by verification status.",
            "example": "verified"
          },
          {
            "name": "shipment_courier",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "description": "Filter shipments by shipping courier.",
            "example": "ups"
          },
          {
            "name": "limit",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            },
            "in": "query",
            "description": "Number of results to return per page (1-100).",
            "example": 25
          },
          {
            "name": "starting_after",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "description": "Pagination cursor for fetching results after a specific shipment ID.",
            "example": "ship_1234567890abcdef"
          },
          {
            "name": "ending_before",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "description": "Pagination cursor for fetching results before a specific shipment ID.",
            "example": "ship_9876543210fedcba"
          },
          {
            "name": "search",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "description": "Search term to filter shipments across multiple fields.",
            "example": "1Z123E45678901234"
          },
          {
            "name": "searchBy",
            "schema": {
              "type": "string",
              "enum": [
                "tracking_number",
                "courier",
                "id",
                "merchant_invoice_id"
              ]
            },
            "in": "query",
            "description": "Specific field to search within.",
            "example": "tracking_number"
          },
          {
            "name": "sort",
            "schema": {
              "type": "string"
            },
            "in": "query",
            "description": "Sort records by the specified fields.\n\nThe sort order for each sort field is ascending unless it is prefixed with a minus,\nin which case it is descending.\n\nMultiple sort fields supported by allowing comma-separated sort fields. Sort fields will be applied in the order specified.\n\nSorting is allowed by the following fields: `id`, `created_at`.\n\nExample: `sort=id,-created_at`\n"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ShipmentListResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Shipments"
        ]
      },
      "post": {
        "summary": "Create a Shipment",
        "operationId": "createShipment",
        "requestBody": {
          "$ref": "#/components/requestBodies/CreateShipmentRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/ShipmentResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Shipments"
        ]
      }
    },
    "/shipments/{shipment_id}": {
      "get": {
        "summary": "Get a Shipment",
        "operationId": "getShipment",
        "parameters": [
          {
            "name": "shipment_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "ID of the Shipment",
            "example": "ship_1234567890abcdef"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ShipmentResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Shipments"
        ]
      },
      "put": {
        "summary": "Update a Shipment",
        "operationId": "updateShipment",
        "parameters": [
          {
            "name": "shipment_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "ID of the Shipment to update",
            "example": "ship_1234567890abcdef"
          }
        ],
        "requestBody": {
          "$ref": "#/components/requestBodies/UpdateShipmentRequest"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/ShipmentResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Shipments"
        ]
      },
      "delete": {
        "summary": "Delete a Shipment",
        "operationId": "deleteShipment",
        "parameters": [
          {
            "name": "shipment_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "ID of the Shipment to delete",
            "example": "ship_1234567890abcdef"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ShipmentResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Shipments"
        ]
      }
    },
    "/shipments/{shipment_id}/sync": {
      "post": {
        "summary": "Sync Shipment Tracking",
        "description": "Synchronizes shipment tracking information by fetching real-time data from the courier using the existing tracking number. This endpoint retrieves the latest tracking updates directly from the shipping provider and performs instant verification of the shipment status, ensuring that the shipment data is current and accurate.",
        "operationId": "syncShipmentTracking",
        "parameters": [
          {
            "name": "shipment_id",
            "in": "path",
            "schema": {
              "type": "string"
            },
            "required": true,
            "description": "ID of the Shipment to sync tracking for",
            "example": "ship_1234567890abcdef"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ShipmentResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "404": {
            "$ref": "#/components/responses/NotFoundResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Shipments"
        ]
      }
    },
    "/webhooks": {
      "get": {
        "summary": "List webhook endpoints",
        "operationId": "listWebhookEndpoints",
        "description": "Returns a list of all configured webhook endpoints for the merchant account.",
        "parameters": [
          {
            "name": "limit",
            "schema": {
              "type": "integer",
              "default": 25,
              "maximum": 100,
              "minimum": 25
            },
            "in": "query",
            "description": "Limit the number of webhook endpoints returned."
          },
          {
            "name": "page",
            "schema": {
              "type": "string",
              "default": "1"
            },
            "in": "query",
            "description": "Specify the page of webhook endpoints returned."
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/WebhookListResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Webhooks"
        ]
      },
      "post": {
        "summary": "Create or update webhook endpoints",
        "operationId": "upsertWebhookEndpoints",
        "description": "Create a new webhook endpoint or update an existing one. If an endpoint with the same URL already exists, it will be updated with the new event subscriptions.",
        "requestBody": {
          "$ref": "#/components/requestBodies/WebhookUpsertRequestBody"
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WebhookResponse"
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Webhooks"
        ]
      },
      "delete": {
        "summary": "Delete webhook endpoints",
        "operationId": "deleteWebhookEndpoints",
        "description": "Delete a webhook endpoint and all its event subscriptions.",
        "requestBody": {
          "$ref": "#/components/requestBodies/WebhookDeleteRequestBody"
        },
        "responses": {
          "204": {
            "description": "Webhook endpoint successfully deleted."
          },
          "400": {
            "$ref": "#/components/responses/InvalidRequestOrValidationResponse"
          },
          "401": {
            "$ref": "#/components/responses/UnauthorizedResponse"
          },
          "429": {
            "$ref": "#/components/responses/RateLimitResponse"
          }
        },
        "tags": [
          "Webhooks"
        ]
      }
    }
  }
}