{
  "openapi": "3.1.0",
  "info": {
    "title": "Dime Partner API v2",
    "version": "",
    "description": "The Dime Partner API lets you take card payments, store cards for later\ncharges, bill customers with invoices and subscriptions, manage your\nproduct catalog, and respond to chargebacks.\n\nStart with **Guides** in the menu: authentication, how v2 differs from\nv1, conventions shared by every endpoint, and how webhooks are\ndelivered. **API reference** lists every endpoint and event.\n",
    "contact": {
      "name": "Dime Payment Services",
      "url": "https://dimepay.net"
    }
  },
  "servers": [
    {
      "url": "https://sandbox.api.dimepay.app/dapi/v2",
      "description": "Sandbox. A separate environment with its own data; no real money\nmoves. Use a client key created in sandbox.\n"
    },
    {
      "url": "https://api.dimepay.app/dapi/v2",
      "description": "Production. Real payments. Use a client key created in production.\n"
    }
  ],
  "security": [
    {
      "ClientKey": [],
      "SecretKey": []
    }
  ],
  "tags": [
    {
      "name": "Authentication",
      "x-traitTag": true,
      "description": "Every request needs both halves of your API key: the client key in\nthe `X-Dime-Client` header, and its secret key as a Bearer token.\n\n```\nX-Dime-Client: ck_your_sandbox_key\nAuthorization: Bearer sk_your_sandbox_secret\n```\n\nBoth must belong to the same key. A request with only one of them, or\nwith a pair that does not match, returns `401`.\n\nThe secret key is for your server only. Never put it in a browser,\na mobile app or source control. The client key is the public half:\nit identifies you in Dime's client SDKs and cannot call this API on\nits own. If a secret key may have leaked, roll the key in the Dime\ndashboard.\n\nSandbox and production are separate environments with separate data. A\nkey works only in the environment that issued it. Keys look the same in\nboth (`ck_…` and `sk_…`), so label them where you store them.\n"
    },
    {
      "name": "What changed from v1",
      "x-traitTag": true,
      "description": "If you are moving from v1, five things differ:\n\n- **Authentication.** v1 sends the client key in a `client_key` header\n  and signs the body with the secret key. v2 sends the client key in\n  `X-Dime-Client` and the secret key as `Authorization: Bearer`. See\n  **Authentication**.\n- **Plain JSON.** v1 signs the request body as a JWT and wraps it in a\n  `data` field. v2 takes the body directly. Sending `data` is rejected.\n- **No envelope.** v1 returns `{ statusCode, headers, body }`. v2 returns\n  the resource at the top level.\n- **One error shape.** Every failure returns a single `error` object with a\n  `type`, `code`, `message`, and often the offending `param`.\n- **Registered webhooks.** Register a URL once with\n  `POST /webhook-endpoints` to receive events for your account. Every\n  delivery is signed, and you can review and replay deliveries. See\n  **Webhooks**.\n\nv1 is unchanged and continues to work.\n"
    },
    {
      "name": "Identifiers",
      "x-traitTag": true,
      "description": "Every object is identified by its `token`. Use it wherever you refer\nto the object: in a URL, in a request field, as a pagination cursor.\nFields that refer to another object carry that object's token too: a\nrefund's `reference_transaction_id` is the original transaction's\ntoken, and an order's `customer` is the customer's token. Dime's\ndatabase ids are never returned and are not accepted: a request field\nsent an id is rejected with `400`, and an id in a URL matches nothing\nand returns `404`.\n\nEvery token starts with a three-letter code for the kind of object,\nthen `_`. Orders, invoices and transactions have a 20-character token\nthat carries the day the object was created (in Jamaica), then seven\nrandom characters, for example `ord_20261112_V1StGXR`,\n`inv_20261112_x9-qLm3` or `txn_20261112_Bx87TxQ`.\nEvery other object has a 38-character token: the code, then 31 random\ncharacters in groups of 8, 8, 8 and 7, every part separated by `_`, for\nexample `cus_V1StGXR8_Z5jdHi6B_myT2x9Kq_Lm3P-Rt`. Random characters are\nletters, digits and `-`; `_` only ever separates parts.\n\nTokens issued earlier keep their shape and stay valid, for example\norders with five random characters (`ord_20261112_V1StG`) and\n38-character transaction tokens. Store tokens as opaque strings; do not\nparse them or assume a length.\n\n| Code | Object |\n| --- | --- |\n| `ord` | Order |\n| `txn` | Transaction |\n| `sub` | Subscription |\n| `cus` | Customer |\n| `inv` | Invoice |\n| `prd` | Product |\n| `cat` | Category |\n| `lnk` | Payment link |\n| `crq` | Tokenization request |\n| `crd` | Card |\n| `chb` | Chargeback |\n| `bac` | Bank account |\n| `btf` | Bank transfer |\n| `wal` | Wallet |\n| `hep` | Webhook endpoint |\n| `whe` | Webhook event |\n| `brq` | Bridge request |\n| `brm` | Linked merchant (Dime Bridge) |\n| `btr` | Bridge transfer |\n\nObjects created before this format keep the token they were given,\nwhich is shorter and shaped differently (`ob9gWGGx5ACvn6KU`,\n`INVUx6KQoFDuY`, `c_3f8a1e029c4d4b71a5e36`). Those tokens stay valid.\nKeep tokens as opaque strings of up to 64 characters, and do not\nwork out an object's kind or age from the shape of its token.\n\nYour merchant is named by its merchant token, for example\n`m82yalYupLIdpAz`.\n\nA Bridge link has no token: its only identifier is the secret in its\none-time `url`.\n\nSome requests take an identifier of your own, such as the `id` you\nsend when creating an order. Those are yours, not Dime's: they are\nstored and returned exactly as you sent them (an order's `reference`,\nthe `origin_id` filter).\n"
    },
    {
      "name": "Amounts",
      "x-traitTag": true,
      "description": "Amounts are decimal numbers in the currency's major unit: `1100` JMD is\none thousand one hundred Jamaican dollars, and `11.50` USD is eleven\ndollars fifty. The API does not restrict decimal places, but send at most\ntwo.\n\nSupported currencies: USD, JMD, GBP, EUR, TTD, BBD, XCD, GYD, SRD.\n\nOn orders and payments, the API does not check that `total` equals\n`subtotal + tax + shipping − discount`. Send the amount you want charged\nas `total`. Invoices are different: `tax` is a percentage, and Dime\ncalculates `total` for you.\n\n`POST /orders` and `POST /payments/hosted-page` require a minimum `total`\nof 200 JMD or 1 USD. Other currencies, and `POST /payments/sale` and\n`POST /payments/auth`, have no minimum.\n"
    },
    {
      "name": "Pagination",
      "x-traitTag": true,
      "description": "Lists are cursor-paginated and report `has_more` rather than a total. Walk\nforward by passing the `token` of the last record you saw as\n`starting_after`.\n"
    },
    {
      "name": "Errors",
      "x-traitTag": true,
      "description": "`type` is always one of four values: `invalid_request_error`, `card_error`,\n`idempotency_error`, `api_error`.\n\nA token that matches no record returns `404 resource_missing`, with\n`param` naming the field that did not match. A database id sent in a\nrequest field that takes a token returns `400 parameter_invalid`.\n"
    },
    {
      "name": "Retrying requests",
      "x-traitTag": true,
      "description": "Requests are not idempotent unless an endpoint says so. These endpoints\nact again every time they are sent, so a retry after a timeout can create\na second order, charge or refund:\n\n- `POST /orders` and `POST /payments/hosted-page`\n- `POST /payments/sale` and `POST /payments/auth`\n- `PUT /payments/refund`\n\nBefore retrying, check whether the first request succeeded. Look up the\norder with `GET /orders?origin_id=<the id you sent>`, or its transactions\nwith `GET /transactions?order_id=<the id you sent>`.\n\nThese endpoints are safe to retry:\n\n- `PUT /subscriptions/resume` accepts an `Idempotency-Key` header. A\n  retry with the same key returns the subscription with `replayed: true`\n  and does not charge again.\n- `POST /subscriptions/dime-billing` refuses a second debit for the same\n  invoice with `400 already_billed`.\n- `POST /bridge/transfers` requires an `Idempotency-Key` header. A\n  retry with the same key returns the original transfer and moves no\n  money.\n"
    },
    {
      "name": "Webhooks guide",
      "x-traitTag": true,
      "description": "Dime can tell your server when something happens: a payment succeeds\nor fails, a refund is recorded, a chargeback arrives, a customer is\ncreated. Register a URL once with `POST /webhook-endpoints` and receive\nevery event this API generates, for orders created through it (hosted\npage, `/payments/*`, `POST /orders`), for tokenization requests, for\ncustomer records, and for invoices created or deleted through it, or\nonly the types you choose. Payment terminal sales made through\n`/pos/*` produce events too. Orders taken through other channels (v1\nterminal sales, invoices, payment links, storefront) do not produce\nevents here.\n\n## Event names\n\nEvery event has a name such as `payment.succeeded` and a payload\ndescribing what happened. Branch on the name, and ignore names you do\nnot recognise: new events may be added. The full list, with payloads,\nis under **Webhooks** in the menu; `GET /webhook-event-types` returns the\ncurrent names.\n\n## The delivery\n\nEach event is a POST with this JSON body:\n\n```json\n{\n  \"event_id\": \"evt_V1StGXR8Z5jdHi6BmyT2\",\n  \"event_type\": \"payment.succeeded\",\n  \"occurred_at\": \"2026-10-27T15:04:07.112Z\",\n  \"owner_type\": \"merchant\",\n  \"owner_id\": \"m82yalYupLIdpAz\",\n  \"addon_subscription_id\": null,\n  \"resource_type\": \"payment\",\n  \"resource_id\": \"txn_20261027_PBFpP02\",\n  \"payload\": { \"transaction\": { \"...\": \"...\" } },\n  \"signature_version\": \"v1\"\n}\n```\n\n`payload` is documented for each event. `resource_type` and\n`resource_id` name the record the event is about, by its `token`.\n`owner_id` is your merchant token. The\nsame `event_id` and `event_type` are also sent as the `X-Dime-Event-Id`\nand `X-Dime-Event-Type` headers. `X-Dime-Attempt` is the attempt\nnumber, `1` for the first.\n\n## Verifying\n\nEach delivery carries `X-Dime-Signature: v1=<hex>`, where `<hex>` is\nHMAC-SHA256 of the raw request body, keyed with the endpoint's\n`signing_secret`. Compute the same over the exact bytes you received,\nbefore parsing, and compare with a constant-time comparison. Reject\nanything that does not match. Rotate the secret with\n`POST /webhook-endpoints/{token}/rotate-secret`. Every attempt is signed\nwith the endpoint's current secret, so retries still pending when you\nrotate are signed with the new one.\n\n## Responding and retries\n\nRespond with any `2xx` within 7 seconds, before doing any slow work.\nAnything else counts as a failure: a redirect (`3xx`), a `4xx` or\n`5xx`, a timeout, or no connection.\n\nAfter a failure Dime retries automatically, waiting about 1 minute,\n5 minutes, 30 minutes, 2 hours, 6 hours, 12 hours, 24 hours and 24\nhours between attempts. That is nine attempts over about 3 days.\nRetries from a backlog are spread out, so they do not all arrive at\nonce. While retries remain the delivery is `PENDING`, and\n`next_attempt_at` says when the next one is due. After the ninth\nfailure it is `FAILED`.\n\nIf you answer `429` or `503` with a `Retry-After` header, the next\nattempt waits that long when it is longer than the scheduled wait, up\nto 24 hours.\n\nA retry is the same event: the same `event_id`, `event_type`,\nresource, `payload` and `occurred_at`, with a new signature and the\nnext `X-Dime-Attempt`. `GET /webhook-events/{token}` lists every attempt\nwith its response status and error.\n\nTo recover sooner, or after a delivery has `FAILED`, replay it with\n`POST /webhook-events/{token}/replay`. A replay replaces the event's\npending retries, so the event is not also delivered by them. It\ncarries the same `event_id`, `event_type`, resource and `payload`;\n`occurred_at` and the signature are those of the replay.\n\nSet `is_active: false` on an endpoint to stop deliveries. Its pending\nretries stop too, and are marked `FAILED`. Events are still recorded\nwhile it is paused and can be replayed.\n\n## Handling events\n\n- **Duplicates.** You may receive an event more than once, for example\n  when your `2xx` arrived after the 7 seconds, or after a replay.\n  Discard an event whose `event_id` you have already handled.\n- **Order.** Events are not guaranteed to arrive in the order they\n  happened; a retried event can arrive after later ones. Rely on the\n  current state from the API rather than on arrival order.\n- **Tokens.** Every record in a payload is named by its `token`, the\n  same value the API returns and the endpoints take. Fields ending in\n  `_id` that refer to a Dime record (`reference_transaction_id`,\n  `customer_id`, `order_id`) hold that record's token. No database id\n  is sent. Ids you supplied, such as an order's `origin_id`, are\n  returned as you sent them.\n"
    },
    {
      "name": "Dime Bridge guide",
      "x-traitTag": true,
      "description": "Dime Bridge lets your marketplace take payments for the merchants it\nhas linked. Each merchant agrees to the link, each payment names one\nlinked merchant, and you pay several merchants with Bridge transfers.\nDime Bridge is enabled per account by Dime support.\n\n## 1. Link a merchant\n\n1. `POST /bridge/requests` with the merchant's `email`, the\n   `capabilities` you need (`payments`, `transfers`), anything you\n   already know in `prefill`, a `return_url` and a `refresh_url`.\n2. `POST /bridge/requests/{token}/links` and redirect the merchant to\n   the `url`. The link works once and expires after 10 minutes. If\n   they open a used or expired link they go to your `refresh_url`;\n   create a new link there and redirect them again.\n3. On a co-branded page, an existing Dime merchant signs in as the\n   invited email, picks a store and approves with a code emailed to\n   it. A merchant without a Dime account signs up with your prefill\n   and completes onboarding. They return to your `return_url`.\n4. You receive `bridge_merchant.activated`. Its `token` is what you\n   pay. A newly registered merchant is linked when it submits\n   onboarding, with `payments_enabled: false`; you receive\n   `bridge_merchant.updated` when Dime approves it.\n\n## 2. Take a payment\n\nAdd `bridge` to `POST /orders`, `POST /payments/hosted-page`,\n`POST /payments/sale` or `POST /payments/auth`, or to the signed `data`\nof a Web SDK 2.x checkout (`POST /orders/sdk`):\n\n```json\n\"bridge\": { \"destination\": \"brm_9CKxgfQk_jDKOHNVm_H8696T87_2alsOAP\", \"merchant_of_record\": \"marketplace\", \"fee\": 10 }\n```\n\n| | `marketplace` (default) | `linked_merchant` |\n|---|---|---|\n| Whose sale, processor profile and card descriptor | Yours | The linked merchant's |\n| Dime's processing fee paid by | You | The linked merchant |\n| Linked merchant receives | `amount`, or `total − fee` | `total − Dime fee − fee` |\n| You receive | `total − linked amount − Dime fee` | `fee` |\n| Chargebacks | Yours | The linked merchant's |\n| Send | `fee` or `amount` | `fee` |\n\nExample: a 100.00 payment with `fee: 10` where you are merchant of\nrecord and Dime's fee is 3.20. The linked merchant gets 90.00 and you\nkeep 6.80. A payment that would leave anyone a negative share is\nrejected.\n\n`merchant_descriptor_override` sets the name on the buyer's statement.\nBridge payments cannot be subscriptions yet. When the linked merchant\nis merchant of record you can still retrieve, capture, void and refund\nthe payment with your key; add `include_bridged=true` to list them.\n\nResponses carry a `bridge` object with `linked_amount`,\n`marketplace_net` and `dime_fee`. They are estimates until the payment\nsettles.\n\nPayment, refund and chargeback webhooks for a Bridge payment go to\nyou, the marketplace that created it, even when the linked merchant is\nmerchant of record, and carry the main payment's token. The linked\nmerchant gets none for payments you create.\n\nAt settlement the other party's share is recorded as a separate fee or\npayout transaction (`bridge.role` set, `bridge.parent_transaction_id`\nnaming the main payment). If you send its token to `PUT /payments/refund`,\nthe main payment is refunded: `amount` is the customer refund amount,\nand omitting it refunds the rest of the payment. It cannot be captured\nor voided on its own.\n\n## 3. Refunds\n\nA full refund unwinds everything: each party gives back all it\nreceived, whatever the options. On a partial refund the merchant of\nrecord pays unless `PUT /payments/refund` says otherwise (like Stripe's\n`reverse_transfer` and `refund_application_fee`):\n\n- `bridge.refund_from_linked_account`: the linked merchant funds the\n  refund (marketplace is merchant of record only).\n- `bridge.refund_bridge_fee`: the marketplace also gives back its share.\n\nFor a 100 payment where you kept 6.80 and the linked merchant got 90,\na refund of 40 with both options takes 36 from the linked merchant and\n4 from you: the shares come out of the refund, not on top of it. The\nlinked merchant always pays the refund fee. Each merchant that pays\npart of a refund gets its own refund transaction; refund and void\ntransactions carry the id the processor gave them.\n\nA chargeback is debited from the merchant of record for the whole\ncharge, including the other party's share.\n\n## 4. Paying several merchants\n\nTake the payment as merchant of record, then send one\n`POST /bridge/transfers` per merchant with `source_transaction_id`.\nTransfers move money from your available balance at once.\n\n## Moving from `split`\n\nv2 no longer accepts `split` (`400 parameter_unsupported`). v1 still\ndoes, and its responses carry `Deprecation` and `Sunset` headers.\nLink each merchant you split to today, then replace `split` with\n`bridge`, or with transfers for multi-merchant carts.\n"
    },
    {
      "name": "Status",
      "description": "Check that the API is reachable. Needs no key."
    },
    {
      "name": "Card Tokenization",
      "description": "Store a customer's card so you can charge it later without the\ncustomer present.\n\n1. Open a tokenization request with `POST /card-tokenization`. Send the customer\n   to the `card_url` in the response.\n2. The customer enters their card. Dime places a small verification\n   charge on it: a random 0.30–0.99 USD, converted to the request's\n   currency. The charge is not refunded.\n3. The customer reads the amount from their statement, and you submit\n   it with `PUT /card-tokenization/verify`.\n4. Call `GET /cards/{card_request_token}`. The response's `token`\n   is the card token.\n5. Charge the card token with `POST /payments/sale` or\n   `POST /payments/auth`.\n\nIn sandbox the verification charge is always 65, and verify also\naccepts 1.58, 28 or 32.46.\n"
    },
    {
      "name": "Categories",
      "description": "Group your catalog's products. Addressed by `token`."
    },
    {
      "name": "Chargebacks",
      "description": "Cardholder disputes against your transactions. A new chargeback is\n`RECEIVED`; respond before its `dispute_deadline` with\n`PUT /chargebacks/{token}/dispute`, or it is recorded as `ACCEPTED`.\n"
    },
    {
      "name": "Customers",
      "description": "The people paying your orders and invoices. Find a customer by its `token`."
    },
    {
      "name": "Dime Bridge",
      "description": "Link merchants to your marketplace, then take payments and send\ntransfers for them. See **Dime Bridge guide** under Guides.\n"
    },
    {
      "name": "Invoices",
      "description": "Bill a customer for goods or services. The customer pays on the\ninvoice's page: `https://pay.dimepay.app/open-invoices/{token}/`\n(sandbox: `https://pay.sandbox.dimepay.app/open-invoices/{token}/`).\nKeep the trailing slash.\n"
    },
    {
      "name": "Orders",
      "description": "Take a payment through a hosted checkout page.\n\nTo take an order for one of your linked merchants, add `bridge`. See\n**Dime Bridge guide**.\n"
    },
    {
      "name": "Payment Links",
      "description": "Shareable pages that collect a payment. Share\n`https://pay.dimepay.app/link/{token}` (sandbox:\n`https://pay.sandbox.dimepay.app/link/{token}`), where `token` is the\npayment link's `token`.\n"
    },
    {
      "name": "Payments",
      "description": "Charge a stored card, then capture, void, or refund."
    },
    {
      "name": "Payment Terminal",
      "description": "Card payments on your Dime payment terminals, from your POS."
    },
    {
      "name": "Products",
      "description": "Your catalog. Addressed by `token`."
    },
    {
      "name": "Subscriptions",
      "description": "Manage recurring billing."
    },
    {
      "name": "Bank Transfers",
      "description": "Send funds from your wallets to bank accounts."
    },
    {
      "name": "Transactions",
      "description": "The record of money moving."
    },
    {
      "name": "Webhooks",
      "description": "Register endpoints to receive signed events, inspect and replay\ndeliveries, and the events themselves. See **Webhooks guide** under\nGuides for delivery, retries and verification.\n"
    }
  ],
  "x-tagGroups": [
    {
      "name": "Guides",
      "tags": [
        "Authentication",
        "What changed from v1",
        "Identifiers",
        "Amounts",
        "Pagination",
        "Errors",
        "Retrying requests",
        "Webhooks guide",
        "Dime Bridge guide"
      ]
    },
    {
      "name": "API reference",
      "tags": [
        "Status",
        "Bank Transfers",
        "Card Tokenization",
        "Categories",
        "Chargebacks",
        "Customers",
        "Dime Bridge",
        "Invoices",
        "Orders",
        "Payment Links",
        "Payments",
        "Payment Terminal",
        "Products",
        "Subscriptions",
        "Transactions",
        "Webhooks"
      ]
    }
  ],
  "paths": {
    "/ping": {
      "get": {
        "tags": [
          "Status"
        ],
        "summary": "Health check",
        "operationId": "ping",
        "security": [],
        "description": "Confirms the API is reachable and which version answered. Needs no\nkey, so use it to check connectivity before sending authenticated\nrequests.\n",
        "responses": {
          "200": {
            "description": "The API is up.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "status": {
                      "type": "string",
                      "const": "ok",
                      "example": "ok"
                    },
                    "version": {
                      "type": "string",
                      "const": "v2",
                      "example": "v2"
                    }
                  }
                },
                "examples": {
                  "ok": {
                    "value": {
                      "status": "ok",
                      "version": "v2"
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/orders": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "List orders",
        "operationId": "listOrders",
        "description": "Returns your orders, newest first. Cursor-paginated.\n\nAn `origin_id` with no match returns an empty page, not a `404`.\n`origin_id` is not unique: nothing stops two orders from sharing one,\nso a filter can return more than one order.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          },
          {
            "$ref": "#/components/parameters/EndingBefore"
          },
          {
            "name": "origin_id",
            "in": "query",
            "description": "The `id` you sent when creating the order. If you reused an id,\nevery matching order is returned.\n",
            "schema": {
              "type": "string"
            },
            "example": "3f8a1e02-9c4d-4b71-a5e3-6d2f0b8c7a19"
          },
          {
            "name": "currency",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Currency"
            }
          },
          {
            "name": "customer_name",
            "in": "query",
            "description": "Matches against the customer's full name or either half of it,\ncase-insensitively, as a substring.\n",
            "schema": {
              "type": "string"
            },
            "example": "Jane"
          },
          {
            "name": "include_bridged",
            "in": "query",
            "description": "Dime Bridge. `true` also lists Bridge payments you created where\nthe linked merchant is merchant of record. Those orders belong to\nthe linked merchant, so they are left out by default.\n",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "example": true
          }
        ],
        "responses": {
          "200": {
            "description": "A page of orders.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ListEnvelope"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Order"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "page": {
                    "summary": "A page of orders",
                    "value": {
                      "object": "list",
                      "data": [
                        {
                          "object": "order",
                          "token": "ord_20261027_V1StGXR",
                          "status": "PENDING",
                          "currency": "JMD",
                          "subtotal": 1000,
                          "total": 1100,
                          "tax": 100,
                          "shipping": null,
                          "tip": null,
                          "email": "dev@example.com",
                          "customer": null,
                          "notes": null,
                          "fulfilled": false,
                          "recurring": false,
                          "subscription": null,
                          "line_items": [
                            {
                              "name": "Sample Item",
                              "external_id": null,
                              "sku": "SAMPLE",
                              "quantity": 1,
                              "unit_amount": 1100,
                              "description": null,
                              "image_url": null
                            }
                          ],
                          "reference": "ac58293d-a2c5-4979-8ef7-f3d4a9354b63",
                          "checkout_url": "https://pay.sandbox.dimepay.app/e-order/ord_20261027_V1StGXR",
                          "metadata": {},
                          "created_at": "2026-10-27T15:04:05.000Z",
                          "updated_at": "2026-10-27T15:04:05.000Z"
                        }
                      ],
                      "has_more": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          }
        }
      },
      "post": {
        "tags": [
          "Orders"
        ],
        "summary": "Create an order",
        "operationId": "createOrder",
        "description": "Creates an order. To take payment, send the buyer to\n`https://pay.dimepay.app/e-order/{token}` (sandbox:\n`https://pay.sandbox.dimepay.app/e-order/{token}`) using the `token`\nin the response.\n\n`total` must meet the currency minimum: **200 JMD** or **1 USD**.\nOther currencies have no configured minimum.\n\nThis request is not idempotent: a retry creates a second order. See\n*Retrying requests* under Guides.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderRequest"
              },
              "examples": {
                "simple": {
                  "summary": "A one-item order",
                  "value": {
                    "id": "ac58293d-a2c5-4979-8ef7-f3d4a9354b63",
                    "currency": "JMD",
                    "subtotal": 1000,
                    "total": 1100,
                    "tax": 100,
                    "email": "dev@example.com",
                    "referenceTransactionId": "order-1024",
                    "items": [
                      {
                        "name": "Sample Item",
                        "price": 1100,
                        "quantity": 1,
                        "sku": "SAMPLE"
                      }
                    ]
                  }
                },
                "subscription": {
                  "summary": "A recurring order",
                  "description": "`billing_cycles` is the total number of charges. The order\nitself is the first, so the stored subscription holds one\nfewer. Omit it to run until cancelled. A subscription order\nneeds `billingPerson` or `shippingPerson`, so there is a\ncustomer to bill.\n",
                  "value": {
                    "id": "7c1f6e42-6b3d-4a58-9d21-2f6b8c4e1a90",
                    "currency": "JMD",
                    "subtotal": 1000,
                    "total": 1100,
                    "tax": 100,
                    "email": "dev@example.com",
                    "referenceTransactionId": "sub-2048",
                    "is_subscription": true,
                    "tokenize": true,
                    "billingPerson": {
                      "name": "Jane Chen",
                      "phone": "+18765550199"
                    },
                    "subscription_instructions": {
                      "recurring_frequency": "MONTHLY",
                      "billing_cycles": 12
                    },
                    "items": [
                      {
                        "name": "Monthly Plan",
                        "price": 1100,
                        "quantity": 1,
                        "sku": "PLAN"
                      }
                    ]
                  }
                },
                "bridge": {
                  "summary": "A Dime Bridge order for a linked merchant",
                  "description": "You keep 10 of the 2000; the linked merchant receives 1990.\nAs merchant of record you pay Dime's processing fee out of\nyour 10.\n",
                  "value": {
                    "id": "9d2b7c54-1e8f-4a36-b7c1-5f0e2d8a4c13",
                    "currency": "USD",
                    "subtotal": 2000,
                    "total": 2000,
                    "email": "buyer@example.com",
                    "referenceTransactionId": "order-10001",
                    "items": [
                      {
                        "id": "SKU-BOOK-1",
                        "name": "Hardcover Book",
                        "price": 2000,
                        "quantity": 1
                      }
                    ],
                    "bridge": {
                      "destination": "brm_9CKxgfQk_jDKOHNVm_H8696T87_2alsOAP",
                      "merchant_of_record": "marketplace",
                      "fee": 10
                    },
                    "merchant_descriptor_override": "JANES STORE VIA MKT"
                  }
                },
                "settlementCountry": {
                  "summary": "Route by settlement country",
                  "description": "A USD order for an event in Trinidad and Tobago. It is\nprocessed through the merchant's Trinidad and Tobago USD\nconfiguration, not the merchant's default USD one.\n",
                  "value": {
                    "id": "7c9e6679-7425-40de-944b-e07fc1f90ae7",
                    "currency": "USD",
                    "settlement_country": "TT",
                    "total": 120,
                    "subtotal": 120,
                    "email": "buyer@example.com",
                    "referenceTransactionId": "EVT-TT-0042"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The order was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                },
                "examples": {
                  "created": {
                    "summary": "Captured from a live sandbox response",
                    "value": {
                      "object": "order",
                      "token": "ord_20261027_V1StGXR",
                      "status": "PENDING",
                      "currency": "JMD",
                      "subtotal": 1000,
                      "total": 1100,
                      "tax": 100,
                      "shipping": null,
                      "tip": null,
                      "email": null,
                      "customer": null,
                      "notes": "Order ac58293d-a2c5-4979-8ef7-f3d4a9354b63",
                      "fulfilled": false,
                      "recurring": false,
                      "subscription": null,
                      "line_items": [
                        {
                          "name": "Sample Item",
                          "external_id": null,
                          "sku": "SAMPLE",
                          "quantity": 1,
                          "unit_amount": 1100,
                          "description": null,
                          "image_url": null
                        }
                      ],
                      "reference": "ac58293d-a2c5-4979-8ef7-f3d4a9354b63",
                      "checkout_url": "https://pay.sandbox.dimepay.app/e-order/ord_20261027_V1StGXR",
                      "metadata": {},
                      "created_at": "2026-08-26T00:48:52.252Z",
                      "updated_at": "2026-08-26T00:48:52.252Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The request was rejected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                },
                "examples": {
                  "missing": {
                    "summary": "A required field was absent",
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "parameter_missing",
                        "message": "Currency is required.",
                        "param": "currency"
                      }
                    }
                  },
                  "belowMinimum": {
                    "summary": "The total is under the currency minimum",
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "parameter_invalid",
                        "message": "Order needs to be greater than 200 JMD",
                        "param": "total"
                      }
                    }
                  },
                  "splitUnsupported": {
                    "summary": "The v1 split was sent",
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "parameter_unsupported",
                        "message": "split is not supported on v2. Use bridge: { destination, fee | amount } for a single linked merchant, and POST /bridge/transfers to pay more than one.",
                        "param": "split"
                      }
                    }
                  },
                  "bridgeFeeTooLow": {
                    "summary": "The Bridge fee does not cover Dime's processing fee",
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "parameter_invalid",
                        "message": "The marketplace share does not cover Dime's processing fee (3.2). Increase bridge.fee or lower bridge.amount.",
                        "param": "bridge.fee"
                      }
                    }
                  },
                  "bridgeInactive": {
                    "summary": "The linked merchant is not approved yet",
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "parameter_invalid",
                        "message": "The linked merchant is not yet approved to transact.",
                        "param": "bridge.destination"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "403": {
            "description": "Dime Bridge is not enabled for your account, or the linked merchant has not granted payments.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "bridgeDisabled": {
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "forbidden",
                        "message": "Dime Bridge is not enabled for this merchant.",
                        "param": "bridge"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "description": "The `bridge.destination` is not one of your linked merchants.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error"
                },
                "examples": {
                  "unknownDestination": {
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "resource_missing",
                        "message": "No such bridge merchant.",
                        "param": "bridge.destination"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/orders/sdk": {
      "post": {
        "tags": [
          "Orders"
        ],
        "summary": "Create and pay an order from the Web SDK",
        "operationId": "createSdkOrder",
        "security": [],
        "description": "Used by the Dime Web SDK **2.x** payment page; you do not normally call\nit yourself. Web SDK 1.x uses `POST /api/v1/orders/sdk`.\n\n**Authentication.** The page runs in the buyer's browser, so it never\nholds your secret key. It sends your client key in the `client_key`\n(or `X-Dime-Client`) header, and `data`: the order claims as a JWT\n(HS256) that your server signed with your secret key. A wrong key or\nsignature returns `401`.\n\n**Claims** (`data`): the order (see `SdkOrderClaims`). Add `bridge` to\ntake the payment for one of your linked merchants. `split` is not\naccepted on v2.\n\n**Result.** Card payments return the 3-D Secure step for the page to\nrun. When the payment finishes, the page receives a message\n`{ version: 2, status, code, message, result }`:\n\n- Paid: `result` is the payment, the same object `POST /payments/sale`\n  returns (`PaymentResult`).\n- Declined: `result` is `{ error: { type: card_error, code:\n  card_declined, message }, transaction }`.\n- System error: `result` is `{ error: { type: api_error, code:\n  processing_error, message } }`.\n\nWallet payments (Apple Pay, Google Pay, Samsung Pay) return that body\ndirectly, with HTTP `200`, `402` or `500`. The SDK passes `result` to\nyour `onSuccess` or `onFailed` callback.\n\nWebhooks for these orders are v2 webhooks and go to the merchant whose\nkey signed the order, also for Bridge payments where the linked\nmerchant is merchant of record.\n",
        "parameters": [
          {
            "name": "client_key",
            "in": "header",
            "required": true,
            "description": "Your client key (`ck_…`). `X-Dime-Client` is also accepted.",
            "schema": {
              "type": "string"
            },
            "example": "ck_live_3f8a1e029c4d4b71"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SdkOrderRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The 3-D Secure step for the payment page, or, for a wallet payment,\n`{ version: 2, status, code, message, result }` with the payment.\n",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "402": {
            "description": "The wallet payment was declined. `result.error.code` is `card_declined`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    },
    "/orders/{token}": {
      "get": {
        "tags": [
          "Orders"
        ],
        "summary": "Retrieve an order",
        "operationId": "retrieveOrder",
        "description": "Takes the order's `token`, which is in the order object returned when\nyou create or list orders. A token that matches no order returns\n`404`.\n",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "description": "The order's `token`.",
            "schema": {
              "type": "string"
            },
            "example": "ord_20261027_V1StGXR"
          }
        ],
        "responses": {
          "200": {
            "description": "The order.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Order"
                },
                "examples": {
                  "order": {
                    "summary": "An unpaid order",
                    "value": {
                      "object": "order",
                      "token": "ord_20261027_V1StGXR",
                      "status": "PENDING",
                      "currency": "JMD",
                      "subtotal": 1000,
                      "total": 1100,
                      "tax": 100,
                      "shipping": null,
                      "tip": null,
                      "email": "dev@example.com",
                      "customer": null,
                      "notes": null,
                      "fulfilled": false,
                      "recurring": false,
                      "subscription": null,
                      "line_items": [
                        {
                          "name": "Sample Item",
                          "external_id": null,
                          "sku": "SAMPLE",
                          "quantity": 1,
                          "unit_amount": 1100,
                          "description": null,
                          "image_url": null
                        }
                      ],
                      "reference": "ac58293d-a2c5-4979-8ef7-f3d4a9354b63",
                      "checkout_url": "https://pay.sandbox.dimepay.app/e-order/ord_20261027_V1StGXR",
                      "metadata": {},
                      "created_at": "2026-10-27T15:04:05.000Z",
                      "updated_at": "2026-10-27T15:04:05.000Z"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized"
          },
          "404": {
            "$ref": "#/components/responses/NotFound"
          }
        }
      }
    },
    "/customers": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "List customers",
        "operationId": "listCustomers",
        "description": "Returns your customers, newest first. Cursor-paginated.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          },
          {
            "$ref": "#/components/parameters/EndingBefore"
          },
          {
            "name": "email",
            "in": "query",
            "description": "Filter to the customer with this email.",
            "schema": {
              "type": "string",
              "format": "email"
            }
          },
          {
            "name": "is_active",
            "in": "query",
            "schema": {
              "type": "boolean"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of customers.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ListEnvelope-2"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Customer"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "page": {
                    "summary": "A page of customers",
                    "value": {
                      "object": "list",
                      "data": [
                        {
                          "object": "customer",
                          "token": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW",
                          "first_name": "Michael",
                          "last_name": "Scott",
                          "email": "mscott@example.com",
                          "phone": "+18765551234",
                          "company": null,
                          "billing_address_street": "555 Lackawanna Ave",
                          "billing_address_city": "Scranton",
                          "billing_address_state": "Pennsylvania",
                          "billing_address_postal_code": "18508",
                          "billing_address_country": "United States",
                          "shipping_address_street": null,
                          "shipping_address_city": null,
                          "shipping_address_state": null,
                          "shipping_address_postal_code": null,
                          "shipping_address_country": null,
                          "notes": null,
                          "custom_attributes": null,
                          "is_active": true,
                          "created_at": "2026-10-27T15:04:05.000Z",
                          "updated_at": "2026-10-27T15:04:05.000Z"
                        }
                      ],
                      "has_more": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          }
        }
      },
      "post": {
        "tags": [
          "Customers"
        ],
        "summary": "Create a customer",
        "operationId": "createCustomer",
        "description": "Creates a customer. Creating a second one with the same email, for\nthe same merchant, fails with `409`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCustomerRequest"
              },
              "examples": {
                "simple": {
                  "summary": "A customer with a billing address",
                  "value": {
                    "first_name": "Michael",
                    "last_name": "Scott",
                    "email": "mscott@example.com",
                    "phone": "+18765551234",
                    "billing_address_street": "555 Lackawanna Ave",
                    "billing_address_city": "Scranton",
                    "billing_address_state": "Pennsylvania",
                    "billing_address_postal_code": "18508",
                    "billing_address_country": "United States"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The customer was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                },
                "examples": {
                  "created": {
                    "summary": "A new customer",
                    "value": {
                      "object": "customer",
                      "token": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW",
                      "first_name": "Michael",
                      "last_name": "Scott",
                      "email": "mscott@example.com",
                      "phone": "+18765551234",
                      "company": null,
                      "billing_address_street": "555 Lackawanna Ave",
                      "billing_address_city": "Scranton",
                      "billing_address_state": "Pennsylvania",
                      "billing_address_postal_code": "18508",
                      "billing_address_country": "United States",
                      "shipping_address_street": null,
                      "shipping_address_city": null,
                      "shipping_address_state": null,
                      "shipping_address_postal_code": null,
                      "shipping_address_country": null,
                      "notes": null,
                      "custom_attributes": null,
                      "is_active": true,
                      "created_at": "2026-10-27T15:04:05.000Z",
                      "updated_at": "2026-10-27T15:04:05.000Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "409": {
            "description": "This merchant already has a customer with this email.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                },
                "examples": {
                  "duplicate": {
                    "value": {
                      "error": {
                        "type": "idempotency_error",
                        "code": "idempotency_conflict",
                        "message": "A customer already exists for mscott@example.com.",
                        "param": "email"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/customers/{token}": {
      "get": {
        "tags": [
          "Customers"
        ],
        "summary": "Retrieve a customer",
        "operationId": "retrieveCustomer",
        "description": "Addressed by the customer's `token`, which is in the customer object\nreturned when you create or list customers. A token that matches no\ncustomer returns `404`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/CustomerToken"
          }
        ],
        "responses": {
          "200": {
            "description": "The customer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                },
                "examples": {
                  "customer": {
                    "summary": "A customer",
                    "value": {
                      "object": "customer",
                      "token": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW",
                      "first_name": "Michael",
                      "last_name": "Scott",
                      "email": "mscott@example.com",
                      "phone": "+18765551234",
                      "company": null,
                      "billing_address_street": "555 Lackawanna Ave",
                      "billing_address_city": "Scranton",
                      "billing_address_state": "Pennsylvania",
                      "billing_address_postal_code": "18508",
                      "billing_address_country": "United States",
                      "shipping_address_street": null,
                      "shipping_address_city": null,
                      "shipping_address_state": null,
                      "shipping_address_postal_code": null,
                      "shipping_address_country": null,
                      "notes": null,
                      "custom_attributes": null,
                      "is_active": true,
                      "created_at": "2026-10-27T15:04:05.000Z",
                      "updated_at": "2026-10-27T15:04:05.000Z"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      },
      "put": {
        "tags": [
          "Customers"
        ],
        "summary": "Replace a customer",
        "operationId": "updateCustomer",
        "description": "Replaces the customer. This is a full replacement, not a patch — a\nfield you omit is cleared, not left unchanged. Re-send every field\nyou want to keep.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/CustomerToken"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCustomerRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated customer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Customer"
                },
                "examples": {
                  "updated": {
                    "summary": "Company added",
                    "value": {
                      "object": "customer",
                      "token": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW",
                      "first_name": "Michael",
                      "last_name": "Scott",
                      "email": "mscott@example.com",
                      "phone": "+18765551234",
                      "company": "Dunder Mifflin",
                      "billing_address_street": "555 Lackawanna Ave",
                      "billing_address_city": "Scranton",
                      "billing_address_state": "Pennsylvania",
                      "billing_address_postal_code": "18508",
                      "billing_address_country": "United States",
                      "shipping_address_street": null,
                      "shipping_address_city": null,
                      "shipping_address_state": null,
                      "shipping_address_postal_code": null,
                      "shipping_address_country": null,
                      "notes": null,
                      "custom_attributes": null,
                      "is_active": true,
                      "created_at": "2026-10-27T15:04:05.000Z",
                      "updated_at": "2026-10-27T15:06:40.000Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          },
          "409": {
            "description": "Another customer of this merchant already uses this email.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Customers"
        ],
        "summary": "Erase a customer",
        "operationId": "deleteCustomer",
        "description": "Removes the customer, then redacts the personal details that their\norders and transactions copied when they were created. Those records\nare kept, because they are financial records, with the embedded\nname, email and card details replaced by `[REDACTED]`. Records are\nmatched by the customer's current email, so a record made under an\nearlier email is not redacted.\n\nErasing a customer does not stop their billing. Before you erase a\ncustomer:\n\n- Cancel their subscriptions with `PUT /subscriptions/cancel`.\n  Otherwise they keep billing.\n- Settle their unpaid invoices, or delete them with\n  `DELETE /invoices/{token}`. Erasing the customer does not delete or\n  redact them.\n\nStored cards and payment methods are not removed. This cannot be\nundone.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/CustomerToken"
          }
        ],
        "responses": {
          "200": {
            "description": "The customer was erased.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "token",
                    "object",
                    "deleted"
                  ],
                  "properties": {
                    "token": {
                      "type": "string",
                      "description": "The erased customer's `token`.",
                      "example": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW"
                    },
                    "object": {
                      "type": "string",
                      "const": "customer",
                      "example": "customer"
                    },
                    "deleted": {
                      "type": "boolean",
                      "const": true,
                      "example": true
                    }
                  }
                },
                "examples": {
                  "deleted": {
                    "summary": "Deletion acknowledged",
                    "value": {
                      "token": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW",
                      "object": "customer",
                      "deleted": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/invoices": {
      "get": {
        "tags": [
          "Invoices"
        ],
        "summary": "List invoices",
        "operationId": "listInvoices",
        "description": "Returns the merchant's invoices, newest first. Cursor-paginated: pass\nthe `token` of the last invoice you saw as `starting_after` to walk\nforward.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          },
          {
            "$ref": "#/components/parameters/EndingBefore"
          },
          {
            "name": "status",
            "in": "query",
            "description": "Only invoices in this status.",
            "schema": {
              "$ref": "#/components/schemas/InvoiceStatus"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Currency"
            }
          },
          {
            "name": "customer",
            "in": "query",
            "description": "Only invoices for this customer, by the customer's `token`. An\nunknown token returns an empty list.\n",
            "schema": {
              "type": "string"
            },
            "example": "cus_4PFJ949u_MZlVF16q_07ULkzZK_p6ZknUT"
          },
          {
            "name": "created_after",
            "in": "query",
            "description": "Only invoices created at or after this time (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "example": "2026-10-01T00:00:00Z"
          },
          {
            "name": "created_before",
            "in": "query",
            "description": "Only invoices created at or before this time (inclusive).",
            "schema": {
              "type": "string",
              "format": "date-time"
            },
            "example": "2026-10-31T23:59:59Z"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of invoices.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ListEnvelope-2"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Invoice"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "page": {
                    "summary": "A page of invoices",
                    "value": {
                      "object": "list",
                      "data": [
                        {
                          "object": "invoice",
                          "number": "INV-25082026-0007",
                          "token": "inv_20260825_giodwK2",
                          "status": "UNPAID",
                          "payment_type": "CARD_ONLINE",
                          "currency": "JMD",
                          "subtotal": 5000,
                          "total": 5000,
                          "shipping": null,
                          "tax": null,
                          "tax_label": null,
                          "discount": null,
                          "customer": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW",
                          "notes": null,
                          "recurring": false,
                          "recurring_frequency": null,
                          "recurring_billing_cycle": null,
                          "recurring_start_date": null,
                          "recurring_end_date": null,
                          "recurring_end_type": null,
                          "line_items": [
                            {
                              "type": "custom",
                              "product": null,
                              "name": "Consulting",
                              "description": null,
                              "quantity": 1,
                              "unit_amount": 5000,
                              "currency": "JMD"
                            }
                          ],
                          "invoice_date": "2026-10-27T00:00:00.000Z",
                          "due_date": "2026-11-10T00:00:00.000Z",
                          "paid_at": null,
                          "created_at": "2026-10-27T15:04:05.000Z",
                          "updated_at": "2026-10-27T15:04:05.000Z"
                        }
                      ],
                      "has_more": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          }
        }
      },
      "post": {
        "tags": [
          "Invoices"
        ],
        "summary": "Create an invoice",
        "operationId": "createInvoice",
        "description": "The customer must already exist under your merchant. Pass its `token`\nas `customer_id`.\n\nA line item carries either a `product_id` (a catalog product's\n`token`), or its own\n`name`, `price`, and `currency`. A custom item's currency must match the\ninvoice currency.\n\nSends `invoice.created`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateInvoiceRequest"
              },
              "examples": {
                "custom": {
                  "summary": "A custom line item",
                  "value": {
                    "customer_id": "cus_4PFJ949u_MZlVF16q_07ULkzZK_p6ZknUT",
                    "currency": "JMD",
                    "invoice_date": "2026-08-25T00:00:00.000Z",
                    "due_date": "2026-09-08T00:00:00.000Z",
                    "status": "UNPAID",
                    "products": [
                      {
                        "name": "Consulting",
                        "price": 5000,
                        "quantity": 1,
                        "currency": "JMD"
                      }
                    ]
                  }
                },
                "catalog": {
                  "summary": "A catalog product",
                  "value": {
                    "customer_id": "cus_4PFJ949u_MZlVF16q_07ULkzZK_p6ZknUT",
                    "currency": "JMD",
                    "invoice_date": "2026-08-25T00:00:00.000Z",
                    "due_date": "2026-09-08T00:00:00.000Z",
                    "status": "UNPAID",
                    "products": [
                      {
                        "product_id": "prd_DbCYbcS3_OcTRL1Cd_e9nJdatU_HYypKhE",
                        "quantity": 2
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The invoice was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                },
                "examples": {
                  "created": {
                    "summary": "Captured from a live sandbox response",
                    "value": {
                      "object": "invoice",
                      "number": "INV-25082026-0007",
                      "token": "inv_20260825_giodwK2",
                      "status": "UNPAID",
                      "payment_type": "CARD_ONLINE",
                      "currency": "JMD",
                      "subtotal": 5000,
                      "total": 5000,
                      "shipping": null,
                      "tax": null,
                      "tax_label": null,
                      "discount": null,
                      "customer": "cus_4PFJ949u_MZlVF16q_07ULkzZK_p6ZknUT",
                      "notes": null,
                      "recurring": false,
                      "recurring_frequency": null,
                      "recurring_billing_cycle": null,
                      "recurring_start_date": null,
                      "recurring_end_date": null,
                      "recurring_end_type": null,
                      "line_items": [
                        {
                          "type": "custom",
                          "product": null,
                          "name": "Consulting",
                          "description": null,
                          "quantity": 1,
                          "unit_amount": 5000,
                          "currency": "JMD"
                        }
                      ],
                      "invoice_date": "2026-08-25T22:13:12.193Z",
                      "due_date": "2026-09-08T22:13:12.193Z",
                      "paid_at": null,
                      "created_at": "2026-08-25T22:13:13.037Z",
                      "updated_at": "2026-08-25T22:13:13.037Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "description": "The customer or a referenced product does not exist for this merchant.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                }
              }
            }
          }
        }
      }
    },
    "/invoices/{token}": {
      "get": {
        "tags": [
          "Invoices"
        ],
        "summary": "Retrieve an invoice",
        "operationId": "retrieveInvoice",
        "description": "Takes the invoice's `token`, from create or list.",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "description": "The invoice's `token`.",
            "schema": {
              "type": "string"
            },
            "example": "inv_20261027_NWjpXh4"
          }
        ],
        "responses": {
          "200": {
            "description": "The invoice.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                },
                "examples": {
                  "invoice": {
                    "summary": "An unpaid invoice",
                    "value": {
                      "object": "invoice",
                      "number": "INV-25082026-0007",
                      "token": "inv_20260825_giodwK2",
                      "status": "UNPAID",
                      "payment_type": "CARD_ONLINE",
                      "currency": "JMD",
                      "subtotal": 5000,
                      "total": 5000,
                      "shipping": null,
                      "tax": null,
                      "tax_label": null,
                      "discount": null,
                      "customer": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW",
                      "notes": null,
                      "recurring": false,
                      "recurring_frequency": null,
                      "recurring_billing_cycle": null,
                      "recurring_start_date": null,
                      "recurring_end_date": null,
                      "recurring_end_type": null,
                      "line_items": [
                        {
                          "type": "custom",
                          "product": null,
                          "name": "Consulting",
                          "description": null,
                          "quantity": 1,
                          "unit_amount": 5000,
                          "currency": "JMD"
                        }
                      ],
                      "invoice_date": "2026-10-27T00:00:00.000Z",
                      "due_date": "2026-11-10T00:00:00.000Z",
                      "paid_at": null,
                      "created_at": "2026-10-27T15:04:05.000Z",
                      "updated_at": "2026-10-27T15:04:05.000Z"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      },
      "delete": {
        "tags": [
          "Invoices"
        ],
        "summary": "Delete an invoice",
        "operationId": "deleteInvoice",
        "description": "Deletes an `UNPAID` or `OVERDUE` invoice and its line items. Its\npayment page stops working, and it no longer appears in\n`GET /invoices`. Sends `invoice.deleted`.\n\nA `PAID` or `CANCELLED` invoice cannot be deleted, and neither can\nan invoice a subscription created; pause or cancel the subscription\ninstead. Both return `400`. This cannot be undone.\n",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "description": "The invoice's `token`.",
            "schema": {
              "type": "string"
            },
            "example": "inv_20261027_NWjpXh4"
          }
        ],
        "responses": {
          "200": {
            "description": "The invoice was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "token",
                    "object",
                    "deleted"
                  ],
                  "properties": {
                    "token": {
                      "type": "string",
                      "description": "The deleted invoice's `token`.",
                      "example": "inv_20260825_giodwK2"
                    },
                    "object": {
                      "type": "string",
                      "const": "invoice",
                      "example": "invoice"
                    },
                    "deleted": {
                      "type": "boolean",
                      "const": true,
                      "example": true
                    }
                  }
                },
                "examples": {
                  "deleted": {
                    "summary": "Deleted",
                    "value": {
                      "token": "inv_20260825_giodwK2",
                      "object": "invoice",
                      "deleted": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The invoice cannot be deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                },
                "examples": {
                  "paid": {
                    "summary": "Already paid",
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "parameter_invalid",
                        "param": "token",
                        "message": "Only UNPAID or OVERDUE invoices can be deleted. This invoice is PAID."
                      }
                    }
                  },
                  "subscription": {
                    "summary": "Created by a subscription",
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "parameter_invalid",
                        "param": "token",
                        "message": "This invoice belongs to a subscription and cannot be deleted. Pause or cancel the subscription instead."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/products": {
      "get": {
        "tags": [
          "Products"
        ],
        "summary": "List products",
        "operationId": "listProducts",
        "description": "Returns your products, newest first. Cursor-paginated.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          },
          {
            "$ref": "#/components/parameters/EndingBefore"
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "PUBLISHED",
                "DRAFT",
                "all"
              ]
            }
          },
          {
            "name": "min_price",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "max_price",
            "in": "query",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "min_inventory",
            "in": "query",
            "description": "Minimum `quantity` in stock.",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "max_inventory",
            "in": "query",
            "schema": {
              "type": "integer"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Matches against the product name.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "category",
            "in": "query",
            "description": "Only products in this category, by the category's `token`. An unknown token returns an empty list.",
            "schema": {
              "type": "string"
            },
            "example": "cat_OwnPgze7_HExqHIKA_LjAgZ9oA_ThPBbj3"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of products.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ListEnvelope-2"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Product"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "page": {
                    "summary": "A page of products",
                    "value": {
                      "object": "list",
                      "data": [
                        {
                          "object": "product",
                          "token": "prd_DbCYbcS3_OcTRL1Cd_e9nJdatU_HYypKhE",
                          "name": "Shampoo",
                          "description": "500ml, sulfate free.",
                          "image_url": null,
                          "additional_images": [],
                          "status": "PUBLISHED",
                          "visible": "PRIVATE",
                          "currency": "JMD",
                          "price": 1200,
                          "sale_price": 0,
                          "original_price": null,
                          "discount_percentage": null,
                          "quantity": 0,
                          "sell_out_of_stock": false,
                          "show_quantity_selector": true,
                          "sku": "SHMP-500",
                          "external_id": null,
                          "tags": [],
                          "variation": null,
                          "supplier": null,
                          "enable_shipping": false,
                          "shipping": 0,
                          "shipping_text": null,
                          "enable_tax": false,
                          "tax": 0,
                          "is_sale_price_inc_tax": false,
                          "is_tax_exemptable": false,
                          "enable_notes": false,
                          "enable_reviews": false,
                          "enable_return": false,
                          "return_text": null,
                          "enable_recurring": false,
                          "recurring_frequency": null,
                          "recurring_billing_cycle": null,
                          "recurring_start_date": null,
                          "recurring_end_date": null,
                          "recurring_end_type": null,
                          "trial_period_days": null,
                          "categories": [
                            {
                              "token": "cat_OwnPgze7_HExqHIKA_LjAgZ9oA_ThPBbj3",
                              "name": "Hair care"
                            }
                          ],
                          "created_at": "2026-10-27T15:04:05.000Z",
                          "updated_at": "2026-10-27T15:04:05.000Z"
                        }
                      ],
                      "has_more": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          }
        }
      },
      "post": {
        "tags": [
          "Products"
        ],
        "summary": "Create a product",
        "operationId": "createProduct",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "allOf": [
                  {
                    "$ref": "#/components/schemas/ProductRequest"
                  },
                  {
                    "type": "object",
                    "properties": {
                      "categories": {
                        "type": "array",
                        "description": "Category tokens to put the product in. Each must be one of your categories.",
                        "items": {
                          "type": "string"
                        },
                        "example": [
                          "cat_OwnPgze7_HExqHIKA_LjAgZ9oA_ThPBbj3"
                        ]
                      }
                    }
                  }
                ]
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The product was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                },
                "examples": {
                  "created": {
                    "summary": "A new product in one category",
                    "value": {
                      "object": "product",
                      "token": "prd_DbCYbcS3_OcTRL1Cd_e9nJdatU_HYypKhE",
                      "name": "Shampoo",
                      "description": "500ml, sulfate free.",
                      "image_url": null,
                      "additional_images": [],
                      "status": "PUBLISHED",
                      "visible": "PRIVATE",
                      "currency": "JMD",
                      "price": 1200,
                      "sale_price": 0,
                      "original_price": null,
                      "discount_percentage": null,
                      "quantity": 0,
                      "sell_out_of_stock": false,
                      "show_quantity_selector": true,
                      "sku": "SHMP-500",
                      "external_id": null,
                      "tags": [],
                      "variation": null,
                      "supplier": null,
                      "enable_shipping": false,
                      "shipping": 0,
                      "shipping_text": null,
                      "enable_tax": false,
                      "tax": 0,
                      "is_sale_price_inc_tax": false,
                      "is_tax_exemptable": false,
                      "enable_notes": false,
                      "enable_reviews": false,
                      "enable_return": false,
                      "return_text": null,
                      "enable_recurring": false,
                      "recurring_frequency": null,
                      "recurring_billing_cycle": null,
                      "recurring_start_date": null,
                      "recurring_end_date": null,
                      "recurring_end_type": null,
                      "trial_period_days": null,
                      "categories": [
                        {
                          "token": "cat_OwnPgze7_HExqHIKA_LjAgZ9oA_ThPBbj3",
                          "name": "Hair care"
                        }
                      ],
                      "created_at": "2026-10-27T15:04:05.000Z",
                      "updated_at": "2026-10-27T15:04:05.000Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "409": {
            "$ref": "#/components/responses/NameTaken"
          }
        }
      }
    },
    "/products/{token}": {
      "get": {
        "tags": [
          "Products"
        ],
        "summary": "Retrieve a product",
        "operationId": "retrieveProduct",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProductToken"
          }
        ],
        "responses": {
          "200": {
            "description": "The product.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                },
                "examples": {
                  "product": {
                    "summary": "A product",
                    "value": {
                      "object": "product",
                      "token": "prd_DbCYbcS3_OcTRL1Cd_e9nJdatU_HYypKhE",
                      "name": "Shampoo",
                      "description": "500ml, sulfate free.",
                      "image_url": null,
                      "additional_images": [],
                      "status": "PUBLISHED",
                      "visible": "PRIVATE",
                      "currency": "JMD",
                      "price": 1200,
                      "sale_price": 0,
                      "original_price": null,
                      "discount_percentage": null,
                      "quantity": 0,
                      "sell_out_of_stock": false,
                      "show_quantity_selector": true,
                      "sku": "SHMP-500",
                      "external_id": null,
                      "tags": [],
                      "variation": null,
                      "supplier": null,
                      "enable_shipping": false,
                      "shipping": 0,
                      "shipping_text": null,
                      "enable_tax": false,
                      "tax": 0,
                      "is_sale_price_inc_tax": false,
                      "is_tax_exemptable": false,
                      "enable_notes": false,
                      "enable_reviews": false,
                      "enable_return": false,
                      "return_text": null,
                      "enable_recurring": false,
                      "recurring_frequency": null,
                      "recurring_billing_cycle": null,
                      "recurring_start_date": null,
                      "recurring_end_date": null,
                      "recurring_end_type": null,
                      "trial_period_days": null,
                      "categories": [
                        {
                          "token": "cat_OwnPgze7_HExqHIKA_LjAgZ9oA_ThPBbj3",
                          "name": "Hair care"
                        }
                      ],
                      "created_at": "2026-10-27T15:04:05.000Z",
                      "updated_at": "2026-10-27T15:04:05.000Z"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      },
      "put": {
        "tags": [
          "Products"
        ],
        "summary": "Update a product",
        "operationId": "updateProduct",
        "description": "Send the required fields, as on create. Optional fields you omit keep\ntheir current value. Categories are changed through\n`/products/{token}/categories/{category_token}`, not here.\n\nMoving a product to `DRAFT` fails with `409` while a published\npayment link or an unpaid invoice uses it.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProductToken"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ProductRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated product.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Product"
                },
                "examples": {
                  "updated": {
                    "summary": "Price changed",
                    "value": {
                      "object": "product",
                      "token": "prd_DbCYbcS3_OcTRL1Cd_e9nJdatU_HYypKhE",
                      "name": "Shampoo",
                      "description": "500ml, sulfate free.",
                      "image_url": null,
                      "additional_images": [],
                      "status": "PUBLISHED",
                      "visible": "PRIVATE",
                      "currency": "JMD",
                      "price": 1250,
                      "sale_price": 0,
                      "original_price": null,
                      "discount_percentage": null,
                      "quantity": 0,
                      "sell_out_of_stock": false,
                      "show_quantity_selector": true,
                      "sku": "SHMP-500",
                      "external_id": null,
                      "tags": [],
                      "variation": null,
                      "supplier": null,
                      "enable_shipping": false,
                      "shipping": 0,
                      "shipping_text": null,
                      "enable_tax": false,
                      "tax": 0,
                      "is_sale_price_inc_tax": false,
                      "is_tax_exemptable": false,
                      "enable_notes": false,
                      "enable_reviews": false,
                      "enable_return": false,
                      "return_text": null,
                      "enable_recurring": false,
                      "recurring_frequency": null,
                      "recurring_billing_cycle": null,
                      "recurring_start_date": null,
                      "recurring_end_date": null,
                      "recurring_end_type": null,
                      "trial_period_days": null,
                      "categories": [
                        {
                          "token": "cat_OwnPgze7_HExqHIKA_LjAgZ9oA_ThPBbj3",
                          "name": "Hair care"
                        }
                      ],
                      "created_at": "2026-10-27T15:04:05.000Z",
                      "updated_at": "2026-10-27T15:06:40.000Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          },
          "409": {
            "description": "The name is taken in this currency, or the product cannot be unpublished while in use.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Products"
        ],
        "summary": "Delete a product",
        "operationId": "deleteProduct",
        "description": "Deletes the product and removes it from its categories.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProductToken"
          }
        ],
        "responses": {
          "200": {
            "description": "The product was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "token",
                    "object",
                    "deleted"
                  ],
                  "properties": {
                    "token": {
                      "type": "string",
                      "description": "The deleted product's `token`.",
                      "example": "prd_DbCYbcS3_OcTRL1Cd_e9nJdatU_HYypKhE"
                    },
                    "object": {
                      "type": "string",
                      "const": "product"
                    },
                    "deleted": {
                      "type": "boolean",
                      "const": true
                    }
                  }
                },
                "examples": {
                  "deleted": {
                    "summary": "Deletion acknowledged",
                    "value": {
                      "token": "prd_DbCYbcS3_OcTRL1Cd_e9nJdatU_HYypKhE",
                      "object": "product",
                      "deleted": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/categories": {
      "get": {
        "tags": [
          "Categories"
        ],
        "summary": "List categories",
        "operationId": "listCategories",
        "description": "Returns your categories, newest first. Cursor-paginated.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          },
          {
            "$ref": "#/components/parameters/EndingBefore"
          },
          {
            "name": "status",
            "in": "query",
            "description": "Only active or inactive categories. Defaults to `all`.",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "inactive",
                "all"
              ]
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Matches against name, slug, and description.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of categories.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ListEnvelope-2"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Category"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "page": {
                    "summary": "A page of categories",
                    "value": {
                      "object": "list",
                      "data": [
                        {
                          "object": "category",
                          "token": "cat_OwnPgze7_HExqHIKA_LjAgZ9oA_ThPBbj3",
                          "name": "Hair care",
                          "slug": "hair-care",
                          "description": "Shampoos, conditioners and treatments.",
                          "image_url": null,
                          "color": "#3B82F6",
                          "icon": null,
                          "is_active": true,
                          "created_at": "2026-10-27T15:04:05.000Z",
                          "updated_at": "2026-10-27T15:04:05.000Z"
                        }
                      ],
                      "has_more": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          }
        }
      },
      "post": {
        "tags": [
          "Categories"
        ],
        "summary": "Create a category",
        "operationId": "createCategory",
        "description": "Creates a category. The `slug` must be unique among your categories.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CategoryRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The category was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Category"
                },
                "examples": {
                  "created": {
                    "summary": "A new category",
                    "value": {
                      "object": "category",
                      "token": "cat_OwnPgze7_HExqHIKA_LjAgZ9oA_ThPBbj3",
                      "name": "Hair care",
                      "slug": "hair-care",
                      "description": "Shampoos, conditioners and treatments.",
                      "image_url": null,
                      "color": "#3B82F6",
                      "icon": null,
                      "is_active": true,
                      "created_at": "2026-10-27T15:04:05.000Z",
                      "updated_at": "2026-10-27T15:04:05.000Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "409": {
            "$ref": "#/components/responses/SlugTaken"
          }
        }
      }
    },
    "/categories/{token}": {
      "get": {
        "tags": [
          "Categories"
        ],
        "summary": "Retrieve a category",
        "operationId": "retrieveCategory",
        "parameters": [
          {
            "$ref": "#/components/parameters/CategoryToken"
          }
        ],
        "responses": {
          "200": {
            "description": "The category.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Category"
                },
                "examples": {
                  "category": {
                    "summary": "A category",
                    "value": {
                      "object": "category",
                      "token": "cat_OwnPgze7_HExqHIKA_LjAgZ9oA_ThPBbj3",
                      "name": "Hair care",
                      "slug": "hair-care",
                      "description": "Shampoos, conditioners and treatments.",
                      "image_url": null,
                      "color": "#3B82F6",
                      "icon": null,
                      "is_active": true,
                      "created_at": "2026-10-27T15:04:05.000Z",
                      "updated_at": "2026-10-27T15:04:05.000Z"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      },
      "put": {
        "tags": [
          "Categories"
        ],
        "summary": "Replace a category",
        "operationId": "updateCategory",
        "description": "Full replacement, not a patch: an optional field you omit is cleared,\nand an omitted `is_active` reverts to `true`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/CategoryToken"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CategoryRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated category.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Category"
                },
                "examples": {
                  "updated": {
                    "summary": "Description changed",
                    "value": {
                      "object": "category",
                      "token": "cat_OwnPgze7_HExqHIKA_LjAgZ9oA_ThPBbj3",
                      "name": "Hair care",
                      "slug": "hair-care",
                      "description": "Shampoos, conditioners, treatments and tools.",
                      "image_url": null,
                      "color": "#3B82F6",
                      "icon": null,
                      "is_active": true,
                      "created_at": "2026-10-27T15:04:05.000Z",
                      "updated_at": "2026-10-27T15:06:40.000Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          },
          "409": {
            "$ref": "#/components/responses/SlugTaken"
          }
        }
      },
      "delete": {
        "tags": [
          "Categories"
        ],
        "summary": "Delete a category",
        "operationId": "deleteCategory",
        "description": "Fails with `409` while any product is still in the category. Remove them first.",
        "parameters": [
          {
            "$ref": "#/components/parameters/CategoryToken"
          }
        ],
        "responses": {
          "200": {
            "description": "The category was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "token",
                    "object",
                    "deleted"
                  ],
                  "properties": {
                    "token": {
                      "type": "string",
                      "description": "The deleted category's `token`.",
                      "example": "cat_OwnPgze7_HExqHIKA_LjAgZ9oA_ThPBbj3"
                    },
                    "object": {
                      "type": "string",
                      "const": "category"
                    },
                    "deleted": {
                      "type": "boolean",
                      "const": true
                    }
                  }
                },
                "examples": {
                  "deleted": {
                    "summary": "Deletion acknowledged",
                    "value": {
                      "token": "cat_OwnPgze7_HExqHIKA_LjAgZ9oA_ThPBbj3",
                      "object": "category",
                      "deleted": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          },
          "409": {
            "description": "Products are still in this category.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                }
              }
            }
          }
        }
      }
    },
    "/categories/{token}/products": {
      "get": {
        "tags": [
          "Categories"
        ],
        "summary": "List a category's products",
        "operationId": "listCategoryProducts",
        "description": "Every product in the category. Not paginated; `has_more` is always `false`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/CategoryToken"
          }
        ],
        "responses": {
          "200": {
            "description": "The category's products.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ListEnvelope-2"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/CategoryProduct"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "products": {
                    "summary": "The category's products",
                    "value": {
                      "object": "list",
                      "data": [
                        {
                          "object": "product",
                          "token": "prd_DbCYbcS3_OcTRL1Cd_e9nJdatU_HYypKhE",
                          "name": "Shampoo",
                          "description": "500ml, sulfate free.",
                          "currency": "JMD",
                          "price": 1200,
                          "status": "PUBLISHED",
                          "image_url": null
                        }
                      ],
                      "has_more": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/products/{token}/categories": {
      "get": {
        "tags": [
          "Categories"
        ],
        "summary": "List a product's categories",
        "operationId": "listProductCategories",
        "description": "Every category the product is in. Not paginated; `has_more` is always `false`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProductToken-2"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ProductCategories"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/products/{token}/categories/{category_token}": {
      "put": {
        "tags": [
          "Categories"
        ],
        "summary": "Add a product to a category",
        "operationId": "attachProductCategory",
        "description": "Adds the product to the category and returns the product's\ncategories. Fails with `409` if the product is already in it.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProductToken-2"
          },
          {
            "$ref": "#/components/parameters/CategoryTokenInPath"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ProductCategories"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          },
          "409": {
            "description": "The product is already in this category.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                }
              }
            }
          }
        }
      },
      "delete": {
        "tags": [
          "Categories"
        ],
        "summary": "Remove a product from a category",
        "operationId": "detachProductCategory",
        "description": "Removes the product from the category and returns the product's remaining categories.",
        "parameters": [
          {
            "$ref": "#/components/parameters/ProductToken-2"
          },
          {
            "$ref": "#/components/parameters/CategoryTokenInPath"
          }
        ],
        "responses": {
          "200": {
            "$ref": "#/components/responses/ProductCategories"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "description": "The product, the category, or the link between them does not exist.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                }
              }
            }
          }
        }
      }
    },
    "/p2p/wallets": {
      "get": {
        "tags": [
          "Bank Transfers"
        ],
        "summary": "List the merchant's wallets",
        "operationId": "listP2pWallets",
        "responses": {
          "200": {
            "description": "Wallets with balances. `available_amount` excludes held funds.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list"
                    },
                    "default_currency": {
                      "type": [
                        "string",
                        "null"
                      ]
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Wallet"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/p2p/fees": {
      "get": {
        "tags": [
          "Bank Transfers"
        ],
        "summary": "Get withdrawal fees and a fee token",
        "operationId": "getP2pFees",
        "responses": {
          "200": {
            "description": "The merchant's fees and a 1-hour `fee_token` for conversions.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "fee_token": {
                      "type": "string"
                    },
                    "fees": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "label": {
                            "type": "string"
                          },
                          "value": {
                            "type": "string",
                            "example": "Standard"
                          },
                          "amount": {
                            "type": "number"
                          },
                          "overAMillion": {
                            "type": "number"
                          },
                          "currency": {
                            "type": "string"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/p2p/conversions": {
      "post": {
        "tags": [
          "Bank Transfers"
        ],
        "summary": "Quote a transfer",
        "operationId": "createP2pConversion",
        "description": "Converts `amount` from `from` to `to` and signs the token a transfer needs.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "from",
                  "to",
                  "amount",
                  "fee_token"
                ],
                "properties": {
                  "from": {
                    "$ref": "#/components/schemas/Currency"
                  },
                  "to": {
                    "$ref": "#/components/schemas/Currency"
                  },
                  "amount": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "description": "Amount to send, in `from`."
                  },
                  "fee_token": {
                    "type": "string",
                    "description": "From `GET /p2p/fees`."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The converted amount, the fee, and `recipientAmountToken` (valid 1 hour).",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "amount": {
                      "type": "number",
                      "description": "What the recipient gets, in `to`."
                    },
                    "standard": {
                      "type": "object",
                      "description": "The fee, converted."
                    },
                    "recipientAmountToken": {
                      "type": "string"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/p2p/banks": {
      "get": {
        "tags": [
          "Bank Transfers"
        ],
        "summary": "List banks and branches",
        "operationId": "listP2pBanks",
        "responses": {
          "200": {
            "description": "Banks and their branches, keyed by bank name, for bank accounts.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "available_banks": {
                      "type": "object"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/p2p/bank-account": {
      "get": {
        "tags": [
          "Bank Transfers"
        ],
        "summary": "List bank accounts",
        "operationId": "listP2pContacts",
        "parameters": [
          {
            "name": "page",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "default": 1
            }
          },
          {
            "name": "page_size",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 25
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Name, email or account number. Quotes and backslashes are rejected.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "sort",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "createdAt",
                "name",
                "email",
                "accountNumber"
              ],
              "default": "createdAt"
            }
          },
          {
            "name": "sort_type",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "asc",
                "desc"
              ],
              "default": "desc"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of bank accounts, offset-paginated.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list"
                    },
                    "total_count": {
                      "type": "integer"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Contact"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      },
      "post": {
        "tags": [
          "Bank Transfers"
        ],
        "summary": "Add a bank account",
        "operationId": "createP2pContact",
        "description": "A bank account to send to. Send every bank field; email, contact\nnumber and SWIFT code are optional.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactRequest"
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The added bank account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/p2p/bank-account/{token}": {
      "parameters": [
        {
          "name": "token",
          "in": "path",
          "required": true,
          "description": "The bank account's `token`.",
          "schema": {
            "type": "string",
            "example": "bac_bEBGGWJo_uNjJq3b1_TSr6c0SS_vvKx2VI"
          }
        }
      ],
      "put": {
        "tags": [
          "Bank Transfers"
        ],
        "summary": "Update a bank account",
        "operationId": "updateP2pContact",
        "description": "Bank details change only when all required bank fields are sent.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ContactRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated bank account.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Contact"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      },
      "delete": {
        "tags": [
          "Bank Transfers"
        ],
        "summary": "Delete a bank account",
        "operationId": "deleteP2pContact",
        "responses": {
          "200": {
            "description": "Deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "bank_account"
                    },
                    "token": {
                      "type": "string",
                      "example": "bac_bEBGGWJo_uNjJq3b1_TSr6c0SS_vvKx2VI"
                    },
                    "deleted": {
                      "type": "boolean",
                      "const": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/p2p/bank-transfers": {
      "post": {
        "tags": [
          "Bank Transfers"
        ],
        "summary": "Send to a bank account",
        "operationId": "createP2pBankTransfer",
        "description": "Debits the amount plus fee and creates a transfer pending Dime's\napproval. `contact_token` must be one of your saved bank accounts.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "wallet_id",
                  "contact_token",
                  "recipient_amount_token",
                  "transfer_method"
                ],
                "properties": {
                  "wallet_id": {
                    "type": "string",
                    "description": "The sending wallet's `token`, from `GET /p2p/wallets`. A database id is rejected with `400`.",
                    "example": "wal_Q3nT8vKp_Zx2Lm9Rc_Yb4Hu7Wd_E1sGf0a"
                  },
                  "contact_token": {
                    "type": "string",
                    "description": "The bank account's `token`, from `GET /p2p/bank-account`.",
                    "example": "bac_bEBGGWJo_uNjJq3b1_TSr6c0SS_vvKx2VI"
                  },
                  "recipient_amount_token": {
                    "type": "string"
                  },
                  "transfer_method": {
                    "type": "string",
                    "enum": [
                      "Standard"
                    ]
                  },
                  "reason": {
                    "type": "string"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "$ref": "#/components/responses/TransferSummary"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/payment-links": {
      "get": {
        "tags": [
          "Payment Links"
        ],
        "summary": "List payment links",
        "operationId": "listPaymentLinks",
        "description": "Returns the merchant's payment links, newest first, with the same\nfilters as the merchant portal. Cursor-paginated.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          },
          {
            "$ref": "#/components/parameters/EndingBefore"
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "PUBLISHED",
                "DRAFT"
              ]
            }
          },
          {
            "name": "type",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/LinkType"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Currency"
            }
          },
          {
            "name": "min_total",
            "in": "query",
            "description": "Only links whose total is at least this amount.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "max_total",
            "in": "query",
            "description": "Only links whose total is at most this amount.",
            "schema": {
              "type": "number"
            }
          },
          {
            "name": "search",
            "in": "query",
            "description": "Fuzzy match on the link name.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of payment links.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ListEnvelope-2"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/PaymentLink"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "page": {
                    "summary": "A page of payment links",
                    "value": {
                      "object": "list",
                      "data": [
                        {
                          "object": "payment_link",
                          "token": "lnk_DoN4zNOO_lp5TrgxI_exvZv89Z_4u3Toxh",
                          "name": "Workshop Ticket",
                          "description": null,
                          "image_url": null,
                          "type": "STATIC",
                          "status": "PUBLISHED",
                          "currency": "JMD",
                          "total": 5000,
                          "subtotal": 5000,
                          "open_total": false,
                          "products": [],
                          "enable_shipping": false,
                          "shipping": 0,
                          "enable_tax": false,
                          "tax": 0,
                          "enable_notes": false,
                          "enable_fee_handling": false,
                          "fee_handling_type": null,
                          "consumer_fee": 0,
                          "enable_expiration": false,
                          "expiration_date": null,
                          "enable_recurring": false,
                          "recurring_frequency": null,
                          "recurring_billing_cycle": null,
                          "recurring_start_date": null,
                          "recurring_end_date": null,
                          "recurring_end_type": null,
                          "metadata": null,
                          "created_at": "2026-10-27T15:04:05.000Z"
                        }
                      ],
                      "has_more": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          }
        }
      },
      "post": {
        "tags": [
          "Payment Links"
        ],
        "summary": "Create a payment link",
        "operationId": "createPaymentLink",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePaymentLinkRequest"
              },
              "examples": {
                "open": {
                  "summary": "Payer chooses the amount",
                  "value": {
                    "name": "Donation",
                    "type": "OPEN",
                    "currency": "JMD",
                    "open_total": true
                  }
                },
                "static": {
                  "summary": "Fixed amount",
                  "value": {
                    "name": "Workshop Ticket",
                    "type": "STATIC",
                    "currency": "JMD",
                    "total": 5000,
                    "subtotal": 5000
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The link was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentLink"
                },
                "examples": {
                  "created": {
                    "summary": "Captured from a live sandbox response",
                    "value": {
                      "object": "payment_link",
                      "token": "lnk_DoN4zNOO_lp5TrgxI_exvZv89Z_4u3Toxh",
                      "name": "Donation",
                      "description": null,
                      "image_url": null,
                      "type": "OPEN",
                      "status": "PUBLISHED",
                      "currency": "JMD",
                      "total": 0,
                      "subtotal": 0,
                      "open_total": true,
                      "products": [],
                      "enable_shipping": false,
                      "shipping": 0,
                      "enable_tax": false,
                      "tax": 0,
                      "enable_notes": false,
                      "enable_fee_handling": false,
                      "fee_handling_type": null,
                      "consumer_fee": 0,
                      "enable_expiration": false,
                      "expiration_date": null,
                      "enable_recurring": false,
                      "recurring_frequency": null,
                      "recurring_billing_cycle": null,
                      "recurring_start_date": null,
                      "recurring_end_date": null,
                      "recurring_end_type": null,
                      "metadata": null,
                      "created_at": "2026-08-26T00:53:01.787Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          }
        }
      }
    },
    "/payment-links/{token}": {
      "get": {
        "tags": [
          "Payment Links"
        ],
        "summary": "Retrieve a payment link",
        "operationId": "retrievePaymentLink",
        "parameters": [
          {
            "$ref": "#/components/parameters/PaymentLinkToken"
          }
        ],
        "responses": {
          "200": {
            "description": "The payment link.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentLink"
                },
                "examples": {
                  "link": {
                    "summary": "A fixed-price link",
                    "value": {
                      "object": "payment_link",
                      "token": "lnk_DoN4zNOO_lp5TrgxI_exvZv89Z_4u3Toxh",
                      "name": "Workshop Ticket",
                      "description": null,
                      "image_url": null,
                      "type": "STATIC",
                      "status": "PUBLISHED",
                      "currency": "JMD",
                      "total": 5000,
                      "subtotal": 5000,
                      "open_total": false,
                      "products": [],
                      "enable_shipping": false,
                      "shipping": 0,
                      "enable_tax": false,
                      "tax": 0,
                      "enable_notes": false,
                      "enable_fee_handling": false,
                      "fee_handling_type": null,
                      "consumer_fee": 0,
                      "enable_expiration": false,
                      "expiration_date": null,
                      "enable_recurring": false,
                      "recurring_frequency": null,
                      "recurring_billing_cycle": null,
                      "recurring_start_date": null,
                      "recurring_end_date": null,
                      "recurring_end_type": null,
                      "metadata": null,
                      "created_at": "2026-10-27T15:04:05.000Z"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      },
      "put": {
        "tags": [
          "Payment Links"
        ],
        "summary": "Replace a payment link",
        "operationId": "updatePaymentLink",
        "description": "Replaces the link with the body sent — the same body and rules as\ncreate. Fees, tax and shipping are reset to 0 when their `enable_*`\nflag is false or omitted, as in the merchant portal.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/PaymentLinkToken"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreatePaymentLinkRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated payment link.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/PaymentLink"
                },
                "examples": {
                  "updated": {
                    "summary": "Description added",
                    "value": {
                      "object": "payment_link",
                      "token": "lnk_DoN4zNOO_lp5TrgxI_exvZv89Z_4u3Toxh",
                      "name": "Workshop Ticket",
                      "description": "Saturday session",
                      "image_url": null,
                      "type": "STATIC",
                      "status": "PUBLISHED",
                      "currency": "JMD",
                      "total": 5000,
                      "subtotal": 5000,
                      "open_total": false,
                      "products": [],
                      "enable_shipping": false,
                      "shipping": 0,
                      "enable_tax": false,
                      "tax": 0,
                      "enable_notes": false,
                      "enable_fee_handling": false,
                      "fee_handling_type": null,
                      "consumer_fee": 0,
                      "enable_expiration": false,
                      "expiration_date": null,
                      "enable_recurring": false,
                      "recurring_frequency": null,
                      "recurring_billing_cycle": null,
                      "recurring_start_date": null,
                      "recurring_end_date": null,
                      "recurring_end_type": null,
                      "metadata": null,
                      "created_at": "2026-10-27T15:04:05.000Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      },
      "delete": {
        "tags": [
          "Payment Links"
        ],
        "summary": "Delete a payment link",
        "operationId": "deletePaymentLink",
        "description": "The link stops accepting payments. Its past transactions are kept.",
        "parameters": [
          {
            "$ref": "#/components/parameters/PaymentLinkToken"
          }
        ],
        "responses": {
          "200": {
            "description": "Deletion acknowledged.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "token": {
                      "type": "string",
                      "description": "The deleted payment link's `token`.",
                      "example": "lnk_7r4tCdfd_YVEuIERD_R0161dfg_I2SyiOP"
                    },
                    "object": {
                      "type": "string",
                      "const": "payment_link"
                    },
                    "deleted": {
                      "type": "boolean",
                      "const": true
                    }
                  }
                },
                "examples": {
                  "deleted": {
                    "summary": "Deletion acknowledged",
                    "value": {
                      "token": "lnk_7r4tCdfd_YVEuIERD_R0161dfg_I2SyiOP",
                      "object": "payment_link",
                      "deleted": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/payment-links/{token}/transactions": {
      "get": {
        "tags": [
          "Payment Links"
        ],
        "summary": "List a payment link's transactions",
        "operationId": "listPaymentLinkTransactions",
        "description": "Transactions paid through this link, newest first. Accepts the same\nfilters and pagination as `GET /transactions`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/PaymentLinkToken"
          },
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          },
          {
            "$ref": "#/components/parameters/EndingBefore"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of transactions.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ListEnvelope-2"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Transaction"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "transactions": {
                    "summary": "Payments taken through the link",
                    "value": {
                      "object": "list",
                      "data": [
                        {
                          "object": "transaction",
                          "token": "txn_20261027_PBFpP02",
                          "status": "COMPLETE",
                          "currency": "JMD",
                          "amount": 1100,
                          "final_amount": 1100,
                          "consumer_fee": null,
                          "tip_value": null,
                          "fees": 38.5,
                          "source": "CARD",
                          "description": null,
                          "authorized": true,
                          "captured": true,
                          "refunded": false,
                          "voided": false,
                          "settled": false,
                          "last_four_digits": "4242",
                          "card_scheme": "visa",
                          "customer_id": null,
                          "reference_transaction_id": null,
                          "subscription": null,
                          "entity": null,
                          "error_code": null,
                          "error_message": null,
                          "created_at": "2026-10-27T15:04:05.000Z"
                        }
                      ],
                      "has_more": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/card-tokenization": {
      "post": {
        "tags": [
          "Card Tokenization"
        ],
        "summary": "Open a tokenization request",
        "operationId": "createCardRequest",
        "description": "Returns `card_url`, the hosted page where the customer enters their\ncard. `webhookUrl` is required: the customer enters the card on\nDime's page, so the webhook is how you learn the outcome. Expect\n`card_request.succeeded` once the customer verifies, or\n`card_request.failed`. Some cards also send `card_request.card_saved`\nfirst; see **Webhooks**.\nOmitting it returns `400 parameter_missing`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateCardRequest"
              },
              "examples": {
                "basic": {
                  "value": {
                    "id": "your-reference-1024",
                    "currency": "USD",
                    "webhookUrl": "https://example.com/hooks/card",
                    "redirectUrl": "https://example.com/done"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The tokenization request was opened.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardRequest"
                },
                "examples": {
                  "created": {
                    "summary": "Captured from a live sandbox response",
                    "value": {
                      "object": "card_request",
                      "token": "crq_lnM3xzwx_nFcWA9XR_bVWBl76P_slIlKTM",
                      "status": "STARTED",
                      "currency": "USD",
                      "verification_attempts": 0,
                      "last_four_digits": null,
                      "card_scheme": null,
                      "card_expiry": null,
                      "expired": false,
                      "metadata": {
                        "type": "API",
                        "api_version": "v2",
                        "return_url": "https://example.com/done",
                        "webhook_url": "https://example.com/hooks/card",
                        "reference_id": "your-reference-1024"
                      },
                      "created_at": "2026-08-26T00:53:02.169Z",
                      "card_url": "https://pay.sandbox.dimepay.app/e-card/m82yalYupLIdpAz/crq_lnM3xzwx_nFcWA9XR_bVWBl76P_slIlKTM"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          }
        }
      }
    },
    "/card-tokenization/verify": {
      "put": {
        "tags": [
          "Card Tokenization"
        ],
        "summary": "Verify a tokenization request",
        "operationId": "verifyCardRequest",
        "description": "Confirms the customer controls the card: submit the verification\namount from their statement as `value`. A correct amount sets\n`status: SUCCESS` and returns the stored card.\n\nA wrong amount returns `402` (`card_declined`, `param: value`) and\nleaves the request open. The third wrong amount closes it: `status`\nbecomes `FAILED`, and later attempts return `400`. Open a new card\nrequest to try again.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token",
                  "value"
                ],
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "The tokenization request's `token` (`cr_…`).",
                    "example": "crq_lnM3xzwx_nFcWA9XR_bVWBl76P_slIlKTM"
                  },
                  "value": {
                    "type": "number",
                    "minimum": 0,
                    "description": "The verification amount the customer saw on their\nstatement. In sandbox, send 65 (or 1.58, 28 or 32.46).\n",
                    "example": 0.47
                  }
                }
              },
              "examples": {
                "verify": {
                  "value": {
                    "token": "crq_lnM3xzwx_nFcWA9XR_bVWBl76P_slIlKTM",
                    "value": 0.47
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Verified. The card is now retrievable.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Card"
                },
                "examples": {
                  "card": {
                    "summary": "The verified card",
                    "value": {
                      "object": "card",
                      "token": "crd_lYW5MOH2_omvDipze_0iG9s67K_hUwjeHr",
                      "card_request_token": "crq_lnM3xzwx_nFcWA9XR_bVWBl76P_slIlKTM",
                      "reference_id": "your-reference-1024",
                      "last_four_digits": "4242",
                      "card_scheme": "visa",
                      "card_expiry": "12/29",
                      "currency": "USD",
                      "expired": false,
                      "metadata": {
                        "type": "API",
                        "api_version": "v2",
                        "binDetails": null,
                        "return_url": "https://example.com/done",
                        "webhook_url": "https://example.com/hooks/card",
                        "reference_id": "your-reference-1024"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "402": {
            "description": "The amount did not match.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                },
                "examples": {
                  "declined": {
                    "value": {
                      "error": {
                        "type": "card_error",
                        "code": "card_declined",
                        "message": "Card failed verification",
                        "param": "value"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/card-tokenization/{token}": {
      "get": {
        "tags": [
          "Card Tokenization"
        ],
        "summary": "Retrieve a tokenization request",
        "operationId": "retrieveCardRequest",
        "description": "Returns the tokenization request's status and the card's last four digits.\nIt never returns the card token; use `GET /cards/{token}` for that.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/CardRequestToken"
          }
        ],
        "responses": {
          "200": {
            "description": "The tokenization request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/CardRequest"
                },
                "examples": {
                  "started": {
                    "summary": "Card details not yet entered",
                    "value": {
                      "object": "card_request",
                      "token": "crq_lnM3xzwx_nFcWA9XR_bVWBl76P_slIlKTM",
                      "status": "STARTED",
                      "currency": "USD",
                      "verification_attempts": 0,
                      "last_four_digits": null,
                      "card_scheme": null,
                      "card_expiry": null,
                      "expired": false,
                      "metadata": {
                        "type": "API",
                        "api_version": "v2",
                        "return_url": "https://example.com/done",
                        "webhook_url": "https://example.com/hooks/card",
                        "reference_id": "your-reference-1024"
                      },
                      "created_at": "2026-10-27T15:04:05.000Z"
                    }
                  },
                  "verified": {
                    "summary": "Verified; the card is ready to charge",
                    "value": {
                      "object": "card_request",
                      "token": "crq_lnM3xzwx_nFcWA9XR_bVWBl76P_slIlKTM",
                      "status": "SUCCESS",
                      "currency": "USD",
                      "verification_attempts": 1,
                      "last_four_digits": "4242",
                      "card_scheme": "VISA",
                      "card_expiry": "12/29",
                      "expired": false,
                      "metadata": {
                        "type": "API",
                        "api_version": "v2",
                        "return_url": "https://example.com/done",
                        "webhook_url": "https://example.com/hooks/card",
                        "reference_id": "your-reference-1024"
                      },
                      "created_at": "2026-10-27T15:04:05.000Z"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/cards/{token}": {
      "get": {
        "tags": [
          "Card Tokenization"
        ],
        "summary": "Retrieve the stored card",
        "operationId": "retrieveCard",
        "description": "Returns the stored card, including the card token (`token`, starting\nwith `card_`) to send as `token` to `POST /payments/sale` or\n`POST /payments/auth`. The path takes the tokenization request's token, not\nthe card token. Returns `400` until the request has been verified.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/CardRequestToken"
          }
        ],
        "responses": {
          "200": {
            "description": "The stored card.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Card"
                },
                "examples": {
                  "card": {
                    "summary": "A verified card",
                    "value": {
                      "object": "card",
                      "token": "crd_lYW5MOH2_omvDipze_0iG9s67K_hUwjeHr",
                      "card_request_token": "crq_lnM3xzwx_nFcWA9XR_bVWBl76P_slIlKTM",
                      "reference_id": "your-reference-1024",
                      "last_four_digits": "4242",
                      "card_scheme": "visa",
                      "card_expiry": "12/29",
                      "currency": "USD",
                      "expired": false,
                      "metadata": {
                        "type": "API",
                        "api_version": "v2",
                        "binDetails": null,
                        "return_url": "https://example.com/done",
                        "webhook_url": "https://example.com/hooks/card",
                        "reference_id": "your-reference-1024"
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The tokenization request has not been verified.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                },
                "examples": {
                  "unverified": {
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "parameter_invalid",
                        "message": "Card request was not verified.",
                        "param": "token"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      },
      "delete": {
        "tags": [
          "Card Tokenization"
        ],
        "summary": "Delete the stored card",
        "operationId": "deleteCard",
        "description": "Deletes the card a verified tokenization request stored. The path\ntakes the tokenization request's token, as `GET /cards/{token}` does.\nAfterwards the card token can no longer be charged, and\n`GET /cards/{token}` returns `404`. Sends `card_request.card_deleted`.\n\nReturns `400` when the card cannot be deleted:\n\n- the tokenization request was never verified;\n- a subscription that is not cancelled or complete still bills the\n  card. Cancel the subscription first;\n- the card is also your payment method for Dime's own billing.\n\nThis cannot be undone. To charge the customer again, open a new\ntokenization request.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/CardRequestToken"
          }
        ],
        "responses": {
          "200": {
            "description": "The card was deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "required": [
                    "token",
                    "object",
                    "deleted"
                  ],
                  "properties": {
                    "token": {
                      "type": "string",
                      "description": "The deleted card's `token`.",
                      "example": "crd_AknWM2rI_mCnLkMCZ_x49WVYRv_tvlpSc7"
                    },
                    "object": {
                      "type": "string",
                      "const": "card",
                      "example": "card"
                    },
                    "deleted": {
                      "type": "boolean",
                      "const": true,
                      "example": true
                    }
                  }
                },
                "examples": {
                  "deleted": {
                    "summary": "Deleted",
                    "value": {
                      "token": "crd_AknWM2rI_mCnLkMCZ_x49WVYRv_tvlpSc7",
                      "object": "card",
                      "deleted": true
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The card cannot be deleted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                },
                "examples": {
                  "subscription": {
                    "summary": "Used by a subscription",
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "parameter_invalid",
                        "param": "token",
                        "message": "This card is used by an active subscription. Cancel the subscription first."
                      }
                    }
                  },
                  "billing": {
                    "summary": "Used for billing by the merchant",
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "parameter_invalid",
                        "param": "token",
                        "message": "This card is also the merchant's payment method for Dime billing and cannot be deleted here."
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/payments/hosted-page": {
      "post": {
        "tags": [
          "Payments"
        ],
        "summary": "Create a hosted payment page",
        "operationId": "createHostedPage",
        "description": "Creates an order and returns what you need to send the buyer to pay.\nIt takes the same body as `POST /orders` and applies the same\nvalidation; only the response is shorter: `token`, `currency`,\n`checkout_url` and `created_at`.\n\nTo take payment, redirect the buyer to the Dime payment page:\n`https://pay.dimepay.app/e-order/{token}` (sandbox:\n`https://pay.sandbox.dimepay.app/e-order/{token}`). If you sent\n`checkoutUrl`, the response's `checkout_url` is your own cart URL,\nnot the payment page.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateOrderRequest"
              },
              "examples": {
                "simple": {
                  "summary": "A one-item order",
                  "value": {
                    "id": "ac58293d-a2c5-4979-8ef7-f3d4a9354b63",
                    "currency": "JMD",
                    "subtotal": 1000,
                    "total": 1100,
                    "tax": 100,
                    "email": "dev@example.com",
                    "referenceTransactionId": "order-1024",
                    "checkoutUrl": "https://example.com/cart",
                    "items": [
                      {
                        "name": "Sample Item",
                        "price": 1100,
                        "quantity": 1,
                        "sku": "SAMPLE"
                      }
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The order was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HostedPageResult"
                },
                "examples": {
                  "created": {
                    "value": {
                      "object": "order",
                      "token": "ord_20260910_2XFla9Q",
                      "currency": "JMD",
                      "checkout_url": "https://example.com/cart",
                      "created_at": "2026-09-10T18:59:55.676Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          }
        }
      }
    },
    "/payments/sale": {
      "post": {
        "tags": [
          "Payments"
        ],
        "summary": "Charge a card",
        "operationId": "salePayment",
        "description": "Charges the card in one step: authorizes and captures. A successful\ncharge returns `200` with `status: COMPLETE`.\n\nA declined card returns `402` with `type: card_error` and\n`code: card_declined`; the `message` is safe to show the buyer. A\n`500` with `type: api_error` means the processor did not answer, so\nthe charge may or may not have gone through. Check before retrying\n(see *Retrying requests*).\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChargeRequest"
              },
              "examples": {
                "sale": {
                  "value": {
                    "token": "crd_lYW5MOH2_omvDipze_0iG9s67K_hUwjeHr",
                    "id": "3f8a1e02-9c4d-4b71-a5e3-6d2f0b8c7a19",
                    "currency": "JMD",
                    "subtotal": 1000,
                    "total": 1100,
                    "tax": 100,
                    "email": "buyer@example.com",
                    "ipAddress": "198.51.100.10",
                    "referenceTransactionId": "sale-1024"
                  }
                },
                "bridge": {
                  "summary": "A Dime Bridge sale where the linked merchant is merchant of record",
                  "description": "The charge runs under the linked merchant's processor\nprofile, rates and card descriptor. You receive the 10 fee;\nthe linked merchant receives the rest after Dime's fee.\n",
                  "value": {
                    "token": "crd_lYW5MOH2_omvDipze_0iG9s67K_hUwjeHr",
                    "id": "9d2b7c54-1e8f-4a36-b7c1-5f0e2d8a4c13",
                    "currency": "USD",
                    "subtotal": 100,
                    "total": 100,
                    "tax": 0,
                    "email": "buyer@example.com",
                    "ipAddress": "198.51.100.10",
                    "referenceTransactionId": "sale-10001",
                    "bridge": {
                      "destination": "brm_9CKxgfQk_jDKOHNVm_H8696T87_2alsOAP",
                      "merchant_of_record": "linked_merchant",
                      "fee": 10
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/PaymentResult"
          },
          "400": {
            "$ref": "#/components/responses/ChargeRejected"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "402": {
            "$ref": "#/components/responses/CardDeclined"
          },
          "500": {
            "$ref": "#/components/responses/ProcessorUnavailable"
          }
        }
      }
    },
    "/payments/auth": {
      "post": {
        "tags": [
          "Payments"
        ],
        "summary": "Authorize a card",
        "operationId": "authorizePayment",
        "description": "Holds the funds without taking them. A successful hold returns `200`\nwith `status: AUTHORISED`. Capture it with `PUT /payments/capture` or\nrelease it with `PUT /payments/void`. Declines and processor failures\nreturn the same errors as `POST /payments/sale`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChargeRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/PaymentResult"
          },
          "400": {
            "$ref": "#/components/responses/ChargeRejected"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "402": {
            "$ref": "#/components/responses/CardDeclined"
          },
          "500": {
            "$ref": "#/components/responses/ProcessorUnavailable"
          }
        }
      }
    },
    "/payments/capture": {
      "put": {
        "tags": [
          "Payments"
        ],
        "summary": "Capture an authorization",
        "operationId": "capturePayment",
        "description": "Captures an authorization in full. Only a transaction with\n`status: AUTHORISED` can be captured, and only once; it then has\n`status: COMPLETE`. Partial capture is not supported. Any other\nstatus returns `404`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionAction"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/PaymentResult"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/TransactionNotFound"
          }
        }
      }
    },
    "/payments/void": {
      "put": {
        "tags": [
          "Payments"
        ],
        "summary": "Void a transaction",
        "operationId": "voidPayment",
        "description": "Releases an authorization so no money moves. Only a transaction with\n`status: AUTHORISED` can be voided, and the whole hold is released. A\nsale or a captured authorization cannot be voided; refund it instead.\nAny other status returns `404`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/TransactionAction"
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/PaymentResult"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/TransactionNotFound"
          }
        }
      }
    },
    "/payments/refund": {
      "put": {
        "tags": [
          "Payments"
        ],
        "summary": "Refund a transaction",
        "operationId": "refundPayment",
        "description": "Refunds a completed transaction. Send `amount` for a partial refund,\nor omit it to refund everything not yet refunded: the whole payment,\nor what is left after earlier partial refunds. You can make several\npartial refunds until the full amount is refunded.\n\nEach refund creates a new transaction, and that new transaction is\nwhat this endpoint returns: its own `token`, the refunded\n`amount`, `status` `PARTIAL_REFUND` or `REFUND`, and\n`reference_transaction_id` holding the original's `token`. The original keeps\n`status: COMPLETE`, and its `refunded` flag becomes `true` once it is\nfully refunded. Refunding more than remains returns `402`.\n\n`refund_fees` provides a breakdown of the costs associated with a\nrefund, including the amount deducted from the merchant's wallet, the\noriginal processing fees returned, and the platform's refund fee.\n\nThis breakdown is recorded shortly after the refund is processed, so\n`refund_fees` may initially be `null` in the response. To retrieve the\nbreakdown, make a `GET /transactions/{token}` request. It is usually\navailable within 15 to 30 seconds of the refund.\n\n**Dime Bridge.** On a Bridge payment, `bridge` chooses who pays for\nthe refund (see `BridgeRefundOptions`). The party paying must have\nthe money available before the customer is refunded, or the request\nfails with `400 insufficient_balance` and nothing is refunded. What\neach wallet paid appears on the original payment's\n`bridge.refunds` once the refund's ledger entries are recorded.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefundRequest"
              },
              "examples": {
                "partial": {
                  "summary": "Partial refund",
                  "value": {
                    "transaction_id": "txn_20261027_PBFpP02",
                    "amount": 500
                  }
                },
                "bridgeProportional": {
                  "summary": "Bridge refund shared in proportion",
                  "description": "On a 100 payment where you kept 6.80 and the linked\nmerchant received 90, a 40 refund takes 36 from the\nlinked merchant and 4 from you.\n",
                  "value": {
                    "transaction_id": "txn_20261027_PBFpP02",
                    "amount": 40,
                    "bridge": {
                      "refund_from_linked_account": true,
                      "refund_bridge_fee": true
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/PaymentResult"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "402": {
            "description": "The refund was rejected, for example because more than the remaining amount was requested.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                },
                "examples": {
                  "overRefund": {
                    "value": {
                      "error": {
                        "type": "card_error",
                        "code": "card_declined",
                        "message": "Refund amount 500.00 exceeds remaining refundable amount 100.00",
                        "param": "transaction_id"
                      }
                    }
                  }
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/TransactionNotFound"
          }
        }
      }
    },
    "/pos/sale": {
      "post": {
        "tags": [
          "Payment Terminal"
        ],
        "summary": "Charge a card on a terminal",
        "operationId": "posSale",
        "description": "Sends a sale to one of your terminals and waits for the result. An\napproved sale returns `200` with `status: COMPLETE`.\n\nName the terminal by its `terminal_id` (the terminal's token), or by\nthe `store_id` and `pos_station_id` it is registered under.\n\n`order_id` (or `pos_transaction_id`) is your POS's own reference.\nSending the same reference again does not charge twice: a paid sale\nis returned as it is, and an unpaid one is retried with the latest\namount, items and `bridge` block.\n\nA decline or a failure at the terminal returns `402` with\n`type: card_error`. A `504` means the terminal did not acknowledge\nthe sale in time; it may still complete, so retry with the same\n`order_id` rather than a new one.\n\n**Dime Bridge.** Add `bridge` to take the sale for one of your linked\nmerchants. It is checked before the terminal is called. The card is\nalways charged on your terminal; when the linked merchant is merchant\nof record, the payment is recorded under it and you can still retry\nand refund it with your own key. `bridge` can't be combined with\n`settlement_override`, and the currency must be one the terminal\nprocesses natively (JMD or USD).\n\n**Tips.** The customer can add a tip on the terminal, so the charged\ntotal can be higher than `amount`. `pos.tip` is the tip,\n`pos.approved_amount` the sale without it, and `pos.processed_amount`\n(also the payment's `amount`) what the card was charged. Webhook\nevents report the charged total as `amount` and the tip as\n`tip_value`. On a Bridge sale the tip is part of the total that is\nshared out: with `bridge.fee` the linked merchant receives it, with\n`bridge.amount` you do.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PosSaleRequest"
              },
              "examples": {
                "sale": {
                  "value": {
                    "amount": "900.00",
                    "currency": "JMD",
                    "tip": 10.13,
                    "store_id": "12",
                    "pos_station_id": 1,
                    "pos_transaction_id": 1048577,
                    "order_id": "POS-1048577",
                    "operator_code": "007",
                    "operator_name": "Ann"
                  }
                },
                "bridge": {
                  "summary": "A Dime Bridge sale",
                  "value": {
                    "amount": "2950.00",
                    "currency": "JMD",
                    "terminal_id": "2740017028",
                    "order_id": "POS-2001",
                    "bridge": {
                      "destination": "brm_9CKxgfQk_jDKOHNVm_H8696T87_2alsOAP",
                      "merchant_of_record": "marketplace",
                      "fee": 200
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/PosPayment"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "402": {
            "$ref": "#/components/responses/CardDeclined"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          },
          "504": {
            "$ref": "#/components/responses/TerminalTimeout"
          }
        }
      }
    },
    "/pos/refund": {
      "put": {
        "tags": [
          "Payment Terminal"
        ],
        "summary": "Refund a POS sale",
        "operationId": "posRefund",
        "description": "Refunds a sale taken on a terminal, by the same rules as\n`PUT /payments/refund`. `transaction_id` is the sale's `token`. Send\n`amount` for a partial refund, or omit it to refund everything not\nyet refunded. You can make several partial refunds until the full\namount is refunded.\n\nThe response is the refund's own transaction: `status` is\n`PARTIAL_REFUND` or `REFUND`, `amount` is what was refunded, and\n`reference_transaction_id` holds the sale's `token`. The sale keeps\n`status: COMPLETE` until it is fully refunded.\n\n**Dime Bridge.** On a Bridge sale, `bridge` chooses who pays for a\npartial refund (see `BridgeRefundOptions`); a full refund always\ntakes back every share. If `transaction_id` is a Bridge fee or payout\nrecord, the main payment is refunded. Sending `bridge` for a sale\nthat is not a Bridge payment returns `400`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PosRefundRequest"
              },
              "examples": {
                "partial": {
                  "value": {
                    "transaction_id": "txn_20261027_lYW5MOH",
                    "amount": "500.00"
                  }
                },
                "bridge": {
                  "summary": "A partial refund that takes the linked merchant's share back",
                  "value": {
                    "transaction_id": "txn_20261027_lYW5MOH",
                    "amount": "500.00",
                    "bridge": {
                      "refund_from_linked_account": true
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/PosPayment"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "402": {
            "$ref": "#/components/responses/CardDeclined"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/pos/init": {
      "post": {
        "tags": [
          "Payment Terminal"
        ],
        "summary": "Start an Android intent payment",
        "operationId": "posInit",
        "description": "Creates the order your app hands to the Dime app on the same device.\nReturns `201` with the order; pass its `token` to the Dime app and to\n**Complete**.\n\nSending the same `order_id` again returns the same order, refreshed\nwith the latest amount, items and `bridge` block. If it has already\nbeen paid, the response is `200` with `already_completed: true` and\nthe payment.\n\n`bridge` works as on **Sale** and is stored on the order.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PosSaleRequest"
              },
              "examples": {
                "init": {
                  "value": {
                    "amount": "900.00",
                    "currency": "JMD",
                    "store_id": "12",
                    "pos_station_id": 1,
                    "order_id": "POS-1048577"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/PosOrder"
          },
          "201": {
            "$ref": "#/components/responses/PosOrder"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/pos/complete": {
      "post": {
        "tags": [
          "Payment Terminal"
        ],
        "summary": "Complete an Android intent payment",
        "operationId": "posComplete",
        "description": "Records how the Dime app's payment ended. Name the order by\n`gateway_order_token` (the `token` from **Init**), or by the same\n`order_id` you sent to init.\n\nReturns `200` with the order. `pos.outcome_status` is `approved`,\n`cancelled`, `declined` or `error`; `payment` is the transaction once\none exists. Calling it again for a paid order returns\n`already_completed: true`.\n\nDime Bridge comes from the order made by init. A `bridge` block sent\nhere is ignored.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PosCompleteRequest"
              },
              "examples": {
                "approved": {
                  "value": {
                    "gateway_order_token": "ord_20261116_abcdefg",
                    "outcome_status": "approved",
                    "response_text": "Transaction successful",
                    "receipt": {
                      "card_type": "mastercard",
                      "card_number": "3539",
                      "authorization": "123456",
                      "entry_mode": "Chip"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/PosOrder"
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/transactions": {
      "get": {
        "tags": [
          "Transactions"
        ],
        "summary": "List transactions",
        "operationId": "listTransactions",
        "description": "Returns your transactions, newest first. Cursor-paginated.\n\nAn unrecognized filter value is rejected rather than silently returning\nnothing.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          },
          {
            "$ref": "#/components/parameters/EndingBefore"
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/TransactionStatus"
            }
          },
          {
            "name": "entity_type",
            "in": "query",
            "description": "What the transaction settled against.",
            "schema": {
              "$ref": "#/components/schemas/EntityType"
            }
          },
          {
            "name": "currency",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Currency"
            }
          },
          {
            "name": "subscription",
            "in": "query",
            "description": "Filters to transactions billed against this subscription, by its\n`token`. An unknown token returns an empty page.\n",
            "schema": {
              "type": "string"
            },
            "example": "sub_pESz9qv3_M4rhjWUy_KMaAVBqb_XyCKvmZ"
          },
          {
            "name": "order_id",
            "in": "query",
            "description": "Your own identifier for the order this transaction settled\nagainst, the same value `origin_id` filters by on `GET /orders`.\nNot unique, so a match can span more than one order's\ntransactions.\n",
            "schema": {
              "type": "string"
            },
            "example": "order-1024"
          },
          {
            "name": "customer_name",
            "in": "query",
            "description": "Matches against the customer's full name or either half of it,\ncase-insensitively, as a substring.\n",
            "schema": {
              "type": "string"
            },
            "example": "Jane"
          },
          {
            "name": "card_scheme",
            "in": "query",
            "description": "Matches the card scheme used, e.g. VISA.",
            "schema": {
              "type": "string"
            },
            "example": "VISA"
          },
          {
            "name": "last_four_digits",
            "in": "query",
            "description": "Matches the last four digits of the card used.",
            "schema": {
              "type": "string"
            },
            "example": "4242"
          },
          {
            "name": "include_bridged",
            "in": "query",
            "description": "Dime Bridge. `true` also lists Bridge payments you created where\nthe linked merchant is merchant of record. They belong to the\nlinked merchant, so they are left out by default.\n",
            "schema": {
              "type": "boolean",
              "default": false
            },
            "example": true
          }
        ],
        "responses": {
          "200": {
            "description": "A page of transactions.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ListEnvelope-2"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Transaction"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "page": {
                    "summary": "A page of transactions; entity token and status are only loaded on retrieve",
                    "value": {
                      "object": "list",
                      "data": [
                        {
                          "object": "transaction",
                          "token": "txn_20261027_PBFpP02",
                          "status": "COMPLETE",
                          "currency": "JMD",
                          "amount": 1100,
                          "final_amount": 1100,
                          "consumer_fee": null,
                          "tip_value": null,
                          "fees": 38.5,
                          "source": "API",
                          "description": null,
                          "authorized": true,
                          "captured": true,
                          "refunded": false,
                          "voided": false,
                          "settled": false,
                          "last_four_digits": "4242",
                          "card_scheme": "visa",
                          "customer_id": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW",
                          "reference_transaction_id": null,
                          "subscription": null,
                          "entity": {
                            "object": "order",
                            "token": null,
                            "status": null
                          },
                          "error_code": null,
                          "error_message": null,
                          "refund_fees": null,
                          "usd_conversion": null,
                          "created_at": "2026-10-27T15:04:05.000Z"
                        }
                      ],
                      "has_more": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A filter value was not recognized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                },
                "examples": {
                  "badStatus": {
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "parameter_invalid",
                        "message": "status must be one of: COMPLETE, FAILED, PENDING, AUTHORISED, VOID, REFUND, PARTIAL_REFUND, ABANDONED.",
                        "param": "status"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          }
        }
      }
    },
    "/transactions/{token}": {
      "get": {
        "tags": [
          "Transactions"
        ],
        "summary": "Retrieve a transaction",
        "operationId": "retrieveTransaction",
        "description": "Takes the transaction's `token`. It is in every transaction object:\nthe response to a sale, auth, capture, void or refund, the list\nendpoint, a chargeback's `transaction_token`, and a webhook's\n`payload.transaction.token`. A token that matches no transaction\nreturns `404`.\n",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "description": "The transaction's `token`.",
            "schema": {
              "type": "string"
            },
            "example": "txn_20261027_PBFpP02"
          }
        ],
        "responses": {
          "200": {
            "description": "The transaction.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Transaction"
                },
                "examples": {
                  "transaction": {
                    "summary": "A captured card sale against an order",
                    "value": {
                      "object": "transaction",
                      "token": "txn_20261027_PBFpP02",
                      "status": "COMPLETE",
                      "currency": "JMD",
                      "amount": 1100,
                      "final_amount": 1100,
                      "consumer_fee": null,
                      "tip_value": null,
                      "fees": 38.5,
                      "source": "API",
                      "description": null,
                      "authorized": true,
                      "captured": true,
                      "refunded": false,
                      "voided": false,
                      "settled": false,
                      "last_four_digits": "4242",
                      "card_scheme": "visa",
                      "customer_id": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW",
                      "reference_transaction_id": null,
                      "subscription": null,
                      "entity": {
                        "object": "order",
                        "token": "ord_20261027_V1StGXR",
                        "status": "COMPLETE"
                      },
                      "error_code": null,
                      "error_message": null,
                      "refund_fees": null,
                      "usd_conversion": null,
                      "created_at": "2026-10-27T15:04:05.000Z"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/chargebacks": {
      "get": {
        "tags": [
          "Chargebacks"
        ],
        "summary": "List chargebacks",
        "operationId": "listChargebacks",
        "description": "Returns your chargebacks, newest first. Cursor-paginated.\n\nA chargeback still `RECEIVED` after its `dispute_deadline` is\nreported, and stored, as `ACCEPTED`. An unknown `status` value\nreturns `400`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          },
          {
            "$ref": "#/components/parameters/EndingBefore"
          },
          {
            "name": "status",
            "in": "query",
            "description": "Only chargebacks in this status.",
            "schema": {
              "$ref": "#/components/schemas/ChargebackStatus"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of chargebacks.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ListEnvelope-2"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Chargeback"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "page": {
                    "summary": "A page of chargebacks",
                    "value": {
                      "object": "list",
                      "data": [
                        {
                          "object": "chargeback",
                          "token": "chb_KfDdVMbE_xOCOU6Kj_YlmeI4S5_kgpSOvk",
                          "status": "RECEIVED",
                          "reason_code": "PRODUCT_NOT_RECEIVED",
                          "source": "CARD",
                          "currency": "JMD",
                          "amount": 1100,
                          "transaction_id": "txn_20261027_PBFpP02",
                          "transaction_token": "txn_20261027_PBFpP02",
                          "transaction_display_id": "ord_20261027_V1StGXR",
                          "order_id": "ord_20261027_V1StGXR",
                          "customer_id": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW",
                          "customer": {
                            "name": "Michael Scott",
                            "email": "mscott@example.com"
                          },
                          "last_four_digits": "4242",
                          "card_scheme": "VISA",
                          "notes": null,
                          "files": [],
                          "fee_paid": false,
                          "received_at": "2026-10-27T15:04:05.000Z",
                          "responded_at": null,
                          "resolution_date": null,
                          "dispute_deadline": "2026-11-26T15:04:05.000Z",
                          "created_at": "2026-10-27T15:04:05.000Z",
                          "updated_at": "2026-10-27T15:04:05.000Z"
                        }
                      ],
                      "has_more": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "A filter value was not recognized.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                },
                "examples": {
                  "badStatus": {
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "parameter_invalid",
                        "message": "status must be one of: RECEIVED, UNDER_REVIEW, REPRESENTED, WON, LOST, ACCEPTED.",
                        "param": "status"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          }
        }
      }
    },
    "/chargebacks/{token}": {
      "get": {
        "tags": [
          "Chargebacks"
        ],
        "summary": "Retrieve a chargeback",
        "operationId": "retrieveChargeback",
        "description": "Takes the chargeback's `token`, which is in the chargeback object\nreturned by the list endpoint. A token that matches no chargeback\nreturns `404`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/ChargebackToken"
          }
        ],
        "responses": {
          "200": {
            "description": "The chargeback.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Chargeback"
                },
                "examples": {
                  "received": {
                    "summary": "Awaiting your response",
                    "value": {
                      "object": "chargeback",
                      "token": "chb_KfDdVMbE_xOCOU6Kj_YlmeI4S5_kgpSOvk",
                      "status": "RECEIVED",
                      "reason_code": "PRODUCT_NOT_RECEIVED",
                      "source": "CARD",
                      "currency": "JMD",
                      "amount": 1100,
                      "transaction_id": "txn_20261027_PBFpP02",
                      "transaction_token": "txn_20261027_PBFpP02",
                      "transaction_display_id": "ord_20261027_V1StGXR",
                      "order_id": "ord_20261027_V1StGXR",
                      "customer_id": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW",
                      "customer": {
                        "name": "Michael Scott",
                        "email": "mscott@example.com"
                      },
                      "last_four_digits": "4242",
                      "card_scheme": "VISA",
                      "notes": null,
                      "files": [],
                      "fee_paid": false,
                      "received_at": "2026-10-27T15:04:05.000Z",
                      "responded_at": null,
                      "resolution_date": null,
                      "dispute_deadline": "2026-11-26T15:04:05.000Z",
                      "created_at": "2026-10-27T15:04:05.000Z",
                      "updated_at": "2026-10-27T15:04:05.000Z"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/chargebacks/{token}/dispute": {
      "put": {
        "tags": [
          "Chargebacks"
        ],
        "summary": "Dispute or accept a chargeback",
        "operationId": "disputeChargeback",
        "description": "Responds to a chargeback that is still `RECEIVED` and before its\n`dispute_deadline`. Set `status` to `UNDER_REVIEW` to dispute it, or\n`ACCEPTED` to concede it. Either choice is final: a chargeback can\nbe responded to once.\n\n`notes` is sent to Dime compliance as a message on the chargeback.\nIt is not stored in the chargeback's `notes` field. Evidence files\ncannot be attached through the API; send them through the merchant\nportal.\n\nA chargeback that is already `WON`, `LOST` or `ACCEPTED` returns\n`404`, as does one past its deadline, which has been recorded as\n`ACCEPTED`. One in `UNDER_REVIEW` or `REPRESENTED` returns `400`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/ChargebackToken"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "status"
                ],
                "properties": {
                  "status": {
                    "type": "string",
                    "enum": [
                      "UNDER_REVIEW",
                      "ACCEPTED"
                    ],
                    "description": "`UNDER_REVIEW` disputes the chargeback; `ACCEPTED` concedes it."
                  },
                  "notes": {
                    "type": "string",
                    "description": "Your response, sent to Dime compliance as a message. Explain why the charge was valid."
                  }
                }
              },
              "examples": {
                "dispute": {
                  "value": {
                    "status": "UNDER_REVIEW",
                    "notes": "Customer signed for delivery on 2 October."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The chargeback after the update.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Chargeback"
                },
                "examples": {
                  "underReview": {
                    "summary": "Disputed; now with compliance",
                    "value": {
                      "object": "chargeback",
                      "token": "chb_KfDdVMbE_xOCOU6Kj_YlmeI4S5_kgpSOvk",
                      "status": "UNDER_REVIEW",
                      "reason_code": "PRODUCT_NOT_RECEIVED",
                      "source": "CARD",
                      "currency": "JMD",
                      "amount": 1100,
                      "transaction_id": "txn_20261027_PBFpP02",
                      "transaction_token": "txn_20261027_PBFpP02",
                      "transaction_display_id": "ord_20261027_V1StGXR",
                      "order_id": "ord_20261027_V1StGXR",
                      "customer_id": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW",
                      "customer": {
                        "name": "Michael Scott",
                        "email": "mscott@example.com"
                      },
                      "last_four_digits": "4242",
                      "card_scheme": "VISA",
                      "notes": "Customer signed for delivery on 20 Oct.",
                      "files": [],
                      "fee_paid": false,
                      "received_at": "2026-10-27T15:04:05.000Z",
                      "responded_at": "2026-10-27T15:06:40.000Z",
                      "resolution_date": null,
                      "dispute_deadline": "2026-11-26T15:06:40.000Z",
                      "created_at": "2026-10-27T15:04:05.000Z",
                      "updated_at": "2026-10-27T15:06:40.000Z"
                    }
                  },
                  "accepted": {
                    "summary": "Accepted without dispute",
                    "value": {
                      "object": "chargeback",
                      "token": "chb_KfDdVMbE_xOCOU6Kj_YlmeI4S5_kgpSOvk",
                      "status": "ACCEPTED",
                      "reason_code": "PRODUCT_NOT_RECEIVED",
                      "source": "CARD",
                      "currency": "JMD",
                      "amount": 1100,
                      "transaction_id": "txn_20261027_PBFpP02",
                      "transaction_token": "txn_20261027_PBFpP02",
                      "transaction_display_id": "ord_20261027_V1StGXR",
                      "order_id": "ord_20261027_V1StGXR",
                      "customer_id": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW",
                      "customer": {
                        "name": "Michael Scott",
                        "email": "mscott@example.com"
                      },
                      "last_four_digits": "4242",
                      "card_scheme": "VISA",
                      "notes": null,
                      "files": [],
                      "fee_paid": false,
                      "received_at": "2026-10-27T15:04:05.000Z",
                      "responded_at": "2026-10-27T15:06:40.000Z",
                      "resolution_date": "2026-10-27T15:06:40.000Z",
                      "dispute_deadline": "2026-11-26T15:06:40.000Z",
                      "created_at": "2026-10-27T15:04:05.000Z",
                      "updated_at": "2026-10-27T15:06:40.000Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The transition is not permitted.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                },
                "examples": {
                  "notReceived": {
                    "summary": "Already responded to",
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "parameter_invalid",
                        "message": "This chargeback cannot be disputed: it is past the dispute window or not in RECEIVED status.",
                        "param": "status"
                      }
                    }
                  },
                  "badStatus": {
                    "summary": "A status a merchant may not set",
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "parameter_invalid",
                        "message": "status must be one of: UNDER_REVIEW, ACCEPTED.",
                        "param": "status"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/subscriptions": {
      "get": {
        "tags": [
          "Subscriptions"
        ],
        "summary": "List subscriptions",
        "operationId": "listSubscriptions",
        "description": "Returns your subscriptions, newest first. Cursor-paginated.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          },
          {
            "$ref": "#/components/parameters/EndingBefore"
          },
          {
            "name": "status",
            "in": "query",
            "description": "Filters to subscriptions in this exact status.",
            "schema": {
              "type": "string",
              "enum": [
                "ACTIVE",
                "SUSPENDED",
                "CANCELLED",
                "COMPLETE",
                "PENDING_CANCELLATION",
                "PENDING",
                "TRIALING",
                "PAUSED"
              ]
            },
            "example": "ACTIVE"
          },
          {
            "name": "currency",
            "in": "query",
            "schema": {
              "$ref": "#/components/schemas/Currency"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of subscriptions.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ListEnvelope-2"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/Subscription"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "page": {
                    "summary": "A page of subscriptions",
                    "value": {
                      "object": "list",
                      "data": [
                        {
                          "object": "subscription",
                          "token": "sub_pESz9qv3_M4rhjWUy_KMaAVBqb_XyCKvmZ",
                          "status": "ACTIVE",
                          "currency": "JMD",
                          "amount": 1100,
                          "frequency": "MONTHLY",
                          "billing_cycles": 12,
                          "end_type": "CYCLE",
                          "customer_id": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW",
                          "start_date": "2026-10-27T00:00:00.000Z",
                          "end_date": "2027-10-27T00:00:00.000Z",
                          "next_billing_date": "2026-11-27T00:00:00.000Z",
                          "paused": false,
                          "paused_days": 0,
                          "created_at": "2026-10-27T15:04:05.000Z"
                        }
                      ],
                      "has_more": false
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          }
        }
      }
    },
    "/subscriptions/{token}": {
      "get": {
        "tags": [
          "Subscriptions"
        ],
        "summary": "Retrieve a subscription",
        "operationId": "retrieveSubscription",
        "description": "Takes the subscription's `token`, which is in the subscription object\nreturned when you create or list subscriptions. A token that matches\nno subscription returns `404`.\n",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "description": "The subscription's `token`.",
            "schema": {
              "type": "string"
            },
            "example": "sub_pESz9qv3_M4rhjWUy_KMaAVBqb_XyCKvmZ"
          }
        ],
        "responses": {
          "200": {
            "description": "The subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                },
                "examples": {
                  "active": {
                    "summary": "An active monthly subscription",
                    "value": {
                      "object": "subscription",
                      "token": "sub_pESz9qv3_M4rhjWUy_KMaAVBqb_XyCKvmZ",
                      "status": "ACTIVE",
                      "currency": "JMD",
                      "amount": 1100,
                      "frequency": "MONTHLY",
                      "billing_cycles": 12,
                      "end_type": "CYCLE",
                      "customer_id": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW",
                      "start_date": "2026-10-27T00:00:00.000Z",
                      "end_date": "2027-10-27T00:00:00.000Z",
                      "next_billing_date": "2026-11-27T00:00:00.000Z",
                      "paused": false,
                      "paused_days": 0,
                      "created_at": "2026-10-27T15:04:05.000Z"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "description": "No subscription matches the token.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                },
                "examples": {
                  "missing": {
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "resource_missing",
                        "message": "No such subscription: sub_pESz9qv3_M4rhjWUy_KMaAVBqb_XyCKvmZ",
                        "param": "token"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/cancel": {
      "put": {
        "tags": [
          "Subscriptions"
        ],
        "summary": "Set a subscription's status",
        "operationId": "changeSubscriptionStatus",
        "description": "Sets `status` to `ACTIVE`, `PAUSED` or `CANCELLED`. `PAUSED` stops\nall billing until you set `ACTIVE` again. To skip a single charge\ninstead, use `PUT /subscriptions/pause`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token",
                  "status"
                ],
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "The subscription's `token`. A database id is rejected with `400`.",
                    "example": "sub_pESz9qv3_M4rhjWUy_KMaAVBqb_XyCKvmZ"
                  },
                  "status": {
                    "type": "string",
                    "enum": [
                      "ACTIVE",
                      "PAUSED",
                      "CANCELLED"
                    ],
                    "example": "ACTIVE"
                  }
                }
              },
              "examples": {
                "cancel": {
                  "summary": "Cancel",
                  "value": {
                    "token": "sub_pESz9qv3_M4rhjWUy_KMaAVBqb_XyCKvmZ",
                    "status": "CANCELLED"
                  }
                },
                "pause": {
                  "summary": "Pause, keeping it resumable",
                  "value": {
                    "token": "sub_pESz9qv3_M4rhjWUy_KMaAVBqb_XyCKvmZ",
                    "status": "PAUSED"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated subscription.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                },
                "examples": {
                  "cancelled": {
                    "summary": "Status set to CANCELLED",
                    "value": {
                      "object": "subscription",
                      "token": "sub_pESz9qv3_M4rhjWUy_KMaAVBqb_XyCKvmZ",
                      "status": "CANCELLED",
                      "currency": "JMD",
                      "amount": 1100,
                      "frequency": "MONTHLY",
                      "billing_cycles": 12,
                      "end_type": "CYCLE",
                      "customer_id": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW",
                      "start_date": "2026-10-27T00:00:00.000Z",
                      "end_date": "2027-10-27T00:00:00.000Z",
                      "next_billing_date": null,
                      "paused": false,
                      "paused_days": 0,
                      "created_at": "2026-10-27T15:04:05.000Z"
                    }
                  },
                  "paused": {
                    "summary": "Status set to PAUSED",
                    "value": {
                      "object": "subscription",
                      "token": "sub_pESz9qv3_M4rhjWUy_KMaAVBqb_XyCKvmZ",
                      "status": "PAUSED",
                      "currency": "JMD",
                      "amount": 1100,
                      "frequency": "MONTHLY",
                      "billing_cycles": 12,
                      "end_type": "CYCLE",
                      "customer_id": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW",
                      "start_date": "2026-10-27T00:00:00.000Z",
                      "end_date": "2027-10-27T00:00:00.000Z",
                      "next_billing_date": "2026-11-27T00:00:00.000Z",
                      "paused": false,
                      "paused_days": 0,
                      "created_at": "2026-10-27T15:04:05.000Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "description": "No such subscription for this merchant.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                },
                "examples": {
                  "missing": {
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "resource_missing",
                        "message": "No such subscription: sub_ZZZZZZZZ_ZZZZZZZZ_ZZZZZZZZ_ZZZZZZZ",
                        "param": "token"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/pause": {
      "put": {
        "tags": [
          "Subscriptions"
        ],
        "summary": "Skip the next charge",
        "operationId": "pauseSubscription",
        "description": "Skips the next charge by pushing it out `total_paused_days`. Billing\nthen continues on its own; you do not need to call anything to end\nthe pause.\n\nThis is not the same as setting `status: PAUSED`. Here `status`\nstays `ACTIVE`, and `paused` on the response becomes `true`. Only an\n`ACTIVE` subscription with no skip already pending can be paused.\n\nCapped by the subscription's billing period: 7 days (daily), 28\n(weekly), 90 (monthly), 365 (yearly). The cap is tightened further\nwhen the subscription is set to cancel at period end and has one\ncycle left, since one must remain to complete it.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token",
                  "total_paused_days"
                ],
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "The subscription's `token`. A database id is rejected with `400`.",
                    "example": "sub_pESz9qv3_M4rhjWUy_KMaAVBqb_XyCKvmZ"
                  },
                  "total_paused_days": {
                    "type": "integer",
                    "minimum": 1,
                    "description": "Days to push the next billing date out by.",
                    "example": 14
                  },
                  "reason": {
                    "type": "string",
                    "description": "Recorded on the subscription, not shown to the customer.",
                    "example": "Customer requested"
                  }
                }
              },
              "examples": {
                "pause": {
                  "value": {
                    "token": "sub_pESz9qv3_M4rhjWUy_KMaAVBqb_XyCKvmZ",
                    "total_paused_days": 14,
                    "reason": "Customer requested"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The subscription, with the pause applied.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                },
                "examples": {
                  "skipped": {
                    "summary": "Next charge skipped for 14 days",
                    "value": {
                      "object": "subscription",
                      "token": "sub_pESz9qv3_M4rhjWUy_KMaAVBqb_XyCKvmZ",
                      "status": "ACTIVE",
                      "currency": "JMD",
                      "amount": 1100,
                      "frequency": "MONTHLY",
                      "billing_cycles": 12,
                      "end_type": "CYCLE",
                      "customer_id": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW",
                      "start_date": "2026-10-27T00:00:00.000Z",
                      "end_date": "2027-10-27T00:00:00.000Z",
                      "next_billing_date": "2026-12-11T00:00:00.000Z",
                      "paused": true,
                      "paused_days": 14,
                      "created_at": "2026-10-27T15:04:05.000Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The subscription cannot be paused as requested.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                },
                "examples": {
                  "overLimit": {
                    "summary": "Requested days exceed the policy cap",
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "parameter_invalid",
                        "message": "Maximum pause for this subscription is 90 days.",
                        "param": "total_paused_days"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "description": "No pausable subscription for this merchant — it does not exist,\nis not `ACTIVE`, or already has a pause pending.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                },
                "examples": {
                  "missing": {
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "resource_missing",
                        "message": "No pausable subscription: sub_ZZZZZZZZ_ZZZZZZZZ_ZZZZZZZZ_ZZZZZZZ",
                        "param": "token"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/resume": {
      "put": {
        "tags": [
          "Subscriptions"
        ],
        "summary": "Resume charging after a skip",
        "operationId": "resumeSubscription",
        "description": "Undoes a skip made with `PUT /subscriptions/pause`. It cannot resume\na subscription whose `status` is `PAUSED`: that returns `404`. To\nrestart one, set `status: ACTIVE` with `PUT /subscriptions/cancel`.\n\n`resume_type` chooses how:\n\n- `IMMEDIATE` charges the customer right away and restarts billing\n  from today.\n- `SCHEDULED` only moves `next_billing_date` to `scheduled_date`; no\n  charge happens now.\n\nIf the pause has not actually started yet (today is still before\nthe date it was due to begin), the pause is simply reverted instead\n— nothing is charged and `resume_type` has no effect.\n\nWhen resuming would start a new billing period past the\nsubscription's original end (a renewal), `user_consent_given: true`\nis required, or the request fails with `400`.\n\nSafe to retry: send the same `Idempotency-Key` header on a retry and\nthe subscription is returned with `replayed: true` rather than\nresuming — and charging — a second time.\n",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": false,
            "description": "Reuse on retry to replay the first result. Without one, a key is\nderived from the subscription, resume type, and day, so retries\non the same day are still deduplicated.\n",
            "schema": {
              "type": "string"
            }
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "token",
                  "resume_type"
                ],
                "properties": {
                  "token": {
                    "type": "string",
                    "description": "The subscription's `token`. A database id is rejected with `400`.",
                    "example": "sub_pESz9qv3_M4rhjWUy_KMaAVBqb_XyCKvmZ"
                  },
                  "resume_type": {
                    "type": "string",
                    "enum": [
                      "IMMEDIATE",
                      "SCHEDULED"
                    ],
                    "example": "IMMEDIATE"
                  },
                  "scheduled_date": {
                    "type": "string",
                    "format": "date",
                    "description": "Required when `resume_type` is `SCHEDULED`.",
                    "example": "2026-11-15"
                  },
                  "user_consent_given": {
                    "type": "boolean",
                    "description": "Required when resuming starts a new billing period.",
                    "example": false
                  }
                }
              },
              "examples": {
                "immediate": {
                  "summary": "Resume and charge now",
                  "value": {
                    "token": "sub_pESz9qv3_M4rhjWUy_KMaAVBqb_XyCKvmZ",
                    "resume_type": "IMMEDIATE"
                  }
                },
                "scheduled": {
                  "summary": "Resume on a future date",
                  "value": {
                    "token": "sub_pESz9qv3_M4rhjWUy_KMaAVBqb_XyCKvmZ",
                    "resume_type": "SCHEDULED",
                    "scheduled_date": "2026-11-15"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The subscription, resumed.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Subscription"
                },
                "examples": {
                  "resumed": {
                    "summary": "Charging resumes on the next billing date",
                    "value": {
                      "object": "subscription",
                      "token": "sub_pESz9qv3_M4rhjWUy_KMaAVBqb_XyCKvmZ",
                      "status": "ACTIVE",
                      "currency": "JMD",
                      "amount": 1100,
                      "frequency": "MONTHLY",
                      "billing_cycles": 12,
                      "end_type": "CYCLE",
                      "customer_id": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW",
                      "start_date": "2026-10-27T00:00:00.000Z",
                      "end_date": "2027-10-27T00:00:00.000Z",
                      "next_billing_date": "2026-11-27T00:00:00.000Z",
                      "paused": false,
                      "paused_days": 14,
                      "created_at": "2026-10-27T15:04:05.000Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The resume cannot proceed as requested.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                },
                "examples": {
                  "consentRequired": {
                    "summary": "Resuming would start a new billing period",
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "parameter_invalid",
                        "message": "Resuming this subscription starts a new billing period and requires user consent.",
                        "param": "user_consent_given"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "description": "No resumable subscription for this merchant — it does not exist,\nis not `ACTIVE`, or was never paused.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                },
                "examples": {
                  "missing": {
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "resource_missing",
                        "message": "No resumable subscription: sub_ZZZZZZZZ_ZZZZZZZZ_ZZZZZZZZ_ZZZZZZZ",
                        "param": "token"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/reinstate": {
      "get": {
        "tags": [
          "Subscriptions"
        ],
        "summary": "Get the unpaid invoice behind a suspended subscription",
        "operationId": "reinstateSubscription",
        "description": "After repeated failed charges, Dime suspends a subscription's\nbilling. This endpoint returns the unpaid invoice behind the\nsuspension; it does not charge, create or email anything. Send your\ncustomer to the invoice's payment page,\n`https://pay.dimepay.app/open-invoices/{token}/`. Paying it clears\nthe suspension.\n\nA suspended subscription keeps `status: ACTIVE`, and the subscription\nobject does not show its billing state. To check, call this\nendpoint: `404` means the subscription is not suspended or has no\nunpaid invoice.\n",
        "parameters": [
          {
            "name": "token",
            "in": "query",
            "required": true,
            "description": "The subscription's `token`.",
            "schema": {
              "type": "string",
              "example": "sub_pESz9qv3_M4rhjWUy_KMaAVBqb_XyCKvmZ"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The subscription's outstanding invoice.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Invoice"
                },
                "examples": {
                  "invoice": {
                    "summary": "The unpaid invoice that suspended the subscription",
                    "value": {
                      "object": "invoice",
                      "number": "INV-25082026-0007",
                      "token": "inv_20260825_giodwK2",
                      "status": "UNPAID",
                      "payment_type": "RECURRING",
                      "currency": "JMD",
                      "subtotal": 5000,
                      "total": 5000,
                      "shipping": null,
                      "tax": null,
                      "tax_label": null,
                      "discount": null,
                      "customer": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW",
                      "notes": null,
                      "recurring": false,
                      "recurring_frequency": null,
                      "recurring_billing_cycle": null,
                      "recurring_start_date": null,
                      "recurring_end_date": null,
                      "recurring_end_type": null,
                      "line_items": [
                        {
                          "type": "custom",
                          "product": null,
                          "name": "Consulting",
                          "description": null,
                          "quantity": 1,
                          "unit_amount": 5000,
                          "currency": "JMD"
                        }
                      ],
                      "invoice_date": "2026-10-27T00:00:00.000Z",
                      "due_date": "2026-11-10T00:00:00.000Z",
                      "paid_at": null,
                      "created_at": "2026-10-27T15:04:05.000Z",
                      "updated_at": "2026-10-27T15:04:05.000Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "description": "No reinstatable subscription — it does not exist, is not\nsuspended, or has no unpaid invoice.\n",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                },
                "examples": {
                  "missingSubscription": {
                    "summary": "Subscription not found, or not suspended",
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "resource_missing",
                        "message": "No reinstatable subscription: sub_ZZZZZZZZ_ZZZZZZZZ_ZZZZZZZZ_ZZZZZZZ",
                        "param": "token"
                      }
                    }
                  },
                  "missingInvoice": {
                    "summary": "Suspended, but no unpaid invoice found",
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "resource_missing",
                        "message": "No unpaid invoice for subscription: sub_pESz9qv3_M4rhjWUy_KMaAVBqb_XyCKvmZ",
                        "param": "invoice_id"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/subscriptions/dime-billing": {
      "post": {
        "tags": [
          "Subscriptions"
        ],
        "summary": "Pay an invoice from your Dime wallet",
        "operationId": "processDimeBilling",
        "description": "Pays one of your `UNPAID` invoices by debiting your own Dime merchant\nwallet. No card is charged. `currency` selects which wallet to debit.\nUse the invoice's currency; a USD or JMD wallet can also pay a JMD or\nUSD invoice. The invoice is marked `PAID`.\n\nA second call for the same invoice returns `400 already_billed`.\nThis endpoint does not change any subscription's status.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "required": [
                  "invoice_id",
                  "currency"
                ],
                "properties": {
                  "invoice_id": {
                    "type": "string",
                    "description": "The `token` of the invoice to pay. A database id is rejected with `400`.",
                    "example": "inv_20260825_giodwK2"
                  },
                  "currency": {
                    "allOf": [
                      {
                        "$ref": "#/components/schemas/Currency"
                      }
                    ],
                    "description": "The currency of the wallet to debit."
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The invoice was paid from your wallet.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "invoice_token": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The `token` of the invoice paid.",
                      "example": "inv_20260825_giodwK2"
                    },
                    "amount": {
                      "type": "number",
                      "description": "Amount debited from the wallet.",
                      "example": 5000
                    },
                    "currency": {
                      "$ref": "#/components/schemas/Currency"
                    },
                    "wallet_id": {
                      "type": [
                        "string",
                        "null"
                      ],
                      "description": "The `token` of the wallet debited, as listed by `GET /p2p/wallets`.",
                      "example": "wal_Q3nT8vKp_Zx2Lm9Rc_Yb4Hu7Wd_E1sGf0a"
                    }
                  }
                },
                "examples": {
                  "paid": {
                    "summary": "Invoice paid from your wallet",
                    "value": {
                      "invoice_token": "inv_20260825_giodwK2",
                      "amount": 1100,
                      "currency": "JMD",
                      "wallet_id": "wal_Q3nT8vKp_Zx2Lm9Rc_Yb4Hu7Wd_E1sGf0a"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "description": "No such invoice for this merchant.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                },
                "examples": {
                  "missing": {
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "resource_missing",
                        "message": "No such invoice: inv_20261112_ZZZZZZZ",
                        "param": "invoice_id"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/bridge/requests": {
      "post": {
        "tags": [
          "Dime Bridge"
        ],
        "summary": "Create a Bridge request",
        "operationId": "createBridgeRequest",
        "description": "Invites a merchant to link to your marketplace. Next, create a Bridge\nlink and send the merchant to its `url`.\n\n`prefill` is shown already filled in when a new merchant signs up, so\nthey do not retype what you know. Each field is checked against Dime's\nformats and lists (see `BridgePrefill`); an invalid value rejects the\nrequest. A prefilled `mcc` is still reviewed by Dime.\n\n`status` is `pending` until the merchant approves or declines. The\nresponse never says whether the email already has a Dime account.\nRequests expire after 30 days.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBridgeRequest"
              },
              "examples": {
                "vendor": {
                  "value": {
                    "email": "vendor@example.com",
                    "account_type": "standard",
                    "capabilities": {
                      "payments": true,
                      "transfers": true
                    },
                    "prefill": {
                      "business_name": "Jane's Store",
                      "business_type": "SOLE_TRADER",
                      "first_name": "Jane",
                      "last_name": "Doe",
                      "phone_number": "+18765550123",
                      "website_url": "https://janestore.example",
                      "mcc": "5734",
                      "address_street": "1 Market St",
                      "address_city": "Kingston",
                      "address_country": "JM"
                    },
                    "return_url": "https://marketplace.example/dashboard",
                    "refresh_url": "https://marketplace.example/bridge/refresh?vendor=v_123",
                    "metadata": {
                      "vendor_id": "v_123"
                    }
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The request was created.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BridgeRequest"
                }
              }
            }
          },
          "400": {
            "description": "The request was rejected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                },
                "examples": {
                  "missingEmail": {
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "parameter_missing",
                        "message": "email is required.",
                        "param": "email"
                      }
                    }
                  },
                  "invalidPrefill": {
                    "summary": "A prefill value failed its format or list check",
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "parameter_invalid",
                        "message": "prefill.phone_number is not a valid phone number for JM.",
                        "param": "prefill.phone_number"
                      }
                    }
                  },
                  "express": {
                    "summary": "Express linked merchants are not available yet",
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "parameter_unsupported",
                        "message": "Express linked merchants are not available yet. Use account_type \"standard\".",
                        "param": "account_type"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "403": {
            "$ref": "#/components/responses/BridgeDisabled"
          }
        }
      },
      "get": {
        "tags": [
          "Dime Bridge"
        ],
        "summary": "List Bridge requests",
        "operationId": "listBridgeRequests",
        "description": "Your Bridge requests, newest first. Cursor-paginated.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/StartingAfterRequest"
          },
          {
            "$ref": "#/components/parameters/EndingBeforeRequest"
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "pending",
                "approved",
                "declined",
                "cancelled",
                "expired"
              ]
            },
            "example": "pending"
          },
          {
            "name": "email",
            "in": "query",
            "schema": {
              "type": "string",
              "format": "email"
            },
            "example": "vendor@example.com"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of Bridge requests.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ListEnvelope-2"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/BridgeRequest"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          }
        }
      }
    },
    "/bridge/requests/{token}": {
      "get": {
        "tags": [
          "Dime Bridge"
        ],
        "summary": "Retrieve a Bridge request",
        "operationId": "retrieveBridgeRequest",
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "The request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BridgeRequest"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/bridge/requests/{token}/cancel": {
      "post": {
        "tags": [
          "Dime Bridge"
        ],
        "summary": "Cancel a Bridge request",
        "operationId": "cancelBridgeRequest",
        "description": "Cancels a `pending` request. Its unopened links stop working.",
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "responses": {
          "200": {
            "description": "The cancelled request.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BridgeRequest"
                }
              }
            }
          },
          "400": {
            "description": "The request is no longer pending.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/bridge/requests/{token}/links": {
      "post": {
        "tags": [
          "Dime Bridge"
        ],
        "summary": "Create a Bridge link",
        "operationId": "createBridgeLink",
        "description": "Returns a URL to redirect the merchant's browser to. On a co-branded\npage showing your name and logo:\n\n- **Already a Dime merchant:** they sign in to Dime as the invited\n  email (or are asked to sign out if they are signed in as someone\n  else), pick which of their stores to link, confirm with a code\n  emailed to the invited address, and approve or decline.\n- **No Dime account:** they sign up with your `prefill`, agree to the\n  link, and complete onboarding. The link is created when they submit\n  onboarding (`bridge_merchant.activated`, with `payments_enabled:\n  false`). When Dime approves them, you receive\n  `bridge_merchant.updated` with `payments_enabled: true`.\n\nAfterwards they are sent to your `return_url`. Signing in or out on\nthe way does not use up the link.\n\nA Bridge link:\n\n- **works once.** Opening it uses it up.\n- **expires** after 10 minutes if not opened.\n- **is replaced** by the next one you create: earlier unopened links\n  stop working.\n\nIf the merchant opens a used or expired link, they are sent to your\n`refresh_url`. Handle that route by creating a new link and\nredirecting them to it.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/RequestId"
          }
        ],
        "responses": {
          "201": {
            "description": "The link.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BridgeLink"
                }
              }
            }
          },
          "400": {
            "description": "The request is no longer pending, or has expired.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/bridge/merchants": {
      "get": {
        "tags": [
          "Dime Bridge"
        ],
        "summary": "List linked merchants",
        "operationId": "listBridgeMerchants",
        "description": "Merchants linked to your marketplace, newest first. Cursor-paginated.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/StartingAfterMerchant"
          },
          {
            "$ref": "#/components/parameters/EndingBeforeMerchant"
          },
          {
            "name": "status",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "active",
                "paused",
                "revoked"
              ]
            },
            "example": "active"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of linked merchants.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ListEnvelope-2"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/BridgeMerchant"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          }
        }
      }
    },
    "/bridge/merchants/{token}": {
      "get": {
        "tags": [
          "Dime Bridge"
        ],
        "summary": "Retrieve a linked merchant",
        "operationId": "retrieveBridgeMerchant",
        "parameters": [
          {
            "$ref": "#/components/parameters/BridgeMerchantId"
          }
        ],
        "responses": {
          "200": {
            "description": "The linked merchant.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BridgeMerchant"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/bridge/merchants/{token}/revoke": {
      "post": {
        "tags": [
          "Dime Bridge"
        ],
        "summary": "Revoke a linked merchant",
        "operationId": "revokeBridgeMerchant",
        "description": "Ends the link. New payments and transfers to it are refused; existing\npayments are unaffected. The linked merchant can also revoke from its\ndashboard. To link again, send a new Bridge request.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/BridgeMerchantId"
          }
        ],
        "responses": {
          "200": {
            "description": "The revoked link.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BridgeMerchant"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/bridge/transfers": {
      "post": {
        "tags": [
          "Dime Bridge"
        ],
        "summary": "Create a Bridge transfer",
        "operationId": "createBridgeTransfer",
        "description": "Moves money from your wallet to a linked merchant's wallet. Use it to\npay several merchants from one payment: take the payment as merchant\nof record, then send one transfer per merchant.\n\nThe transfer is returned with `status: pending` and becomes\n`complete` once the money has moved, normally within seconds. You\nreceive `bridge_transfer.created` at that point. A pending transfer\nalready counts against your available balance.\n\n`source_transaction_id` is required: the transfer is shown under that\npayment in your transaction details, and doesn't add rows to your\ntransaction list. The linked merchant gets an order and an incoming\ntransaction from you (`destination_transaction`); send `items` to\nshow what the transfer pays for on that order.\n\n- The link must have granted `transfers`.\n- `currency` must match; there is no conversion.\n- Your available balance must cover `amount`. Funds still on hold do\n  not count.\n- Transfers for the `source_transaction_id` payment cannot add up to\n  more than you netted from it.\n\nRequires an `Idempotency-Key` header. Sending the same key again\nreturns the original transfer and moves no money. Reusing a key\nwith different parameters returns `409`.\n",
        "parameters": [
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "A unique value per transfer, up to 255 characters.",
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "example": "payout-order-1234-vendor-1"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBridgeTransfer"
              },
              "examples": {
                "payout": {
                  "value": {
                    "destination": "brm_9CKxgfQk_jDKOHNVm_H8696T87_2alsOAP",
                    "amount": 25,
                    "currency": "JMD",
                    "source_transaction_id": "txn_20261027_PBFpP02",
                    "description": "Order 1234 vendor payout"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The transfer. A replay returns the original.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BridgeTransfer"
                }
              }
            }
          },
          "400": {
            "description": "The transfer was rejected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                },
                "examples": {
                  "noSource": {
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "parameter_missing",
                        "message": "source_transaction_id is required: the token of the payment this transfer pays out from.",
                        "param": "source_transaction_id"
                      }
                    }
                  },
                  "noKey": {
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "parameter_missing",
                        "message": "An Idempotency-Key header is required for bridge transfers.",
                        "param": "Idempotency-Key"
                      }
                    }
                  },
                  "insufficient": {
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "insufficient_balance",
                        "message": "Insufficient available JMD balance for this transfer.",
                        "param": "amount"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "403": {
            "description": "Dime Bridge is not enabled, or the link has not granted `transfers`.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                }
              }
            }
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          },
          "409": {
            "description": "The `Idempotency-Key` was used with different parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                },
                "examples": {
                  "reused": {
                    "value": {
                      "error": {
                        "type": "idempotency_error",
                        "code": "idempotency_conflict",
                        "message": "This Idempotency-Key was already used with different parameters.",
                        "param": "Idempotency-Key"
                      }
                    }
                  }
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Dime Bridge"
        ],
        "summary": "List Bridge transfers",
        "operationId": "listBridgeTransfers",
        "description": "Your transfers, newest first. Cursor-paginated.",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/StartingAfterTransfer"
          },
          {
            "$ref": "#/components/parameters/EndingBeforeTransfer"
          },
          {
            "name": "destination",
            "in": "query",
            "description": "Only transfers to this linked merchant, by its `token`.",
            "schema": {
              "type": "string"
            },
            "example": "brm_9CKxgfQk_jDKOHNVm_H8696T87_2alsOAP"
          },
          {
            "name": "source_transaction_id",
            "in": "query",
            "description": "Only transfers paid out of this payment, by its `token`.",
            "schema": {
              "type": "string"
            },
            "example": "txn_20261027_PBFpP02"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of transfers.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ListEnvelope-2"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/BridgeTransfer"
                          }
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          }
        }
      }
    },
    "/bridge/transfers/{token}": {
      "get": {
        "tags": [
          "Dime Bridge"
        ],
        "summary": "Retrieve a Bridge transfer",
        "operationId": "retrieveBridgeTransfer",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "description": "The transfer's `token`.",
            "schema": {
              "type": "string"
            },
            "example": "btr_ghUDrzcz_8WNcGewb_HC7S6U6-_gR-3I3w"
          }
        ],
        "responses": {
          "200": {
            "description": "The transfer.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BridgeTransfer"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/bridge/transfers/{token}/reversals": {
      "post": {
        "tags": [
          "Dime Bridge"
        ],
        "summary": "Reverse a Bridge transfer",
        "operationId": "createBridgeTransferReversal",
        "description": "Moves all or part of a transfer back from the linked merchant's\nwallet to yours. Leave out `amount` to reverse everything not yet\nreversed. You can make several partial reversals, up to the transfer\namount; once they have all moved, the transfer shows\n`reversed: true` and status `reversed`.\n\nA reversal works like a refund on the linked merchant's side: it gets\na refund transaction (`PARTIAL_REFUND`, or `REFUND` once the whole\ntransfer is reversed) on the transfer's order, pointing at the\ntransfer's transaction. You see it under the original payment. Send\n`items` to show what is being reversed. Payment refund endpoints\n(`PUT /payments/refund`) do not accept transfer transactions.\n\nOnly a `complete` transfer can be reversed. The reversal is returned\nwith `status: pending` and becomes `complete` once the money has\nmoved, normally within seconds; you receive\n`bridge_transfer.reversed` then. `amount_reversed` on the transfer\nincludes reversals still pending.\n\n- The linked merchant's available balance must cover `amount`. If\n  it has already been spent or withdrawn, the request fails with\n  `insufficient_balance` and nothing moves.\n- Works even if the link was revoked since the transfer.\n- Reversed money can be transferred again for the transfer's\n  `source_transaction_id` payment.\n\nRequires an `Idempotency-Key` header. Sending the same key again\nreturns the original reversal and moves no money. Reusing a key with\na different `amount` returns `409`.\n",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "description": "The transfer's `token`.",
            "schema": {
              "type": "string"
            },
            "example": "btr_ghUDrzcz_8WNcGewb_HC7S6U6-_gR-3I3w"
          },
          {
            "name": "Idempotency-Key",
            "in": "header",
            "required": true,
            "description": "A unique value per reversal, up to 255 characters.",
            "schema": {
              "type": "string",
              "maxLength": 255
            },
            "example": "reverse-order-1234-vendor-1"
          }
        ],
        "requestBody": {
          "required": false,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateBridgeTransferReversal"
              },
              "examples": {
                "partial": {
                  "summary": "Take back 10 of a 25 transfer",
                  "value": {
                    "amount": 10,
                    "description": "Order 1234 item returned"
                  }
                },
                "full": {
                  "summary": "Take back everything not yet reversed",
                  "value": {}
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The reversal. A replay returns the original.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/BridgeTransferReversal"
                }
              }
            }
          },
          "400": {
            "description": "The reversal was rejected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                },
                "examples": {
                  "tooMuch": {
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "parameter_invalid",
                        "message": "Reversal amount 30.00 exceeds the 15.00 not yet reversed.",
                        "param": "amount"
                      }
                    }
                  },
                  "alreadyReversed": {
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "parameter_invalid",
                        "message": "This transfer has already been fully reversed.",
                        "param": "amount"
                      }
                    }
                  },
                  "insufficient": {
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "insufficient_balance",
                        "message": "The linked merchant's available JMD balance cannot cover this reversal.",
                        "param": "amount"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          },
          "409": {
            "description": "The `Idempotency-Key` was used with different parameters.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                }
              }
            }
          }
        }
      },
      "get": {
        "tags": [
          "Dime Bridge"
        ],
        "summary": "List a transfer's reversals",
        "operationId": "listBridgeTransferReversals",
        "description": "The transfer's reversals, newest first. Cursor-paginated.",
        "parameters": [
          {
            "name": "token",
            "in": "path",
            "required": true,
            "description": "The transfer's `token`.",
            "schema": {
              "type": "string"
            },
            "example": "btr_ghUDrzcz_8WNcGewb_HC7S6U6-_gR-3I3w"
          },
          {
            "name": "limit",
            "in": "query",
            "schema": {
              "type": "integer",
              "minimum": 1,
              "maximum": 100,
              "default": 10
            }
          },
          {
            "name": "starting_after",
            "in": "query",
            "description": "The `token` of the last reversal on the previous page.",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "ending_before",
            "in": "query",
            "description": "The `token` of the first reversal on the page you have.",
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "A page of reversals.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/BridgeTransferReversal"
                      }
                    },
                    "has_more": {
                      "type": "boolean"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/NotFound-2"
          }
        }
      }
    },
    "/webhook-endpoints": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List webhook endpoints",
        "operationId": "listWebhookEndpoints",
        "description": "Returns your registered endpoints, newest first. The signing secret\nis never included; it is shown once, when the endpoint is created or\nits secret is rotated.\n",
        "responses": {
          "200": {
            "description": "Your endpoints.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ListEnvelope-2"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/WebhookEndpoint"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "page": {
                    "summary": "One registered endpoint",
                    "value": {
                      "object": "list",
                      "data": [
                        {
                          "token": "hep_kBXRfasu_Ard5VWhe_xECb9iAV_IyX1JdD",
                          "object": "webhook_endpoint",
                          "url": "https://example.com/webhooks/dime",
                          "description": "Production order events",
                          "is_active": true,
                          "enabled_events": [
                            "payment.succeeded",
                            "payment.failed",
                            "refund.processed"
                          ],
                          "created_at": "2026-10-28T14:02:11.000Z"
                        }
                      ],
                      "has_more": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          }
        }
      },
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Register a webhook endpoint",
        "operationId": "createWebhookEndpoint",
        "description": "Registers a URL to receive events. The response includes\n`signing_secret`, shown only this once: store it, and use it to\nverify the `X-Dime-Signature` header on every delivery.\n\nThe URL must be `https://`, must not contain a username or password,\nand must resolve to a public internet address; Dime checks this\nbefore saving. Leave `enabled_events` out to receive every event, or\nlist the ones you want from `GET /webhook-event-types`.\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CreateWebhookEndpointRequest"
              },
              "examples": {
                "allEvents": {
                  "summary": "Every event",
                  "value": {
                    "url": "https://example.com/webhooks/dime",
                    "description": "Production order events"
                  }
                },
                "selected": {
                  "summary": "Payment outcomes only",
                  "value": {
                    "url": "https://example.com/webhooks/dime",
                    "enabled_events": [
                      "payment.succeeded",
                      "payment.failed",
                      "refund.processed"
                    ]
                  }
                }
              }
            }
          }
        },
        "responses": {
          "201": {
            "description": "The endpoint, with its signing secret.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointWithSecret"
                },
                "examples": {
                  "created": {
                    "summary": "Store the secret now",
                    "value": {
                      "token": "hep_kBXRfasu_Ard5VWhe_xECb9iAV_IyX1JdD",
                      "object": "webhook_endpoint",
                      "url": "https://example.com/webhooks/dime",
                      "description": "Production order events",
                      "is_active": true,
                      "enabled_events": null,
                      "created_at": "2026-10-28T14:02:11.000Z",
                      "signing_secret": "whsec_V1StGXR8_Z5jdHi6BmyT2kQ4pL7nR9sW1xZ3cE5v"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "The URL or event list was rejected.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Error-2"
                },
                "examples": {
                  "privateUrl": {
                    "summary": "The URL is not public",
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "parameter_invalid",
                        "message": "That address is not reachable from the public internet.",
                        "param": "url"
                      }
                    }
                  },
                  "unknownEvent": {
                    "summary": "An event type is not in the catalogue",
                    "value": {
                      "error": {
                        "type": "invalid_request_error",
                        "code": "parameter_invalid",
                        "message": "Unknown event type(s): order.shipped.",
                        "param": "enabled_events"
                      }
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          }
        }
      }
    },
    "/webhook-endpoints/{token}": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Retrieve a webhook endpoint",
        "operationId": "retrieveWebhookEndpoint",
        "description": "Takes the endpoint's `token`, as returned when you create or list endpoints.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookEndpointId"
          }
        ],
        "responses": {
          "200": {
            "description": "The endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                },
                "examples": {
                  "endpoint": {
                    "summary": "A registered endpoint",
                    "value": {
                      "token": "hep_kBXRfasu_Ard5VWhe_xECb9iAV_IyX1JdD",
                      "object": "webhook_endpoint",
                      "url": "https://example.com/webhooks/dime",
                      "description": "Production order events",
                      "is_active": true,
                      "enabled_events": null,
                      "created_at": "2026-10-28T14:02:11.000Z"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/EndpointNotFound"
          }
        }
      },
      "put": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Update a webhook endpoint",
        "operationId": "updateWebhookEndpoint",
        "description": "Changes only the fields you send. Set `is_active: false` to stop\ndeliveries without deleting the endpoint; events are still recorded\nand can be replayed once it is active again.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookEndpointId"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/UpdateWebhookEndpointRequest"
              },
              "examples": {
                "pause": {
                  "summary": "Pause deliveries",
                  "value": {
                    "is_active": false
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The updated endpoint.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpoint"
                },
                "examples": {
                  "paused": {
                    "summary": "Deliveries paused",
                    "value": {
                      "token": "hep_kBXRfasu_Ard5VWhe_xECb9iAV_IyX1JdD",
                      "object": "webhook_endpoint",
                      "url": "https://example.com/webhooks/dime",
                      "description": "Production order events",
                      "is_active": false,
                      "enabled_events": null,
                      "created_at": "2026-10-28T14:02:11.000Z"
                    }
                  }
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/BadRequest-2"
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/EndpointNotFound"
          }
        }
      },
      "delete": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Delete a webhook endpoint",
        "operationId": "deleteWebhookEndpoint",
        "description": "Stops all deliveries to the endpoint. Past events and their delivery records are kept.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookEndpointId"
          }
        ],
        "responses": {
          "200": {
            "description": "Deletion acknowledged.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "token": {
                      "type": "string",
                      "description": "The deleted endpoint's `token`.",
                      "example": "hep_kBXRfasu_Ard5VWhe_xECb9iAV_IyX1JdD"
                    },
                    "object": {
                      "type": "string",
                      "const": "webhook_endpoint",
                      "example": "webhook_endpoint"
                    },
                    "deleted": {
                      "type": "boolean",
                      "const": true,
                      "example": true
                    }
                  }
                },
                "examples": {
                  "deleted": {
                    "summary": "Deletion acknowledged",
                    "value": {
                      "token": "hep_kBXRfasu_Ard5VWhe_xECb9iAV_IyX1JdD",
                      "object": "webhook_endpoint",
                      "deleted": true
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/EndpointNotFound"
          }
        }
      }
    },
    "/webhook-endpoints/{token}/rotate-secret": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Rotate an endpoint's signing secret",
        "operationId": "rotateWebhookEndpointSecret",
        "description": "Replaces the signing secret and returns the new one, shown only this\nonce. Deliveries sent after this call are signed with the new secret\nstraight away, so update your verifier first, or accept both secrets\nfor a short period.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookEndpointId"
          }
        ],
        "responses": {
          "200": {
            "description": "The endpoint, with its new signing secret.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEndpointWithSecret"
                },
                "examples": {
                  "rotated": {
                    "summary": "New secret",
                    "value": {
                      "token": "hep_kBXRfasu_Ard5VWhe_xECb9iAV_IyX1JdD",
                      "object": "webhook_endpoint",
                      "url": "https://example.com/webhooks/dime",
                      "description": "Production order events",
                      "is_active": true,
                      "enabled_events": null,
                      "created_at": "2026-10-28T14:02:11.000Z",
                      "signing_secret": "whsec_9kQ2pjmnNMXqG0Ewxdo1aB3cD5eF7gH9iJ1kL3mN"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/EndpointNotFound"
          }
        }
      }
    },
    "/webhook-event-types": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List event types",
        "operationId": "listWebhookEventTypes",
        "description": "Every event type an endpoint can subscribe to. Use these values in\n`enabled_events`. The list may grow; treat an event type you do not\nrecognise as one to ignore.\n",
        "responses": {
          "200": {
            "description": "The event types.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "object": {
                      "type": "string",
                      "const": "list",
                      "example": "list"
                    },
                    "data": {
                      "type": "array",
                      "items": {
                        "type": "string"
                      },
                      "example": [
                        "payment.succeeded",
                        "payment.failed",
                        "refund.processed"
                      ]
                    },
                    "has_more": {
                      "type": "boolean",
                      "example": false
                    }
                  }
                },
                "examples": {
                  "types": {
                    "summary": "The catalogue",
                    "value": {
                      "object": "list",
                      "data": [
                        "payment.succeeded",
                        "payment.failed",
                        "payment.authorised",
                        "payment.voided",
                        "payment.abandoned",
                        "payment.settled",
                        "settlement.batched",
                        "refund.processed",
                        "chargeback.created",
                        "chargeback.under_review",
                        "chargeback.represented",
                        "chargeback.won",
                        "chargeback.lost",
                        "chargeback.accepted",
                        "customer.created",
                        "customer.updated",
                        "customer.deleted",
                        "invoice.created",
                        "invoice.deleted",
                        "card_request.card_saved",
                        "card_request.succeeded",
                        "card_request.failed",
                        "card_request.card_deleted",
                        "bank_transfer.created",
                        "bank_transfer.approved",
                        "bank_transfer.rejected",
                        "bank_account.created",
                        "bank_account.updated",
                        "bank_account.deleted",
                        "subscription.created",
                        "subscription.renewed",
                        "subscription.updated",
                        "subscription.resumed",
                        "subscription.paused",
                        "subscription.cancelled",
                        "subscription.cancellation_scheduled",
                        "subscription.suspended",
                        "subscription.completed",
                        "subscription.past_due"
                      ],
                      "has_more": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          }
        }
      }
    },
    "/webhook-events": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "List webhook events",
        "operationId": "listWebhookEvents",
        "description": "Every event this API generated for you, newest first, with the result\nof each delivery to your endpoints. Events are recorded whether or\nnot you had an endpoint to receive them, so this is also an audit\ntrail. Cursor-paginated.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/Limit"
          },
          {
            "$ref": "#/components/parameters/StartingAfter"
          },
          {
            "$ref": "#/components/parameters/EndingBefore"
          },
          {
            "name": "event_type",
            "in": "query",
            "description": "Only events of this type.",
            "schema": {
              "type": "string"
            },
            "example": "payment.succeeded"
          }
        ],
        "responses": {
          "200": {
            "description": "A page of events.",
            "content": {
              "application/json": {
                "schema": {
                  "allOf": [
                    {
                      "$ref": "#/components/schemas/ListEnvelope-2"
                    },
                    {
                      "type": "object",
                      "properties": {
                        "data": {
                          "type": "array",
                          "items": {
                            "$ref": "#/components/schemas/WebhookEvent"
                          }
                        }
                      }
                    }
                  ]
                },
                "examples": {
                  "page": {
                    "summary": "One delivered event",
                    "value": {
                      "object": "list",
                      "data": [
                        {
                          "token": "whe_W2uMzOzd_QxAOG0la_PjxFZOhI_ryYAE1l",
                          "object": "webhook_event",
                          "event_id": "evt_V1StGXR8Z5jdHi6BmyT2",
                          "event_type": "payment.succeeded",
                          "resource_type": "payment",
                          "resource_id": "txn_20261027_PBFpP02",
                          "occurred_at": "2026-10-27T15:04:07.112Z",
                          "deliveries": [
                            {
                              "endpoint_id": "hep_kBXRfasu_Ard5VWhe_xECb9iAV_IyX1JdD",
                              "status": "DELIVERED",
                              "attempt_count": 1,
                              "last_attempt_at": "2026-10-27T15:04:07.120Z",
                              "last_response_status": 200,
                              "last_error": null,
                              "delivered_at": "2026-10-27T15:04:07.631Z",
                              "next_attempt_at": null
                            }
                          ]
                        }
                      ],
                      "has_more": false
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          }
        }
      }
    },
    "/webhook-events/{token}": {
      "get": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Retrieve a webhook event",
        "operationId": "retrieveWebhookEvent",
        "description": "Takes the event's `token`, as returned by the list, not its `event_id`.",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookEventId"
          }
        ],
        "responses": {
          "200": {
            "description": "The event.",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/WebhookEvent"
                },
                "examples": {
                  "retrying": {
                    "summary": "A delivery being retried",
                    "value": {
                      "token": "whe_W2uMzOzd_QxAOG0la_PjxFZOhI_ryYAE1l",
                      "object": "webhook_event",
                      "event_id": "evt_V1StGXR8Z5jdHi6BmyT2",
                      "event_type": "payment.succeeded",
                      "resource_type": "payment",
                      "resource_id": "txn_20261027_PBFpP02",
                      "occurred_at": "2026-10-27T15:04:07.112Z",
                      "deliveries": [
                        {
                          "endpoint_id": "hep_kBXRfasu_Ard5VWhe_xECb9iAV_IyX1JdD",
                          "status": "PENDING",
                          "attempt_count": 2,
                          "last_attempt_at": "2026-10-27T15:05:09.300Z",
                          "last_response_status": null,
                          "last_error": "timed out after 7s",
                          "delivered_at": null,
                          "next_attempt_at": "2026-10-27T15:10:12.000Z",
                          "attempts": [
                            {
                              "attempt": 1,
                              "attempted_at": "2026-10-27T15:04:07.120Z",
                              "response_status": 503,
                              "error": "non-2xx (503)",
                              "duration_ms": 412
                            },
                            {
                              "attempt": 2,
                              "attempted_at": "2026-10-27T15:05:09.300Z",
                              "response_status": null,
                              "error": "timed out after 7s",
                              "duration_ms": 7001
                            }
                          ]
                        }
                      ]
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/EventNotFound"
          }
        }
      }
    },
    "/webhook-events/{token}/replay": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Replay a webhook event",
        "operationId": "replayWebhookEvent",
        "description": "Sends the event again to every active endpoint subscribed to its\ntype. `event_id`, `event_type`, resource and `payload` are the\noriginal's; `occurred_at` and the signature are those of the\nreplay. Use it after fixing an endpoint that returned an error. The\nreplay replaces any retries of the event still pending, and gets\nits own retries if it fails. Your handler should treat\na replay like any redelivery: discard it if the `event_id` was\nalready processed.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/WebhookEventId"
          }
        ],
        "responses": {
          "200": {
            "description": "The replay was sent.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "token": {
                      "type": "string",
                      "description": "The replayed event's `token`.",
                      "example": "whe_W2uMzOzd_QxAOG0la_PjxFZOhI_ryYAE1l"
                    },
                    "object": {
                      "type": "string",
                      "const": "webhook_event",
                      "example": "webhook_event"
                    },
                    "replayed": {
                      "type": "boolean",
                      "const": true,
                      "example": true
                    },
                    "event_id": {
                      "type": "string",
                      "description": "The original event's `event_id`, reused on the replay.",
                      "example": "evt_V1StGXR8Z5jdHi6BmyT2"
                    }
                  }
                },
                "examples": {
                  "replayed": {
                    "summary": "Sent again",
                    "value": {
                      "token": "whe_W2uMzOzd_QxAOG0la_PjxFZOhI_ryYAE1l",
                      "object": "webhook_event",
                      "replayed": true,
                      "event_id": "evt_V1StGXR8Z5jdHi6BmyT2"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Unauthorized-2"
          },
          "404": {
            "$ref": "#/components/responses/EventNotFound"
          }
        }
      }
    }
  },
  "webhooks": {
    "paymentEvent": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Payment events",
        "operationId": "webhookPaymentEvent",
        "security": [],
        "description": "Sent for every change to a payment on an order created through this\nAPI.\n\n- `payment.authorised`: funds are held, after `POST /payments/auth`.\n- `payment.succeeded`: funds are captured, after a hosted-page\n  payment, `POST /payments/sale` or `PUT /payments/capture`. The\n  first payment on a subscription order is reported as\n  `subscription.created` instead.\n- `payment.failed`: a payment, authorisation, capture or void was\n  declined or errored.\n- `payment.voided`: an authorisation was voided with\n  `PUT /payments/void`.\n- `payment.abandoned`: a hosted-page order that never reached the card\n  processor was closed after an hour unpaid.\n- `payment.settled`: the captured payment was credited to your Dime\n  wallet, shortly after capture.\n\nOn `payment.failed`, `payload.transaction` carries `error_code` and\n`error_message`.\n\n**USD preference.** `payload.transaction.usd_preferred` is `true` when\nthe order opted in. That alone does not mean the payment was switched:\n`payload.transaction.usd_conversion` is an object when it was charged\nand settled in USD, and `null` when it stayed in the order currency.\nWhen it is set, `currency` and `amount` are the USD charge and\n`order.currency` and `order.total` are still what you asked for. Every\npayment event carries these fields, so you do not need to read the\ntransaction back.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/XDimeSignature"
          },
          {
            "$ref": "#/components/parameters/XDimeSignatureVersion"
          },
          {
            "$ref": "#/components/parameters/XDimeEventId"
          },
          {
            "$ref": "#/components/parameters/XDimeEventType"
          },
          {
            "$ref": "#/components/parameters/XDimeAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/PaymentWebhook"
              },
              "examples": {
                "succeeded": {
                  "summary": "Succeeded after a sale",
                  "value": {
                    "event_id": "evt_V1StGXR8Z5jdHi6BmyT2",
                    "event_type": "payment.succeeded",
                    "occurred_at": "2026-10-27T15:04:07.112Z",
                    "owner_type": "merchant",
                    "owner_id": "m82yalYupLIdpAz",
                    "addon_subscription_id": null,
                    "resource_type": "payment",
                    "resource_id": "txn_20261027_PBFpP02",
                    "payload": {
                      "transaction": {
                        "token": "txn_20261027_PBFpP02",
                        "status": "COMPLETE",
                        "amount": 1100,
                        "final_amount": 1100,
                        "currency": "JMD",
                        "authorized": true,
                        "captured": true,
                        "refunded": false,
                        "voided": false,
                        "settled": false,
                        "fees": null,
                        "error_code": null,
                        "error_message": null,
                        "reference_transaction_id": null,
                        "entity_type": "ORDER",
                        "entity_id": "ord_20261027_V1StGXR",
                        "customer_id": null,
                        "source_details": {
                          "last_four_digits": "4242",
                          "card_scheme": "visa",
                          "cardholder_name": "Jane Chen"
                        },
                        "order": {
                          "token": "ord_20261027_V1StGXR",
                          "status": "COMPLETE",
                          "currency": "JMD",
                          "subtotal": 1000,
                          "total": 1100,
                          "origin_id": "ac58293d-a2c5-4979-8ef7-f3d4a9354b63"
                        },
                        "createdAt": "2026-10-27T15:04:05.000Z",
                        "updatedAt": "2026-10-27T15:04:07.000Z"
                      }
                    },
                    "signature_version": "v1"
                  }
                },
                "succeededInUsd": {
                  "summary": "Succeeded, and switched to USD by USD preference",
                  "value": {
                    "event_id": "evt_Hk2pQ9xLm4ZtR7vB1cYd",
                    "event_type": "payment.succeeded",
                    "occurred_at": "2026-11-20T13:32:03.000Z",
                    "owner_type": "merchant",
                    "owner_id": "m82yalYupLIdpAz",
                    "addon_subscription_id": null,
                    "resource_type": "payment",
                    "resource_id": "txn_20261120_I0WYqXv",
                    "payload": {
                      "transaction": {
                        "token": "txn_20261120_I0WYqXv",
                        "status": "COMPLETE",
                        "amount": 112.83,
                        "currency": "USD",
                        "usd_preferred": true,
                        "usd_conversion": {
                          "applied": true,
                          "original_currency": "TTD",
                          "original_amount": 757.72,
                          "currency": "USD",
                          "amount": 112.83,
                          "fx_rate": 0.14890725
                        },
                        "entity_type": "ORDER",
                        "entity_id": "ord_20261120_b8WxnRM",
                        "order": {
                          "token": "ord_20261120_b8WxnRM",
                          "status": "COMPLETE",
                          "currency": "TTD",
                          "total": 757.72,
                          "usd_preferred": true
                        }
                      }
                    },
                    "signature_version": "v1"
                  }
                },
                "failed": {
                  "summary": "Failed after a declined sale",
                  "value": {
                    "event_id": "evt_q8Rz2LwX6vKtM3nP8aZb",
                    "event_type": "payment.failed",
                    "occurred_at": "2026-10-27T15:04:07.112Z",
                    "owner_type": "merchant",
                    "owner_id": "m82yalYupLIdpAz",
                    "addon_subscription_id": null,
                    "resource_type": "payment",
                    "resource_id": "txn_20261027_PBFpP02",
                    "payload": {
                      "transaction": {
                        "token": "txn_20261027_PBFpP02",
                        "status": "FAILED",
                        "amount": 1100,
                        "currency": "JMD",
                        "authorized": false,
                        "captured": false,
                        "error_code": "DECLINED",
                        "error_message": "Insufficient funds",
                        "entity_type": "ORDER",
                        "entity_id": "ord_20261027_V1StGXR",
                        "order": {
                          "token": "ord_20261027_V1StGXR",
                          "status": "PENDING"
                        }
                      }
                    },
                    "signature_version": "v1"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WebhookAck"
          }
        }
      }
    },
    "refundProcessed": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Refund processed",
        "operationId": "webhookRefundProcessed",
        "security": [],
        "description": "Sent when a full or partial refund of a payment on the order is\nrecorded, whether you refunded with `PUT /payments/refund` or from the\nDime dashboard.\n\n`payload.transaction` is the new refund transaction (`status`\n`PARTIAL_REFUND` or `REFUND`). `payload.refund` summarises it and\nnames the original in `transaction_id`.\n\nWhen the payment was switched to USD, the refund is in USD and\n`payload.transaction.usd_conversion` is set: `amount` is the refunded\nUSD amount and `original_amount` is that part in the original currency\nat the payment's rate.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/XDimeSignature"
          },
          {
            "$ref": "#/components/parameters/XDimeSignatureVersion"
          },
          {
            "$ref": "#/components/parameters/XDimeEventId"
          },
          {
            "$ref": "#/components/parameters/XDimeEventType"
          },
          {
            "$ref": "#/components/parameters/XDimeAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/RefundWebhook"
              },
              "examples": {
                "partial": {
                  "summary": "A 500 JMD partial refund of a 1100 JMD sale",
                  "value": {
                    "event_id": "evt_3fTq9XbL1mZr7wVc2Hn0",
                    "event_type": "refund.processed",
                    "occurred_at": "2026-10-27T16:20:31.481Z",
                    "owner_type": "merchant",
                    "owner_id": "m82yalYupLIdpAz",
                    "addon_subscription_id": null,
                    "resource_type": "refund",
                    "resource_id": "txn_20261027_3CqXuOw",
                    "payload": {
                      "transaction": {
                        "token": "txn_20261027_3CqXuOw",
                        "status": "PARTIAL_REFUND",
                        "amount": 500,
                        "currency": "JMD",
                        "refunded": true,
                        "reference_transaction_id": "txn_20261027_PBFpP02",
                        "entity_type": "ORDER",
                        "entity_id": "ord_20261027_V1StGXR",
                        "order": {
                          "token": "ord_20261027_V1StGXR",
                          "status": "COMPLETE"
                        }
                      },
                      "refund": {
                        "refund_id": "txn_20261027_3CqXuOw",
                        "transaction_id": "txn_20261027_PBFpP02",
                        "amount": 500,
                        "currency": "JMD",
                        "fully_refunded": false,
                        "subscription_id": null
                      }
                    },
                    "signature_version": "v1"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WebhookAck"
          }
        }
      }
    },
    "chargebackEvent": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Chargeback events",
        "operationId": "webhookChargebackEvent",
        "security": [],
        "description": "Sent each time a chargeback against a payment on the order changes\nstatus.\n\n- `chargeback.created`: a chargeback was raised. `previous_status` is\n  `null`.\n- `chargeback.under_review`: you disputed it with\n  `PUT /chargebacks/{token}/dispute`.\n- `chargeback.represented`: your dispute was sent to the card network.\n- `chargeback.won`: the dispute was won; the amount and fee are\n  returned to you.\n- `chargeback.lost`: the dispute was lost.\n- `chargeback.accepted`: you accepted it, or the response window closed\n  without a dispute.\n\nA chargeback whose window closes is marked `ACCEPTED` the next time it\nis read, so `chargeback.accepted` for a missed deadline can arrive\nafter the deadline itself; `dispute_deadline` on the chargeback is\nthe date that counts.\n\nNotes, evidence files and the customer's contact details are left out.\nRetrieve the chargeback by `token` for those, and for the disputed\ntransaction's `transaction_token`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/XDimeSignature"
          },
          {
            "$ref": "#/components/parameters/XDimeSignatureVersion"
          },
          {
            "$ref": "#/components/parameters/XDimeEventId"
          },
          {
            "$ref": "#/components/parameters/XDimeEventType"
          },
          {
            "$ref": "#/components/parameters/XDimeAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/ChargebackWebhook"
              },
              "examples": {
                "created": {
                  "summary": "New chargeback",
                  "value": {
                    "event_id": "evt_8kQ2pjmnNMXqG0Ewxdo1",
                    "event_type": "chargeback.created",
                    "occurred_at": "2026-10-27T14:03:12.481Z",
                    "owner_type": "merchant",
                    "owner_id": "m82yalYupLIdpAz",
                    "addon_subscription_id": null,
                    "resource_type": "chargeback",
                    "resource_id": "chb_KfDdVMbE_xOCOU6Kj_YlmeI4S5_kgpSOvk",
                    "payload": {
                      "chargeback": {
                        "token": "chb_KfDdVMbE_xOCOU6Kj_YlmeI4S5_kgpSOvk",
                        "status": "RECEIVED",
                        "previous_status": null,
                        "reason_code": "PRODUCT_NOT_RECEIVED",
                        "source": "CARD",
                        "currency": "JMD",
                        "amount": 1100,
                        "transaction_id": "txn_20261027_PBFpP02",
                        "transaction_display_id": "ord_20261027_V1StGXR",
                        "order_id": "ord_20261027_V1StGXR",
                        "customer_id": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW",
                        "received_at": "2026-10-27T14:03:12.000Z",
                        "responded_at": null,
                        "resolution_date": null
                      }
                    },
                    "signature_version": "v1"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WebhookAck"
          }
        }
      }
    },
    "cardRequestEvent": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Card tokenization events",
        "operationId": "webhookCardRequestEvent",
        "security": [],
        "description": "Sent as the customer completes, or fails to complete, the hosted card\npage, and when you delete the stored card.\n\n- `card_request.card_saved`: sent only when the customer's bank asks\n  for a 3-D Secure check while the card is saved. Most cards skip\n  that check, so you may not receive it; do not wait for it. The card\n  cannot be charged until `card_request.succeeded`.\n- `card_request.succeeded`: the customer confirmed the micro-charge\n  amount. `payload.card.token` is the card token to charge with.\n- `card_request.failed`: the card could not be saved, or the\n  micro-charge amount was wrong three times. The request is closed;\n  open a new one.\n- `card_request.card_deleted`: `DELETE /cards/{token}` deleted the\n  stored card. `payload.card` is the card as it was just before the\n  delete; its token can no longer be charged.\n\nThe payloads differ by event; see the examples.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/XDimeSignature"
          },
          {
            "$ref": "#/components/parameters/XDimeSignatureVersion"
          },
          {
            "$ref": "#/components/parameters/XDimeEventId"
          },
          {
            "$ref": "#/components/parameters/XDimeEventType"
          },
          {
            "$ref": "#/components/parameters/XDimeAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CardRequestWebhook"
              },
              "examples": {
                "cardSaved": {
                  "summary": "Card saved, verification next",
                  "value": {
                    "event_id": "evt_c4Rd5aV3dQx8LmN2pK7t",
                    "event_type": "card_request.card_saved",
                    "occurred_at": "2026-10-27T15:01:44.118Z",
                    "owner_type": "merchant",
                    "owner_id": "m82yalYupLIdpAz",
                    "addon_subscription_id": null,
                    "resource_type": "card_request",
                    "resource_id": "crq_lnM3xzwx_nFcWA9XR_bVWBl76P_slIlKTM",
                    "payload": {
                      "token": "crd_lYW5MOH2_omvDipze_0iG9s67K_hUwjeHr",
                      "card_request_token": "crq_lnM3xzwx_nFcWA9XR_bVWBl76P_slIlKTM",
                      "reference_id": "your-reference-1024",
                      "card_expiry": "12/29",
                      "card_scheme": "visa",
                      "currency": "USD",
                      "last_four_digits": "4242",
                      "metadata": {
                        "type": "API",
                        "api_version": "v2",
                        "reference_id": "your-reference-1024",
                        "webhook_url": "https://example.com/hooks/card",
                        "return_url": "https://example.com/done"
                      }
                    },
                    "signature_version": "v1"
                  }
                },
                "succeeded": {
                  "summary": "Verified; the card can be charged",
                  "value": {
                    "event_id": "evt_9vT2wQe7RmX4bNc1LsK8",
                    "event_type": "card_request.succeeded",
                    "occurred_at": "2026-10-27T15:03:02.551Z",
                    "owner_type": "merchant",
                    "owner_id": "m82yalYupLIdpAz",
                    "addon_subscription_id": null,
                    "resource_type": "card_request",
                    "resource_id": "crq_lnM3xzwx_nFcWA9XR_bVWBl76P_slIlKTM",
                    "payload": {
                      "card": {
                        "token": "crd_lYW5MOH2_omvDipze_0iG9s67K_hUwjeHr",
                        "status": "SUCCESS",
                        "currency": "USD",
                        "verification_attempts": 1,
                        "last_four_digits": "4242",
                        "card_scheme": "visa",
                        "card_expiry": "12/29",
                        "expired": true,
                        "cardholder_name": "Jane Chen",
                        "metadata": {
                          "type": "API",
                          "api_version": "v2",
                          "reference_id": "your-reference-1024"
                        }
                      }
                    },
                    "signature_version": "v1"
                  }
                },
                "failedVerification": {
                  "summary": "Wrong amount three times",
                  "value": {
                    "event_id": "evt_Hq3nB8xZ2kW6vR1tYp4m",
                    "event_type": "card_request.failed",
                    "occurred_at": "2026-10-27T15:05:19.002Z",
                    "owner_type": "merchant",
                    "owner_id": "m82yalYupLIdpAz",
                    "addon_subscription_id": null,
                    "resource_type": "card_request",
                    "resource_id": "crq_lnM3xzwx_nFcWA9XR_bVWBl76P_slIlKTM",
                    "payload": {
                      "token": "crq_lnM3xzwx_nFcWA9XR_bVWBl76P_slIlKTM",
                      "verification_attempts": 4,
                      "status": "FAILED",
                      "expired": true
                    },
                    "signature_version": "v1"
                  }
                },
                "failedSave": {
                  "summary": "The card could not be saved",
                  "value": {
                    "event_id": "evt_Zp7mK2qW9xL4cR8vN1tB",
                    "event_type": "card_request.failed",
                    "occurred_at": "2026-10-27T15:01:44.118Z",
                    "owner_type": "merchant",
                    "owner_id": "m82yalYupLIdpAz",
                    "addon_subscription_id": null,
                    "resource_type": "card_request",
                    "resource_id": "crq_lnM3xzwx_nFcWA9XR_bVWBl76P_slIlKTM",
                    "payload": {
                      "card_request_token": "crq_lnM3xzwx_nFcWA9XR_bVWBl76P_slIlKTM",
                      "reference_id": "your-reference-1024"
                    },
                    "signature_version": "v1"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WebhookAck"
          }
        }
      }
    },
    "subscriptionEvent": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Subscription events",
        "operationId": "webhookSubscriptionEvent",
        "security": [],
        "description": "Sent for a subscription created from an order through this API, when\nit is created, each time it renews, and each time its status changes.\n\n- `subscription.created`: the first payment succeeded and the\n  subscription was set up. This is the event for that first payment;\n  `payload.transaction` is the payment.\n- `subscription.renewed`: a renewal charge succeeded.\n  `payload.transaction` is the payment, `payload.invoice` is the\n  invoice it paid, and `payload.subscription.next_billing_date` is the\n  next charge. A renewal that fails sends `subscription.past_due`\n  instead.\n- `subscription.paused`: billing was paused. Also sent by\n  `PUT /subscriptions/pause`, which skips the next charge.\n- `subscription.resumed`: billing was resumed.\n- `subscription.cancelled`: the subscription was cancelled.\n- `subscription.past_due`: a charge failed and the subscription is\n  past due.\n\nEvery subscription event carries the subscription's current state in\n`payload.subscription` and a `payload.message`: `SUBSCRIPTION_CREATED`,\n`SUBSCRIPTION_RENEWED` or `SUBSCRIPTION_STATUS_CHANGED`, and a\npayment on the subscription in `payload.transaction`.\n`subscription.renewed` also carries `payload.invoice`, since a\nrenewal is billed as an invoice.\n\nSkipping a charge with `PUT /subscriptions/pause` sends\n`subscription.paused` but does not change the subscription's\n`status`; `payload.subscription.pause_next_period` is `true`\ninstead.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/XDimeSignature"
          },
          {
            "$ref": "#/components/parameters/XDimeSignatureVersion"
          },
          {
            "$ref": "#/components/parameters/XDimeEventId"
          },
          {
            "$ref": "#/components/parameters/XDimeEventType"
          },
          {
            "$ref": "#/components/parameters/XDimeAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SubscriptionWebhook"
              },
              "examples": {
                "paused": {
                  "summary": "Paused from the dashboard",
                  "value": {
                    "event_id": "evt_Lm4pQ8rT2vX6zB1nC9kW",
                    "event_type": "subscription.paused",
                    "occurred_at": "2026-10-27T18:12:40.330Z",
                    "owner_type": "merchant",
                    "owner_id": "m82yalYupLIdpAz",
                    "addon_subscription_id": null,
                    "resource_type": "subscription",
                    "resource_id": "sub_pESz9qv3_M4rhjWUy_KMaAVBqb_XyCKvmZ",
                    "payload": {
                      "message": "SUBSCRIPTION_STATUS_CHANGED",
                      "subscription": {
                        "token": "sub_pESz9qv3_M4rhjWUy_KMaAVBqb_XyCKvmZ",
                        "order_id": "ord_20261027_V1StGXR",
                        "status": "PAUSED",
                        "billing_status": "PAUSED",
                        "billing_period_unit": "M",
                        "billing_period_length": 1,
                        "billing_cycles": 11,
                        "currency": "JMD",
                        "amount": 1100,
                        "next_billing_date": "2026-11-27T00:00:00.000Z",
                        "cancel_at_period_end": false,
                        "pause_next_period": false
                      },
                      "transaction": {
                        "token": "txn_20261027_PBFpP02",
                        "status": "COMPLETE",
                        "amount": 1100,
                        "currency": "JMD"
                      }
                    },
                    "signature_version": "v1"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WebhookAck"
          }
        }
      }
    },
    "customerEvent": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Customer events",
        "operationId": "webhookCustomerEvent",
        "security": [],
        "description": "Sent when a customer record changes.\n\n- `customer.created`: a customer was created with `POST /customers`,\n  or by an order or charge that named a new billing or shipping\n  person.\n- `customer.updated`: `PUT /customers/{token}`.\n- `customer.deleted`: `DELETE /customers/{token}`.\n\n`payload.order_id` is the `token` of the order that created the\ncustomer, or `null`.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/XDimeSignature"
          },
          {
            "$ref": "#/components/parameters/XDimeSignatureVersion"
          },
          {
            "$ref": "#/components/parameters/XDimeEventId"
          },
          {
            "$ref": "#/components/parameters/XDimeEventType"
          },
          {
            "$ref": "#/components/parameters/XDimeAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/CustomerWebhook"
              },
              "examples": {
                "created": {
                  "summary": "Created by an order",
                  "value": {
                    "event_id": "evt_Cq7wE2rT9yU4iO1pA6sD",
                    "event_type": "customer.created",
                    "occurred_at": "2026-10-27T15:04:05.300Z",
                    "owner_type": "merchant",
                    "owner_id": "m82yalYupLIdpAz",
                    "addon_subscription_id": null,
                    "resource_type": "customer",
                    "resource_id": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW",
                    "payload": {
                      "order_id": "ord_20261027_V1StGXR",
                      "customer": {
                        "token": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW",
                        "first_name": "Michael",
                        "last_name": "Scott",
                        "email": "mscott@example.com",
                        "phone": "+18765551234",
                        "company": null,
                        "billing_address_street": "555 Lackawanna Ave",
                        "billing_address_city": "Scranton",
                        "billing_address_state": "Pennsylvania",
                        "billing_address_postal_code": "18508",
                        "billing_address_country": "United States",
                        "shipping_address_street": null,
                        "shipping_address_city": null,
                        "shipping_address_state": null,
                        "shipping_address_postal_code": null,
                        "shipping_address_country": null,
                        "custom_attributes": null,
                        "is_active": true,
                        "created_at": "2026-10-27T15:04:05.000Z"
                      }
                    },
                    "signature_version": "v1"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WebhookAck"
          }
        }
      }
    },
    "invoiceEvent": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Invoice events",
        "operationId": "webhookInvoiceEvent",
        "security": [],
        "description": "Sent when an invoice is created or deleted through this API.\n\n- `invoice.created`: `POST /invoices`. `payload.invoice` is the\n  invoice the request returned.\n- `invoice.deleted`: `DELETE /invoices/{token}` deleted an unpaid or\n  overdue invoice. `payload.invoice` is the invoice as it was just\n  before it was deleted.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/XDimeSignature"
          },
          {
            "$ref": "#/components/parameters/XDimeSignatureVersion"
          },
          {
            "$ref": "#/components/parameters/XDimeEventId"
          },
          {
            "$ref": "#/components/parameters/XDimeEventType"
          },
          {
            "$ref": "#/components/parameters/XDimeAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/InvoiceWebhook"
              },
              "examples": {
                "deleted": {
                  "summary": "Deleted through the API",
                  "value": {
                    "event_id": "evt_Hn3kD8sQ1wZ5xV7bM2pL",
                    "event_type": "invoice.deleted",
                    "occurred_at": "2026-10-29T19:45:12.210Z",
                    "owner_type": "merchant",
                    "owner_id": "m82yalYupLIdpAz",
                    "addon_subscription_id": null,
                    "resource_type": "invoice",
                    "resource_id": "inv_20260825_giodwK2",
                    "payload": {
                      "invoice": {
                        "object": "invoice",
                        "number": "INV-25082026-0007",
                        "token": "inv_20260825_giodwK2",
                        "status": "UNPAID",
                        "currency": "JMD",
                        "total": 5000,
                        "customer": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW",
                        "due_date": "2026-11-10T00:00:00.000Z"
                      }
                    },
                    "signature_version": "v1"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WebhookAck"
          }
        }
      }
    },
    "bridgeEvent": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Dime Bridge events",
        "operationId": "webhookBridgeEvent",
        "security": [],
        "description": "Sent to the marketplace as its Bridge requests, linked merchants and\ntransfers change.\n\n- `bridge_request.created`, `.approved`, `.declined`, `.cancelled`,\n  `.expired`: `payload.bridge_request`.\n- `bridge_merchant.activated`, `.updated`, `.revoked`:\n  `payload.bridge_merchant`. `activated` follows\n  `bridge_request.approved`. `updated` is sent when Dime approves a\n  newly registered linked merchant and `payments_enabled` becomes\n  `true`.\n- `bridge_transfer.created`, `.failed`: `payload.bridge_transfer`.\n  `created` is sent once the money has moved (status `complete`).\n- `bridge_transfer.reversed`: `payload.bridge_transfer_reversal` and\n  `payload.bridge_transfer` (with `amount_reversed`). Sent for every\n  reversal, partial or full, once its money has moved.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/XDimeSignature"
          },
          {
            "$ref": "#/components/parameters/XDimeSignatureVersion"
          },
          {
            "$ref": "#/components/parameters/XDimeEventId"
          },
          {
            "$ref": "#/components/parameters/XDimeEventType"
          },
          {
            "$ref": "#/components/parameters/XDimeAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BridgeWebhook"
              },
              "examples": {
                "activated": {
                  "summary": "A merchant approved the link",
                  "value": {
                    "event_id": "evt_Q8nM2rT5vX1zB4cF7hJ0",
                    "event_type": "bridge_merchant.activated",
                    "occurred_at": "2026-11-11T15:20:00.412Z",
                    "owner_type": "merchant",
                    "owner_id": "m82yalYupLIdpAz",
                    "addon_subscription_id": null,
                    "resource_type": "bridge_merchant",
                    "resource_id": "brm_9CKxgfQk_jDKOHNVm_H8696T87_2alsOAP",
                    "payload": {
                      "bridge_merchant": {
                        "token": "brm_9CKxgfQk_jDKOHNVm_H8696T87_2alsOAP",
                        "object": "bridge_merchant",
                        "account_type": "standard",
                        "status": "active",
                        "capabilities": {
                          "payments": true,
                          "transfers": true
                        },
                        "payments_enabled": true,
                        "merchant": {
                          "business_name": "Jane's Store",
                          "logo_url": null,
                          "country": "JM"
                        },
                        "bridge_request": "brq_ksV-MbRi_uWgDF4iD_jNf6oBHl_PIq3pl8",
                        "approved_at": "2026-11-11T15:20:00.000Z",
                        "revoked_at": null,
                        "revoked_by": null,
                        "metadata": null,
                        "created_at": "2026-11-11T15:20:00.000Z"
                      }
                    },
                    "signature_version": "v1"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WebhookAck"
          }
        }
      }
    },
    "bankTransferEvent": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Bank transfer events",
        "operationId": "webhookBankTransferEvent",
        "security": [],
        "description": "Sent as a bank transfer moves through Dime's approval, however it was\nsent (this API or the Dime dashboard).\n\n- `bank_transfer.created`: the transfer was created and is waiting\n  for Dime's approval. The amount plus fee has left the wallet.\n- `bank_transfer.approved`: Dime approved it and the funds were sent\n  to the bank account.\n- `bank_transfer.rejected`: Dime rejected it. The amount plus fee is\n  returned to the wallet, and `rejection_reason` says why.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/XDimeSignature"
          },
          {
            "$ref": "#/components/parameters/XDimeSignatureVersion"
          },
          {
            "$ref": "#/components/parameters/XDimeEventId"
          },
          {
            "$ref": "#/components/parameters/XDimeEventType"
          },
          {
            "$ref": "#/components/parameters/XDimeAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BankTransferWebhook"
              },
              "examples": {
                "approved": {
                  "summary": "Approved by Dime",
                  "value": {
                    "event_id": "evt_Kq7rB2mN5xW8zT1vC4dP",
                    "event_type": "bank_transfer.approved",
                    "occurred_at": "2026-11-04T18:20:41.002Z",
                    "owner_type": "merchant",
                    "owner_id": "m82yalYupLIdpAz",
                    "addon_subscription_id": null,
                    "resource_type": "bank_transfer",
                    "resource_id": "btf_zxjtBCUY_83nlZ4Wq_p6v0JBtV_nsPOe7P",
                    "payload": {
                      "bank_transfer": {
                        "object": "bank_transfer",
                        "token": "btf_zxjtBCUY_83nlZ4Wq_p6v0JBtV_nsPOe7P",
                        "status": "approved",
                        "amount": 25000,
                        "fee": 150,
                        "currency": "JMD",
                        "destination_amount": 25000,
                        "destination_currency": "JMD",
                        "transfer_method": "STANDARD",
                        "reason": "Supplier payment",
                        "bank_account": "bac_bEBGGWJo_uNjJq3b1_TSr6c0SS_vvKx2VI",
                        "rejection_reason": null,
                        "created_at": "2026-11-04T15:02:10.512Z",
                        "decided_at": "2026-11-04T18:20:40.871Z"
                      }
                    },
                    "signature_version": "v1"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WebhookAck"
          }
        }
      }
    },
    "bankAccountEvent": {
      "post": {
        "tags": [
          "Webhooks"
        ],
        "summary": "Bank account events",
        "operationId": "webhookBankAccountEvent",
        "security": [],
        "description": "Sent when one of your saved bank accounts is added, changed or\nremoved, however it was done (this API or the Dime dashboard). Use\nthese as an alert: an account you did not add is a sign your key may\nbe compromised.\n\n- `bank_account.created`: a bank account was added.\n- `bank_account.updated`: a bank account's details changed.\n- `bank_account.deleted`: a bank account was removed.\n  `payload.bank_account` is the account as it was just before.\n",
        "parameters": [
          {
            "$ref": "#/components/parameters/XDimeSignature"
          },
          {
            "$ref": "#/components/parameters/XDimeSignatureVersion"
          },
          {
            "$ref": "#/components/parameters/XDimeEventId"
          },
          {
            "$ref": "#/components/parameters/XDimeEventType"
          },
          {
            "$ref": "#/components/parameters/XDimeAttempt"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/BankAccountWebhook"
              },
              "examples": {
                "created": {
                  "summary": "A bank account was added",
                  "value": {
                    "event_id": "evt_Pz4wR9cT2yH6nJ8kL1sF",
                    "event_type": "bank_account.created",
                    "occurred_at": "2026-11-04T14:55:03.300Z",
                    "owner_type": "merchant",
                    "owner_id": "m82yalYupLIdpAz",
                    "addon_subscription_id": null,
                    "resource_type": "bank_account",
                    "resource_id": "bac_bEBGGWJo_uNjJq3b1_TSr6c0SS_vvKx2VI",
                    "payload": {
                      "bank_account": {
                        "object": "bank_account",
                        "token": "bac_bEBGGWJo_uNjJq3b1_TSr6c0SS_vvKx2VI",
                        "recipient_bank_details": {
                          "recipient_bank_name": "NCB",
                          "recipient_bank_account_name": "Jane Chen",
                          "recipient_bank_last_four_digits": "4821",
                          "recipient_bank_currency": "JMD"
                        },
                        "last_activity_at": null,
                        "created_at": "2026-11-04T14:55:03.120Z",
                        "updated_at": "2026-11-04T14:55:03.120Z"
                      }
                    },
                    "signature_version": "v1"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "$ref": "#/components/responses/WebhookAck"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "ClientKey": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Dime-Client",
        "description": "Your client key (`ck_…`). Use a sandbox key when testing. Sent together with the secret key."
      },
      "SecretKey": {
        "type": "http",
        "scheme": "bearer",
        "description": "The secret key (`sk_…`) that belongs to your client key, sent as\n`Authorization: Bearer sk_…`. Server-side only: never put it in a\nbrowser, mobile app or source control.\n"
      }
    },
    "parameters": {
      "Limit": {
        "name": "limit",
        "in": "query",
        "required": false,
        "description": "How many records to return, 1–100.",
        "schema": {
          "type": "integer",
          "minimum": 1,
          "maximum": 100,
          "default": 10
        }
      },
      "StartingAfter": {
        "name": "starting_after",
        "in": "query",
        "required": false,
        "description": "Return records after this one. Pass the `token` of the last record on\nthe previous page to walk forward.\n",
        "schema": {
          "type": "string"
        }
      },
      "EndingBefore": {
        "name": "ending_before",
        "in": "query",
        "required": false,
        "description": "Return records before this one, to walk backward. Pass the `token` of\nthe first record on the page you have.\n",
        "schema": {
          "type": "string"
        }
      },
      "CustomerToken": {
        "name": "token",
        "in": "path",
        "required": true,
        "description": "The customer's `token`, from create or list.",
        "schema": {
          "type": "string"
        },
        "example": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW"
      },
      "ProductToken": {
        "name": "token",
        "in": "path",
        "required": true,
        "description": "The product's `token`, from create or list.",
        "schema": {
          "type": "string"
        },
        "example": "prd_DbCYbcS3_OcTRL1Cd_e9nJdatU_HYypKhE"
      },
      "CategoryToken": {
        "name": "token",
        "in": "path",
        "required": true,
        "description": "The category's `token`, from create or list.",
        "schema": {
          "type": "string"
        },
        "example": "cat_OwnPgze7_HExqHIKA_LjAgZ9oA_ThPBbj3"
      },
      "ProductToken-2": {
        "name": "token",
        "in": "path",
        "required": true,
        "description": "The product's `token`.",
        "schema": {
          "type": "string"
        },
        "example": "prd_DbCYbcS3_OcTRL1Cd_e9nJdatU_HYypKhE"
      },
      "CategoryTokenInPath": {
        "name": "category_token",
        "in": "path",
        "required": true,
        "description": "The category's `token`.",
        "schema": {
          "type": "string"
        },
        "example": "cat_OwnPgze7_HExqHIKA_LjAgZ9oA_ThPBbj3"
      },
      "PaymentLinkToken": {
        "name": "token",
        "in": "path",
        "required": true,
        "description": "The payment link's `token`, from create or list.",
        "schema": {
          "type": "string"
        },
        "example": "lnk_7r4tCdfd_YVEuIERD_R0161dfg_I2SyiOP"
      },
      "CardRequestToken": {
        "name": "token",
        "in": "path",
        "required": true,
        "description": "The tokenization request's `token`, not the card token.",
        "schema": {
          "type": "string"
        },
        "example": "crq_lnM3xzwx_nFcWA9XR_bVWBl76P_slIlKTM"
      },
      "ChargebackToken": {
        "name": "token",
        "in": "path",
        "required": true,
        "description": "The chargeback's `token`, as returned on the resource.",
        "schema": {
          "type": "string",
          "pattern": "^ch"
        },
        "example": "chb_KfDdVMbE_xOCOU6Kj_YlmeI4S5_kgpSOvk"
      },
      "StartingAfterRequest": {
        "name": "starting_after",
        "in": "query",
        "description": "The `token` of the last request on the previous page.",
        "schema": {
          "type": "string"
        }
      },
      "EndingBeforeRequest": {
        "name": "ending_before",
        "in": "query",
        "description": "The `token` of the first request on the page you have.",
        "schema": {
          "type": "string"
        }
      },
      "RequestId": {
        "name": "token",
        "in": "path",
        "required": true,
        "description": "The Bridge request's `token`.",
        "schema": {
          "type": "string"
        },
        "example": "brq_ksV-MbRi_uWgDF4iD_jNf6oBHl_PIq3pl8"
      },
      "StartingAfterMerchant": {
        "name": "starting_after",
        "in": "query",
        "description": "The `token` of the last linked merchant on the previous page.",
        "schema": {
          "type": "string"
        }
      },
      "EndingBeforeMerchant": {
        "name": "ending_before",
        "in": "query",
        "description": "The `token` of the first linked merchant on the page you have.",
        "schema": {
          "type": "string"
        }
      },
      "BridgeMerchantId": {
        "name": "token",
        "in": "path",
        "required": true,
        "description": "The linked merchant's `token`.",
        "schema": {
          "type": "string"
        },
        "example": "brm_9CKxgfQk_jDKOHNVm_H8696T87_2alsOAP"
      },
      "StartingAfterTransfer": {
        "name": "starting_after",
        "in": "query",
        "description": "The `token` of the last transfer on the previous page.",
        "schema": {
          "type": "string"
        }
      },
      "EndingBeforeTransfer": {
        "name": "ending_before",
        "in": "query",
        "description": "The `token` of the first transfer on the page you have.",
        "schema": {
          "type": "string"
        }
      },
      "WebhookEndpointId": {
        "name": "token",
        "in": "path",
        "required": true,
        "description": "The endpoint's `token`.",
        "schema": {
          "type": "string",
          "pattern": "^hep"
        },
        "example": "hep_kBXRfasu_Ard5VWhe_xECb9iAV_IyX1JdD"
      },
      "WebhookEventId": {
        "name": "token",
        "in": "path",
        "required": true,
        "description": "The event's `token`, not its `event_id`.",
        "schema": {
          "type": "string",
          "pattern": "^whe"
        },
        "example": "whe_W2uMzOzd_QxAOG0la_PjxFZOhI_ryYAE1l"
      },
      "XDimeSignature": {
        "name": "X-Dime-Signature",
        "in": "header",
        "required": true,
        "description": "`v1=` followed by the hex HMAC-SHA256 of the raw body, keyed with the endpoint's `signing_secret`.",
        "schema": {
          "type": "string"
        },
        "example": "v1=5f2b8c0e9a7d4c1b3e6f8a2d4c6e8b0a1c3e5f7a9b2d4f6a8c0e2b4d6f8a0c2e"
      },
      "XDimeSignatureVersion": {
        "name": "X-Dime-Signature-Version",
        "in": "header",
        "required": true,
        "description": "Signing scheme. Always `v1`.",
        "schema": {
          "type": "string",
          "const": "v1"
        },
        "example": "v1"
      },
      "XDimeEventId": {
        "name": "X-Dime-Event-Id",
        "in": "header",
        "required": true,
        "description": "The body's `event_id`.",
        "schema": {
          "type": "string"
        },
        "example": "evt_V1StGXR8Z5jdHi6BmyT2"
      },
      "XDimeEventType": {
        "name": "X-Dime-Event-Type",
        "in": "header",
        "required": true,
        "description": "The body's `event_type`.",
        "schema": {
          "type": "string"
        },
        "example": "payment.succeeded"
      },
      "XDimeAttempt": {
        "name": "X-Dime-Attempt",
        "in": "header",
        "required": true,
        "description": "The attempt number, `1` for the first and up to `9` with retries.",
        "schema": {
          "type": "string"
        },
        "example": "1"
      }
    },
    "schemas": {
      "Currency": {
        "type": "string",
        "enum": [
          "USD",
          "JMD",
          "GBP",
          "EUR",
          "TTD",
          "BBD",
          "XCD",
          "GYD",
          "SRD"
        ],
        "example": "JMD"
      },
      "ListEnvelope": {
        "type": "object",
        "description": "Lists are cursor-paginated. There is no total count: `has_more`\nreports whether another page exists.\n",
        "required": [
          "object",
          "data",
          "has_more"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list",
            "example": "list"
          },
          "data": {
            "type": "array",
            "items": {}
          },
          "has_more": {
            "type": "boolean",
            "example": true
          }
        }
      },
      "OrderSubscription": {
        "type": "object",
        "properties": {
          "frequency": {
            "type": "string",
            "enum": [
              "WEEKLY",
              "MONTHLY",
              "YEARLY"
            ],
            "example": "WEEKLY"
          },
          "billing_cycles": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Charges remaining after this order. `null` when it runs until cancelled.",
            "example": 11
          },
          "end_type": {
            "type": "string",
            "enum": [
              "CANCEL",
              "CYCLE"
            ],
            "description": "`CANCEL` runs until cancelled; `CYCLE` stops after `billing_cycles`.",
            "example": "CANCEL"
          }
        }
      },
      "LineItem": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string",
            "example": "Sample Item"
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ],
            "example": "3f8a1e02-9c4d-4b71-a5e3-6d2f0b8c7a19"
          },
          "sku": {
            "type": [
              "string",
              "null"
            ],
            "example": "SAMPLE"
          },
          "quantity": {
            "type": "integer",
            "example": 1
          },
          "unit_amount": {
            "type": "number",
            "example": 1100
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "example": "A short description."
          },
          "image_url": {
            "type": [
              "string",
              "null"
            ],
            "example": "https://example.com/item.png"
          }
        }
      },
      "BridgeBreakdown": {
        "type": [
          "object",
          "null"
        ],
        "description": "Dime Bridge breakdown. `null` when the payment is not a Bridge payment.\nEstimated when the payment is created; the actual figures replace the\nestimate when the payment settles.\n",
        "properties": {
          "destination": {
            "type": [
              "string",
              "null"
            ],
            "description": "The linked merchant's `token`.",
            "example": "brm_9CKxgfQk_jDKOHNVm_H8696T87_2alsOAP"
          },
          "merchant_of_record": {
            "type": "string",
            "enum": [
              "marketplace",
              "linked_merchant"
            ],
            "example": "marketplace"
          },
          "fee": {
            "type": [
              "number",
              "null"
            ],
            "example": 10
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "example": null
          },
          "linked_amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "What the linked merchant receives.",
            "example": 90
          },
          "marketplace_net": {
            "type": [
              "number",
              "null"
            ],
            "description": "What you receive.",
            "example": 6.8
          },
          "dime_fee": {
            "type": [
              "number",
              "null"
            ],
            "description": "Dime's processing fee on the whole charge.",
            "example": 3.2
          },
          "refunds": {
            "type": [
              "object",
              "null"
            ],
            "description": "Running totals of refunds on this payment. Updated when each\nrefund's ledger entries are recorded, usually within 15 seconds.\n",
            "properties": {
              "refunded_total": {
                "type": "number",
                "example": 40
              },
              "linked_debited": {
                "type": "number",
                "description": "Taken from the linked merchant's wallet.",
                "example": 36
              },
              "marketplace_debited": {
                "type": "number",
                "description": "Taken from your wallet.",
                "example": 4
              },
              "fees_returned": {
                "type": "number",
                "description": "Processing fees Dime and the bank returned. Fees are returned when the payment is fully refunded.",
                "example": 0
              }
            }
          },
          "role": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "marketplace_fee",
              "linked_payout",
              "counterparty_refund",
              null
            ],
            "description": "Set on the fee or payout transaction recorded at settlement for\nthe other party's share (`marketplace_fee`, `linked_payout`), and\non the other party's refund transaction when it pays part of a\nrefund or the refund fee (`counterparty_refund`). `null` on the\nmain payment. Refunding a fee or payout transaction refunds the\nmain payment it belongs to (`amount` is the customer refund\namount); these rows cannot be captured or voided on their own.\n",
            "example": null
          },
          "parent_transaction_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "On a fee or payout transaction, the main payment's `token`.",
            "example": null
          },
          "parent_order_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "On a fee or payout order, the main order's `token`.",
            "example": null
          }
        }
      },
      "Order": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "order",
            "example": "order"
          },
          "token": {
            "type": "string",
            "description": "Identifies the order. Used in the checkout URL and wherever a\nrequest or response refers to this order.\n",
            "example": "ord_20261027_V1StGXR"
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "COMPLETE",
              "FAILED",
              "CANCELLED"
            ],
            "example": "PENDING"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "settlement_country": {
            "type": [
              "string",
              "null"
            ],
            "description": "Country the payment settles in, as a country name. Null means the merchant's own country.",
            "example": "Trinidad and Tobago"
          },
          "subtotal": {
            "type": "number",
            "example": 1000
          },
          "total": {
            "type": "number",
            "example": 1100
          },
          "tax": {
            "type": [
              "number",
              "null"
            ],
            "example": 100
          },
          "shipping": {
            "type": [
              "number",
              "null"
            ],
            "example": 0
          },
          "tip": {
            "type": [
              "number",
              "null"
            ],
            "example": 0
          },
          "email": {
            "type": [
              "string",
              "null"
            ],
            "example": "buyer@example.com"
          },
          "customer": {
            "type": [
              "string",
              "null"
            ],
            "description": "The attached customer's `token`, when there is one.",
            "example": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "example": "example"
          },
          "fulfilled": {
            "type": "boolean",
            "example": true
          },
          "recurring": {
            "type": "boolean",
            "example": true
          },
          "subscription": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/OrderSubscription"
              },
              {
                "type": "null"
              }
            ]
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/LineItem"
            }
          },
          "reference": {
            "type": [
              "string",
              "null"
            ],
            "description": "The `id` you sent when creating the order.",
            "example": "3f8a1e02-9c4d-4b71-a5e3-6d2f0b8c7a19"
          },
          "checkout_url": {
            "type": [
              "string",
              "null"
            ],
            "format": "uri",
            "description": "Your cart URL, echoed from the `checkoutUrl` you sent. If you did\nnot send one, `POST /orders` returns the Dime payment page here,\nand `GET /orders` and `GET /orders/{token}` return `null`.\n\nDo not use this field to send the buyer to pay. The payment page\nis always `https://pay.dimepay.app/e-order/{token}` (sandbox:\n`https://pay.sandbox.dimepay.app/e-order/{token}`).\n",
            "example": "https://pay.sandbox.dimepay.app/e-order/ord_20261027_V1StGXR"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "description": "The key-value data you sent as `metadata` (or `details`) when the\norder was created. `{}` when you sent none.\n",
            "example": {
              "cart_id": "cart_8812",
              "channel": "web"
            }
          },
          "bridge": {
            "$ref": "#/components/schemas/BridgeBreakdown"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-08-26T00:48:52.252Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-08-26T00:48:52.252Z"
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "type",
              "code",
              "message"
            ],
            "properties": {
              "type": {
                "type": "string",
                "enum": [
                  "invalid_request_error",
                  "card_error",
                  "idempotency_error",
                  "api_error"
                ],
                "example": "invalid_request_error"
              },
              "code": {
                "type": "string",
                "example": "parameter_missing"
              },
              "message": {
                "type": "string",
                "example": "Order ID is required."
              },
              "param": {
                "type": "string",
                "description": "The field that caused the failure, when applicable.",
                "example": "id"
              }
            }
          }
        }
      },
      "LineItemInput": {
        "type": "object",
        "required": [
          "name",
          "price",
          "quantity"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "Your own identifier for the item, returned as `external_id`.",
            "example": "SKU-BOOK-1"
          },
          "name": {
            "type": "string",
            "example": "Sample Item"
          },
          "price": {
            "type": "number",
            "minimum": 0,
            "example": 1100
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "example": 1
          },
          "sku": {
            "type": "string",
            "example": "SAMPLE"
          },
          "shortDescription": {
            "type": "string",
            "description": "Returned as `description` on the order's line items.",
            "example": "A short description."
          },
          "imageUrl": {
            "type": "string",
            "format": "uri",
            "description": "Returned as `image_url` on the order's line items.",
            "example": "https://example.com"
          }
        }
      },
      "OrderPerson": {
        "type": "object",
        "description": "A billing or shipping contact.",
        "properties": {
          "name": {
            "type": "string",
            "example": "Michael Scott"
          },
          "phone": {
            "type": "string",
            "example": "+18765551234"
          },
          "email": {
            "type": "string",
            "format": "email",
            "example": "mscott@example.com"
          },
          "street": {
            "type": "string",
            "example": "555 Lackawanna Ave"
          },
          "city": {
            "type": "string",
            "example": "Scranton"
          },
          "stateOrProvinceName": {
            "type": "string",
            "example": "Pennsylvania"
          },
          "postalCode": {
            "type": "string",
            "example": "18508"
          },
          "countryName": {
            "type": "string",
            "example": "United States"
          },
          "countryCode": {
            "type": "string",
            "example": "US"
          }
        }
      },
      "SubscriptionInstructions": {
        "type": "object",
        "required": [
          "recurring_frequency"
        ],
        "properties": {
          "recurring_frequency": {
            "type": "string",
            "enum": [
              "WEEKLY",
              "MONTHLY",
              "YEARLY"
            ],
            "description": "How often to bill. Daily billing is not supported.",
            "example": "WEEKLY"
          },
          "billing_cycles": {
            "type": "integer",
            "minimum": 1,
            "description": "Total number of charges, including this order. Omit to bill until\ncancelled.\n",
            "example": 12
          },
          "recurring_end_date": {
            "type": "string",
            "format": "date-time",
            "description": "When rebilling stops. Omit for no fixed end date.",
            "example": "2027-08-26T00:00:00.000Z"
          }
        }
      },
      "BridgePayment": {
        "type": "object",
        "required": [
          "destination"
        ],
        "description": "Dime Bridge. Takes this payment for one of your linked merchants.\nSend `fee` or `amount`, not both. See **Dime Bridge** in the menu.\n",
        "properties": {
          "destination": {
            "type": "string",
            "description": "The `token` of the linked merchant to pay. A database id is rejected with `400`.",
            "example": "brm_9CKxgfQk_jDKOHNVm_H8696T87_2alsOAP"
          },
          "merchant_of_record": {
            "type": "string",
            "enum": [
              "marketplace",
              "linked_merchant"
            ],
            "default": "marketplace",
            "description": "Whose sale this is. `marketplace`: you are the merchant of record,\npay Dime's processing fee and carry chargebacks. `linked_merchant`:\nthe linked merchant is, and the charge runs under its processor\nprofile, rates and card descriptor.\n",
            "example": "marketplace"
          },
          "fee": {
            "type": "number",
            "minimum": 0,
            "description": "What you keep, in major units. With `marketplace`, the linked\nmerchant receives `total − fee` and Dime's fee comes out of your\n`fee`. With `linked_merchant`, you receive `fee` and the linked\nmerchant receives the rest after Dime's fee.\n",
            "example": 10
          },
          "amount": {
            "type": "number",
            "minimum": 0,
            "description": "`marketplace` only. Exactly what the linked merchant receives; you\nkeep the rest after Dime's fee.\n",
            "example": 90
          }
        }
      },
      "CreateOrderRequest": {
        "type": "object",
        "required": [
          "id",
          "currency",
          "subtotal",
          "total",
          "email",
          "referenceTransactionId"
        ],
        "properties": {
          "id": {
            "type": "string",
            "format": "uuid",
            "description": "Your id for the order. Must be a UUID. Returned as `reference`\nand matched by the `origin_id` filter on `GET /orders` and the\n`order_id` filter on `GET /transactions`. Dime does not reject a\nrepeated id, so send a new one for every order.\n",
            "example": "3f8a1e02-9c4d-4b71-a5e3-6d2f0b8c7a19"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "subtotal": {
            "type": "number",
            "minimum": 0,
            "description": "Amount before tax and shipping.",
            "example": 1000
          },
          "total": {
            "type": "number",
            "minimum": 0,
            "description": "Amount to charge. Must meet the currency minimum.",
            "example": 1100
          },
          "tax": {
            "type": "number",
            "minimum": 0,
            "example": 100
          },
          "shipping": {
            "type": "number",
            "minimum": 0,
            "example": 0
          },
          "discount": {
            "type": "number",
            "minimum": 0,
            "example": 0
          },
          "email": {
            "type": "string",
            "format": "email",
            "description": "The buyer's email address.",
            "example": "buyer@example.com"
          },
          "referenceTransactionId": {
            "type": "string",
            "description": "Your reconciliation reference. Stored with the order, but not\nreturned in the order object and not filterable.\n",
            "example": "order-1024"
          },
          "description": {
            "type": "string",
            "example": "A short description."
          },
          "items": {
            "type": "array",
            "description": "Line items shown on the checkout page.",
            "items": {
              "$ref": "#/components/schemas/LineItemInput"
            }
          },
          "billingPerson": {
            "$ref": "#/components/schemas/OrderPerson"
          },
          "shippingPerson": {
            "$ref": "#/components/schemas/OrderPerson"
          },
          "orderComments": {
            "type": "string",
            "maxLength": 1000,
            "description": "Stored as the order's notes. Defaults to your order id.",
            "example": "Please deliver by Friday."
          },
          "is_subscription": {
            "type": "boolean",
            "default": false,
            "description": "Set true to bill this order on a recurring schedule. Requires\n`billingPerson` or `shippingPerson`, so there is a customer to\nbill on future cycles.\n",
            "example": false
          },
          "tokenize": {
            "type": "boolean",
            "default": false,
            "description": "Store the card for future charges. Required for subscriptions.",
            "example": false
          },
          "send_receipt_email": {
            "type": "boolean",
            "default": false,
            "description": "Set true to have Dime email the customer a receipt when the\npayment succeeds. Off by default: no receipt is sent to the\ncustomer unless this is true. Your own payment notification\nemail is not affected.\n",
            "example": false
          },
          "subscription_instructions": {
            "$ref": "#/components/schemas/SubscriptionInstructions"
          },
          "bridge": {
            "$ref": "#/components/schemas/BridgePayment"
          },
          "settlement_country": {
            "type": "string",
            "maxLength": 100,
            "description": "Country the payment settles in, as an ISO 3166-1 alpha-2 or alpha-3\ncode or the English country name. It selects the merchant's\nprocessing configuration for the order's currency in that country,\nso one currency can be routed to different acquiring banks (for\nexample USD for an event in Jamaica and USD for one in Trinidad\nand Tobago). Defaults to the merchant's own country. When no\nconfiguration is available for the currency in that country, the\nmerchant's default configuration for the currency is used. The\nrequest is rejected when the country is not a supported one.\n",
            "example": "TT"
          },
          "merchant_descriptor_override": {
            "type": "string",
            "maxLength": 255,
            "description": "The name on the buyer's card statement for this order. Defaults to\nthe merchant of record's business name. Not returned in responses.\n",
            "example": "JANES STORE VIA MKT"
          },
          "redirectUrl": {
            "type": "string",
            "format": "uri",
            "description": "Where to send the buyer after payment.",
            "example": "https://example.com"
          },
          "checkoutUrl": {
            "type": "string",
            "format": "uri",
            "description": "Your cart URL. Stored and echoed as `checkout_url`.",
            "example": "https://example.com/cart"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "description": "Your own key-value data, stored on the order and returned as\n`metadata` on every order response. Use it to tie the order to\nyour records, such as a cart or customer id. Dime does not read\nit. `details` is accepted as an alias for v1 parity.\n",
            "example": {
              "cart_id": "cart_8812",
              "channel": "web"
            }
          },
          "details": {
            "type": "object",
            "additionalProperties": true,
            "deprecated": true,
            "description": "v1's name for `metadata`. Used only when `metadata` is absent."
          }
        }
      },
      "Error-2": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "type",
              "code",
              "message"
            ],
            "properties": {
              "type": {
                "type": "string",
                "description": "Which kind of failure occurred. Always one of four values, so\na client can branch on `type` before reading `code`.\n",
                "enum": [
                  "invalid_request_error",
                  "card_error",
                  "idempotency_error",
                  "api_error"
                ],
                "example": "invalid_request_error"
              },
              "code": {
                "type": "string",
                "example": "parameter_missing"
              },
              "message": {
                "type": "string",
                "example": "Order ID is required."
              },
              "param": {
                "type": "string",
                "description": "The field that caused the failure, when applicable.",
                "example": "id"
              }
            }
          }
        }
      },
      "SdkOrderRequest": {
        "type": "object",
        "required": [
          "data"
        ],
        "properties": {
          "data": {
            "type": "string",
            "description": "The order claims (`SdkOrderClaims`) as a JWT signed with your secret\nkey (HS256). Sign it on your server.\n",
            "example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpZCI6Ik9SREVSLTAwMSJ9.sig"
          },
          "customer": {
            "type": "object",
            "description": "The buyer, when the claims have no `billingPerson` or `shippingPerson`."
          },
          "paymentType": {
            "type": "string",
            "description": "Set by the payment page (`CARD`, `APPLE_PAY`, `GOOGLE_PAY`, …)."
          }
        }
      },
      "ListEnvelope-2": {
        "type": "object",
        "description": "Lists are cursor-paginated. There is no total count: `has_more` reports\nwhether another page exists.\n",
        "required": [
          "object",
          "data",
          "has_more"
        ],
        "properties": {
          "object": {
            "type": "string",
            "const": "list",
            "example": "list"
          },
          "data": {
            "type": "array",
            "items": {}
          },
          "has_more": {
            "type": "boolean",
            "example": true
          }
        }
      },
      "Customer": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "customer",
            "example": "customer"
          },
          "token": {
            "type": "string",
            "description": "Identifies the customer. Use it in customer URLs and wherever a\nrequest refers to the customer.\n",
            "example": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW"
          },
          "first_name": {
            "type": "string",
            "example": "Michael"
          },
          "last_name": {
            "type": "string",
            "example": "Scott"
          },
          "email": {
            "type": "string",
            "format": "email",
            "example": "mscott@example.com"
          },
          "phone": {
            "type": [
              "string",
              "null"
            ],
            "example": "+18765551234"
          },
          "company": {
            "type": [
              "string",
              "null"
            ],
            "example": "Dunder Mifflin"
          },
          "billing_address_street": {
            "type": [
              "string",
              "null"
            ],
            "example": "555 Lackawanna Ave"
          },
          "billing_address_city": {
            "type": [
              "string",
              "null"
            ],
            "example": "Scranton"
          },
          "billing_address_state": {
            "type": [
              "string",
              "null"
            ],
            "example": "Pennsylvania"
          },
          "billing_address_postal_code": {
            "type": [
              "string",
              "null"
            ],
            "example": "18508"
          },
          "billing_address_country": {
            "type": [
              "string",
              "null"
            ],
            "example": "United States"
          },
          "shipping_address_street": {
            "type": [
              "string",
              "null"
            ],
            "example": "555 Lackawanna Ave"
          },
          "shipping_address_city": {
            "type": [
              "string",
              "null"
            ],
            "example": "Scranton"
          },
          "shipping_address_state": {
            "type": [
              "string",
              "null"
            ],
            "example": "Pennsylvania"
          },
          "shipping_address_postal_code": {
            "type": [
              "string",
              "null"
            ],
            "example": "18508"
          },
          "shipping_address_country": {
            "type": [
              "string",
              "null"
            ],
            "example": "United States"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "example": "Prefers email over phone."
          },
          "custom_attributes": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true,
            "example": {
              "loyalty_tier": "gold"
            }
          },
          "is_active": {
            "type": "boolean",
            "example": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-08-26T00:48:52.252Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-08-26T00:48:52.252Z"
          }
        }
      },
      "CreateCustomerRequest": {
        "type": "object",
        "required": [
          "first_name",
          "last_name",
          "email"
        ],
        "properties": {
          "first_name": {
            "type": "string",
            "example": "Michael"
          },
          "last_name": {
            "type": "string",
            "example": "Scott"
          },
          "email": {
            "type": "string",
            "format": "email",
            "example": "mscott@example.com"
          },
          "phone": {
            "type": "string",
            "example": "+18765551234"
          },
          "company": {
            "type": "string",
            "example": "Dunder Mifflin"
          },
          "billing_address_street": {
            "type": "string",
            "example": "555 Lackawanna Ave"
          },
          "billing_address_city": {
            "type": "string",
            "example": "Scranton"
          },
          "billing_address_state": {
            "type": "string",
            "example": "Pennsylvania"
          },
          "billing_address_postal_code": {
            "type": "string",
            "example": "18508"
          },
          "billing_address_country": {
            "type": "string",
            "example": "United States"
          },
          "shipping_address_street": {
            "type": "string",
            "example": "555 Lackawanna Ave"
          },
          "shipping_address_city": {
            "type": "string",
            "example": "Scranton"
          },
          "shipping_address_state": {
            "type": "string",
            "example": "Pennsylvania"
          },
          "shipping_address_postal_code": {
            "type": "string",
            "example": "18508"
          },
          "shipping_address_country": {
            "type": "string",
            "example": "United States"
          },
          "notes": {
            "type": "string",
            "example": "Prefers email over phone."
          },
          "custom_attributes": {
            "type": "object",
            "additionalProperties": true,
            "example": {
              "loyalty_tier": "gold"
            }
          },
          "is_active": {
            "type": "boolean",
            "description": "Only applied on replace. Defaults to true on create.",
            "example": true
          }
        }
      },
      "InvoiceStatus": {
        "type": "string",
        "enum": [
          "PAID",
          "UNPAID",
          "OVERDUE",
          "CANCELLED"
        ],
        "example": "UNPAID"
      },
      "RecurringFrequency": {
        "type": "string",
        "description": "`DAILY` is accepted only in the sandbox, to prevent accidental daily\nrebilling in production.\n",
        "enum": [
          "DAILY",
          "WEEKLY",
          "MONTHLY",
          "YEARLY"
        ],
        "example": "MONTHLY"
      },
      "InvoiceLineItem": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "custom",
              "product"
            ],
            "example": "custom"
          },
          "product": {
            "type": [
              "string",
              "null"
            ],
            "description": "The product's `token`, for catalog items.",
            "example": "prd_DbCYbcS3_OcTRL1Cd_e9nJdatU_HYypKhE"
          },
          "name": {
            "type": "string",
            "example": "Sample Item"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "example": "A short description."
          },
          "quantity": {
            "type": "integer",
            "example": 1
          },
          "unit_amount": {
            "type": "number",
            "example": 1100
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          }
        }
      },
      "Invoice": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "invoice",
            "example": "invoice"
          },
          "number": {
            "type": [
              "string",
              "null"
            ],
            "description": "Human-readable invoice number.",
            "example": "INV-25082026-0007"
          },
          "token": {
            "type": "string",
            "description": "Public token. The customer pays at `https://pay.dimepay.app/open-invoices/{token}/`.",
            "example": "inv_20260825_giodwK2"
          },
          "status": {
            "$ref": "#/components/schemas/InvoiceStatus"
          },
          "payment_type": {
            "type": [
              "string",
              "null"
            ],
            "example": "example"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "subtotal": {
            "type": "number",
            "example": 1000
          },
          "total": {
            "type": "number",
            "example": 1100
          },
          "shipping": {
            "type": [
              "number",
              "null"
            ],
            "example": 0
          },
          "tax": {
            "type": [
              "number",
              "null"
            ],
            "example": 100
          },
          "tax_label": {
            "type": [
              "string",
              "null"
            ],
            "example": "example"
          },
          "discount": {
            "type": [
              "number",
              "null"
            ],
            "example": 0
          },
          "customer": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer's `token`.",
            "example": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "example": "example"
          },
          "recurring": {
            "type": "boolean",
            "example": true
          },
          "recurring_frequency": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RecurringFrequency"
              },
              {
                "type": "null"
              }
            ]
          },
          "recurring_billing_cycle": {
            "type": [
              "integer",
              "null"
            ],
            "example": 6
          },
          "recurring_start_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-11-19T00:00:00.000Z"
          },
          "recurring_end_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": null
          },
          "recurring_end_type": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "DATE",
              "CYCLE",
              "CANCEL",
              null
            ],
            "example": "CYCLE"
          },
          "line_items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/InvoiceLineItem"
            }
          },
          "invoice_date": {
            "type": "string",
            "format": "date-time",
            "example": "2026-08-26T00:48:52.252Z"
          },
          "due_date": {
            "type": "string",
            "format": "date-time",
            "example": "2026-08-26T00:48:52.252Z"
          },
          "paid_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-08-26T00:48:52.252Z"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-08-26T00:48:52.252Z"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-08-26T00:48:52.252Z"
          }
        }
      },
      "LineItemInput-2": {
        "type": "object",
        "description": "Supply either `product_id`, or `name` + `price` + `currency` for a\ncustom item.\n",
        "required": [
          "quantity"
        ],
        "properties": {
          "product_id": {
            "type": "string",
            "description": "The `token` of a catalog product owned by your merchant. A\ndatabase id is rejected with `400`.\n",
            "example": "prd_DbCYbcS3_OcTRL1Cd_e9nJdatU_HYypKhE"
          },
          "name": {
            "type": "string",
            "description": "Required for a custom item.",
            "example": "Sample Item"
          },
          "price": {
            "type": "number",
            "minimum": 0,
            "description": "Required for a custom item.",
            "example": 1100
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "description": {
            "type": "string",
            "example": "A short description."
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "example": 1
          }
        }
      },
      "CreateInvoiceRequest": {
        "type": "object",
        "required": [
          "customer_id",
          "currency",
          "invoice_date",
          "due_date",
          "status",
          "products"
        ],
        "properties": {
          "customer_id": {
            "type": "string",
            "description": "The customer's `token`, from creating or listing customers. The\ncustomer must belong to your merchant.\n",
            "example": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "invoice_date": {
            "type": "string",
            "format": "date-time",
            "example": "2026-08-26T00:48:52.252Z"
          },
          "due_date": {
            "type": "string",
            "format": "date-time",
            "example": "2026-08-26T00:48:52.252Z"
          },
          "status": {
            "$ref": "#/components/schemas/InvoiceStatus"
          },
          "products": {
            "type": "array",
            "minItems": 1,
            "items": {
              "$ref": "#/components/schemas/LineItemInput-2"
            }
          },
          "notes": {
            "type": "string",
            "example": "example"
          },
          "payment_type": {
            "type": "string",
            "enum": [
              "CARD_ONLINE",
              "CARD_PRESENT",
              "BANK_TRANSFER",
              "CASH",
              "WALLET"
            ],
            "example": "CARD_ONLINE"
          },
          "enable_tax": {
            "type": "boolean",
            "example": true
          },
          "tax": {
            "type": "number",
            "description": "Required when `enable_tax` is true.",
            "example": 100
          },
          "tax_label": {
            "type": "string",
            "example": "example"
          },
          "enable_shipping": {
            "type": "boolean",
            "example": true
          },
          "shipping": {
            "type": "number",
            "description": "Required when `enable_shipping` is true.",
            "example": 0
          },
          "enable_recurring": {
            "type": "boolean",
            "description": "Bills the customer again on `recurring_frequency` once this\ninvoice is paid. Same behaviour as a recurring invoice created in\nthe merchant portal.\n",
            "example": true
          },
          "recurring_frequency": {
            "$ref": "#/components/schemas/RecurringFrequency"
          },
          "recurring_end_type": {
            "type": "string",
            "enum": [
              "DATE",
              "CYCLE",
              "CANCEL"
            ],
            "description": "How the series ends — on `recurring_end_date`, after `recurring_billing_cycle` cycles, or when cancelled.",
            "example": "CYCLE"
          },
          "recurring_billing_cycle": {
            "type": "integer",
            "minimum": 1,
            "description": "Number of cycles when `recurring_end_type` is `CYCLE`.",
            "example": 6
          },
          "recurring_start_date": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-19T00:00:00.000Z"
          },
          "recurring_end_date": {
            "type": "string",
            "format": "date-time",
            "description": "Last billing date when `recurring_end_type` is `DATE`.",
            "example": "2027-04-19T00:00:00.000Z"
          },
          "sendEmail": {
            "type": "boolean",
            "description": "Queue the invoice email to the customer on creation.",
            "example": false
          }
        }
      },
      "ProductRequest": {
        "type": "object",
        "required": [
          "name",
          "description",
          "status",
          "price",
          "currency"
        ],
        "properties": {
          "name": {
            "type": "string",
            "example": "Shampoo"
          },
          "description": {
            "type": "string",
            "example": "500ml, sulfate free."
          },
          "status": {
            "type": "string",
            "enum": [
              "PUBLISHED",
              "DRAFT"
            ]
          },
          "visible": {
            "type": "string",
            "enum": [
              "PUBLIC",
              "PRIVATE"
            ],
            "default": "PRIVATE"
          },
          "price": {
            "type": "number",
            "minimum": 0,
            "example": 1200
          },
          "sale_price": {
            "type": "number",
            "minimum": 0
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "quantity": {
            "type": "integer",
            "minimum": 0,
            "description": "Units in stock."
          },
          "sell_out_of_stock": {
            "type": "boolean"
          },
          "show_quantity_selector": {
            "type": "boolean"
          },
          "image_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "additional_images": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sku": {
            "type": [
              "string",
              "null"
            ]
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your own reference for the product."
          },
          "tags": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "variation": {
            "type": [
              "object",
              "null"
            ],
            "description": "Variant attributes, for example\n`{ \"enabled\": true, \"attributes\": [{ \"name\": \"Size\", \"value\": [\"S\", \"M\"] }] }`.\n"
          },
          "supplier": {
            "type": [
              "object",
              "array",
              "null"
            ]
          },
          "enable_shipping": {
            "type": "boolean"
          },
          "shipping": {
            "type": "number"
          },
          "shipping_text": {
            "type": [
              "string",
              "null"
            ]
          },
          "enable_tax": {
            "type": "boolean"
          },
          "tax": {
            "type": "number"
          },
          "is_sale_price_inc_tax": {
            "type": "boolean"
          },
          "is_tax_exemptable": {
            "type": "boolean"
          },
          "enable_notes": {
            "type": "boolean"
          },
          "enable_reviews": {
            "type": "boolean"
          },
          "enable_return": {
            "type": "boolean"
          },
          "return_text": {
            "type": [
              "string",
              "null"
            ]
          },
          "enable_recurring": {
            "type": "boolean"
          },
          "recurring_frequency": {
            "type": [
              "string",
              "null"
            ],
            "description": "Required when `enable_recurring` is true."
          },
          "recurring_billing_cycle": {
            "type": [
              "integer",
              "null"
            ]
          },
          "recurring_start_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "recurring_end_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "recurring_end_type": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "DATE",
              "CYCLE",
              "CANCEL",
              null
            ]
          },
          "trial_period_days": {
            "type": [
              "integer",
              "null"
            ],
            "minimum": 0
          }
        }
      },
      "Product": {
        "allOf": [
          {
            "$ref": "#/components/schemas/ProductRequest"
          },
          {
            "type": "object",
            "properties": {
              "object": {
                "type": "string",
                "const": "product"
              },
              "token": {
                "type": "string",
                "description": "Identifies the product. Use it in URLs and wherever a request refers to the product.",
                "example": "prd_DbCYbcS3_OcTRL1Cd_e9nJdatU_HYypKhE"
              },
              "original_price": {
                "type": [
                  "number",
                  "null"
                ],
                "readOnly": true
              },
              "discount_percentage": {
                "type": [
                  "number",
                  "null"
                ],
                "readOnly": true
              },
              "categories": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "token": {
                      "type": "string",
                      "example": "cat_OwnPgze7_HExqHIKA_LjAgZ9oA_ThPBbj3"
                    },
                    "name": {
                      "type": "string"
                    }
                  }
                }
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "updated_at": {
                "type": "string",
                "format": "date-time"
              }
            }
          }
        ]
      },
      "Category": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "category"
          },
          "token": {
            "type": "string",
            "description": "Identifies the category. Use it in URLs and wherever a request refers to the category.",
            "example": "cat_OwnPgze7_HExqHIKA_LjAgZ9oA_ThPBbj3"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": [
              "string",
              "null"
            ]
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "image_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "color": {
            "type": [
              "string",
              "null"
            ]
          },
          "icon": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_active": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "CategoryRequest": {
        "type": "object",
        "required": [
          "name",
          "slug",
          "description"
        ],
        "properties": {
          "name": {
            "type": "string",
            "example": "Hair care"
          },
          "slug": {
            "type": "string",
            "description": "Unique among your categories.",
            "example": "hair-care"
          },
          "description": {
            "type": "string",
            "example": "Shampoos, conditioners and treatments."
          },
          "image_url": {
            "type": [
              "string",
              "null"
            ]
          },
          "color": {
            "type": [
              "string",
              "null"
            ],
            "example": "#3B82F6"
          },
          "icon": {
            "type": [
              "string",
              "null"
            ]
          },
          "is_active": {
            "type": "boolean",
            "default": true
          }
        }
      },
      "CategoryProduct": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "product"
          },
          "token": {
            "type": "string",
            "description": "Identifies the product. Use it in URLs and wherever a request refers to the product.",
            "example": "prd_DbCYbcS3_OcTRL1Cd_e9nJdatU_HYypKhE"
          },
          "name": {
            "type": "string"
          },
          "description": {
            "type": [
              "string",
              "null"
            ]
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "price": {
            "type": "number"
          },
          "status": {
            "type": "string",
            "enum": [
              "PUBLISHED",
              "DRAFT"
            ]
          },
          "image_url": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Wallet": {
        "type": "object",
        "properties": {
          "token": {
            "type": [
              "string",
              "null"
            ],
            "description": "Identifies the wallet. Send it as `wallet_id` when you create a transfer.",
            "example": "wal_Q3nT8vKp_Zx2Lm9Rc_Yb4Hu7Wd_E1sGf0a"
          },
          "currency": {
            "type": "string"
          },
          "balance": {
            "type": "number"
          },
          "hold_amount": {
            "type": "number"
          },
          "available_amount": {
            "type": "number"
          }
        }
      },
      "Contact": {
        "type": "object",
        "description": "A saved bank account. Address it by `token`.",
        "properties": {
          "object": {
            "type": "string",
            "const": "bank_account"
          },
          "token": {
            "type": "string",
            "example": "bac_bEBGGWJo_uNjJq3b1_TSr6c0SS_vvKx2VI"
          },
          "recipient_bank_details": {
            "type": [
              "object",
              "null"
            ]
          },
          "last_activity_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "updated_at": {
            "type": "string",
            "format": "date-time"
          }
        }
      },
      "ContactRequest": {
        "type": "object",
        "properties": {
          "recipient_bank_account_name": {
            "type": "string"
          },
          "recipient_bank_type": {
            "type": "string"
          },
          "recipient_bank_number": {
            "type": "string"
          },
          "recipient_bank_last_four_digits": {
            "type": "string"
          },
          "recipient_bank_name": {
            "type": "string"
          },
          "recipient_bank_branch": {
            "type": "string"
          },
          "recipient_bank_code": {
            "type": "string"
          },
          "recipient_bank_currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "recipient_bank_email": {
            "type": "string"
          },
          "recipient_swift_code": {
            "type": "string"
          },
          "recipient_contact_number": {
            "type": "string"
          }
        }
      },
      "LinkType": {
        "type": "string",
        "enum": [
          "OPEN",
          "STATIC",
          "PRODUCT"
        ],
        "example": "OPEN"
      },
      "PaymentLink": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "payment_link",
            "example": "payment_link"
          },
          "token": {
            "type": "string",
            "description": "Identifies the payment link. The link's page is `https://pay.dimepay.app/link/{token}`.",
            "example": "lnk_DoN4zNOO_lp5TrgxI_exvZv89Z_4u3Toxh"
          },
          "name": {
            "type": "string",
            "example": "Sample Item"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "example": "A short description."
          },
          "image_url": {
            "type": [
              "string",
              "null"
            ],
            "example": "https://example.com/item.png"
          },
          "type": {
            "$ref": "#/components/schemas/LinkType"
          },
          "status": {
            "type": "string",
            "enum": [
              "PUBLISHED",
              "DRAFT"
            ],
            "example": "PUBLISHED"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "total": {
            "type": "number",
            "example": 1100
          },
          "subtotal": {
            "type": "number",
            "example": 1000
          },
          "open_total": {
            "type": "boolean",
            "example": true
          },
          "products": {
            "type": "array",
            "description": "The products a `PRODUCT` link sells. Empty for other link types.",
            "items": {
              "type": "object",
              "properties": {
                "token": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "description": "The product's `token`.",
                  "example": "prd_DbCYbcS3_OcTRL1Cd_e9nJdatU_HYypKhE"
                },
                "quantity": {
                  "type": [
                    "number",
                    "null"
                  ],
                  "example": 1
                }
              }
            }
          },
          "enable_shipping": {
            "type": "boolean",
            "example": true
          },
          "shipping": {
            "type": "number",
            "example": 0
          },
          "enable_tax": {
            "type": "boolean",
            "example": true
          },
          "tax": {
            "type": "number",
            "example": 100
          },
          "enable_notes": {
            "type": "boolean",
            "example": true
          },
          "enable_fee_handling": {
            "type": "boolean",
            "example": true
          },
          "fee_handling_type": {
            "type": [
              "string",
              "null"
            ],
            "example": "example"
          },
          "consumer_fee": {
            "type": "number",
            "example": 0
          },
          "enable_expiration": {
            "type": "boolean",
            "example": true
          },
          "expiration_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-08-26T00:48:52.252Z"
          },
          "enable_recurring": {
            "type": "boolean",
            "example": true
          },
          "recurring_frequency": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/RecurringFrequency"
              },
              {
                "type": "null"
              }
            ]
          },
          "recurring_billing_cycle": {
            "type": [
              "integer",
              "null"
            ],
            "example": 0
          },
          "recurring_start_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-08-26T00:48:52.252Z"
          },
          "recurring_end_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-08-26T00:48:52.252Z"
          },
          "recurring_end_type": {
            "type": [
              "string",
              "null"
            ],
            "example": "example"
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-08-26T00:48:52.252Z"
          }
        }
      },
      "CreatePaymentLinkRequest": {
        "type": "object",
        "required": [
          "name",
          "type",
          "currency"
        ],
        "properties": {
          "name": {
            "type": "string",
            "example": "Sample Item"
          },
          "type": {
            "$ref": "#/components/schemas/LinkType"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "description": {
            "type": "string",
            "example": "A short description."
          },
          "image_url": {
            "type": "string",
            "format": "uri",
            "example": "https://example.com"
          },
          "open_total": {
            "type": "boolean",
            "description": "Set true for an `OPEN` link so the payer names the amount.",
            "example": true
          },
          "total": {
            "type": "number",
            "minimum": 0,
            "example": 1100
          },
          "subtotal": {
            "type": "number",
            "minimum": 0,
            "example": 1000
          },
          "product_ids": {
            "type": "array",
            "description": "For a `PRODUCT` link: the products it sells, each named by its\n`token`. Each product must be yours. A database id is rejected\nwith `400`.\n",
            "items": {
              "type": "object",
              "required": [
                "token"
              ],
              "properties": {
                "token": {
                  "type": "string",
                  "description": "The product's `token`.",
                  "example": "prd_DbCYbcS3_OcTRL1Cd_e9nJdatU_HYypKhE"
                },
                "count": {
                  "type": "integer",
                  "minimum": 1,
                  "description": "How many of the product the link sells. Returned as `quantity`.",
                  "example": 1
                }
              }
            }
          },
          "enable_tax": {
            "type": "boolean",
            "example": true
          },
          "tax": {
            "type": "number",
            "example": 100
          },
          "enable_shipping": {
            "type": "boolean",
            "example": true
          },
          "shipping": {
            "type": "number",
            "example": 0
          },
          "enable_expiration": {
            "type": "boolean",
            "example": true
          },
          "expiration_date": {
            "type": "string",
            "format": "date-time",
            "example": "2026-08-26T00:48:52.252Z"
          },
          "enable_recurring": {
            "type": "boolean",
            "example": true
          },
          "recurring_frequency": {
            "$ref": "#/components/schemas/RecurringFrequency"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          }
        }
      },
      "TransactionStatus": {
        "type": "string",
        "enum": [
          "COMPLETE",
          "FAILED",
          "PENDING",
          "AUTHORISED",
          "VOID",
          "REFUND",
          "PARTIAL_REFUND",
          "ABANDONED"
        ],
        "example": "COMPLETE"
      },
      "RefundFees": {
        "type": [
          "object",
          "null"
        ],
        "description": "On a refund transaction, what the refund cost you, as the dashboard\nshows it. `null` on other transactions, and on a refund until its\nledger entries are recorded, usually within 15 seconds of the refund.\nRead it with `GET /transactions/{token}`. Amounts have up to four\ndecimal places, as the ledger records them.\n",
        "properties": {
          "currency": {
            "type": "string",
            "description": "Currency of your wallet, in which the amounts below are given.",
            "example": "USD"
          },
          "refunded": {
            "type": "number",
            "description": "What the customer got back.",
            "example": 46
          },
          "merchant_wallet": {
            "type": "number",
            "description": "Taken from your wallet. The original sale, less the fees you paid on it.",
            "example": 43.801
          },
          "fee_refund": {
            "type": [
              "number",
              "null"
            ],
            "description": "The original processing fees Dime returned, so the customer gets\nback what they paid: `refunded` minus `merchant_wallet`. `null`\nwhen your wallet and the refund are in different currencies.\n",
            "example": 2.199
          },
          "platform_refund_fee": {
            "type": "number",
            "description": "The refund fee charged to your wallet.",
            "example": 0.35
          },
          "total_refund_cost": {
            "type": "number",
            "description": "`refunded` plus `platform_refund_fee`.",
            "example": 46.35
          }
        }
      },
      "UsdConversion": {
        "type": [
          "object",
          "null"
        ],
        "description": "Set only when a USD-preferred payment was actually switched to USD. `currency` and `amount` on the transaction are then USD, and this object carries what the order originally asked for. `null` means the payment stayed in the order currency, even if the order has `usd_preferred: true`.\n",
        "properties": {
          "applied": {
            "type": "boolean",
            "example": true
          },
          "original_currency": {
            "type": "string",
            "example": "TTD"
          },
          "original_amount": {
            "type": "number",
            "example": 757.72
          },
          "currency": {
            "type": "string",
            "example": "USD"
          },
          "amount": {
            "type": "number",
            "example": 112.83
          },
          "fx_rate": {
            "type": [
              "number",
              "null"
            ],
            "description": "USD per unit of the original currency, as applied.",
            "example": 0.14890725
          }
        }
      },
      "Transaction": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "transaction",
            "example": "transaction"
          },
          "token": {
            "type": "string",
            "description": "Identifies the transaction. Use it to retrieve, capture, void or\nrefund the transaction, and wherever a request refers to it.\n",
            "example": "txn_20261027_PBFpP02"
          },
          "status": {
            "$ref": "#/components/schemas/TransactionStatus"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "amount": {
            "type": "number",
            "description": "The amount requested.",
            "example": 1100
          },
          "final_amount": {
            "type": [
              "number",
              "null"
            ],
            "description": "The amount actually settled, after fees and adjustments.",
            "example": 1100
          },
          "consumer_fee": {
            "type": [
              "number",
              "null"
            ],
            "example": 0
          },
          "tip_value": {
            "type": [
              "number",
              "null"
            ],
            "example": 1.23
          },
          "fees": {
            "type": [
              "number",
              "null"
            ],
            "description": "Total processing fee charged on this transaction, in the currency's major unit.",
            "example": 38.5
          },
          "source": {
            "type": [
              "string",
              "null"
            ],
            "description": "How the payment was taken.",
            "example": "example"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "example": "A short description."
          },
          "authorized": {
            "type": "boolean",
            "example": true
          },
          "captured": {
            "type": "boolean",
            "example": true
          },
          "refunded": {
            "type": "boolean",
            "example": true
          },
          "voided": {
            "type": "boolean",
            "example": true
          },
          "settled": {
            "type": "boolean",
            "example": true
          },
          "last_four_digits": {
            "type": [
              "string",
              "null"
            ],
            "example": "4242"
          },
          "card_scheme": {
            "type": [
              "string",
              "null"
            ],
            "example": "VISA"
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer's `token`, when the transaction has a customer.",
            "example": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW"
          },
          "reference_transaction_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Set when this transaction derives from another, most commonly a\nrefund, capture or void: the original transaction's `token`.\n`null` on a sale or auth. The `referenceTransactionId` you send\nwhen charging is not returned here.\n",
            "example": "txn_20261027_PBFpP02"
          },
          "subscription": {
            "type": [
              "string",
              "null"
            ],
            "description": "The `token` of the subscription this transaction was billed against, when there is one.",
            "example": "sub_pESz9qv3_M4rhjWUy_KMaAVBqb_XyCKvmZ"
          },
          "entity": {
            "type": [
              "object",
              "null"
            ],
            "description": "What this transaction settled against: its kind in `object`, its\n`token` and its `status`.\n",
            "additionalProperties": true
          },
          "error_code": {
            "type": [
              "string",
              "null"
            ],
            "example": "parameter_missing"
          },
          "error_message": {
            "type": [
              "string",
              "null"
            ],
            "example": "Order ID is required."
          },
          "refund_fees": {
            "$ref": "#/components/schemas/RefundFees"
          },
          "usd_conversion": {
            "$ref": "#/components/schemas/UsdConversion"
          },
          "bridge": {
            "$ref": "#/components/schemas/BridgeBreakdown"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-08-26T00:48:52.252Z"
          }
        }
      },
      "CreateCardRequest": {
        "type": "object",
        "description": "`webhookUrl` (or its alias `callbackUrl`) is required.",
        "properties": {
          "id": {
            "type": "string",
            "description": "Your own reference for this request. Returned as `reference_id` on the card.",
            "example": "3f8a1e02-9c4d-4b71-a5e3-6d2f0b8c7a19"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "webhookUrl": {
            "type": "string",
            "format": "uri",
            "description": "Required (or its alias `callbackUrl`). Where Dime POSTs the tokenization request's result.",
            "example": "https://example.com/hooks/card"
          },
          "callbackUrl": {
            "type": "string",
            "format": "uri",
            "deprecated": true,
            "description": "Alias of `webhookUrl`, kept for v1 parity. Used only when `webhookUrl` is absent.",
            "example": "https://example.com/hooks/card"
          },
          "redirectUrl": {
            "type": "string",
            "format": "uri",
            "description": "Where to send the customer after they enter their card.",
            "example": "https://example.com/done"
          },
          "returnUrl": {
            "type": "string",
            "format": "uri",
            "deprecated": true,
            "description": "Alias of `redirectUrl`, kept for v1 parity. Used only when `redirectUrl` is absent.",
            "example": "https://example.com/done"
          },
          "lang": {
            "type": "string",
            "example": "en"
          }
        }
      },
      "CardRequest": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "card_request",
            "example": "card_request"
          },
          "token": {
            "type": "string",
            "description": "The tokenization request's token. Use it to verify and to retrieve the card.",
            "example": "crq_lnM3xzwx_nFcWA9XR_bVWBl76P_slIlKTM"
          },
          "status": {
            "type": "string",
            "enum": [
              "STARTED",
              "VERIFICATION",
              "SUCCESS",
              "FAILED"
            ],
            "description": "`STARTED`: opened, card not yet entered. `VERIFICATION`: card\naccepted and the verification charge placed; waiting for\n`PUT /card-tokenization/verify`. `SUCCESS`: verified; the card can be\nretrieved. `FAILED`: the card was declined, or verification\nfailed three times.\n",
            "example": "STARTED"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "verification_attempts": {
            "type": "integer",
            "example": 0
          },
          "last_four_digits": {
            "type": [
              "string",
              "null"
            ],
            "example": "4242"
          },
          "card_scheme": {
            "type": [
              "string",
              "null"
            ],
            "example": "VISA"
          },
          "card_expiry": {
            "type": [
              "string",
              "null"
            ],
            "example": "12/29"
          },
          "expired": {
            "type": "boolean",
            "example": true
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-08-26T00:48:52.252Z"
          },
          "card_url": {
            "type": "string",
            "format": "uri",
            "description": "Present on create. The hosted capture page.",
            "example": "https://pay.sandbox.dimepay.app/e-card/m82yalYupLIdpAz/crq_lnM3xzwx_nFcWA9XR_bVWBl76P_slIlKTM"
          }
        }
      },
      "Card": {
        "type": "object",
        "description": "The stored card. The full number is never returned.",
        "properties": {
          "object": {
            "type": "string",
            "const": "card",
            "example": "card"
          },
          "token": {
            "type": "string",
            "description": "The card token. Pass it as `token` to `POST /payments/sale` or `POST /payments/auth`.",
            "example": "crd_lYW5MOH2_omvDipze_0iG9s67K_hUwjeHr"
          },
          "card_request_token": {
            "type": "string",
            "description": "The `token` of the tokenization request this card came from. Not accepted by the payment endpoints.",
            "example": "crq_lnM3xzwx_nFcWA9XR_bVWBl76P_slIlKTM"
          },
          "reference_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The `id` you supplied when opening the request.",
            "example": "3f8a1e02-9c4d-4b71-a5e3-6d2f0b8c7a19"
          },
          "last_four_digits": {
            "type": [
              "string",
              "null"
            ],
            "example": "4242"
          },
          "card_scheme": {
            "type": [
              "string",
              "null"
            ],
            "example": "VISA"
          },
          "card_expiry": {
            "type": [
              "string",
              "null"
            ],
            "example": "12/29"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "expired": {
            "type": "boolean",
            "example": true
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          }
        }
      },
      "HostedPageResult": {
        "type": "object",
        "description": "A trimmed view of the created order. `POST /orders` returns the\nfull order object; this endpoint returns only what a redirect flow\nneeds. The payment page is `https://pay.dimepay.app/e-order/{token}`.\n",
        "properties": {
          "object": {
            "type": "string",
            "const": "order",
            "example": "order"
          },
          "token": {
            "type": "string",
            "description": "Identifies the order. Appears in the Dime-hosted checkout URL;\nkeep it to correlate the order with your own records.\n",
            "example": "ord_20260910_2XFla9Q"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "checkout_url": {
            "type": "string",
            "format": "uri",
            "description": "Your cart URL, echoed from the `checkoutUrl` you sent. If you did\nnot send one, this is the Dime payment page,\n`https://pay.dimepay.app/e-order/{token}` (sandbox:\n`https://pay.sandbox.dimepay.app/e-order/{token}`).\n\nDo not use this field to send the buyer to pay when you sent\n`checkoutUrl`; use the payment page URL built from `token`.\n",
            "example": "https://example.com/cart"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-09-10T18:59:55.676Z"
          }
        }
      },
      "ChargeRequest": {
        "type": "object",
        "required": [
          "token",
          "id",
          "currency",
          "subtotal",
          "total",
          "tax",
          "email",
          "ipAddress",
          "referenceTransactionId"
        ],
        "properties": {
          "token": {
            "type": "string",
            "description": "The card token: the `token` returned by\n`GET /cards/{card_request_token}`. Starts with `card_`.\n",
            "example": "crd_lYW5MOH2_omvDipze_0iG9s67K_hUwjeHr"
          },
          "id": {
            "type": "string",
            "maxLength": 100,
            "description": "Your id for the order this charge creates, up to 100 characters.\nMatched by `GET /orders?origin_id=`, so you can check whether a\ncharge went through before retrying.\n",
            "example": "3f8a1e02-9c4d-4b71-a5e3-6d2f0b8c7a19"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "subtotal": {
            "type": "number",
            "minimum": 0,
            "example": 1000
          },
          "total": {
            "type": "number",
            "minimum": 0,
            "example": 1100
          },
          "tax": {
            "type": "number",
            "minimum": 0,
            "example": 100
          },
          "discount": {
            "type": "number",
            "minimum": 0,
            "example": 0
          },
          "email": {
            "type": "string",
            "format": "email",
            "example": "buyer@example.com"
          },
          "ipAddress": {
            "type": "string",
            "description": "The buyer's IP, required by the processor for risk scoring.",
            "example": "198.51.100.10"
          },
          "referenceTransactionId": {
            "type": "string",
            "example": "order-1024"
          },
          "orderComments": {
            "type": "string",
            "maxLength": 1000,
            "example": "Leave at the door."
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "description": "Your own key-value data, stored on the order this charge creates\nand returned as `metadata` by `GET /orders/{token}`. Dime does not\nread it. `details` is accepted as an alias for v1 parity.\n",
            "example": {
              "cart_id": "cart_8812"
            }
          },
          "items": {
            "type": "array",
            "description": "Line items recorded on the order.",
            "items": {
              "$ref": "#/components/schemas/LineItemInput"
            }
          },
          "bridge": {
            "$ref": "#/components/schemas/BridgePayment"
          },
          "settlement_country": {
            "type": "string",
            "maxLength": 100,
            "description": "Country the payment settles in, as an ISO 3166-1 alpha-2 or alpha-3\ncode or the English country name. Selects the merchant's processing\nconfiguration for the currency in that country; defaults to the\nmerchant's own country. A saved card can only be charged on the\nroute it was saved under.\n",
            "example": "TT"
          },
          "merchant_descriptor_override": {
            "type": "string",
            "maxLength": 255,
            "description": "The name on the buyer's card statement for this charge. Defaults\nto the merchant of record's business name. Not returned in\nresponses.\n",
            "example": "JANES STORE VIA MKT"
          },
          "send_receipt_email": {
            "type": "boolean",
            "default": false,
            "description": "Set true to have Dime email the customer a receipt when the\npayment succeeds. Off by default: no receipt is sent to the\ncustomer unless this is true. Your own payment notification\nemail is not affected.\n",
            "example": false
          }
        }
      },
      "PaymentResult": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "transaction",
            "example": "transaction"
          },
          "token": {
            "type": "string",
            "description": "Identifies the transaction. Use it with `GET /transactions/{token}`\nand as `transaction_id` when you capture, void or refund.\n",
            "example": "txn_20261027_PBFpP02"
          },
          "status": {
            "$ref": "#/components/schemas/TransactionStatus",
            "description": "`COMPLETE` after a sale or capture; `AUTHORISED` after an auth."
          },
          "authorized": {
            "type": "boolean",
            "example": true
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "amount": {
            "type": "number",
            "example": 1100
          },
          "fees": {
            "type": [
              "number",
              "null"
            ],
            "example": 0
          },
          "error_code": {
            "type": [
              "string",
              "null"
            ],
            "description": "Always `null` in a `200` response. A decline returns `402` instead.",
            "example": null
          },
          "error_message": {
            "type": [
              "string",
              "null"
            ],
            "description": "Always `null` in a `200` response.",
            "example": null
          },
          "reference_transaction_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Set when this transaction derives from another, most commonly a\nrefund, capture or void: the original transaction's `token`.\n`null` on a sale or auth. The `referenceTransactionId` you send\nwhen charging is not returned here.\n",
            "example": "txn_20261027_PBFpP02"
          },
          "last_four_digits": {
            "type": [
              "string",
              "null"
            ],
            "example": "4242"
          },
          "card_scheme": {
            "type": [
              "string",
              "null"
            ],
            "example": "VISA"
          },
          "order": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "refund_fees": {
            "$ref": "#/components/schemas/RefundFees"
          },
          "usd_conversion": {
            "$ref": "#/components/schemas/UsdConversion"
          },
          "bridge": {
            "$ref": "#/components/schemas/BridgeBreakdown"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-08-26T00:48:52.252Z"
          }
        }
      },
      "TransactionAction": {
        "type": "object",
        "description": "Body for capture and void. The whole amount is always used.",
        "required": [
          "transaction_id"
        ],
        "properties": {
          "transaction_id": {
            "type": "string",
            "description": "The `token` of the transaction to act on, as returned by the sale\nor auth. A database id is rejected with `400`.\n",
            "example": "txn_20261027_PBFpP02"
          }
        }
      },
      "BridgeRefundOptions": {
        "type": "object",
        "description": "Dime Bridge only. Who funds a **partial** refund, like Stripe's\n`reverse_transfer` and `refund_application_fee`.\n\n**A full refund unwinds everything, whatever the flags.** When the\npayment ends fully refunded, each party gives back all it received\nand Dime and the bank return their fees. If earlier partial refunds\nwere split differently, the refund that completes the payment debits\nor credits back the difference.\n\n**Partial refunds:** wallets pay the refund amount in full (fees are\nreturned when the payment is fully refunded), and the flags decide\nwho. Example: a 100 payment where the linked merchant got 90, the\nmarketplace kept 6.80 and the fees were 3.20; a refund of 40:\n\n| Merchant of record | Flags | Refund of 40 |\n|---|---|---|\n| Marketplace | none | Marketplace −40 |\n| Marketplace | `refund_from_linked_account` | Linked −40, marketplace −0 (keeps its commission) |\n| Marketplace | both | Linked −36, marketplace −4 |\n| Linked merchant | none | Linked −40 |\n| Linked merchant | `refund_bridge_fee` | Linked −36, marketplace −4 (fee 10 of 100) |\n\nWith the marketplace as merchant of record, `refund_bridge_fee` alone\nis rejected. With the linked merchant as merchant of record,\n`refund_from_linked_account` is rejected.\n\n**Refund fee:** always paid by the linked merchant.\n\n**Refund transactions:** the merchant of record's refund is the\nrefund transaction returned. When the other party pays part of the\nrefund or the refund fee, it gets its own refund transaction\n(`bridge.role: counterparty_refund`). Webhooks go only to the\nmerchant that created the payment.\n\nThe paying party must have the money available before the customer\nis refunded, or the request fails with `400 insufficient_balance`.\n",
        "properties": {
          "refund_from_linked_account": {
            "type": "boolean",
            "default": false,
            "description": "Marketplace is merchant of record only. The linked merchant funds\nthis partial refund, up to what it received. Like Stripe's\n`reverse_transfer`.\n",
            "example": true
          },
          "reverse_linked_share": {
            "type": "boolean",
            "deprecated": true,
            "description": "Deprecated name for `refund_from_linked_account`."
          },
          "refund_bridge_fee": {
            "type": "boolean",
            "default": false,
            "description": "The marketplace also gives back its share of this partial refund.\nLike Stripe's `refund_application_fee`.\n",
            "example": true
          }
        }
      },
      "RefundRequest": {
        "type": "object",
        "required": [
          "transaction_id"
        ],
        "properties": {
          "transaction_id": {
            "type": "string",
            "description": "The `token` of the transaction to refund. A database id is rejected with `400`.",
            "example": "txn_20261027_PBFpP02"
          },
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "Amount to refund. Omit to refund everything not yet refunded.",
            "example": 500
          },
          "bridge": {
            "$ref": "#/components/schemas/BridgeRefundOptions"
          }
        }
      },
      "PosSaleRequest": {
        "type": "object",
        "required": [
          "amount"
        ],
        "description": "Send `terminal_id`, or `store_id` with `pos_station_id`; and\n`order_id` or `pos_transaction_id`.\n",
        "properties": {
          "amount": {
            "type": [
              "string",
              "number"
            ],
            "description": "The sale amount before any tip, e.g. `\"900.00\"`.",
            "example": "900.00"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "tip": {
            "type": "number",
            "description": "A tip already agreed at the till. Added to `amount` for the charge.",
            "example": 10.13
          },
          "send_receipt_email": {
            "type": "boolean",
            "default": false,
            "description": "Set true to have Dime email the customer a receipt when the sale\nis approved. It needs an email in `billingPerson`. Off by\ndefault: no receipt is sent to the customer unless this is true.\n",
            "example": false
          },
          "terminal_id": {
            "type": "string",
            "description": "The terminal's token, as shown for the terminal in the Dime\nportal. A database id is refused.\n",
            "example": "2740017028"
          },
          "store_id": {
            "type": "string",
            "description": "Your store reference the terminal is registered under."
          },
          "pos_station_id": {
            "type": [
              "string",
              "integer"
            ],
            "description": "The till within the store."
          },
          "order_id": {
            "type": "string",
            "description": "Your POS's reference for the sale. Used to recognise a retry."
          },
          "pos_transaction_id": {
            "type": [
              "string",
              "integer"
            ],
            "description": "Your POS's transaction number. Echoed back in `pos`."
          },
          "name": {
            "type": "string",
            "description": "A label for the sale, shown on the terminal and in the portal."
          },
          "bill_number": {
            "type": "string"
          },
          "operator_code": {
            "type": "string"
          },
          "operator_name": {
            "type": "string"
          },
          "items": {
            "type": "array",
            "description": "Line items, shown in the portal and on receipts.",
            "items": {
              "type": "object",
              "properties": {
                "id": {
                  "type": "string"
                },
                "name": {
                  "type": "string"
                },
                "price": {
                  "type": "number"
                },
                "quantity": {
                  "type": "number"
                },
                "sku": {
                  "type": "string"
                }
              }
            }
          },
          "webhook_url": {
            "type": "string",
            "format": "uri",
            "description": "Optional. Receives this sale's events in the v2 webhook body, in\naddition to your registered endpoints.\n"
          },
          "bridge": {
            "$ref": "#/components/schemas/BridgePayment"
          }
        }
      },
      "PosReceipt": {
        "type": "object",
        "properties": {
          "card_type": {
            "type": [
              "string",
              "null"
            ],
            "example": "mastercard"
          },
          "card_number": {
            "type": [
              "string",
              "null"
            ],
            "description": "Last four digits.",
            "example": "3539"
          },
          "card_scheme_details": {
            "type": [
              "string",
              "null"
            ],
            "example": "Scotiabank Debit"
          },
          "verification_method": {
            "type": [
              "string",
              "null"
            ],
            "example": "PIN"
          },
          "authorization": {
            "type": [
              "string",
              "null"
            ]
          },
          "entry_mode": {
            "type": [
              "string",
              "null"
            ],
            "example": "Chip"
          }
        }
      },
      "PosDetails": {
        "type": "object",
        "description": "The till's view of the payment.",
        "properties": {
          "method": {
            "type": [
              "string",
              "null"
            ],
            "example": "Sale"
          },
          "terminal_id": {
            "type": [
              "string",
              "integer",
              "null"
            ],
            "description": "As sent in the request, or the terminal's token."
          },
          "pos_station_id": {
            "type": [
              "string",
              "integer",
              "null"
            ]
          },
          "pos_transaction_id": {
            "type": [
              "string",
              "integer",
              "null"
            ]
          },
          "approval_status": {
            "type": "boolean"
          },
          "response_text": {
            "type": [
              "string",
              "null"
            ]
          },
          "tip": {
            "type": "number",
            "example": 10.13
          },
          "approved_amount": {
            "type": "number",
            "description": "The sale amount, without the tip.",
            "example": 900
          },
          "processed_amount": {
            "type": "number",
            "description": "What the card was charged, tip included.",
            "example": 910.13
          },
          "receipt": {
            "$ref": "#/components/schemas/PosReceipt"
          },
          "outcome_status": {
            "type": "string",
            "description": "Android intent completion only.",
            "enum": [
              "approved",
              "cancelled",
              "declined",
              "error"
            ]
          }
        }
      },
      "PosPayment": {
        "allOf": [
          {
            "$ref": "#/components/schemas/PaymentResult"
          },
          {
            "type": "object",
            "required": [
              "pos"
            ],
            "properties": {
              "pos": {
                "$ref": "#/components/schemas/PosDetails"
              }
            }
          }
        ]
      },
      "PosRefundRequest": {
        "type": "object",
        "required": [
          "transaction_id"
        ],
        "properties": {
          "transaction_id": {
            "type": "string",
            "description": "The `token` of the sale to refund.",
            "example": "txn_20261027_lYW5MOH"
          },
          "amount": {
            "type": [
              "string",
              "number"
            ],
            "description": "Amount to refund. Omit to refund the sale."
          },
          "items": {
            "type": "array",
            "description": "The items being refunded, for your records.",
            "items": {
              "type": "object"
            }
          },
          "bridge": {
            "$ref": "#/components/schemas/BridgeRefundOptions"
          }
        }
      },
      "PosOrder": {
        "allOf": [
          {
            "$ref": "#/components/schemas/Order"
          },
          {
            "type": "object",
            "required": [
              "already_completed"
            ],
            "properties": {
              "already_completed": {
                "type": "boolean"
              },
              "payment": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/PaymentResult"
                  },
                  {
                    "type": "null"
                  }
                ]
              },
              "pos": {
                "oneOf": [
                  {
                    "$ref": "#/components/schemas/PosDetails"
                  },
                  {
                    "type": "null"
                  }
                ]
              }
            }
          }
        ]
      },
      "PosCompleteRequest": {
        "type": "object",
        "description": "Send `gateway_order_token`, or the `order_id` sent to init.",
        "properties": {
          "gateway_order_token": {
            "type": "string",
            "description": "The order's `token` from init."
          },
          "order_id": {
            "type": "string"
          },
          "outcome_status": {
            "type": "string",
            "enum": [
              "approved",
              "cancelled",
              "declined",
              "error"
            ]
          },
          "response_text": {
            "type": "string"
          },
          "processed_amount": {
            "type": "number"
          },
          "tip": {
            "type": "number"
          },
          "receipt": {
            "$ref": "#/components/schemas/PosReceipt"
          },
          "raw_result": {
            "type": "object",
            "description": "The Dime app's result, as returned to your app."
          }
        }
      },
      "EntityType": {
        "type": "string",
        "enum": [
          "TRANSFER",
          "INVOICE",
          "ORDER",
          "BILL",
          "POS",
          "PRODUCT"
        ]
      },
      "ChargebackStatus": {
        "type": "string",
        "enum": [
          "RECEIVED",
          "UNDER_REVIEW",
          "REPRESENTED",
          "WON",
          "LOST",
          "ACCEPTED"
        ],
        "description": "`RECEIVED`: new; awaiting your response. `UNDER_REVIEW`: you\ndisputed it; Dime is reviewing. `REPRESENTED`: set by Dime while the\ndispute is with the card network. `WON` / `LOST`: the outcome of a\ndispute. `ACCEPTED`: you conceded it, or the deadline passed with no\nresponse.\n",
        "example": "RECEIVED"
      },
      "ChargebackReason": {
        "type": "string",
        "description": "The reason the cardholder gave, as recorded by Dime.",
        "enum": [
          "FRAUD",
          "PRODUCT_NOT_RECEIVED",
          "SERVICE_NOT_PROVIDED",
          "DUPLICATE",
          "CANCELLED_RECURRING",
          "DEFECTIVE_PRODUCT",
          "CREDIT_NOT_PROCESSED",
          "UNRECOGNIZED",
          "PROCESSING_ERROR",
          "OTHER"
        ]
      },
      "Chargeback": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "chargeback"
          },
          "token": {
            "type": "string",
            "description": "Identifies the chargeback. Use it to address the chargeback in URLs.",
            "example": "chb_KfDdVMbE_xOCOU6Kj_YlmeI4S5_kgpSOvk"
          },
          "status": {
            "$ref": "#/components/schemas/ChargebackStatus"
          },
          "reason_code": {
            "$ref": "#/components/schemas/ChargebackReason"
          },
          "source": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "CARD",
              "SAVED_CARD",
              "APPLE_PAY",
              "GOOGLE_PAY",
              "SAMSUNG_PAY",
              "WALLET",
              "POINTS",
              "LYNK_WALLET",
              null
            ],
            "description": "How the disputed payment was taken.",
            "example": "CARD"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "amount": {
            "type": "number",
            "description": "The disputed amount, in the currency's major unit.",
            "example": 1100
          },
          "transaction_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The disputed transaction's `token`. Retrieve it with\n`GET /transactions/{token}`.\n",
            "example": "txn_20261027_PBFpP02"
          },
          "transaction_token": {
            "type": [
              "string",
              "null"
            ],
            "description": "The same value as `transaction_id`.",
            "example": "txn_20261027_PBFpP02"
          },
          "transaction_display_id": {
            "type": [
              "string",
              "null"
            ],
            "example": "TXN-1"
          },
          "order_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The `token` of the order the transaction paid, when there is one.",
            "example": "ord_20261027_V1StGXR"
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer's `token`, when one is attached.",
            "example": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW"
          },
          "customer": {
            "type": [
              "object",
              "null"
            ],
            "description": "The cardholder's name and email as recorded on the chargeback.",
            "properties": {
              "name": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              }
            }
          },
          "last_four_digits": {
            "type": [
              "string",
              "null"
            ],
            "example": "4242"
          },
          "card_scheme": {
            "type": [
              "string",
              "null"
            ],
            "example": "VISA"
          },
          "notes": {
            "type": [
              "string",
              "null"
            ],
            "description": "Notes recorded by Dime. The `notes` you send with a dispute are not stored here."
          },
          "files": {
            "type": "array",
            "description": "Evidence files attached by Dime.",
            "items": {}
          },
          "fee_paid": {
            "type": "boolean"
          },
          "received_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the card network reported the chargeback."
          },
          "responded_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When Dime last updated the chargeback."
          },
          "resolution_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the chargeback reached `WON`, `LOST` or `REPRESENTED`."
          },
          "dispute_deadline": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "The last moment a dispute is accepted: 30 days after the\nchargeback was created (or after `responded_at`, when set).\nAfter this, the chargeback is recorded as `ACCEPTED`.\n"
          },
          "created_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          },
          "updated_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time"
          }
        }
      },
      "Subscription": {
        "type": "object",
        "properties": {
          "object": {
            "type": "string",
            "const": "subscription",
            "example": "subscription"
          },
          "token": {
            "type": [
              "string",
              "null"
            ],
            "description": "Identifies the subscription. Use it in URLs and as `token` in the\ncancel, pause, resume and reinstate requests.\n",
            "example": "sub_pESz9qv3_M4rhjWUy_KMaAVBqb_XyCKvmZ"
          },
          "status": {
            "type": "string",
            "enum": [
              "ACTIVE",
              "PAUSED",
              "CANCELLED",
              "COMPLETE",
              "PENDING",
              "PENDING_CANCELLATION",
              "SUSPENDED",
              "TRIALING"
            ],
            "description": "You can set `ACTIVE`, `PAUSED` or `CANCELLED` with\n`PUT /subscriptions/cancel`. Dime sets the others.\n",
            "example": "ACTIVE"
          },
          "frequency": {
            "type": "string",
            "enum": [
              "WEEKLY",
              "MONTHLY",
              "YEARLY"
            ],
            "example": "WEEKLY"
          },
          "billing_cycles": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Charges remaining after the first. `null` when it runs until cancelled.",
            "example": 11
          },
          "end_type": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "CANCEL",
              "CYCLE",
              null
            ],
            "description": "`CANCEL` runs until cancelled; `CYCLE` stops after `billing_cycles`.",
            "example": "CANCEL"
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "amount": {
            "type": [
              "number",
              "null"
            ],
            "example": 1100
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer's `token`, when one is attached.",
            "example": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW"
          },
          "start_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-08-26T00:48:52.252Z"
          },
          "end_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2027-08-26T00:48:52.252Z"
          },
          "next_billing_date": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-09-26T00:48:52.252Z"
          },
          "paused": {
            "type": "boolean",
            "description": "Whether the next billing cycle will be skipped.",
            "example": false
          },
          "paused_days": {
            "type": [
              "integer",
              "null"
            ],
            "description": "Days the next cycle was pushed out by, when paused.",
            "example": 14
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-08-26T00:48:52.252Z"
          }
        }
      },
      "Capabilities": {
        "type": "object",
        "description": "What the linked merchant allows you to do.",
        "properties": {
          "payments": {
            "type": "boolean",
            "description": "Take payments naming this merchant in `bridge.destination`.",
            "example": true
          },
          "transfers": {
            "type": "boolean",
            "description": "Send it Bridge transfers.",
            "example": true
          }
        }
      },
      "BridgePrefill": {
        "type": "object",
        "description": "Details you already know. Every field is optional. Unknown keys, `null`\nand empty strings are dropped. Values are checked and normalized; the\nfirst invalid field rejects the request with `400 parameter_invalid`\nand `param` set to `prefill.<field>`. `<`, `>` and control characters\nare rejected everywhere. See \"Prefill fields\" in the Dime Bridge guide.\n",
        "properties": {
          "business_name": {
            "type": "string",
            "maxLength": 100,
            "example": "Jane's Store"
          },
          "business_type": {
            "type": "string",
            "enum": [
              "SOLE_TRADER",
              "PARTNERSHIP",
              "LIMITED_LIABILITY_COMPANY",
              "NON_PROFIT"
            ],
            "description": "Case-insensitive; spaces and hyphens count as underscores. Stored upper case.",
            "example": "SOLE_TRADER"
          },
          "legal_name": {
            "type": "string",
            "maxLength": 100,
            "example": "Jane Doe Trading Ltd"
          },
          "first_name": {
            "type": "string",
            "maxLength": 50,
            "description": "Letters, spaces, apostrophes, hyphens and periods.",
            "example": "Jane"
          },
          "last_name": {
            "type": "string",
            "maxLength": 50,
            "description": "Letters, spaces, apostrophes, hyphens and periods.",
            "example": "Doe"
          },
          "phone_number": {
            "type": "string",
            "description": "Must be valid for its country's numbering plan. Send E.164\n(`+18765550123`); a national number is accepted only together\nwith `address_country` or `country`. Stored as E.164.\n",
            "example": "+18765550123"
          },
          "website_url": {
            "type": "string",
            "format": "uri",
            "maxLength": 2048,
            "description": "Absolute `https://` or `http://` URL on a public domain name. No IP addresses, localhost or credentials.",
            "example": "https://janestore.example"
          },
          "mcc": {
            "type": "string",
            "pattern": "^\\d{4}$",
            "description": "A supported merchant category code. Dime still reviews a prefilled MCC.",
            "enum": [
              "0742",
              "0763",
              "0780",
              "1520",
              "1711",
              "1731",
              "1740",
              "1750",
              "1761",
              "1771",
              "1799",
              "2741",
              "4011",
              "4111",
              "4112",
              "4119",
              "4121",
              "4131",
              "4214",
              "4215",
              "4411",
              "4511",
              "4582",
              "4722",
              "4784",
              "4812",
              "4814",
              "4816",
              "4829",
              "4899",
              "4900",
              "5045",
              "5111",
              "5122",
              "5200",
              "5211",
              "5251",
              "5300",
              "5310",
              "5311",
              "5411",
              "5462",
              "5511",
              "5541",
              "5542",
              "5611",
              "5621",
              "5651",
              "5661",
              "5712",
              "5722",
              "5732",
              "5734",
              "5811",
              "5812",
              "5813",
              "5814",
              "5815",
              "5816",
              "5817",
              "5818",
              "5912",
              "5941",
              "5942",
              "5967",
              "5968",
              "5969",
              "7011",
              "7210",
              "7230",
              "7273",
              "7276",
              "7311",
              "7372",
              "7392",
              "7399",
              "7538",
              "7995",
              "7997",
              "8011",
              "8021",
              "8062",
              "8111",
              "8211",
              "8220",
              "8398",
              "8931",
              "8999",
              "9211",
              "9222",
              "9311",
              "9399",
              "9402"
            ],
            "example": "5734"
          },
          "country": {
            "type": "string",
            "description": "Same as `address_country`; prefer `address_country`. If both are sent they must match. Stored as alpha-2.",
            "example": "JM"
          },
          "currency": {
            "type": "string",
            "description": "Must be `USD` or the local currency of the country you send. Stored upper case.",
            "enum": [
              "AED",
              "ANG",
              "AOA",
              "ARS",
              "AUD",
              "AWG",
              "BBD",
              "BDT",
              "BGN",
              "BHD",
              "BOB",
              "BRL",
              "BSD",
              "BWP",
              "BZD",
              "CAD",
              "CHF",
              "CLP",
              "CNY",
              "COP",
              "CRC",
              "CUP",
              "CZK",
              "DKK",
              "DOP",
              "DZD",
              "EGP",
              "ETB",
              "GBP",
              "GHS",
              "GTQ",
              "GYD",
              "HKD",
              "HNL",
              "HRK",
              "HTG",
              "HUF",
              "IDR",
              "ILS",
              "INR",
              "IQD",
              "IRR",
              "JMD",
              "JOD",
              "JPY",
              "KES",
              "KHR",
              "KRW",
              "KWD",
              "KYD",
              "LAK",
              "LBP",
              "LKR",
              "LYD",
              "MAD",
              "MMK",
              "MNT",
              "MXN",
              "MYR",
              "MZN",
              "NAD",
              "NGN",
              "NIO",
              "NOK",
              "NPR",
              "NZD",
              "OMR",
              "PAB",
              "PEN",
              "PHP",
              "PKR",
              "PLN",
              "PYG",
              "QAR",
              "RON",
              "RUB",
              "RWF",
              "SAR",
              "SDG",
              "SEK",
              "SGD",
              "SRD",
              "THB",
              "TND",
              "TRY",
              "TTD",
              "TWD",
              "TZS",
              "UGX",
              "USD",
              "UYU",
              "VES",
              "VND",
              "XAF",
              "XCD",
              "XOF",
              "ZAR",
              "ZMW",
              "ZWL"
            ],
            "example": "JMD"
          },
          "address_street": {
            "type": "string",
            "maxLength": 200,
            "example": "1 Market St"
          },
          "address_city": {
            "type": "string",
            "maxLength": 100,
            "example": "Kingston"
          },
          "address_state": {
            "type": "string",
            "maxLength": 100,
            "example": "St Andrew"
          },
          "address_postal_code": {
            "type": "string",
            "maxLength": 12,
            "pattern": "^[A-Za-z0-9](?:[A-Za-z0-9 -]{0,10}[A-Za-z0-9])?$",
            "description": "Stored upper case.",
            "example": "JMAAW10"
          },
          "address_country": {
            "type": "string",
            "description": "ISO 3166-1 alpha-2 (`JM`), alpha-3 (`JAM`) or English name (`Jamaica`). Stored as alpha-2.",
            "example": "JM"
          }
        }
      },
      "BridgeRequest": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "Identifies the request. Use it in `/bridge/requests/{token}` URLs.",
            "example": "brq_ksV-MbRi_uWgDF4iD_jNf6oBHl_PIq3pl8"
          },
          "object": {
            "type": "string",
            "const": "bridge_request",
            "example": "bridge_request"
          },
          "email": {
            "type": "string",
            "example": "vendor@example.com"
          },
          "account_type": {
            "type": "string",
            "enum": [
              "standard",
              "express"
            ],
            "example": "standard"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "approved",
              "declined",
              "cancelled",
              "expired"
            ],
            "example": "pending"
          },
          "capabilities": {
            "$ref": "#/components/schemas/Capabilities"
          },
          "prefill": {
            "oneOf": [
              {
                "$ref": "#/components/schemas/BridgePrefill"
              },
              {
                "type": "null"
              }
            ]
          },
          "bridge_merchant": {
            "type": [
              "string",
              "null"
            ],
            "description": "The linked merchant's `token`, once approved.",
            "example": null
          },
          "return_url": {
            "type": [
              "string",
              "null"
            ],
            "example": "https://marketplace.example/dashboard"
          },
          "refresh_url": {
            "type": [
              "string",
              "null"
            ],
            "example": "https://marketplace.example/bridge/refresh?vendor=v_123"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-12-11T15:04:05.000Z"
          },
          "resolved_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": null
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true,
            "example": {
              "vendor_id": "v_123"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-11T15:04:05.000Z"
          }
        }
      },
      "CreateBridgeRequest": {
        "type": "object",
        "required": [
          "email"
        ],
        "properties": {
          "email": {
            "type": "string",
            "format": "email",
            "description": "The merchant's email. Stored lowercased.",
            "example": "vendor@example.com"
          },
          "account_type": {
            "type": "string",
            "enum": [
              "standard",
              "express"
            ],
            "default": "standard",
            "description": "`standard` is a full Dime merchant. `express`, a merchant that\nexists only within your marketplace, is reserved and currently\nreturns `parameter_unsupported`.\n",
            "example": "standard"
          },
          "capabilities": {
            "allOf": [
              {
                "$ref": "#/components/schemas/Capabilities"
              }
            ],
            "description": "At least one must be `true`. Defaults to payments only."
          },
          "prefill": {
            "$ref": "#/components/schemas/BridgePrefill"
          },
          "return_url": {
            "type": "string",
            "format": "uri",
            "description": "Where the merchant goes when they finish. `https` in production.",
            "example": "https://marketplace.example/dashboard"
          },
          "refresh_url": {
            "type": "string",
            "format": "uri",
            "description": "Where the merchant goes when a link was already used or has expired. Create a new link there.",
            "example": "https://marketplace.example/bridge/refresh?vendor=v_123"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "description": "Your own key-value data, returned as you sent it.",
            "example": {
              "vendor_id": "v_123"
            }
          }
        }
      },
      "BridgeLink": {
        "type": "object",
        "description": "A link has no token of its own and cannot be retrieved later. Its\nonly identifier is the secret in `url`, which is returned once.\n",
        "properties": {
          "object": {
            "type": "string",
            "const": "bridge_link",
            "example": "bridge_link"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Send the merchant here. Works once.",
            "example": "https://portal.dimepay.app/bridge/onboard/brl_V1StGXR8Z5jdHi6BmyT2"
          },
          "bridge_request": {
            "type": "string",
            "description": "The `token` of the request the link opens.",
            "example": "brq_ksV-MbRi_uWgDF4iD_jNf6oBHl_PIq3pl8"
          },
          "expires_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-11T15:14:05.000Z"
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-11T15:04:05.000Z"
          }
        }
      },
      "BridgeMerchant": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "Identifies the linked merchant. Use it as `bridge.destination` on\na payment, as a transfer's `destination`, and in\n`/bridge/merchants/{token}` URLs.\n",
            "example": "brm_9CKxgfQk_jDKOHNVm_H8696T87_2alsOAP"
          },
          "object": {
            "type": "string",
            "const": "bridge_merchant",
            "example": "bridge_merchant"
          },
          "account_type": {
            "type": "string",
            "enum": [
              "standard",
              "express"
            ],
            "example": "standard"
          },
          "status": {
            "type": "string",
            "enum": [
              "active",
              "paused",
              "revoked"
            ],
            "example": "active"
          },
          "capabilities": {
            "$ref": "#/components/schemas/Capabilities"
          },
          "payments_enabled": {
            "type": "boolean",
            "description": "`true` when the link is active, `payments` was granted, and Dime has\napproved the merchant. Check this before taking a payment.\n",
            "example": true
          },
          "merchant": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "business_name": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "Jane's Store"
              },
              "logo_url": {
                "type": [
                  "string",
                  "null"
                ],
                "example": null
              },
              "country": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "JM"
              }
            }
          },
          "bridge_request": {
            "type": [
              "string",
              "null"
            ],
            "description": "The `token` of the request that created the link, when there was one.",
            "example": "brq_ksV-MbRi_uWgDF4iD_jNf6oBHl_PIq3pl8"
          },
          "approved_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-11-11T15:20:00.000Z"
          },
          "revoked_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": null
          },
          "revoked_by": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "marketplace",
              "linked_merchant",
              "dime",
              null
            ],
            "example": null
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true,
            "example": null
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-11T15:20:00.000Z"
          }
        }
      },
      "BridgeTransferItem": {
        "type": "object",
        "required": [
          "name",
          "price",
          "quantity"
        ],
        "properties": {
          "name": {
            "type": "string",
            "example": "Handmade mug"
          },
          "price": {
            "type": "number",
            "minimum": 0,
            "example": 12.5
          },
          "quantity": {
            "type": "integer",
            "minimum": 1,
            "example": 2
          },
          "sku": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255,
            "example": "MUG-01"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "image_url": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          },
          "external_id": {
            "type": [
              "string",
              "null"
            ],
            "maxLength": 255
          }
        }
      },
      "BridgeTransfer": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "Identifies the transfer. Use it in `/bridge/transfers/{token}` URLs.",
            "example": "btr_ghUDrzcz_8WNcGewb_HC7S6U6-_gR-3I3w"
          },
          "object": {
            "type": "string",
            "const": "bridge_transfer",
            "example": "bridge_transfer"
          },
          "destination": {
            "type": [
              "string",
              "null"
            ],
            "description": "The linked merchant's `token`.",
            "example": "brm_9CKxgfQk_jDKOHNVm_H8696T87_2alsOAP"
          },
          "amount": {
            "type": "number",
            "example": 25
          },
          "amount_reversed": {
            "type": "number",
            "description": "How much of the transfer has been reversed so far, including reversals still pending.",
            "example": 10
          },
          "reversed": {
            "type": "boolean",
            "description": "`true` once the whole transfer has been reversed.",
            "example": false
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "complete",
              "failed",
              "reversed"
            ],
            "description": "`pending` until the money has moved, then `complete`. `reversed` once the whole transfer has been reversed; a partly reversed transfer stays `complete`.",
            "example": "complete"
          },
          "source_transaction_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The `token` of the payment this paid out from, when one was given.",
            "example": "txn_20261027_PBFpP02"
          },
          "destination_transaction": {
            "type": [
              "string",
              "null"
            ],
            "description": "The `token` of the linked merchant's incoming transaction for this transfer.",
            "example": "txn_20261027_Wd3FhK7"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BridgeTransferItem"
            }
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "example": "Order 1234 vendor payout"
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true,
            "example": {
              "order": "1234"
            }
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-11T16:00:00.000Z"
          }
        }
      },
      "CreateBridgeTransfer": {
        "type": "object",
        "required": [
          "destination",
          "amount",
          "currency",
          "source_transaction_id"
        ],
        "properties": {
          "destination": {
            "type": "string",
            "description": "The linked merchant's `token`. A database id is rejected with `400`.",
            "example": "brm_9CKxgfQk_jDKOHNVm_H8696T87_2alsOAP"
          },
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "In major units, at most two decimal places.",
            "example": 25
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "source_transaction_id": {
            "type": "string",
            "description": "Required. The `token` of the payment this pays out from. Must be\none of your settled payments, in the same currency. The transfer\nand its reversals are shown under this payment in your\ntransaction details. A database id is rejected with `400`.\n",
            "example": "txn_20261027_PBFpP02"
          },
          "description": {
            "type": "string",
            "maxLength": 255,
            "example": "Order 1234 vendor payout"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true,
            "example": {
              "order": "1234"
            }
          },
          "items": {
            "description": "What the transfer pays for. Shown on the transfer's order in both\nmerchants' transaction lists. Their total does not have to match\n`amount`.\n",
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/BridgeTransferItem"
            }
          }
        }
      },
      "BridgeTransferReversal": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "Identifies the reversal.",
            "example": "trr_Hq3ZgP0k_Lm2VbN8x_Rt5WcY1e_Q9sDfGh"
          },
          "object": {
            "type": "string",
            "const": "bridge_transfer_reversal",
            "example": "bridge_transfer_reversal"
          },
          "transfer": {
            "type": [
              "string",
              "null"
            ],
            "description": "The `token` of the transfer this reverses.",
            "example": "btr_ghUDrzcz_8WNcGewb_HC7S6U6-_gR-3I3w"
          },
          "amount": {
            "type": "number",
            "example": 10
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "status": {
            "type": "string",
            "enum": [
              "pending",
              "complete"
            ],
            "description": "`pending` until the money has moved, then `complete`.",
            "example": "pending"
          },
          "destination_transaction": {
            "type": [
              "string",
              "null"
            ],
            "description": "The `token` of the linked merchant's refund transaction for this reversal.",
            "example": "txn_20261027_Wd3FhK7"
          },
          "items": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/BridgeTransferItem"
            }
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "example": "Order 1234 item returned"
          },
          "metadata": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": true
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-11-13T16:00:00.000Z"
          }
        }
      },
      "CreateBridgeTransferReversal": {
        "type": "object",
        "properties": {
          "amount": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "How much to take back. Leave out to reverse everything not yet reversed.",
            "example": 10
          },
          "description": {
            "type": "string",
            "maxLength": 255,
            "example": "Order 1234 item returned"
          },
          "metadata": {
            "type": "object",
            "additionalProperties": true
          },
          "items": {
            "description": "What is being reversed. Shown on the refund transaction on both sides.",
            "type": "array",
            "maxItems": 100,
            "items": {
              "$ref": "#/components/schemas/BridgeTransferItem"
            }
          }
        }
      },
      "WebhookEndpoint": {
        "type": "object",
        "properties": {
          "token": {
            "type": "string",
            "description": "Identifies the endpoint. Used in URLs, and as `endpoint_id` on an event's deliveries.",
            "example": "hep_kBXRfasu_Ard5VWhe_xECb9iAV_IyX1JdD"
          },
          "object": {
            "type": "string",
            "const": "webhook_endpoint",
            "example": "webhook_endpoint"
          },
          "url": {
            "type": "string",
            "format": "uri",
            "example": "https://example.com/webhooks/dime"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "example": "Production order events"
          },
          "is_active": {
            "type": "boolean",
            "description": "`false` stops deliveries; events are still recorded.",
            "example": true
          },
          "enabled_events": {
            "type": [
              "array",
              "null"
            ],
            "description": "Event types this endpoint receives. `null` means every event.",
            "items": {
              "type": "string"
            },
            "example": null
          },
          "created_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-28T14:02:11.000Z"
          }
        }
      },
      "CreateWebhookEndpointRequest": {
        "type": "object",
        "required": [
          "url"
        ],
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "description": "Must be `https://` and resolve to a public address.",
            "example": "https://example.com/webhooks/dime"
          },
          "description": {
            "type": "string",
            "example": "Production order events"
          },
          "enabled_events": {
            "type": "array",
            "description": "Event types to receive, from `GET /webhook-event-types`. Omit for every event.",
            "items": {
              "type": "string"
            },
            "example": [
              "payment.succeeded",
              "payment.failed"
            ]
          }
        }
      },
      "WebhookEndpointWithSecret": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEndpoint"
          },
          {
            "type": "object",
            "properties": {
              "signing_secret": {
                "type": "string",
                "description": "HMAC key for verifying deliveries. Returned only when the\nendpoint is created or the secret is rotated.\n",
                "example": "whsec_V1StGXR8_Z5jdHi6BmyT2kQ4pL7nR9sW1xZ3cE5v"
              }
            }
          }
        ]
      },
      "UpdateWebhookEndpointRequest": {
        "type": "object",
        "properties": {
          "url": {
            "type": "string",
            "format": "uri",
            "example": "https://example.com/webhooks/dime-v2"
          },
          "description": {
            "type": [
              "string",
              "null"
            ],
            "description": "Send `null` to clear it.",
            "example": "Production order events"
          },
          "is_active": {
            "type": "boolean",
            "example": false
          },
          "enabled_events": {
            "type": "array",
            "description": "Replaces the list. Send `[]` to receive every event.",
            "items": {
              "type": "string"
            },
            "example": [
              "payment.succeeded"
            ]
          }
        }
      },
      "WebhookDelivery": {
        "type": "object",
        "description": "One attempt series to one endpoint.",
        "properties": {
          "endpoint_id": {
            "type": "string",
            "description": "The `token` of the endpoint the event was sent to.",
            "example": "hep_kBXRfasu_Ard5VWhe_xECb9iAV_IyX1JdD"
          },
          "status": {
            "type": "string",
            "enum": [
              "PENDING",
              "DELIVERED",
              "FAILED"
            ],
            "description": "`PENDING` while attempts remain, `DELIVERED` once your endpoint\nanswered `2xx`, `FAILED` after the ninth failed attempt, a replay,\nor pausing the endpoint.\n",
            "example": "DELIVERED"
          },
          "attempt_count": {
            "type": "integer",
            "description": "Attempts made so far, at most 9.",
            "example": 1
          },
          "last_attempt_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-10-27T15:04:07.120Z"
          },
          "next_attempt_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "description": "When the next automatic retry is due. `null` unless `PENDING`.",
            "example": null
          },
          "attempts": {
            "type": "array",
            "description": "Every attempt, oldest first. Returned by `GET /webhook-events/{token}` only.",
            "items": {
              "type": "object",
              "properties": {
                "attempt": {
                  "type": "integer",
                  "example": 1
                },
                "attempted_at": {
                  "type": "string",
                  "format": "date-time",
                  "example": "2026-10-27T15:04:07.120Z"
                },
                "response_status": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "description": "HTTP status your endpoint returned; `null` on a timeout or connection error.",
                  "example": 503
                },
                "error": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "example": "non-2xx (503)"
                },
                "duration_ms": {
                  "type": [
                    "integer",
                    "null"
                  ],
                  "example": 412
                }
              }
            }
          },
          "last_response_status": {
            "type": [
              "integer",
              "null"
            ],
            "description": "HTTP status your endpoint last returned.",
            "example": 200
          },
          "last_error": {
            "type": [
              "string",
              "null"
            ],
            "example": null
          },
          "delivered_at": {
            "type": [
              "string",
              "null"
            ],
            "format": "date-time",
            "example": "2026-10-27T15:04:07.631Z"
          }
        }
      },
      "WebhookEvent": {
        "type": "object",
        "properties": {
          "token": {
            "type": [
              "string",
              "null"
            ],
            "description": "Identifies the event. Used in URLs and as a pagination cursor.",
            "example": "whe_W2uMzOzd_QxAOG0la_PjxFZOhI_ryYAE1l"
          },
          "object": {
            "type": "string",
            "const": "webhook_event",
            "example": "webhook_event"
          },
          "event_id": {
            "type": "string",
            "description": "The `event_id` carried in the delivered body.",
            "example": "evt_V1StGXR8Z5jdHi6BmyT2"
          },
          "event_type": {
            "type": "string",
            "example": "payment.succeeded"
          },
          "resource_type": {
            "type": "string",
            "enum": [
              "payment",
              "refund",
              "chargeback",
              "customer",
              "card_request",
              "subscription",
              "order"
            ],
            "example": "payment"
          },
          "resource_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The `token` of the record the event is about: a transaction's\nfor `payment` and `refund`, otherwise the token of the kind named\nby `resource_type`.\n",
            "example": "txn_20261027_PBFpP02"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "example": "2026-10-27T15:04:07.112Z"
          },
          "deliveries": {
            "type": "array",
            "description": "One entry per endpoint the event was sent to. Empty if no endpoint was subscribed at the time.",
            "items": {
              "$ref": "#/components/schemas/WebhookDelivery"
            }
          }
        }
      },
      "WebhookEnvelope": {
        "type": "object",
        "description": "The body of every delivery. `payload` is documented for each event.\n",
        "required": [
          "event_id",
          "event_type",
          "occurred_at",
          "owner_type",
          "owner_id",
          "resource_type",
          "resource_id",
          "payload",
          "signature_version"
        ],
        "properties": {
          "event_id": {
            "type": "string",
            "description": "Unique per event, and the same on every redelivery and replay of it. Use it to discard duplicates.",
            "example": "evt_V1StGXR8Z5jdHi6BmyT2"
          },
          "event_type": {
            "type": "string",
            "description": "What happened. Branch on this, and ignore values you do not recognise: new events may be added.",
            "example": "payment.succeeded"
          },
          "occurred_at": {
            "type": "string",
            "format": "date-time",
            "description": "When Dime sent the event. Events can arrive out of order; use this to order them.",
            "example": "2026-10-27T15:04:07.112Z"
          },
          "owner_type": {
            "type": "string",
            "const": "merchant",
            "example": "merchant"
          },
          "owner_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Your merchant token.",
            "example": "m82yalYupLIdpAz"
          },
          "addon_subscription_id": {
            "type": "null",
            "description": "Always `null`.",
            "example": null
          },
          "resource_type": {
            "type": "string",
            "enum": [
              "payment",
              "refund",
              "chargeback",
              "customer",
              "card_request",
              "subscription",
              "invoice",
              "order",
              "bank_transfer",
              "bank_account",
              "settlement",
              "bridge_request",
              "bridge_merchant",
              "bridge_transfer"
            ],
            "example": "payment"
          },
          "resource_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The `token` of the record the event is about: a transaction's\nfor `payment` and `refund`, otherwise the token of the kind named\nby `resource_type`.\n",
            "example": "txn_20261027_PBFpP02"
          },
          "payload": {
            "type": "object",
            "additionalProperties": true
          },
          "signature_version": {
            "type": "string",
            "const": "v1",
            "example": "v1"
          }
        }
      },
      "WebhookTransaction": {
        "type": "object",
        "additionalProperties": true,
        "description": "The transaction record, with internal fields removed. Every record is\nnamed by its `token`, as in API responses; no database id is sent.\nWhere a block names your merchant it does so as `merchant`, holding\nyour merchant token. Other stored fields may be present. Rely on the\nfields listed here; use `token` with `GET /transactions/{token}` for\nthe full v2 object.\n",
        "properties": {
          "token": {
            "type": [
              "string",
              "null"
            ],
            "description": "Use with `GET /transactions/{token}`.",
            "example": "txn_20261027_PBFpP02"
          },
          "status": {
            "$ref": "#/components/schemas/TransactionStatus"
          },
          "amount": {
            "type": "number",
            "example": 1100
          },
          "final_amount": {
            "type": [
              "number",
              "null"
            ],
            "example": 1100
          },
          "currency": {
            "$ref": "#/components/schemas/Currency"
          },
          "authorized": {
            "type": "boolean",
            "example": true
          },
          "captured": {
            "type": "boolean",
            "example": true
          },
          "refunded": {
            "type": "boolean",
            "example": false
          },
          "voided": {
            "type": [
              "boolean",
              "null"
            ],
            "example": false
          },
          "settled": {
            "type": "boolean",
            "example": false
          },
          "fees": {
            "type": [
              "number",
              "null"
            ],
            "description": "Total processing fee, once calculated.",
            "example": null
          },
          "error_code": {
            "type": [
              "string",
              "null"
            ],
            "example": null
          },
          "error_message": {
            "type": [
              "string",
              "null"
            ],
            "example": null
          },
          "reference_transaction_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "On a refund, capture or void, the original transaction's `token`.",
            "example": null
          },
          "entity_type": {
            "type": "string",
            "example": "ORDER"
          },
          "entity_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The `token` of what the transaction settled against: the order's\nwhen `entity_type` is `ORDER`, the invoice's for `INVOICE`, the\nproduct's for `PRODUCT`. `null` for other types.\n",
            "example": "ord_20261027_V1StGXR"
          },
          "customer_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "The customer's `token`, when the transaction has a customer.",
            "example": null
          },
          "bridge_merchant_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Dime Bridge payments only. The linked merchant's `token`.",
            "example": null
          },
          "bridge_marketplace_merchant_id": {
            "type": [
              "string",
              "null"
            ],
            "description": "Dime Bridge payments only. The marketplace's merchant token.",
            "example": null
          },
          "usd_preferred": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "`true` when the order opted in to USD preference. It does not mean\nthe payment was switched; check `usd_conversion`.\n",
            "example": null
          },
          "usd_conversion": {
            "$ref": "#/components/schemas/UsdConversion"
          },
          "source_details": {
            "type": [
              "object",
              "null"
            ],
            "properties": {
              "last_four_digits": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "4242"
              },
              "card_scheme": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "visa"
              },
              "cardholder_name": {
                "type": [
                  "string",
                  "null"
                ],
                "example": "Jane Chen"
              }
            }
          },
          "split": {
            "type": [
              "array",
              "null"
            ],
            "description": "Deprecated v1 Dime Bridge split only. Per-merchant `fee`, `gross_amount` and `net_amount`. v2 Bridge payments carry their breakdown under `metadata.bridge`; use `GET /transactions/{token}` for the `bridge` object.",
            "items": {
              "type": "object",
              "additionalProperties": true
            }
          },
          "order": {
            "type": "object",
            "additionalProperties": true,
            "description": "The order record, with internal fields removed. `customer_id` and\n`subscription_id`, when present, hold tokens.\n",
            "properties": {
              "token": {
                "type": "string",
                "example": "ord_20261027_V1StGXR"
              },
              "status": {
                "type": "string",
                "example": "COMPLETE"
              },
              "origin_id": {
                "type": "string",
                "description": "The `id` you sent when creating the order.",
                "example": "ac58293d-a2c5-4979-8ef7-f3d4a9354b63"
              },
              "metadata": {
                "type": "object",
                "additionalProperties": true,
                "description": "The order's stored settings. The `metadata` you sent is under\n`details`; the other keys are Dime's.\n",
                "properties": {
                  "details": {
                    "type": "object",
                    "additionalProperties": true,
                    "example": {
                      "cart_id": "cart_8812"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "PaymentWebhook": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "event_type": {
                "type": "string",
                "enum": [
                  "payment.authorised",
                  "payment.succeeded",
                  "payment.failed",
                  "payment.voided",
                  "payment.abandoned",
                  "payment.settled"
                ],
                "example": "payment.succeeded"
              },
              "resource_type": {
                "type": "string",
                "const": "payment",
                "example": "payment"
              },
              "payload": {
                "type": "object",
                "required": [
                  "transaction"
                ],
                "properties": {
                  "transaction": {
                    "$ref": "#/components/schemas/WebhookTransaction"
                  }
                }
              }
            }
          }
        ]
      },
      "RefundWebhook": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "event_type": {
                "type": "string",
                "const": "refund.processed",
                "example": "refund.processed"
              },
              "resource_type": {
                "type": "string",
                "const": "refund",
                "example": "refund"
              },
              "payload": {
                "type": "object",
                "required": [
                  "transaction",
                  "refund"
                ],
                "properties": {
                  "transaction": {
                    "$ref": "#/components/schemas/WebhookTransaction"
                  },
                  "refund": {
                    "type": "object",
                    "properties": {
                      "refund_id": {
                        "type": "string",
                        "description": "The refund transaction's `token`.",
                        "example": "txn_20261027_3CqXuOw"
                      },
                      "transaction_id": {
                        "type": "string",
                        "description": "The refunded transaction's `token`.",
                        "example": "txn_20261027_PBFpP02"
                      },
                      "amount": {
                        "type": "number",
                        "example": 500
                      },
                      "currency": {
                        "$ref": "#/components/schemas/Currency"
                      },
                      "fully_refunded": {
                        "type": "boolean",
                        "example": false
                      },
                      "subscription_id": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "The subscription's `token`, when the refunded payment was a subscription charge.",
                        "example": null
                      }
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "ChargebackWebhook": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "event_type": {
                "type": "string",
                "enum": [
                  "chargeback.created",
                  "chargeback.under_review",
                  "chargeback.represented",
                  "chargeback.won",
                  "chargeback.lost",
                  "chargeback.accepted"
                ],
                "example": "chargeback.created"
              },
              "resource_type": {
                "type": "string",
                "const": "chargeback",
                "example": "chargeback"
              },
              "payload": {
                "type": "object",
                "required": [
                  "chargeback"
                ],
                "properties": {
                  "chargeback": {
                    "type": "object",
                    "description": "`transaction_id`, `order_id` and `customer_id` hold tokens.\nUse `token` with `GET /chargebacks/{token}`.\n",
                    "properties": {
                      "token": {
                        "type": "string",
                        "example": "chb_KfDdVMbE_xOCOU6Kj_YlmeI4S5_kgpSOvk"
                      },
                      "status": {
                        "$ref": "#/components/schemas/ChargebackStatus"
                      },
                      "previous_status": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "`null` on `chargeback.created`.",
                        "example": null
                      },
                      "reason_code": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "example": "PRODUCT_NOT_RECEIVED"
                      },
                      "source": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "example": "CARD"
                      },
                      "currency": {
                        "$ref": "#/components/schemas/Currency"
                      },
                      "amount": {
                        "type": "number",
                        "example": 1100
                      },
                      "transaction_id": {
                        "type": "string",
                        "example": "txn_20261027_PBFpP02"
                      },
                      "transaction_display_id": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "example": "ord_20261027_V1StGXR"
                      },
                      "order_id": {
                        "type": "string",
                        "example": "ord_20261027_V1StGXR"
                      },
                      "customer_id": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "example": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW"
                      },
                      "received_at": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time",
                        "example": "2026-10-27T14:03:12.000Z"
                      },
                      "responded_at": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time",
                        "example": null
                      },
                      "resolution_date": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time",
                        "example": null
                      }
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "CardRequestWebhook": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "event_type": {
                "type": "string",
                "enum": [
                  "card_request.card_saved",
                  "card_request.succeeded",
                  "card_request.failed",
                  "card_request.card_deleted"
                ],
                "example": "card_request.succeeded"
              },
              "resource_type": {
                "type": "string",
                "const": "card_request",
                "example": "card_request"
              },
              "payload": {
                "type": "object",
                "additionalProperties": true,
                "description": "Differs by event: the saved card's fields on `card_saved`, a\n`card` object on `succeeded` and `card_deleted`, and the\ntokenization request's token and state on `failed`.\n"
              }
            }
          }
        ]
      },
      "SubscriptionWebhook": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "event_type": {
                "type": "string",
                "enum": [
                  "subscription.created",
                  "subscription.renewed",
                  "subscription.paused",
                  "subscription.resumed",
                  "subscription.cancelled",
                  "subscription.past_due"
                ],
                "example": "subscription.paused"
              },
              "resource_type": {
                "type": "string",
                "const": "subscription",
                "example": "subscription"
              },
              "payload": {
                "type": "object",
                "properties": {
                  "message": {
                    "type": "string",
                    "enum": [
                      "SUBSCRIPTION_CREATED",
                      "SUBSCRIPTION_RENEWED",
                      "SUBSCRIPTION_STATUS_CHANGED"
                    ],
                    "example": "SUBSCRIPTION_STATUS_CHANGED"
                  },
                  "subscription": {
                    "type": "object",
                    "additionalProperties": true,
                    "description": "The subscription record. `order_id` and `customer_id` hold tokens.",
                    "properties": {
                      "token": {
                        "type": "string",
                        "example": "sub_pESz9qv3_M4rhjWUy_KMaAVBqb_XyCKvmZ"
                      },
                      "status": {
                        "type": "string",
                        "example": "PAUSED"
                      },
                      "next_billing_date": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time",
                        "example": "2026-11-27T00:00:00.000Z"
                      }
                    }
                  },
                  "transaction": {
                    "$ref": "#/components/schemas/WebhookTransaction"
                  },
                  "invoice": {
                    "type": "object",
                    "description": "`subscription.renewed` only: the invoice the renewal paid.",
                    "properties": {
                      "token": {
                        "type": "string",
                        "example": "inv_20261027_TEjBMc7"
                      },
                      "invoice_number": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "example": "INV-0007"
                      },
                      "amount": {
                        "type": "number",
                        "example": 1100
                      },
                      "currency": {
                        "type": "string",
                        "example": "JMD"
                      },
                      "status": {
                        "type": "string",
                        "example": "PAID"
                      }
                    }
                  }
                }
              }
            }
          }
        ]
      },
      "CustomerWebhook": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "event_type": {
                "type": "string",
                "enum": [
                  "customer.created",
                  "customer.updated",
                  "customer.deleted"
                ],
                "example": "customer.created"
              },
              "resource_type": {
                "type": "string",
                "const": "customer",
                "example": "customer"
              },
              "payload": {
                "type": "object",
                "required": [
                  "customer"
                ],
                "properties": {
                  "order_id": {
                    "type": [
                      "string",
                      "null"
                    ],
                    "description": "The `token` of the order that created the customer, when there is one.",
                    "example": "ord_20261027_V1StGXR"
                  },
                  "customer": {
                    "type": "object",
                    "description": "The customer record. Use `token` with `GET /customers/{token}`.",
                    "properties": {
                      "token": {
                        "type": "string",
                        "example": "cus_2ex3bH8t_I8wppHr5_nnWIbSOb_0xGEWoW"
                      },
                      "first_name": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "example": "Michael"
                      },
                      "last_name": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "example": "Scott"
                      },
                      "email": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "example": "mscott@example.com"
                      },
                      "phone": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "example": "+18765551234"
                      },
                      "company": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "example": null
                      },
                      "is_active": {
                        "type": "boolean",
                        "example": true
                      },
                      "created_at": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time",
                        "example": "2026-10-27T15:04:05.000Z"
                      }
                    },
                    "additionalProperties": true
                  }
                }
              }
            }
          }
        ]
      },
      "InvoiceWebhook": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "event_type": {
                "type": "string",
                "enum": [
                  "invoice.created",
                  "invoice.deleted"
                ],
                "example": "invoice.created"
              },
              "resource_type": {
                "type": "string",
                "const": "invoice",
                "example": "invoice"
              },
              "payload": {
                "type": "object",
                "required": [
                  "invoice"
                ],
                "properties": {
                  "invoice": {
                    "$ref": "#/components/schemas/Invoice"
                  }
                }
              }
            }
          }
        ]
      },
      "BridgeWebhook": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "event_type": {
                "type": "string",
                "enum": [
                  "bridge_request.created",
                  "bridge_request.approved",
                  "bridge_request.declined",
                  "bridge_request.cancelled",
                  "bridge_request.expired",
                  "bridge_merchant.activated",
                  "bridge_merchant.updated",
                  "bridge_merchant.revoked",
                  "bridge_transfer.created",
                  "bridge_transfer.failed",
                  "bridge_transfer.reversed"
                ],
                "example": "bridge_merchant.activated"
              },
              "resource_type": {
                "type": "string",
                "enum": [
                  "bridge_request",
                  "bridge_merchant",
                  "bridge_transfer",
                  "bridge_transfer_reversal"
                ],
                "example": "bridge_merchant"
              },
              "payload": {
                "type": "object",
                "properties": {
                  "bridge_request": {
                    "$ref": "#/components/schemas/BridgeRequest"
                  },
                  "bridge_merchant": {
                    "$ref": "#/components/schemas/BridgeMerchant"
                  },
                  "bridge_transfer": {
                    "$ref": "#/components/schemas/BridgeTransfer"
                  },
                  "bridge_transfer_reversal": {
                    "$ref": "#/components/schemas/BridgeTransferReversal"
                  }
                }
              }
            }
          }
        ]
      },
      "BankTransferWebhook": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "event_type": {
                "type": "string",
                "enum": [
                  "bank_transfer.created",
                  "bank_transfer.approved",
                  "bank_transfer.rejected"
                ],
                "example": "bank_transfer.created"
              },
              "resource_type": {
                "type": "string",
                "const": "bank_transfer",
                "example": "bank_transfer"
              },
              "payload": {
                "type": "object",
                "required": [
                  "bank_transfer"
                ],
                "properties": {
                  "bank_transfer": {
                    "type": "object",
                    "properties": {
                      "object": {
                        "type": "string",
                        "const": "bank_transfer"
                      },
                      "token": {
                        "type": "string",
                        "example": "btf_zxjtBCUY_83nlZ4Wq_p6v0JBtV_nsPOe7P"
                      },
                      "status": {
                        "type": "string",
                        "enum": [
                          "pending_approval",
                          "approved",
                          "rejected"
                        ]
                      },
                      "amount": {
                        "type": "number"
                      },
                      "fee": {
                        "type": "number"
                      },
                      "currency": {
                        "type": "string"
                      },
                      "destination_amount": {
                        "type": [
                          "number",
                          "null"
                        ]
                      },
                      "destination_currency": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "transfer_method": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "example": "STANDARD"
                      },
                      "reason": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "bank_account": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "description": "The bank account's `token`.",
                        "example": "bac_bEBGGWJo_uNjJq3b1_TSr6c0SS_vvKx2VI"
                      },
                      "rejection_reason": {
                        "type": [
                          "string",
                          "null"
                        ]
                      },
                      "created_at": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      },
                      "decided_at": {
                        "type": [
                          "string",
                          "null"
                        ],
                        "format": "date-time"
                      }
                    },
                    "additionalProperties": true
                  }
                }
              }
            }
          }
        ]
      },
      "BankAccountWebhook": {
        "allOf": [
          {
            "$ref": "#/components/schemas/WebhookEnvelope"
          },
          {
            "type": "object",
            "properties": {
              "event_type": {
                "type": "string",
                "enum": [
                  "bank_account.created",
                  "bank_account.updated",
                  "bank_account.deleted"
                ],
                "example": "bank_account.created"
              },
              "resource_type": {
                "type": "string",
                "const": "bank_account",
                "example": "bank_account"
              },
              "payload": {
                "type": "object",
                "required": [
                  "bank_account"
                ],
                "properties": {
                  "bank_account": {
                    "$ref": "#/components/schemas/Contact"
                  }
                }
              }
            }
          }
        ]
      }
    },
    "responses": {
      "BadRequest": {
        "description": "The request was rejected.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "missing": {
                "summary": "A required field was absent",
                "value": {
                  "error": {
                    "type": "invalid_request_error",
                    "code": "parameter_missing",
                    "message": "Order ID is required.",
                    "param": "id"
                  }
                }
              }
            }
          }
        }
      },
      "Unauthorized": {
        "description": "The client key was missing or not recognized.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "unauthorized": {
                "value": {
                  "error": {
                    "type": "invalid_request_error",
                    "code": "unauthorized",
                    "message": "No API key provided."
                  }
                }
              }
            }
          }
        }
      },
      "NotFound": {
        "description": "No such resource for this merchant.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            },
            "examples": {
              "missing": {
                "value": {
                  "error": {
                    "type": "invalid_request_error",
                    "code": "resource_missing",
                    "message": "No such order: zzzzzzzzzzzzzzzz",
                    "param": "token"
                  }
                }
              }
            }
          }
        }
      },
      "BadRequest-2": {
        "description": "The request was rejected.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error-2"
            },
            "examples": {
              "missing": {
                "summary": "A required field was absent",
                "value": {
                  "error": {
                    "type": "invalid_request_error",
                    "code": "parameter_missing",
                    "message": "Currency is required.",
                    "param": "currency"
                  }
                }
              }
            }
          }
        }
      },
      "Unauthorized-2": {
        "description": "The client key or secret key was missing, not recognized, or the two do not belong to the same key.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error-2"
            },
            "examples": {
              "unauthorized": {
                "value": {
                  "error": {
                    "type": "invalid_request_error",
                    "code": "unauthorized",
                    "message": "No API key provided."
                  }
                }
              },
              "secretKeyMissing": {
                "summary": "Client key sent without its secret key",
                "value": {
                  "error": {
                    "type": "invalid_request_error",
                    "code": "unauthorized",
                    "message": "No secret key provided. Send your secret key as \"Authorization: Bearer <secret key>\" along with the X-Dime-Client header."
                  }
                }
              }
            }
          }
        }
      },
      "NotFound-2": {
        "description": "No record matches the token in the request. A database id in a URL\nalso ends here: v2 looks records up by token only.\n",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error-2"
            },
            "examples": {
              "missing": {
                "value": {
                  "error": {
                    "type": "invalid_request_error",
                    "code": "resource_missing",
                    "message": "No such transaction: txn_20261112_ZZZZZZZ",
                    "param": "token"
                  }
                }
              }
            }
          }
        }
      },
      "NameTaken": {
        "description": "You already have a product with this name in this currency.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error-2"
            }
          }
        }
      },
      "SlugTaken": {
        "description": "Another of your categories already uses this slug.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error-2"
            }
          }
        }
      },
      "ProductCategories": {
        "description": "The product's categories.",
        "content": {
          "application/json": {
            "schema": {
              "allOf": [
                {
                  "$ref": "#/components/schemas/ListEnvelope-2"
                },
                {
                  "type": "object",
                  "properties": {
                    "data": {
                      "type": "array",
                      "items": {
                        "$ref": "#/components/schemas/Category"
                      }
                    }
                  }
                }
              ]
            },
            "examples": {
              "categories": {
                "summary": "The product's categories",
                "value": {
                  "object": "list",
                  "data": [
                    {
                      "object": "category",
                      "token": "cat_OwnPgze7_HExqHIKA_LjAgZ9oA_ThPBbj3",
                      "name": "Hair care",
                      "slug": "hair-care",
                      "description": "Shampoos, conditioners and treatments.",
                      "image_url": null,
                      "color": "#3B82F6",
                      "icon": null,
                      "is_active": true,
                      "created_at": "2026-10-27T15:04:05.000Z",
                      "updated_at": "2026-10-27T15:04:05.000Z"
                    }
                  ],
                  "has_more": false
                }
              }
            }
          }
        }
      },
      "TransferSummary": {
        "description": "The transfer was created.",
        "content": {
          "application/json": {
            "schema": {
              "type": "object",
              "properties": {
                "referenceNumber": {
                  "type": "string"
                },
                "date": {
                  "type": "string",
                  "format": "date-time"
                },
                "walletName": {
                  "type": "string"
                },
                "fee": {
                  "type": "number"
                },
                "feeCurrency": {
                  "type": "string"
                },
                "amountSent": {
                  "type": "number"
                },
                "total": {
                  "type": "number"
                }
              }
            }
          }
        }
      },
      "PaymentResult": {
        "description": "The resulting transaction.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PaymentResult"
            },
            "examples": {
              "sale": {
                "summary": "Sale: charged and captured; the order is now COMPLETE",
                "value": {
                  "object": "transaction",
                  "token": "txn_20261027_PBFpP02",
                  "status": "COMPLETE",
                  "authorized": true,
                  "currency": "JMD",
                  "amount": 1100,
                  "fees": null,
                  "error_code": null,
                  "error_message": null,
                  "reference_transaction_id": null,
                  "last_four_digits": "4242",
                  "card_scheme": "visa",
                  "order": {
                    "token": "ord_20261027_V1StGXR",
                    "status": "COMPLETE",
                    "currency": "JMD",
                    "total": 1100,
                    "subtotal": 1000
                  },
                  "refund_fees": null,
                  "created_at": "2026-10-27T15:04:05.000Z"
                }
              },
              "auth": {
                "summary": "Auth: funds held, not yet captured",
                "value": {
                  "object": "transaction",
                  "token": "txn_20261027_PBFpP02",
                  "status": "AUTHORISED",
                  "authorized": true,
                  "currency": "JMD",
                  "amount": 1100,
                  "fees": null,
                  "error_code": null,
                  "error_message": null,
                  "reference_transaction_id": null,
                  "last_four_digits": "4242",
                  "card_scheme": "visa",
                  "order": {
                    "token": "ord_20261027_V1StGXR",
                    "status": "PENDING",
                    "currency": "JMD",
                    "total": 1100,
                    "subtotal": 1000
                  },
                  "refund_fees": null,
                  "created_at": "2026-10-27T15:04:05.000Z"
                }
              },
              "capture": {
                "summary": "Capture of an earlier auth",
                "value": {
                  "object": "transaction",
                  "token": "txn_20261027_PBFpP02",
                  "status": "COMPLETE",
                  "authorized": true,
                  "currency": "JMD",
                  "amount": 1100,
                  "fees": null,
                  "error_code": null,
                  "error_message": null,
                  "reference_transaction_id": null,
                  "last_four_digits": "4242",
                  "card_scheme": "visa",
                  "order": {
                    "token": "ord_20261027_V1StGXR",
                    "status": "COMPLETE",
                    "currency": "JMD",
                    "total": 1100,
                    "subtotal": 1000
                  },
                  "refund_fees": null,
                  "created_at": "2026-10-27T15:04:05.000Z"
                }
              },
              "void": {
                "summary": "Void of an uncaptured auth",
                "value": {
                  "object": "transaction",
                  "token": "txn_20261027_PBFpP02",
                  "status": "VOID",
                  "authorized": true,
                  "currency": "JMD",
                  "amount": 1100,
                  "fees": null,
                  "error_code": null,
                  "error_message": null,
                  "reference_transaction_id": null,
                  "last_four_digits": "4242",
                  "card_scheme": "visa",
                  "order": {
                    "token": "ord_20261027_V1StGXR",
                    "status": "VOIDED",
                    "currency": "JMD",
                    "total": 1100,
                    "subtotal": 1000
                  },
                  "refund_fees": null,
                  "created_at": "2026-10-27T15:04:05.000Z"
                }
              },
              "refund": {
                "summary": "Partial refund: the new refund transaction, pointing back at the original",
                "value": {
                  "object": "transaction",
                  "token": "txn_20261027_3CqXuOw",
                  "status": "PARTIAL_REFUND",
                  "authorized": true,
                  "currency": "JMD",
                  "amount": 500,
                  "fees": null,
                  "error_code": null,
                  "error_message": null,
                  "reference_transaction_id": "txn_20261027_PBFpP02",
                  "last_four_digits": "4242",
                  "card_scheme": "visa",
                  "order": {
                    "token": "ord_20261027_V1StGXR",
                    "status": "COMPLETE",
                    "currency": "JMD",
                    "total": 1100,
                    "subtotal": 1000
                  },
                  "refund_fees": null,
                  "created_at": "2026-10-27T15:04:05.000Z"
                }
              }
            }
          }
        }
      },
      "ChargeRejected": {
        "description": "The charge was rejected.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error-2"
            },
            "examples": {
              "unknownCard": {
                "summary": "The card token does not exist",
                "value": {
                  "error": {
                    "type": "invalid_request_error",
                    "code": "parameter_invalid",
                    "message": "No such card token.",
                    "param": "token"
                  }
                }
              },
              "splitUnsupported": {
                "summary": "The v1 split was sent",
                "value": {
                  "error": {
                    "type": "invalid_request_error",
                    "code": "parameter_unsupported",
                    "message": "split is not supported on v2. Use bridge: { destination, fee | amount } for a single linked merchant, and POST /bridge/transfers to pay more than one.",
                    "param": "split"
                  }
                }
              },
              "bridgeAmountWithLinkedMor": {
                "summary": "bridge.amount was sent with the linked merchant as merchant of record",
                "value": {
                  "error": {
                    "type": "invalid_request_error",
                    "code": "parameter_invalid",
                    "message": "bridge.amount is only supported when the marketplace is merchant of record. Use bridge.fee.",
                    "param": "bridge.amount"
                  }
                }
              }
            }
          }
        }
      },
      "CardDeclined": {
        "description": "The card was declined.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error-2"
            },
            "examples": {
              "declined": {
                "value": {
                  "error": {
                    "type": "card_error",
                    "code": "card_declined",
                    "message": "Payment was declined.",
                    "param": "token"
                  }
                }
              }
            }
          }
        }
      },
      "ProcessorUnavailable": {
        "description": "The processor did not respond. The outcome is unknown; check before retrying.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error-2"
            },
            "examples": {
              "unavailable": {
                "value": {
                  "error": {
                    "type": "api_error",
                    "code": "internal_error",
                    "message": "The payment processor did not respond."
                  }
                }
              }
            }
          }
        }
      },
      "TransactionNotFound": {
        "description": "No such transaction for this merchant.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error-2"
            },
            "examples": {
              "missing": {
                "value": {
                  "error": {
                    "type": "invalid_request_error",
                    "code": "resource_missing",
                    "message": "No such transaction: txn_20261112_ZZZZZZZ",
                    "param": "transaction_id"
                  }
                }
              }
            }
          }
        }
      },
      "PosPayment": {
        "description": "The payment, with the till's fields under `pos`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PosPayment"
            },
            "examples": {
              "approved": {
                "value": {
                  "object": "transaction",
                  "token": "txn_20261027_lYW5MOH",
                  "status": "COMPLETE",
                  "authorized": false,
                  "currency": "JMD",
                  "amount": 910.13,
                  "fees": null,
                  "error_code": null,
                  "error_message": null,
                  "reference_transaction_id": null,
                  "last_four_digits": "3539",
                  "card_scheme": "mastercard",
                  "order": {
                    "token": "ord_20261116_abcdefg",
                    "status": "COMPLETE",
                    "currency": "JMD",
                    "total": 910.13,
                    "subtotal": 900
                  },
                  "refund_fees": null,
                  "bridge": null,
                  "created_at": "2026-11-16T14:03:22.000Z",
                  "pos": {
                    "method": "Sale",
                    "terminal_id": "2740017028",
                    "pos_station_id": 1,
                    "pos_transaction_id": 1048577,
                    "approval_status": true,
                    "response_text": "Transaction successful",
                    "tip": 10.13,
                    "approved_amount": 900,
                    "processed_amount": 910.13,
                    "receipt": {
                      "card_type": "mastercard",
                      "card_number": "3539",
                      "card_scheme_details": "Scotiabank Debit",
                      "verification_method": "PIN",
                      "authorization": "-",
                      "entry_mode": "Chip"
                    }
                  }
                }
              }
            }
          }
        }
      },
      "TerminalTimeout": {
        "description": "The terminal did not acknowledge the sale in time. The sale may still\ncomplete; retry with the same `order_id`.\n",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error-2"
            }
          }
        }
      },
      "PosOrder": {
        "description": "The order, its payment once there is one, and `pos`.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/PosOrder"
            }
          }
        }
      },
      "BridgeDisabled": {
        "description": "Dime Bridge is not enabled for your account.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error-2"
            },
            "examples": {
              "disabled": {
                "value": {
                  "error": {
                    "type": "invalid_request_error",
                    "code": "forbidden",
                    "message": "Dime Bridge is not enabled for this merchant."
                  }
                }
              }
            }
          }
        }
      },
      "EndpointNotFound": {
        "description": "No endpoint matches the token.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error-2"
            },
            "examples": {
              "missing": {
                "summary": "Unknown endpoint",
                "value": {
                  "error": {
                    "type": "invalid_request_error",
                    "code": "resource_missing",
                    "message": "No such webhook endpoint.",
                    "param": "token"
                  }
                }
              }
            }
          }
        }
      },
      "EventNotFound": {
        "description": "No event matches the token.",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error-2"
            },
            "examples": {
              "missing": {
                "summary": "Unknown event",
                "value": {
                  "error": {
                    "type": "invalid_request_error",
                    "code": "resource_missing",
                    "message": "No such webhook event.",
                    "param": "token"
                  }
                }
              }
            }
          }
        }
      },
      "WebhookAck": {
        "description": "Return any `2xx` within 7 seconds to acknowledge. Otherwise Dime\nretries automatically for about 3 days; see **Webhooks guide**.\nReplay a delivery sooner, or after it has `FAILED`, with\n`POST /webhook-events/{token}/replay`.\n"
      }
    }
  }
}