From f1324cb6daf28a47e20ed1df17f2c4bff1e98181 Mon Sep 17 00:00:00 2001 From: Tom Ra Date: Fri, 20 Nov 2026 15:55:21 -0300 Subject: [PATCH 1/4] Document merchant, refund and list-payments endpoints in the Pay API reference - Merge the merchant service spec into the generated Core spec, keeping only routes the API gateway forwards (merchants, refunds, GET payments) - Preserve each operation's own security, since only the first spec's top-level security survives the merge - Skip tags from the filtered merchant spec and fail on duplicate method/path pairs across specs - Regenerate specs for 2026-02-18 and 2026-02-19.preview with new pages and Refunds and Merchants sidebar groups - Exempt generated API Reference pages from the reviewer rule in AGENTS.md --- AGENTS.md | 2 +- ...hants-merchantid-settlements-crypto-id.mdx | 7 + ...rchants-merchantid-settlements-fiat-id.mdx | 7 + .../delete-v1-merchants-merchantid.mdx | 7 + ...erchants-merchantid-settlements-tokens.mdx | 7 + ...et-v1-merchants-merchantid-settlements.mdx | 7 + .../get-v1-merchants-merchantid.mdx | 7 + .../2026-02-18/get-v1-merchants-payments.mdx | 7 + .../2026-02-18/get-v1-merchants.mdx | 7 + .../2026-02-18/get-v1-payments.mdx | 7 + ...rchants-merchantid-settlements-fiat-id.mdx | 7 + .../patch-v1-merchants-merchantid.mdx | 7 + ...erchants-merchantid-settlements-crypto.mdx | 7 + ...-merchants-merchantid-settlements-fiat.mdx | 7 + ...1-merchants-payments-paymentid-receipt.mdx | 7 + .../2026-02-18/post-v1-merchants.mdx | 7 + .../2026-02-18/post-v1-refunds.mdx | 7 + ...hants-merchantid-settlements-crypto-id.mdx | 7 + ...hants-merchantid-settlements-crypto-id.mdx | 7 + ...rchants-merchantid-settlements-fiat-id.mdx | 7 + .../delete-v1-merchants-merchantid.mdx | 7 + ...erchants-merchantid-settlements-tokens.mdx | 7 + ...et-v1-merchants-merchantid-settlements.mdx | 7 + .../get-v1-merchants-merchantid.mdx | 7 + .../get-v1-merchants-payments.mdx | 7 + .../2026-02-19.preview/get-v1-merchants.mdx | 7 + .../2026-02-19.preview/get-v1-payments.mdx | 7 + ...rchants-merchantid-settlements-fiat-id.mdx | 7 + .../patch-v1-merchants-merchantid.mdx | 7 + ...erchants-merchantid-settlements-crypto.mdx | 7 + ...-merchants-merchantid-settlements-fiat.mdx | 7 + ...1-merchants-payments-paymentid-receipt.mdx | 7 + .../2026-02-19.preview/post-v1-merchants.mdx | 7 + .../2026-02-19.preview/post-v1-refunds.mdx | 7 + ...hants-merchantid-settlements-crypto-id.mdx | 7 + content/navigation.json | 54 + openapi/2026-02-18.json | 7686 +++++++++++++++- openapi/2026-02-19.preview.json | 7689 ++++++++++++++++- scripts/generate-specs.mjs | 32 +- 39 files changed, 15354 insertions(+), 347 deletions(-) create mode 100644 content/docs/payments/api-reference/2026-02-18/delete-v1-merchants-merchantid-settlements-crypto-id.mdx create mode 100644 content/docs/payments/api-reference/2026-02-18/delete-v1-merchants-merchantid-settlements-fiat-id.mdx create mode 100644 content/docs/payments/api-reference/2026-02-18/delete-v1-merchants-merchantid.mdx create mode 100644 content/docs/payments/api-reference/2026-02-18/get-v1-merchants-merchantid-settlements-tokens.mdx create mode 100644 content/docs/payments/api-reference/2026-02-18/get-v1-merchants-merchantid-settlements.mdx create mode 100644 content/docs/payments/api-reference/2026-02-18/get-v1-merchants-merchantid.mdx create mode 100644 content/docs/payments/api-reference/2026-02-18/get-v1-merchants-payments.mdx create mode 100644 content/docs/payments/api-reference/2026-02-18/get-v1-merchants.mdx create mode 100644 content/docs/payments/api-reference/2026-02-18/get-v1-payments.mdx create mode 100644 content/docs/payments/api-reference/2026-02-18/patch-v1-merchants-merchantid-settlements-fiat-id.mdx create mode 100644 content/docs/payments/api-reference/2026-02-18/patch-v1-merchants-merchantid.mdx create mode 100644 content/docs/payments/api-reference/2026-02-18/post-v1-merchants-merchantid-settlements-crypto.mdx create mode 100644 content/docs/payments/api-reference/2026-02-18/post-v1-merchants-merchantid-settlements-fiat.mdx create mode 100644 content/docs/payments/api-reference/2026-02-18/post-v1-merchants-payments-paymentid-receipt.mdx create mode 100644 content/docs/payments/api-reference/2026-02-18/post-v1-merchants.mdx create mode 100644 content/docs/payments/api-reference/2026-02-18/post-v1-refunds.mdx create mode 100644 content/docs/payments/api-reference/2026-02-18/put-v1-merchants-merchantid-settlements-crypto-id.mdx create mode 100644 content/docs/payments/api-reference/2026-02-19.preview/delete-v1-merchants-merchantid-settlements-crypto-id.mdx create mode 100644 content/docs/payments/api-reference/2026-02-19.preview/delete-v1-merchants-merchantid-settlements-fiat-id.mdx create mode 100644 content/docs/payments/api-reference/2026-02-19.preview/delete-v1-merchants-merchantid.mdx create mode 100644 content/docs/payments/api-reference/2026-02-19.preview/get-v1-merchants-merchantid-settlements-tokens.mdx create mode 100644 content/docs/payments/api-reference/2026-02-19.preview/get-v1-merchants-merchantid-settlements.mdx create mode 100644 content/docs/payments/api-reference/2026-02-19.preview/get-v1-merchants-merchantid.mdx create mode 100644 content/docs/payments/api-reference/2026-02-19.preview/get-v1-merchants-payments.mdx create mode 100644 content/docs/payments/api-reference/2026-02-19.preview/get-v1-merchants.mdx create mode 100644 content/docs/payments/api-reference/2026-02-19.preview/get-v1-payments.mdx create mode 100644 content/docs/payments/api-reference/2026-02-19.preview/patch-v1-merchants-merchantid-settlements-fiat-id.mdx create mode 100644 content/docs/payments/api-reference/2026-02-19.preview/patch-v1-merchants-merchantid.mdx create mode 100644 content/docs/payments/api-reference/2026-02-19.preview/post-v1-merchants-merchantid-settlements-crypto.mdx create mode 100644 content/docs/payments/api-reference/2026-02-19.preview/post-v1-merchants-merchantid-settlements-fiat.mdx create mode 100644 content/docs/payments/api-reference/2026-02-19.preview/post-v1-merchants-payments-paymentid-receipt.mdx create mode 100644 content/docs/payments/api-reference/2026-02-19.preview/post-v1-merchants.mdx create mode 100644 content/docs/payments/api-reference/2026-02-19.preview/post-v1-refunds.mdx create mode 100644 content/docs/payments/api-reference/2026-02-19.preview/put-v1-merchants-merchantid-settlements-crypto-id.mdx diff --git a/AGENTS.md b/AGENTS.md index b13163a6..70a80505 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -59,7 +59,7 @@ Before finishing a change, run `pnpm build` for content changes, and `pnpm lint` ## Navigation changes need sign-off - The navbar tabs are fixed: **Apps · Wallets · Payments · Compliance** (plus API Reference on the right, and Network, a hidden tab linked from the top-right of the navbar). Don't add a new tab. If a change adds one anyway, open the PR description with a warning that it adds a new navbar tab, and recommend posting the change in the `#project-docs` Slack channel before merging. -- A PR that adds a new page to the sidebar or the navbar (any new entry in `content/navigation.json` or `links` in `lib/layout.shared.tsx`) needs `@rtomas` and `@Jem-reown` as reviewers: `gh pr create --reviewer rtomas,Jem-reown`, or `gh pr edit --add-reviewer rtomas,Jem-reown` on an existing PR. +- A PR that adds a new page to the sidebar or the navbar (any new entry in `content/navigation.json` or `links` in `lib/layout.shared.tsx`) needs `@rtomas` and `@Jem-reown` as reviewers: `gh pr create --reviewer rtomas,Jem-reown`, or `gh pr edit --add-reviewer rtomas,Jem-reown` on an existing PR. API Reference pages generated by `pnpm generate` are the exception: they don't need these reviewers. ## Frontmatter diff --git a/content/docs/payments/api-reference/2026-02-18/delete-v1-merchants-merchantid-settlements-crypto-id.mdx b/content/docs/payments/api-reference/2026-02-18/delete-v1-merchants-merchantid-settlements-crypto-id.mdx new file mode 100644 index 00000000..6ed11a36 --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-18/delete-v1-merchants-merchantid-settlements-crypto-id.mdx @@ -0,0 +1,7 @@ +--- +title: "Delete a crypto settlement" +_openapi: + method: DELETE +--- + + diff --git a/content/docs/payments/api-reference/2026-02-18/delete-v1-merchants-merchantid-settlements-fiat-id.mdx b/content/docs/payments/api-reference/2026-02-18/delete-v1-merchants-merchantid-settlements-fiat-id.mdx new file mode 100644 index 00000000..34db8d76 --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-18/delete-v1-merchants-merchantid-settlements-fiat-id.mdx @@ -0,0 +1,7 @@ +--- +title: "Delete a fiat settlement" +_openapi: + method: DELETE +--- + + diff --git a/content/docs/payments/api-reference/2026-02-18/delete-v1-merchants-merchantid.mdx b/content/docs/payments/api-reference/2026-02-18/delete-v1-merchants-merchantid.mdx new file mode 100644 index 00000000..9fcae994 --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-18/delete-v1-merchants-merchantid.mdx @@ -0,0 +1,7 @@ +--- +title: "Delete a merchant" +_openapi: + method: DELETE +--- + + diff --git a/content/docs/payments/api-reference/2026-02-18/get-v1-merchants-merchantid-settlements-tokens.mdx b/content/docs/payments/api-reference/2026-02-18/get-v1-merchants-merchantid-settlements-tokens.mdx new file mode 100644 index 00000000..7836b744 --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-18/get-v1-merchants-merchantid-settlements-tokens.mdx @@ -0,0 +1,7 @@ +--- +title: "List tokens available for settlement" +_openapi: + method: GET +--- + + diff --git a/content/docs/payments/api-reference/2026-02-18/get-v1-merchants-merchantid-settlements.mdx b/content/docs/payments/api-reference/2026-02-18/get-v1-merchants-merchantid-settlements.mdx new file mode 100644 index 00000000..2046ae61 --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-18/get-v1-merchants-merchantid-settlements.mdx @@ -0,0 +1,7 @@ +--- +title: "List settlements" +_openapi: + method: GET +--- + + diff --git a/content/docs/payments/api-reference/2026-02-18/get-v1-merchants-merchantid.mdx b/content/docs/payments/api-reference/2026-02-18/get-v1-merchants-merchantid.mdx new file mode 100644 index 00000000..c74f5710 --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-18/get-v1-merchants-merchantid.mdx @@ -0,0 +1,7 @@ +--- +title: "Get a merchant" +_openapi: + method: GET +--- + + diff --git a/content/docs/payments/api-reference/2026-02-18/get-v1-merchants-payments.mdx b/content/docs/payments/api-reference/2026-02-18/get-v1-merchants-payments.mdx new file mode 100644 index 00000000..edba46b7 --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-18/get-v1-merchants-payments.mdx @@ -0,0 +1,7 @@ +--- +title: "List payments for a merchant" +_openapi: + method: GET +--- + + diff --git a/content/docs/payments/api-reference/2026-02-18/get-v1-merchants.mdx b/content/docs/payments/api-reference/2026-02-18/get-v1-merchants.mdx new file mode 100644 index 00000000..2e2272a1 --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-18/get-v1-merchants.mdx @@ -0,0 +1,7 @@ +--- +title: "List merchants" +_openapi: + method: GET +--- + + diff --git a/content/docs/payments/api-reference/2026-02-18/get-v1-payments.mdx b/content/docs/payments/api-reference/2026-02-18/get-v1-payments.mdx new file mode 100644 index 00000000..816857af --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-18/get-v1-payments.mdx @@ -0,0 +1,7 @@ +--- +title: "List payments" +_openapi: + method: GET +--- + + diff --git a/content/docs/payments/api-reference/2026-02-18/patch-v1-merchants-merchantid-settlements-fiat-id.mdx b/content/docs/payments/api-reference/2026-02-18/patch-v1-merchants-merchantid-settlements-fiat-id.mdx new file mode 100644 index 00000000..61f8fd7d --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-18/patch-v1-merchants-merchantid-settlements-fiat-id.mdx @@ -0,0 +1,7 @@ +--- +title: "Update a fiat settlement" +_openapi: + method: PATCH +--- + + diff --git a/content/docs/payments/api-reference/2026-02-18/patch-v1-merchants-merchantid.mdx b/content/docs/payments/api-reference/2026-02-18/patch-v1-merchants-merchantid.mdx new file mode 100644 index 00000000..30c8e80a --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-18/patch-v1-merchants-merchantid.mdx @@ -0,0 +1,7 @@ +--- +title: "Update a merchant" +_openapi: + method: PATCH +--- + + diff --git a/content/docs/payments/api-reference/2026-02-18/post-v1-merchants-merchantid-settlements-crypto.mdx b/content/docs/payments/api-reference/2026-02-18/post-v1-merchants-merchantid-settlements-crypto.mdx new file mode 100644 index 00000000..8030dbe8 --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-18/post-v1-merchants-merchantid-settlements-crypto.mdx @@ -0,0 +1,7 @@ +--- +title: "Create crypto settlements" +_openapi: + method: POST +--- + + diff --git a/content/docs/payments/api-reference/2026-02-18/post-v1-merchants-merchantid-settlements-fiat.mdx b/content/docs/payments/api-reference/2026-02-18/post-v1-merchants-merchantid-settlements-fiat.mdx new file mode 100644 index 00000000..ad67ebdd --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-18/post-v1-merchants-merchantid-settlements-fiat.mdx @@ -0,0 +1,7 @@ +--- +title: "Create a fiat settlement" +_openapi: + method: POST +--- + + diff --git a/content/docs/payments/api-reference/2026-02-18/post-v1-merchants-payments-paymentid-receipt.mdx b/content/docs/payments/api-reference/2026-02-18/post-v1-merchants-payments-paymentid-receipt.mdx new file mode 100644 index 00000000..5865a045 --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-18/post-v1-merchants-payments-paymentid-receipt.mdx @@ -0,0 +1,7 @@ +--- +title: "Email a payment receipt" +_openapi: + method: POST +--- + + diff --git a/content/docs/payments/api-reference/2026-02-18/post-v1-merchants.mdx b/content/docs/payments/api-reference/2026-02-18/post-v1-merchants.mdx new file mode 100644 index 00000000..9bc69b56 --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-18/post-v1-merchants.mdx @@ -0,0 +1,7 @@ +--- +title: "Create a merchant" +_openapi: + method: POST +--- + + diff --git a/content/docs/payments/api-reference/2026-02-18/post-v1-refunds.mdx b/content/docs/payments/api-reference/2026-02-18/post-v1-refunds.mdx new file mode 100644 index 00000000..dcd452fb --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-18/post-v1-refunds.mdx @@ -0,0 +1,7 @@ +--- +title: "Mark a payment as refunded" +_openapi: + method: POST +--- + + diff --git a/content/docs/payments/api-reference/2026-02-18/put-v1-merchants-merchantid-settlements-crypto-id.mdx b/content/docs/payments/api-reference/2026-02-18/put-v1-merchants-merchantid-settlements-crypto-id.mdx new file mode 100644 index 00000000..627b4eaa --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-18/put-v1-merchants-merchantid-settlements-crypto-id.mdx @@ -0,0 +1,7 @@ +--- +title: "Update a crypto settlement destination" +_openapi: + method: PUT +--- + + diff --git a/content/docs/payments/api-reference/2026-02-19.preview/delete-v1-merchants-merchantid-settlements-crypto-id.mdx b/content/docs/payments/api-reference/2026-02-19.preview/delete-v1-merchants-merchantid-settlements-crypto-id.mdx new file mode 100644 index 00000000..2d0cb458 --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-19.preview/delete-v1-merchants-merchantid-settlements-crypto-id.mdx @@ -0,0 +1,7 @@ +--- +title: "Delete a crypto settlement" +_openapi: + method: DELETE +--- + + diff --git a/content/docs/payments/api-reference/2026-02-19.preview/delete-v1-merchants-merchantid-settlements-fiat-id.mdx b/content/docs/payments/api-reference/2026-02-19.preview/delete-v1-merchants-merchantid-settlements-fiat-id.mdx new file mode 100644 index 00000000..d28c058c --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-19.preview/delete-v1-merchants-merchantid-settlements-fiat-id.mdx @@ -0,0 +1,7 @@ +--- +title: "Delete a fiat settlement" +_openapi: + method: DELETE +--- + + diff --git a/content/docs/payments/api-reference/2026-02-19.preview/delete-v1-merchants-merchantid.mdx b/content/docs/payments/api-reference/2026-02-19.preview/delete-v1-merchants-merchantid.mdx new file mode 100644 index 00000000..81fd6561 --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-19.preview/delete-v1-merchants-merchantid.mdx @@ -0,0 +1,7 @@ +--- +title: "Delete a merchant" +_openapi: + method: DELETE +--- + + diff --git a/content/docs/payments/api-reference/2026-02-19.preview/get-v1-merchants-merchantid-settlements-tokens.mdx b/content/docs/payments/api-reference/2026-02-19.preview/get-v1-merchants-merchantid-settlements-tokens.mdx new file mode 100644 index 00000000..854281ea --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-19.preview/get-v1-merchants-merchantid-settlements-tokens.mdx @@ -0,0 +1,7 @@ +--- +title: "List tokens available for settlement" +_openapi: + method: GET +--- + + diff --git a/content/docs/payments/api-reference/2026-02-19.preview/get-v1-merchants-merchantid-settlements.mdx b/content/docs/payments/api-reference/2026-02-19.preview/get-v1-merchants-merchantid-settlements.mdx new file mode 100644 index 00000000..24acecf5 --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-19.preview/get-v1-merchants-merchantid-settlements.mdx @@ -0,0 +1,7 @@ +--- +title: "List settlements" +_openapi: + method: GET +--- + + diff --git a/content/docs/payments/api-reference/2026-02-19.preview/get-v1-merchants-merchantid.mdx b/content/docs/payments/api-reference/2026-02-19.preview/get-v1-merchants-merchantid.mdx new file mode 100644 index 00000000..29ec4205 --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-19.preview/get-v1-merchants-merchantid.mdx @@ -0,0 +1,7 @@ +--- +title: "Get a merchant" +_openapi: + method: GET +--- + + diff --git a/content/docs/payments/api-reference/2026-02-19.preview/get-v1-merchants-payments.mdx b/content/docs/payments/api-reference/2026-02-19.preview/get-v1-merchants-payments.mdx new file mode 100644 index 00000000..cdd95ea0 --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-19.preview/get-v1-merchants-payments.mdx @@ -0,0 +1,7 @@ +--- +title: "List payments for a merchant" +_openapi: + method: GET +--- + + diff --git a/content/docs/payments/api-reference/2026-02-19.preview/get-v1-merchants.mdx b/content/docs/payments/api-reference/2026-02-19.preview/get-v1-merchants.mdx new file mode 100644 index 00000000..8d7ab2c6 --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-19.preview/get-v1-merchants.mdx @@ -0,0 +1,7 @@ +--- +title: "List merchants" +_openapi: + method: GET +--- + + diff --git a/content/docs/payments/api-reference/2026-02-19.preview/get-v1-payments.mdx b/content/docs/payments/api-reference/2026-02-19.preview/get-v1-payments.mdx new file mode 100644 index 00000000..99a91285 --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-19.preview/get-v1-payments.mdx @@ -0,0 +1,7 @@ +--- +title: "List payments" +_openapi: + method: GET +--- + + diff --git a/content/docs/payments/api-reference/2026-02-19.preview/patch-v1-merchants-merchantid-settlements-fiat-id.mdx b/content/docs/payments/api-reference/2026-02-19.preview/patch-v1-merchants-merchantid-settlements-fiat-id.mdx new file mode 100644 index 00000000..1b4a13b0 --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-19.preview/patch-v1-merchants-merchantid-settlements-fiat-id.mdx @@ -0,0 +1,7 @@ +--- +title: "Update a fiat settlement" +_openapi: + method: PATCH +--- + + diff --git a/content/docs/payments/api-reference/2026-02-19.preview/patch-v1-merchants-merchantid.mdx b/content/docs/payments/api-reference/2026-02-19.preview/patch-v1-merchants-merchantid.mdx new file mode 100644 index 00000000..c180537b --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-19.preview/patch-v1-merchants-merchantid.mdx @@ -0,0 +1,7 @@ +--- +title: "Update a merchant" +_openapi: + method: PATCH +--- + + diff --git a/content/docs/payments/api-reference/2026-02-19.preview/post-v1-merchants-merchantid-settlements-crypto.mdx b/content/docs/payments/api-reference/2026-02-19.preview/post-v1-merchants-merchantid-settlements-crypto.mdx new file mode 100644 index 00000000..bd4e3a6f --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-19.preview/post-v1-merchants-merchantid-settlements-crypto.mdx @@ -0,0 +1,7 @@ +--- +title: "Create crypto settlements" +_openapi: + method: POST +--- + + diff --git a/content/docs/payments/api-reference/2026-02-19.preview/post-v1-merchants-merchantid-settlements-fiat.mdx b/content/docs/payments/api-reference/2026-02-19.preview/post-v1-merchants-merchantid-settlements-fiat.mdx new file mode 100644 index 00000000..81381fb6 --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-19.preview/post-v1-merchants-merchantid-settlements-fiat.mdx @@ -0,0 +1,7 @@ +--- +title: "Create a fiat settlement" +_openapi: + method: POST +--- + + diff --git a/content/docs/payments/api-reference/2026-02-19.preview/post-v1-merchants-payments-paymentid-receipt.mdx b/content/docs/payments/api-reference/2026-02-19.preview/post-v1-merchants-payments-paymentid-receipt.mdx new file mode 100644 index 00000000..7c78e30b --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-19.preview/post-v1-merchants-payments-paymentid-receipt.mdx @@ -0,0 +1,7 @@ +--- +title: "Email a payment receipt" +_openapi: + method: POST +--- + + diff --git a/content/docs/payments/api-reference/2026-02-19.preview/post-v1-merchants.mdx b/content/docs/payments/api-reference/2026-02-19.preview/post-v1-merchants.mdx new file mode 100644 index 00000000..64175d2b --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-19.preview/post-v1-merchants.mdx @@ -0,0 +1,7 @@ +--- +title: "Create a merchant" +_openapi: + method: POST +--- + + diff --git a/content/docs/payments/api-reference/2026-02-19.preview/post-v1-refunds.mdx b/content/docs/payments/api-reference/2026-02-19.preview/post-v1-refunds.mdx new file mode 100644 index 00000000..f60c3453 --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-19.preview/post-v1-refunds.mdx @@ -0,0 +1,7 @@ +--- +title: "Mark a payment as refunded" +_openapi: + method: POST +--- + + diff --git a/content/docs/payments/api-reference/2026-02-19.preview/put-v1-merchants-merchantid-settlements-crypto-id.mdx b/content/docs/payments/api-reference/2026-02-19.preview/put-v1-merchants-merchantid-settlements-crypto-id.mdx new file mode 100644 index 00000000..19990c2a --- /dev/null +++ b/content/docs/payments/api-reference/2026-02-19.preview/put-v1-merchants-merchantid-settlements-crypto-id.mdx @@ -0,0 +1,7 @@ +--- +title: "Update a crypto settlement destination" +_openapi: + method: PUT +--- + + diff --git a/content/navigation.json b/content/navigation.json index 8c1786d6..a8b36830 100644 --- a/content/navigation.json +++ b/content/navigation.json @@ -521,6 +521,7 @@ "group": "Payments", "pages": [ "payments/api-reference/2026-02-18/post-v1-payments", + "payments/api-reference/2026-02-18/get-v1-payments", "payments/api-reference/2026-02-18/get-v1-payments-id", "payments/api-reference/2026-02-18/post-v1-payments-id-cancel", "payments/api-reference/2026-02-18/get-v1-payments-id-status", @@ -535,6 +536,32 @@ "payments/api-reference/2026-02-18/post-v1-webhooks-bybit-pay", "payments/api-reference/2026-02-18/post-v1-webhooks-crypto-com-pay" ] + }, + { + "group": "Refunds", + "pages": [ + "payments/api-reference/2026-02-18/post-v1-refunds" + ] + }, + { + "group": "Merchants", + "pages": [ + "payments/api-reference/2026-02-18/get-v1-merchants-payments", + "payments/api-reference/2026-02-18/post-v1-merchants-payments-paymentid-receipt", + "payments/api-reference/2026-02-18/post-v1-merchants", + "payments/api-reference/2026-02-18/get-v1-merchants", + "payments/api-reference/2026-02-18/get-v1-merchants-merchantid", + "payments/api-reference/2026-02-18/patch-v1-merchants-merchantid", + "payments/api-reference/2026-02-18/delete-v1-merchants-merchantid", + "payments/api-reference/2026-02-18/get-v1-merchants-merchantid-settlements", + "payments/api-reference/2026-02-18/get-v1-merchants-merchantid-settlements-tokens", + "payments/api-reference/2026-02-18/post-v1-merchants-merchantid-settlements-crypto", + "payments/api-reference/2026-02-18/put-v1-merchants-merchantid-settlements-crypto-id", + "payments/api-reference/2026-02-18/delete-v1-merchants-merchantid-settlements-crypto-id", + "payments/api-reference/2026-02-18/post-v1-merchants-merchantid-settlements-fiat", + "payments/api-reference/2026-02-18/patch-v1-merchants-merchantid-settlements-fiat-id", + "payments/api-reference/2026-02-18/delete-v1-merchants-merchantid-settlements-fiat-id" + ] } ] }, @@ -562,6 +589,7 @@ "group": "Payments", "pages": [ "payments/api-reference/2026-02-19.preview/post-v1-payments", + "payments/api-reference/2026-02-19.preview/get-v1-payments", "payments/api-reference/2026-02-19.preview/get-v1-payments-id", "payments/api-reference/2026-02-19.preview/post-v1-payments-id-cancel", "payments/api-reference/2026-02-19.preview/get-v1-payments-id-status", @@ -576,6 +604,32 @@ "payments/api-reference/2026-02-19.preview/post-v1-webhooks-bybit-pay", "payments/api-reference/2026-02-19.preview/post-v1-webhooks-crypto-com-pay" ] + }, + { + "group": "Refunds", + "pages": [ + "payments/api-reference/2026-02-19.preview/post-v1-refunds" + ] + }, + { + "group": "Merchants", + "pages": [ + "payments/api-reference/2026-02-19.preview/get-v1-merchants-payments", + "payments/api-reference/2026-02-19.preview/post-v1-merchants-payments-paymentid-receipt", + "payments/api-reference/2026-02-19.preview/post-v1-merchants", + "payments/api-reference/2026-02-19.preview/get-v1-merchants", + "payments/api-reference/2026-02-19.preview/get-v1-merchants-merchantid", + "payments/api-reference/2026-02-19.preview/patch-v1-merchants-merchantid", + "payments/api-reference/2026-02-19.preview/delete-v1-merchants-merchantid", + "payments/api-reference/2026-02-19.preview/get-v1-merchants-merchantid-settlements", + "payments/api-reference/2026-02-19.preview/get-v1-merchants-merchantid-settlements-tokens", + "payments/api-reference/2026-02-19.preview/post-v1-merchants-merchantid-settlements-crypto", + "payments/api-reference/2026-02-19.preview/put-v1-merchants-merchantid-settlements-crypto-id", + "payments/api-reference/2026-02-19.preview/delete-v1-merchants-merchantid-settlements-crypto-id", + "payments/api-reference/2026-02-19.preview/post-v1-merchants-merchantid-settlements-fiat", + "payments/api-reference/2026-02-19.preview/patch-v1-merchants-merchantid-settlements-fiat-id", + "payments/api-reference/2026-02-19.preview/delete-v1-merchants-merchantid-settlements-fiat-id" + ] } ] } diff --git a/openapi/2026-02-18.json b/openapi/2026-02-18.json index 2fd9b5c3..ee112c70 100644 --- a/openapi/2026-02-18.json +++ b/openapi/2026-02-18.json @@ -157,7 +157,18 @@ } } } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } }, "/v1/gateway/payment/{id}/cancel": { @@ -304,7 +315,18 @@ } } } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } }, "/v1/gateway/payment/{id}/confirm": { @@ -488,7 +510,18 @@ } } } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } }, "/v1/gateway/payment/{id}/fetch": { @@ -647,7 +680,18 @@ } } } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } }, "/v1/gateway/payment/{id}/options": { @@ -819,7 +863,18 @@ } } } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } }, "/v1/gateway/payment/{id}/status": { @@ -983,7 +1038,18 @@ } } } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } }, "/v1/gateway/payment/{id}/transition": { @@ -1141,7 +1207,18 @@ } } } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } }, "/v1/payments": { @@ -1276,7 +1353,508 @@ } } } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] + }, + "get": { + "operationId": "PartnerPayments_list", + "parameters": [ + { + "name": "WCP-Version", + "in": "header", + "required": false, + "description": "Optional WalletConnect Pay API version override. If omitted, the partner's pinned version is used.", + "schema": { + "type": "string", + "examples": [ + "2026-02-18", + "2026-02-19.preview" + ] + } + }, + { + "in": "query", + "name": "startTs", + "schema": { + "examples": [ + "2026-01-06T00:00:00Z" + ], + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "description": "RFC3339 timestamp, inclusive" + }, + { + "in": "query", + "name": "endTs", + "schema": { + "examples": [ + "2026-01-07T00:00:00Z" + ], + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "description": "RFC3339 timestamp, exclusive" + }, + { + "in": "query", + "name": "token_symbol", + "schema": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "description": "Filter by token symbol (e.g. `USDC`). CAIP-19 identifiers are not supported. Accepts a single value or multiple repeated params:\n\n- Single: `?token_symbol=USDC`\n- Multiple: `?token_symbol=USDC&token_symbol=EURC`" + }, + { + "in": "query", + "name": "network", + "schema": { + "examples": [ + "eip155:8453", + "eip155:8453,eip155:1" + ], + "type": "string" + }, + "description": "Filter by [CAIP-2](https://standards.chainagnostic.org/CAIPs/caip-2) chain ID. Comma-separated for multiple." + }, + { + "in": "query", + "name": "sortBy", + "schema": { + "type": "string", + "enum": [ + "date", + "amount" + ] + }, + "description": "Field to sort by" + }, + { + "in": "query", + "name": "sortDir", + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "description": "Sort direction" + }, + { + "in": "query", + "name": "cursor", + "schema": { + "type": "string" + }, + "description": "Opaque pagination cursor — use the value from `nextCursor` in the previous response." + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 200 + }, + "description": "Page size (default 50, max 200)" + }, + { + "in": "query", + "name": "status", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "requires_action", + "processing", + "succeeded", + "failed", + "expired" + ] + } + }, + "description": "Filter by payment status. Accepts a single value or multiple repeated params:\n\n- Single: `?status=succeeded`\n- Multiple: `?status=succeeded&status=processing`" + }, + { + "in": "query", + "name": "referenceId", + "schema": { + "type": "string", + "minLength": 3, + "maxLength": 35, + "pattern": "^[A-Za-z0-9 /:.,+-]+$", + "examples": [ + "order-42" + ] + }, + "description": "Substring search on the merchant-provided reference ID. Between 3 and 35 characters. Allowed characters: ASCII letters, digits, and ` /-:.,+`." + }, + { + "in": "query", + "name": "merchantId", + "schema": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "examples": [ + [ + "acme-store-1" + ], + [ + "acme-store-1", + "widget_co" + ] + ] + }, + "description": "Filter by merchant ID. Accepts a single value or multiple repeated params:\n\n- Single: `?merchantId=acme-store-1`\n- Multiple: `?merchantId=acme-store-1&merchantId=widget_co`" + } + ], + "responses": { + "200": { + "description": "Payments with statistics", + "headers": { + "WCP-Version": { + "description": "WalletConnect Pay API version resolved for this request.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MerchantPaymentsResponse" + }, + "example": { + "data": [ + { + "paymentId": "pay_a1a2ecc101KGF210FP7PN3BK08PZARS1CZ", + "merchant": { + "id": "acme-store-1", + "name": "Acme Store", + "iconUrl": "https://imagedelivery.net/example/icon.png" + }, + "referenceId": "a1b2cad4e5f2783012345678axcdea90", + "status": "succeeded", + "isTerminal": true, + "paymentUrl": "https://pay.walletconnect.com/?pid=pay_a1a2ecc101KGF210FP7PN3BK08PZARS1CZ", + "fiatAmount": { + "unit": "iso4217/USD", + "value": "500", + "display": { + "assetSymbol": "USD", + "assetName": "US Dollar", + "decimals": 2 + } + }, + "tokenAmount": { + "unit": "caip19/eip155:8453/erc20:0x0000000000000000000000000000000000000000", + "value": "5000000", + "display": { + "assetSymbol": "USDC", + "assetName": "USD Coin", + "decimals": 6, + "networkName": "Base", + "iconUrl": "https://api.walletconnect.com/assets/v1/image/token/USDC/md", + "networkIconUrl": "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + } + }, + "buyer": { + "accountCaip10": "eip155:8453:0x0000000000000000000000000000000000000000", + "accountProviderName": "MetaMask", + "accountProviderIcon": "https://api.walletconnect.com/assets/v1/image/wallet/metamask/md" + }, + "transaction": { + "networkId": "8453", + "hash": "0x0000000000000000000000000000000000000000000000000000000000000000" + }, + "settlement": { + "amount": { + "unit": "caip19/eip155:8453/erc20:0x0000000000000000000000000000000000000000", + "value": "4840000", + "display": { + "assetSymbol": "USDC", + "assetName": "USD Coin", + "decimals": 6, + "iconUrl": "https://api.walletconnect.com/assets/v1/image/token/USDC/md", + "networkName": "Base", + "networkIconUrl": "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + } + }, + "settled": true, + "txHash": "0x0000000000000000000000000000000000000000000000000000000000000000" + }, + "fees": { + "total": { + "unit": "caip19/eip155:8453/erc20:0x0000000000000000000000000000000000000000", + "value": "160000", + "display": { + "assetSymbol": "USDC", + "assetName": "USD Coin", + "decimals": 6, + "iconUrl": "https://api.walletconnect.com/assets/v1/image/token/USDC/md", + "networkName": "Base", + "networkIconUrl": "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + } + }, + "fixed": { + "unit": "caip19/eip155:8453/erc20:0x0000000000000000000000000000000000000000", + "value": "140000", + "display": { + "assetSymbol": "USDC", + "assetName": "USD Coin", + "decimals": 6, + "iconUrl": "https://api.walletconnect.com/assets/v1/image/token/USDC/md", + "networkName": "Base", + "networkIconUrl": "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + } + }, + "percentage": "0.4" + }, + "refund": { + "status": "fully_refunded", + "fullyRefundedAt": "2024-01-02T08:30:00.000Z" + }, + "createdAt": "2024-01-01T12:00:00.000Z", + "expiresAt": "2024-01-01T12:15:00.000Z", + "lastUpdatedAt": "2024-01-01T12:00:00.000Z", + "settledAt": "2024-01-01T12:00:00.000Z" + } + ], + "nextCursor": null, + "stats": { + "totalRevenue": [ + { + "amount": 1000, + "currency": "USD" + } + ], + "totalTransactions": 100, + "totalCustomers": 25 + } + } + } + } + }, + "400": { + "description": "Bad request — invalid parameters or API version", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "invalid_params", + "params_validation", + "invalid_api_version", + "unknown_api_version", + "api_version_downgrade" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "description": "Field-level validation issues (present on validation errors)", + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "field", + "message" + ] + } + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "invalid_params": { + "summary": "Invalid request parameters", + "value": { + "code": "invalid_params", + "message": "Invalid request parameters" + } + }, + "params_validation": { + "summary": "Validation failed", + "value": { + "code": "params_validation", + "message": "Validation failed" + } + }, + "invalid_api_version": { + "summary": "Invalid API version", + "value": { + "code": "invalid_api_version", + "message": "Invalid API version" + } + }, + "unknown_api_version": { + "summary": "Unknown API version", + "value": { + "code": "unknown_api_version", + "message": "Unknown API version" + } + }, + "api_version_downgrade": { + "summary": "Requested API version is older than the partner pin", + "value": { + "code": "api_version_downgrade", + "message": "Requested API version is older than the partner pin" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid partner API key", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "internal_error", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "internal_error": { + "summary": "Internal Server Error", + "value": { + "code": "internal_error", + "message": "Internal Server Error" + } + } + } + } + } + } + }, + "tags": [ + "Payments" + ], + "summary": "List payments", + "description": "Retrieve paginated payments with optional filters.", + "security": [ + { + "apiKey": [] + } + ] } }, "/v1/payments/{id}": { @@ -1420,12 +1998,23 @@ } } } - } - } - }, - "/v1/payments/{id}/cancel": { - "post": { - "tags": [ + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] + } + }, + "/v1/payments/{id}/cancel": { + "post": { + "tags": [ "Payments" ], "operationId": "paymentsCancelPayment", @@ -1561,7 +2150,18 @@ } } } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } }, "/v1/payments/{id}/status": { @@ -1719,7 +2319,18 @@ } } } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } }, "/v1/payments/{id}/transition": { @@ -1871,7 +2482,18 @@ } } } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } }, "/v1/webhooks/binance_pay": { @@ -1908,7 +2530,18 @@ "500": { "description": "Internal error (Binance retries)" } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } }, "/v1/webhooks/binance_pay_onchain": { @@ -1948,7 +2581,18 @@ "503": { "description": "Webhook verification is not configured (Binance redelivers)" } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } }, "/v1/webhooks/bybit_pay": { @@ -1988,7 +2632,18 @@ "503": { "description": "Webhook verification or the Bybit client is not configured, or the configured key is unusable (Bybit redelivers)" } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } }, "/v1/webhooks/crypto_com_pay": { @@ -2031,123 +2686,6289 @@ "503": { "description": "Crypto.com Pay is not configured (Crypto.com redelivers)" } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } - } - }, - "tags": [ - { - "name": "Gateway" - }, - { - "name": "Payments" }, - { - "name": "Webhooks" - } - ], - "components": { - "schemas": { - "Action": { - "oneOf": [ + "/v1/refunds": { + "post": { + "operationId": "Refunds_create", + "parameters": [ { - "type": "object", - "description": "An action that requires a wallet RPC call to complete", - "required": [ - "data", - "type" - ], - "properties": { - "data": { - "$ref": "#/components/schemas/WalletRpcAction", - "description": "An action that requires a wallet RPC call to complete" - }, - "type": { - "type": "string", - "enum": [ - "walletRpc" - ] - } + "name": "Merchant-Id", + "in": "header", + "required": true, + "description": "Merchant identifier.", + "schema": { + "type": "string", + "examples": [ + "acme-store-1" + ] } }, { - "type": "object", - "description": "An action that requires building to complete", - "required": [ - "data", - "type" - ], - "properties": { - "data": { - "$ref": "#/components/schemas/Build", - "description": "An action that requires building to complete" - }, - "type": { - "type": "string", - "enum": [ - "build" - ] + "name": "WCP-Version", + "in": "header", + "required": false, + "description": "Optional WalletConnect Pay API version override. If omitted, the partner's pinned version is used.", + "schema": { + "type": "string", + "examples": [ + "2026-02-18", + "2026-02-19.preview" + ] + } + } + ], + "responses": { + "200": { + "description": "Payment marked as refunded", + "headers": { + "WCP-Version": { + "description": "WalletConnect Pay API version resolved for this request.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "paymentId": { + "type": "string", + "description": "Payment ID that was marked as refunded" + } + }, + "required": [ + "paymentId" + ] + }, + "example": { + "paymentId": "pay_a1a2ecc101KGF210FP7PN3BK08PZARS1CZ" + } } } }, - { - "type": "object", - "description": "Send an amount to an account. The whole action, with no transaction to\nbuild or sign.", - "required": [ - "data", - "type" - ], - "properties": { - "data": { - "$ref": "#/components/schemas/TransferAction", - "description": "Send an amount to an account. The whole action, with no transaction to\nbuild or sign." - }, - "type": { - "type": "string", - "enum": [ - "transfer" - ] + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "params_validation", + "payment_not_succeeded", + "invalid_api_version", + "unknown_api_version", + "api_version_downgrade" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "description": "Field-level validation issues (present on validation errors)", + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "field", + "message" + ] + } + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "params_validation": { + "summary": "Validation failed", + "value": { + "code": "params_validation", + "message": "Validation failed" + } + }, + "payment_not_succeeded": { + "summary": "Payment is not in a refundable state", + "value": { + "code": "payment_not_succeeded", + "message": "Payment is not in a refundable state" + } + }, + "invalid_api_version": { + "summary": "Invalid API version", + "value": { + "code": "invalid_api_version", + "message": "Invalid API version" + } + }, + "unknown_api_version": { + "summary": "Unknown API version", + "value": { + "code": "unknown_api_version", + "message": "Unknown API version" + } + }, + "api_version_downgrade": { + "summary": "Requested API version is older than the partner pin", + "value": { + "code": "api_version_downgrade", + "message": "Requested API version is older than the partner pin" + } + } + } } } - } - ], - "example": { - "data": { - "chain_id": "eip155:8453", - "method": "eth_signTypedData_v4", - "params": [ - "0x0000000000000000000000000000000000000000", - "{\"domain\":{\"name\":\"USD Coin\",\"version\":\"2\",\"chainId\":\"0x2105\",\"verifyingContract\":\"0x0000000000000000000000000000000000000000\"},\"types\":{\"EIP712Domain\":[{\"type\":\"string\",\"name\":\"name\"},{\"type\":\"string\",\"name\":\"version\"},{\"type\":\"uint256\",\"name\":\"chainId\"},{\"type\":\"address\",\"name\":\"verifyingContract\"}],\"ReceiveWithAuthorization\":[{\"type\":\"address\",\"name\":\"from\"},{\"type\":\"address\",\"name\":\"to\"},{\"type\":\"uint256\",\"name\":\"value\"},{\"type\":\"uint256\",\"name\":\"validAfter\"},{\"type\":\"uint256\",\"name\":\"validBefore\"},{\"type\":\"bytes32\",\"name\":\"nonce\"}]},\"primaryType\":\"ReceiveWithAuthorization\",\"message\":{\"from\":\"0x0000000000000000000000000000000000000000\",\"nonce\":\"0x0000000000000000000000000000000000000000000000000000000000000000\",\"to\":\"0x0000000000000000000000000000000000000000\",\"validAfter\":\"0x0\",\"validBefore\":\"0x0\",\"value\":\"0x0\"}}" - ] }, - "type": "walletRpc" - } - }, - "Amount": { - "type": "object", - "required": [ - "unit", - "value", - "display" - ], - "properties": { - "display": { - "$ref": "#/components/schemas/AmountDisplay", - "description": "Display information for the amount" - }, - "unit": { - "type": "string", - "description": "Currency unit, prefixed with either \"iso4217/\" or \"caip19/\"", - "example": "iso4217/USD" + "401": { + "description": "Unauthorized — missing or invalid API key, or missing merchant id", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key", + "missing_merchant_id" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + }, + "missing_merchant_id": { + "summary": "Missing Merchant ID", + "value": { + "code": "missing_merchant_id", + "message": "Missing Merchant ID" + } + } + } + } + } }, - "value": { - "type": "string", - "description": "Amount value, in the currency unit's minor units" - } - }, - "example": { - "display": { - "assetName": "USD Coin", + "404": { + "description": "Payment not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "not_found", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "not_found": { + "summary": "Not Found", + "value": { + "code": "not_found", + "message": "Not Found" + } + } + } + } + } + }, + "409": { + "description": "Payment is already refunded", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "already_refunded", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "already_refunded": { + "summary": "Payment is already refunded", + "value": { + "code": "already_refunded", + "message": "Payment is already refunded" + } + } + } + } + } + }, + "500": { + "description": "Internal error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "internal_error", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "internal_error": { + "summary": "Internal Server Error", + "value": { + "code": "internal_error", + "message": "Internal Server Error" + } + } + } + } + } + }, + "502": { + "description": "Bad gateway", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "bad_gateway", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "bad_gateway": { + "summary": "Bad Gateway", + "value": { + "code": "bad_gateway", + "message": "Bad Gateway" + } + } + } + } + } + } + }, + "tags": [ + "Refunds" + ], + "summary": "Mark a payment as refunded", + "description": "Request a full refund for a payment. Calling a second time on the same payment returns 409.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "paymentId": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "pattern": "^pay_[A-Za-z0-9]+$", + "description": "Payment ID to refund", + "examples": [ + "pay_a1a2ecc101KGF210FP7PN3BK08PZARS1CZ" + ] + } + }, + "required": [ + "paymentId" + ] + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/v1/merchants/payments": { + "get": { + "operationId": "MerchantPayments_list", + "parameters": [ + { + "name": "Merchant-Id", + "in": "header", + "required": true, + "description": "Merchant identifier.", + "schema": { + "type": "string", + "examples": [ + "acme-store-1" + ] + } + }, + { + "name": "WCP-Version", + "in": "header", + "required": false, + "description": "Optional WalletConnect Pay API version override. If omitted, the partner's pinned version is used.", + "schema": { + "type": "string", + "examples": [ + "2026-02-18", + "2026-02-19.preview" + ] + } + }, + { + "in": "query", + "name": "startTs", + "schema": { + "examples": [ + "2026-01-06T00:00:00Z" + ], + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "description": "RFC3339 timestamp, inclusive" + }, + { + "in": "query", + "name": "endTs", + "schema": { + "examples": [ + "2026-01-07T00:00:00Z" + ], + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "description": "RFC3339 timestamp, exclusive" + }, + { + "in": "query", + "name": "token_symbol", + "schema": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "description": "Filter by token symbol (e.g. `USDC`). CAIP-19 identifiers are not supported. Accepts a single value or multiple repeated params:\n\n- Single: `?token_symbol=USDC`\n- Multiple: `?token_symbol=USDC&token_symbol=EURC`" + }, + { + "in": "query", + "name": "network", + "schema": { + "examples": [ + "eip155:8453", + "eip155:8453,eip155:1" + ], + "type": "string" + }, + "description": "Filter by [CAIP-2](https://standards.chainagnostic.org/CAIPs/caip-2) chain ID. Comma-separated for multiple." + }, + { + "in": "query", + "name": "sortBy", + "schema": { + "type": "string", + "enum": [ + "date", + "amount" + ] + }, + "description": "Field to sort by" + }, + { + "in": "query", + "name": "sortDir", + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "description": "Sort direction" + }, + { + "in": "query", + "name": "cursor", + "schema": { + "type": "string" + }, + "description": "Opaque pagination cursor — use the value from `nextCursor` in the previous response." + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 200 + }, + "description": "Page size (default 50, max 200)" + }, + { + "in": "query", + "name": "status", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "requires_action", + "processing", + "succeeded", + "failed", + "expired" + ] + } + }, + "description": "Filter by payment status. Accepts a single value or multiple repeated params:\n\n- Single: `?status=succeeded`\n- Multiple: `?status=succeeded&status=processing`" + }, + { + "in": "query", + "name": "referenceId", + "schema": { + "type": "string", + "minLength": 3, + "maxLength": 35, + "pattern": "^[A-Za-z0-9 /:.,+-]+$", + "examples": [ + "order-42" + ] + }, + "description": "Substring search on the merchant-provided reference ID. Between 3 and 35 characters. Allowed characters: ASCII letters, digits, and ` /-:.,+`." + } + ], + "responses": { + "200": { + "description": "Payments with statistics", + "headers": { + "WCP-Version": { + "description": "WalletConnect Pay API version resolved for this request.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MerchantPaymentsResponse" + }, + "example": { + "data": [ + { + "paymentId": "pay_a1a2ecc101KGF210FP7PN3BK08PZARS1CZ", + "merchant": { + "id": "acme-store-1", + "name": "Acme Store", + "iconUrl": "https://imagedelivery.net/example/icon.png" + }, + "referenceId": "a1b2cad4e5f2783012345678axcdea90", + "status": "succeeded", + "isTerminal": true, + "paymentUrl": "https://pay.walletconnect.com/?pid=pay_a1a2ecc101KGF210FP7PN3BK08PZARS1CZ", + "fiatAmount": { + "unit": "iso4217/USD", + "value": "500", + "display": { + "assetSymbol": "USD", + "assetName": "US Dollar", + "decimals": 2 + } + }, + "tokenAmount": { + "unit": "caip19/eip155:8453/erc20:0x0000000000000000000000000000000000000000", + "value": "5000000", + "display": { + "assetSymbol": "USDC", + "assetName": "USD Coin", + "decimals": 6, + "networkName": "Base", + "iconUrl": "https://api.walletconnect.com/assets/v1/image/token/USDC/md", + "networkIconUrl": "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + } + }, + "buyer": { + "accountCaip10": "eip155:8453:0x0000000000000000000000000000000000000000", + "accountProviderName": "MetaMask", + "accountProviderIcon": "https://api.walletconnect.com/assets/v1/image/wallet/metamask/md" + }, + "transaction": { + "networkId": "8453", + "hash": "0x0000000000000000000000000000000000000000000000000000000000000000" + }, + "settlement": { + "amount": { + "unit": "caip19/eip155:8453/erc20:0x0000000000000000000000000000000000000000", + "value": "4840000", + "display": { + "assetSymbol": "USDC", + "assetName": "USD Coin", + "decimals": 6, + "iconUrl": "https://api.walletconnect.com/assets/v1/image/token/USDC/md", + "networkName": "Base", + "networkIconUrl": "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + } + }, + "settled": true, + "txHash": "0x0000000000000000000000000000000000000000000000000000000000000000" + }, + "fees": { + "total": { + "unit": "caip19/eip155:8453/erc20:0x0000000000000000000000000000000000000000", + "value": "160000", + "display": { + "assetSymbol": "USDC", + "assetName": "USD Coin", + "decimals": 6, + "iconUrl": "https://api.walletconnect.com/assets/v1/image/token/USDC/md", + "networkName": "Base", + "networkIconUrl": "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + } + }, + "fixed": { + "unit": "caip19/eip155:8453/erc20:0x0000000000000000000000000000000000000000", + "value": "140000", + "display": { + "assetSymbol": "USDC", + "assetName": "USD Coin", + "decimals": 6, + "iconUrl": "https://api.walletconnect.com/assets/v1/image/token/USDC/md", + "networkName": "Base", + "networkIconUrl": "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + } + }, + "percentage": "0.4" + }, + "refund": { + "status": "fully_refunded", + "fullyRefundedAt": "2024-01-02T08:30:00.000Z" + }, + "createdAt": "2024-01-01T12:00:00.000Z", + "expiresAt": "2024-01-01T12:15:00.000Z", + "lastUpdatedAt": "2024-01-01T12:00:00.000Z", + "settledAt": "2024-01-01T12:00:00.000Z" + } + ], + "nextCursor": null, + "stats": { + "totalRevenue": [ + { + "amount": 1000, + "currency": "USD" + } + ], + "totalTransactions": 100, + "totalCustomers": 25 + } + } + } + } + }, + "400": { + "description": "Bad request — invalid parameters or API version", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "invalid_params", + "params_validation", + "invalid_api_version", + "unknown_api_version", + "api_version_downgrade" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "description": "Field-level validation issues (present on validation errors)", + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "field", + "message" + ] + } + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "invalid_params": { + "summary": "Invalid request parameters", + "value": { + "code": "invalid_params", + "message": "Invalid request parameters" + } + }, + "params_validation": { + "summary": "Validation failed", + "value": { + "code": "params_validation", + "message": "Validation failed" + } + }, + "invalid_api_version": { + "summary": "Invalid API version", + "value": { + "code": "invalid_api_version", + "message": "Invalid API version" + } + }, + "unknown_api_version": { + "summary": "Unknown API version", + "value": { + "code": "unknown_api_version", + "message": "Unknown API version" + } + }, + "api_version_downgrade": { + "summary": "Requested API version is older than the partner pin", + "value": { + "code": "api_version_downgrade", + "message": "Requested API version is older than the partner pin" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key, or missing merchant id", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key", + "missing_merchant_id" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + }, + "missing_merchant_id": { + "summary": "Missing Merchant ID", + "value": { + "code": "missing_merchant_id", + "message": "Missing Merchant ID" + } + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "internal_error", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "internal_error": { + "summary": "Internal Server Error", + "value": { + "code": "internal_error", + "message": "Internal Server Error" + } + } + } + } + } + } + }, + "tags": [ + "Payments" + ], + "summary": "List payments for a merchant", + "description": "Retrieve paginated payments with optional filters.", + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/v1/merchants/payments/{paymentId}/receipt": { + "post": { + "operationId": "PaymentReceipts_send", + "parameters": [ + { + "name": "Merchant-Id", + "in": "header", + "required": true, + "description": "Merchant identifier.", + "schema": { + "type": "string", + "examples": [ + "acme-store-1" + ] + } + }, + { + "name": "WCP-Version", + "in": "header", + "required": false, + "description": "Optional WalletConnect Pay API version override. If omitted, the partner's pinned version is used.", + "schema": { + "type": "string", + "examples": [ + "2026-02-18", + "2026-02-19.preview" + ] + } + }, + { + "in": "path", + "name": "paymentId", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "pattern": "^pay_[A-Za-z0-9]+$", + "examples": [ + "pay_a1a2ecc101KGF210FP7PN3BK08PZARS1CZ" + ] + }, + "required": true, + "description": "Payment ID to send the receipt for" + } + ], + "responses": { + "200": { + "description": "Receipt sent, or already sent before", + "headers": { + "WCP-Version": { + "description": "WalletConnect Pay API version resolved for this request.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "paymentId": { + "type": "string", + "description": "Payment ID the receipt is for" + }, + "status": { + "type": "string", + "enum": [ + "sent", + "already_sent" + ], + "description": "`sent`: the receipt is on its way. `already_sent`: a receipt for this payment was already sent, so no new email was sent." + } + }, + "required": [ + "paymentId", + "status" + ] + }, + "example": { + "paymentId": "pay_a1a2ecc101KGF210FP7PN3BK08PZARS1CZ", + "status": "sent" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "params_validation", + "payment_not_succeeded", + "invalid_api_version", + "unknown_api_version", + "api_version_downgrade" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "description": "Field-level validation issues (present on validation errors)", + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "field", + "message" + ] + } + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "params_validation": { + "summary": "Validation failed", + "value": { + "code": "params_validation", + "message": "Validation failed" + } + }, + "payment_not_succeeded": { + "summary": "Payment is not in a refundable state", + "value": { + "code": "payment_not_succeeded", + "message": "Payment is not in a refundable state" + } + }, + "invalid_api_version": { + "summary": "Invalid API version", + "value": { + "code": "invalid_api_version", + "message": "Invalid API version" + } + }, + "unknown_api_version": { + "summary": "Unknown API version", + "value": { + "code": "unknown_api_version", + "message": "Unknown API version" + } + }, + "api_version_downgrade": { + "summary": "Requested API version is older than the partner pin", + "value": { + "code": "api_version_downgrade", + "message": "Requested API version is older than the partner pin" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key, or missing merchant id", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key", + "missing_merchant_id" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + }, + "missing_merchant_id": { + "summary": "Missing Merchant ID", + "value": { + "code": "missing_merchant_id", + "message": "Missing Merchant ID" + } + } + } + } + } + }, + "404": { + "description": "Payment not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "not_found", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "not_found": { + "summary": "Not Found", + "value": { + "code": "not_found", + "message": "Not Found" + } + } + } + } + } + }, + "409": { + "description": "The payment has no on-chain transaction to put on a receipt", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "receipt_unavailable", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "receipt_unavailable": { + "summary": "This payment has no on-chain transaction to put on a receipt", + "value": { + "code": "receipt_unavailable", + "message": "This payment has no on-chain transaction to put on a receipt" + } + } + } + } + } + }, + "429": { + "description": "Too many receipt requests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "rate_limited", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "rate_limited": { + "summary": "Too Many Requests", + "value": { + "code": "rate_limited", + "message": "Too Many Requests" + } + } + } + } + } + }, + "500": { + "description": "Internal error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "internal_error", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "internal_error": { + "summary": "Internal Server Error", + "value": { + "code": "internal_error", + "message": "Internal Server Error" + } + } + } + } + } + }, + "502": { + "description": "Receipt service unavailable", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "receipt_service_unavailable", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "receipt_service_unavailable": { + "summary": "The receipt service is unavailable", + "value": { + "code": "receipt_service_unavailable", + "message": "The receipt service is unavailable" + } + } + } + } + } + } + }, + "tags": [ + "Payments" + ], + "summary": "Email a payment receipt", + "description": "Email the receipt for a succeeded payment to the customer. A payment gets at most one receipt: if the customer already received one, no new email is sent and the response status is `already_sent`.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "maxLength": 320, + "format": "email", + "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$", + "description": "Customer email address to send the receipt to", + "examples": [ + "customer@example.com" + ] + } + }, + "required": [ + "email" + ] + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/v1/merchants": { + "post": { + "operationId": "MerchantManagement_create", + "tags": [ + "Merchant Management" + ], + "summary": "Create a merchant", + "description": "Create a new merchant under the authenticated partner. Requires an `Idempotency-Key` header so retries safely return the originally-created merchant rather than creating duplicates.", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "required": true, + "description": "Unique key to ensure idempotent request processing. Max 255 characters.", + "schema": { + "type": "string", + "maxLength": 255 + } + } + ], + "responses": { + "201": { + "description": "Merchant created", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "merchant": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Merchant ID", + "examples": [ + "mrch_7kBz2qR9xPvLmN4Yw" + ] + }, + "name": { + "type": "string", + "description": "Merchant display name" + }, + "email": { + "description": "Contact email", + "examples": [ + "billing@acme.store" + ], + "type": [ + "string", + "null" + ] + }, + "status": { + "type": "string", + "enum": [ + "active", + "inactive", + "suspended" + ], + "description": "Current merchant status", + "examples": [ + "active" + ] + }, + "mcc": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ], + "description": "ISO 18245 merchant category code, or null if not set", + "examples": [ + 5812 + ] + }, + "createdAt": { + "type": "string", + "description": "ISO 8601 creation timestamp", + "examples": [ + "2025-06-15T10:30:00.000Z" + ] + } + }, + "required": [ + "id", + "name", + "email", + "status", + "mcc", + "createdAt" + ] + } + }, + "required": [ + "merchant" + ] + }, + "example": { + "merchant": { + "id": "mrch_7kBz2qR9xPvLmN4Yw", + "name": "Acme Store", + "email": "billing@acme.store", + "status": "active", + "mcc": 5812, + "createdAt": "2025-06-15T10:30:00.000Z" + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "params_validation", + "invalid_params", + "missing_idempotency_key", + "logo_too_small", + "logo_too_large", + "logo_not_square", + "logo_file_too_big", + "logo_invalid_mime", + "logo_invalid_dimensions" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "description": "Field-level validation issues (present on validation errors)", + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "field", + "message" + ] + } + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "params_validation": { + "summary": "Validation failed", + "value": { + "code": "params_validation", + "message": "Validation failed" + } + }, + "invalid_params": { + "summary": "Invalid request parameters", + "value": { + "code": "invalid_params", + "message": "Invalid request parameters" + } + }, + "missing_idempotency_key": { + "summary": "Missing Idempotency-Key header", + "value": { + "code": "missing_idempotency_key", + "message": "Missing Idempotency-Key header" + } + }, + "logo_too_small": { + "summary": "Logo is too small", + "value": { + "code": "logo_too_small", + "message": "Logo is too small" + } + }, + "logo_too_large": { + "summary": "Logo is too large", + "value": { + "code": "logo_too_large", + "message": "Logo is too large" + } + }, + "logo_not_square": { + "summary": "Logo must be square", + "value": { + "code": "logo_not_square", + "message": "Logo must be square" + } + }, + "logo_file_too_big": { + "summary": "Logo file is too large", + "value": { + "code": "logo_file_too_big", + "message": "Logo file is too large" + } + }, + "logo_invalid_mime": { + "summary": "Logo file type is not supported", + "value": { + "code": "logo_invalid_mime", + "message": "Logo file type is not supported" + } + }, + "logo_invalid_dimensions": { + "summary": "Logo dimensions could not be read", + "value": { + "code": "logo_invalid_dimensions", + "message": "Logo dimensions could not be read" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + } + } + } + } + }, + "409": { + "description": "Idempotency conflict", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "idempotency_conflict", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "idempotency_conflict": { + "summary": "Idempotency key conflict: same key was used with a different request body", + "value": { + "code": "idempotency_conflict", + "message": "Idempotency key conflict: same key was used with a different request body" + } + } + } + } + } + }, + "500": { + "description": "Internal error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "internal_error", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "internal_error": { + "summary": "Internal Server Error", + "value": { + "code": "internal_error", + "message": "Internal Server Error" + } + } + } + } + } + }, + "502": { + "description": "Bad gateway", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "bad_gateway", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "bad_gateway": { + "summary": "Bad Gateway", + "value": { + "code": "bad_gateway", + "message": "Bad Gateway" + } + } + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "merchantName": { + "type": "string", + "minLength": 2, + "maxLength": 64, + "description": "Display name for the merchant", + "examples": [ + "Acme Store" + ] + }, + "merchantEmail": { + "type": "string", + "format": "email", + "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$", + "description": "Contact email for the merchant", + "examples": [ + "billing@acme.store" + ] + }, + "iconUrl": { + "default": null, + "description": "Merchant logo URL (HTTPS only), or null to unset. Logo should be square (1:1, ±5%), 500×500px minimum (1024×1024px recommended, 4096×4096px maximum), JPEG/PNG/WebP, up to 2 MB.", + "examples": [ + "https://example.com/logo.png" + ], + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "null" + } + ] + }, + "alwaysCollectData": { + "description": "When true, every checkout forces the buyer to provide compliance data, even repeat buyers whose data is already on file.", + "examples": [ + true + ], + "type": "boolean" + }, + "mcc": { + "default": null, + "description": "ISO 18245 merchant category code describing the merchant's line of business.", + "examples": [ + 5812 + ], + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "merchantName", + "merchantEmail" + ], + "examples": [ + { + "merchantName": "Acme Store", + "merchantEmail": "billing@acme.store", + "iconUrl": "https://example.com/logo.png" + } + ] + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "get": { + "operationId": "MerchantManagement_list", + "tags": [ + "Merchant Management" + ], + "summary": "List merchants", + "description": "List the partner's merchants. Supports filtering by `status`, free-text `search` over name and ID, and cursor-based pagination via `cursor` and `limit`.", + "responses": { + "200": { + "description": "Merchants list", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "merchants": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Merchant ID", + "examples": [ + "mrch_7kBz2qR9xPvLmN4Yw" + ] + }, + "name": { + "type": "string", + "description": "Merchant display name" + }, + "email": { + "description": "Contact email", + "examples": [ + "billing@acme.store" + ], + "type": [ + "string", + "null" + ] + }, + "status": { + "type": "string", + "enum": [ + "active", + "inactive", + "suspended" + ], + "description": "Current merchant status", + "examples": [ + "active" + ] + }, + "iconUrl": { + "description": "Merchant logo URL, or null if not set", + "examples": [ + "https://imagedelivery.net/example/acme-icon.png" + ], + "type": [ + "string", + "null" + ] + }, + "mcc": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ], + "description": "ISO 18245 merchant category code, or null if not set", + "examples": [ + 5812 + ] + }, + "createdAt": { + "type": "string", + "description": "ISO 8601 creation timestamp", + "examples": [ + "2025-06-15T10:30:00.000Z" + ] + } + }, + "required": [ + "id", + "name", + "email", + "status", + "iconUrl", + "mcc", + "createdAt" + ] + } + }, + "totalCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "Total number of merchants matching the query (ignoring pagination)" + }, + "nextCursor": { + "description": "Cursor for the next page, or null if no more results", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "merchants", + "totalCount", + "nextCursor" + ] + }, + "example": { + "merchants": [ + { + "id": "mrch_7kBz2qR9xPvLmN4Yw", + "name": "Acme Store", + "email": "billing@acme.store", + "status": "active", + "iconUrl": "https://imagedelivery.net/example/acme-icon.png", + "mcc": 5812, + "createdAt": "2025-06-15T10:30:00.000Z" + }, + { + "id": "mrch_Qx8fTp3YwKjR5vNm2", + "name": "Widget Co", + "email": null, + "status": "active", + "iconUrl": null, + "mcc": null, + "createdAt": "2025-07-01T08:00:00.000Z" + } + ], + "totalCount": 2, + "nextCursor": null + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "params_validation", + "invalid_params" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "description": "Field-level validation issues (present on validation errors)", + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "field", + "message" + ] + } + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "params_validation": { + "summary": "Validation failed", + "value": { + "code": "params_validation", + "message": "Validation failed" + } + }, + "invalid_params": { + "summary": "Invalid request parameters", + "value": { + "code": "invalid_params", + "message": "Invalid request parameters" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + } + } + } + } + } + }, + "parameters": [ + { + "in": "query", + "name": "status", + "schema": { + "type": "string", + "enum": [ + "active", + "inactive", + "suspended" + ] + }, + "description": "Filter by merchant status" + }, + { + "in": "query", + "name": "search", + "schema": { + "examples": [ + "Acme" + ], + "type": "string", + "minLength": 1, + "maxLength": 256 + }, + "description": "Search by merchant name or ID (case-insensitive)" + }, + { + "in": "query", + "name": "cursor", + "schema": { + "type": "string" + }, + "description": "Opaque pagination cursor — use the value from `nextCursor` in the previous response." + }, + { + "in": "query", + "name": "limit", + "schema": { + "default": 20, + "type": "integer", + "minimum": 1, + "maximum": 100 + }, + "description": "Page size (default 20, max 100)" + } + ], + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/v1/merchants/{merchantId}": { + "get": { + "operationId": "MerchantManagement_get", + "tags": [ + "Merchant Management" + ], + "summary": "Get a merchant", + "description": "Fetch a merchant's profile along with its configured `settlements` (crypto and fiat). Crypto settlements use [CAIP-19](https://chainagnostic.org/CAIPs/caip-19) asset IDs and [CAIP-10](https://chainagnostic.org/CAIPs/caip-10) destination accounts.", + "responses": { + "200": { + "description": "Merchant details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "merchant": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Merchant ID", + "examples": [ + "mrch_7kBz2qR9xPvLmN4Yw" + ] + }, + "name": { + "type": "string", + "description": "Merchant display name" + }, + "email": { + "description": "Contact email", + "examples": [ + "billing@acme.store" + ], + "type": [ + "string", + "null" + ] + }, + "status": { + "type": "string", + "enum": [ + "active", + "inactive", + "suspended" + ], + "description": "Current merchant status", + "examples": [ + "active" + ] + }, + "iconUrl": { + "description": "Merchant logo URL, or null if not set", + "examples": [ + "https://imagedelivery.net/example/acme-icon.png" + ], + "type": [ + "string", + "null" + ] + }, + "mcc": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ], + "description": "ISO 18245 merchant category code, or null if not set", + "examples": [ + 5812 + ] + }, + "createdAt": { + "type": "string", + "description": "ISO 8601 creation timestamp", + "examples": [ + "2025-06-15T10:30:00.000Z" + ] + }, + "alwaysCollectData": { + "type": "boolean", + "description": "When true, every checkout forces the buyer to provide compliance data — even repeat buyers whose data is already on file.", + "examples": [ + false + ] + }, + "mtaAddresses": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Transit account addresses, where payments arrive before they settle, as [CAIP-10](https://standards.chainagnostic.org/CAIPs/caip-10) account IDs. One entry per provisioned chain, and chains in a namespace share an address, so entries repeat. Empty when there is no transit account. May be shared across all of a partner's merchants, so they cannot be used to attribute a payment to a single merchant.", + "examples": [ + [ + "eip155:8453:0x1234567890abcdef1234567890abcdef12345678", + "eip155:10:0x1234567890abcdef1234567890abcdef12345678" + ] + ] + }, + "settlements": { + "type": "object", + "properties": { + "crypto": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Crypto settlement ID" + }, + "asset": { + "type": "string", + "description": "[CAIP-19](https://standards.chainagnostic.org/CAIPs/caip-19) asset ID", + "examples": [ + "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" + ] + }, + "destination": { + "type": "string", + "description": "[CAIP-10](https://standards.chainagnostic.org/CAIPs/caip-10) settlement destination", + "examples": [ + "eip155:8453:0x1234567890abcdef1234567890abcdef12345678" + ] + }, + "networkName": { + "description": "Display name of the settlement network, or null if the chain is not recognized", + "examples": [ + "Base" + ], + "type": [ + "string", + "null" + ] + }, + "networkLogoUrl": { + "description": "Logo URL for the settlement network (an admin-uploaded logo when set, otherwise the assets-registry fallback), or null if the chain is not recognized", + "examples": [ + "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "asset", + "destination", + "networkName", + "networkLogoUrl" + ] + } + }, + "fiat": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Settlement config ID" + }, + "status": { + "type": "string", + "description": "Fiat settlement status" + }, + "bankType": { + "type": "string", + "description": "Bank account type" + } + }, + "required": [ + "id", + "status", + "bankType" + ] + } + }, + "hasSettlementPath": { + "type": "boolean", + "description": "True when the merchant has somewhere for a live payment to settle: a crypto settlement, a fiat settlement config (including one still in setup, and so absent from `fiat` above), or an enabled funding source. Use this rather than the arrays above to decide whether the merchant is payable — they list only what is active. Advisory: pay-core is the authority and rejects a payment it cannot settle with `no_settlement_configuration`." + } + }, + "required": [ + "crypto", + "fiat", + "hasSettlementPath" + ] + } + }, + "required": [ + "id", + "name", + "email", + "status", + "iconUrl", + "mcc", + "createdAt", + "alwaysCollectData", + "mtaAddresses", + "settlements" + ] + } + }, + "required": [ + "merchant" + ] + }, + "example": { + "merchant": { + "id": "mrch_7kBz2qR9xPvLmN4Yw", + "name": "Acme Store", + "email": "billing@acme.store", + "status": "active", + "iconUrl": "https://imagedelivery.net/example/acme-icon.png", + "mcc": 5812, + "createdAt": "2025-06-15T10:30:00.000Z", + "mtaAddresses": [ + "eip155:8453:0x1234567890abcdef1234567890abcdef12345678", + "eip155:10:0x1234567890abcdef1234567890abcdef12345678" + ], + "settlements": { + "crypto": [ + { + "id": "crypto_Xk7nWp8XmQj2YrTv6", + "asset": "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", + "destination": "eip155:8453:0x1234567890abcdef1234567890abcdef12345678", + "networkName": "Base", + "networkLogoUrl": "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + } + ], + "fiat": [ + { + "id": "fiat_Bk4nWp8XmQj2YrTv6", + "status": "active", + "bankType": "ACH" + } + ] + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + } + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "not_found", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "not_found": { + "summary": "Not Found", + "value": { + "code": "not_found", + "message": "Not Found" + } + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "merchantId", + "required": true + } + ], + "security": [ + { + "apiKey": [] + } + ] + }, + "patch": { + "operationId": "MerchantManagement_update", + "tags": [ + "Merchant Management" + ], + "summary": "Update a merchant", + "description": "Update a merchant's profile. At least one of `merchantName`, `merchantEmail`, `iconUrl`, `alwaysCollectData`, or `mcc` must be provided. Pass `iconUrl: null` to unset the existing logo, and `mcc: null` to unset the merchant category code.", + "responses": { + "200": { + "description": "Merchant updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "merchant": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Merchant ID", + "examples": [ + "mrch_7kBz2qR9xPvLmN4Yw" + ] + }, + "name": { + "type": "string", + "description": "Merchant display name" + }, + "email": { + "description": "Contact email", + "examples": [ + "billing@acme.store" + ], + "type": [ + "string", + "null" + ] + }, + "status": { + "type": "string", + "enum": [ + "active", + "inactive", + "suspended" + ], + "description": "Current merchant status", + "examples": [ + "active" + ] + }, + "iconUrl": { + "description": "Merchant logo URL, or null if not set", + "examples": [ + "https://imagedelivery.net/example/acme-icon.png" + ], + "type": [ + "string", + "null" + ] + }, + "mcc": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ], + "description": "ISO 18245 merchant category code, or null if not set", + "examples": [ + 5812 + ] + }, + "createdAt": { + "type": "string", + "description": "ISO 8601 creation timestamp", + "examples": [ + "2025-06-15T10:30:00.000Z" + ] + } + }, + "required": [ + "id", + "name", + "email", + "status", + "iconUrl", + "mcc", + "createdAt" + ] + } + }, + "required": [ + "merchant" + ] + }, + "example": { + "merchant": { + "id": "mrch_7kBz2qR9xPvLmN4Yw", + "name": "Acme Store v2", + "email": "billing@acme.store", + "status": "active", + "iconUrl": "https://imagedelivery.net/example/acme-icon.png", + "mcc": 5812, + "createdAt": "2025-06-15T10:30:00.000Z" + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "params_validation", + "invalid_params", + "logo_too_small", + "logo_too_large", + "logo_not_square", + "logo_file_too_big", + "logo_invalid_mime", + "logo_invalid_dimensions" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "description": "Field-level validation issues (present on validation errors)", + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "field", + "message" + ] + } + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "params_validation": { + "summary": "Validation failed", + "value": { + "code": "params_validation", + "message": "Validation failed" + } + }, + "invalid_params": { + "summary": "Invalid request parameters", + "value": { + "code": "invalid_params", + "message": "Invalid request parameters" + } + }, + "logo_too_small": { + "summary": "Logo is too small", + "value": { + "code": "logo_too_small", + "message": "Logo is too small" + } + }, + "logo_too_large": { + "summary": "Logo is too large", + "value": { + "code": "logo_too_large", + "message": "Logo is too large" + } + }, + "logo_not_square": { + "summary": "Logo must be square", + "value": { + "code": "logo_not_square", + "message": "Logo must be square" + } + }, + "logo_file_too_big": { + "summary": "Logo file is too large", + "value": { + "code": "logo_file_too_big", + "message": "Logo file is too large" + } + }, + "logo_invalid_mime": { + "summary": "Logo file type is not supported", + "value": { + "code": "logo_invalid_mime", + "message": "Logo file type is not supported" + } + }, + "logo_invalid_dimensions": { + "summary": "Logo dimensions could not be read", + "value": { + "code": "logo_invalid_dimensions", + "message": "Logo dimensions could not be read" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + } + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "not_found", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "not_found": { + "summary": "Not Found", + "value": { + "code": "not_found", + "message": "Not Found" + } + } + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "merchantName": { + "description": "Updated display name", + "examples": [ + "Acme Store v2" + ], + "type": "string", + "minLength": 2, + "maxLength": 64 + }, + "merchantEmail": { + "description": "Updated contact email", + "examples": [ + "new-billing@acme.store" + ], + "type": "string", + "format": "email", + "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + }, + "iconUrl": { + "description": "Updated logo URL (HTTPS only), or null to unset. Logo should be square (1:1, ±5%), 500×500px minimum (1024×1024px recommended, 4096×4096px maximum), JPEG/PNG/WebP, up to 2 MB.", + "examples": [ + "https://example.com/new-logo.png" + ], + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "null" + } + ] + }, + "alwaysCollectData": { + "description": "When true, every checkout forces the buyer to provide compliance data, even repeat buyers whose data is already on file.", + "examples": [ + true + ], + "type": "boolean" + }, + "mcc": { + "description": "Updated ISO 18245 merchant category code, or null to unset.", + "examples": [ + 5812 + ], + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "merchantId", + "required": true + } + ], + "security": [ + { + "apiKey": [] + } + ] + }, + "delete": { + "operationId": "MerchantManagement_delete", + "tags": [ + "Merchant Management" + ], + "summary": "Delete a merchant", + "description": "Soft-delete a merchant. The merchant is hidden from listings and can no longer accept new payments. Already-deleted merchants return `deleted: true` so the call is idempotent.", + "responses": { + "200": { + "description": "Merchant deleted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Merchant ID" + }, + "deleted": { + "type": "boolean", + "description": "Whether the merchant was successfully deleted" + } + }, + "required": [ + "id", + "deleted" + ] + }, + "example": { + "id": "mrch_7kBz2qR9xPvLmN4Yw", + "deleted": true + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + } + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "not_found", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "not_found": { + "summary": "Not Found", + "value": { + "code": "not_found", + "message": "Not Found" + } + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "merchantId", + "required": true + } + ], + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/v1/merchants/{merchantId}/settlements": { + "get": { + "operationId": "Settlements_list", + "tags": [ + "Settlements" + ], + "summary": "List settlements", + "description": "List the merchant's configured fiat and crypto settlement destinations.", + "responses": { + "200": { + "description": "Settlements list", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "fiat": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Fiat settlement ID", + "examples": [ + "fiat_Bk4nWp8XmQj2YrTv6" + ] + }, + "status": { + "type": "string", + "description": "Fiat settlement status. Collapses the KYB lifecycle into broad partner-facing states (`pending_kyb`, `action_required`, `active`, `rejected`). See `kybStatus` for the raw KYB state.", + "examples": [ + "active" + ] + }, + "kybStatus": { + "description": "Raw KYB lifecycle state from the verification provider. Distinguishes `collecting_info` (waiting on merchant to start) from `pending` (verification in flight) — both collapse to `pending_kyb` under `status`. `null` when no KYB case is linked.", + "examples": [ + "pending" + ], + "type": [ + "string", + "null" + ] + }, + "kybUrl": { + "description": "URL the merchant must visit to continue verification: Iron's hosted identity flow during KYB, or our hosted token-gated signing page once Iron requires document signatures. `null` when no merchant action is pending.", + "examples": [ + "https://kyb.iron.io/verify/abc123" + ], + "type": [ + "string", + "null" + ] + }, + "bankType": { + "type": "string", + "const": "SEPA", + "description": "Bank account type" + }, + "bankName": { + "type": "string", + "description": "Display name of the bank.", + "examples": [ + "BNP Paribas" + ] + }, + "bankCountry": { + "type": "string", + "description": "ISO 3166-1 alpha-2 country code of the bank.", + "examples": [ + "FR" + ] + }, + "accountHolderName": { + "description": "Account holder name as recorded on the bank account.", + "examples": [ + "Acme Corp SAS" + ], + "type": [ + "string", + "null" + ] + }, + "ibanLast4": { + "type": "string", + "description": "Last 4 characters of the IBAN. The full IBAN is never returned over the API.", + "examples": [ + "0189" + ] + } + }, + "required": [ + "id", + "status", + "kybStatus", + "kybUrl", + "bankType", + "bankName", + "bankCountry", + "accountHolderName", + "ibanLast4" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Fiat settlement ID", + "examples": [ + "fiat_Bk4nWp8XmQj2YrTv6" + ] + }, + "status": { + "type": "string", + "description": "Fiat settlement status. Collapses the KYB lifecycle into broad partner-facing states (`pending_kyb`, `action_required`, `active`, `rejected`). See `kybStatus` for the raw KYB state.", + "examples": [ + "active" + ] + }, + "kybStatus": { + "description": "Raw KYB lifecycle state from the verification provider. Distinguishes `collecting_info` (waiting on merchant to start) from `pending` (verification in flight) — both collapse to `pending_kyb` under `status`. `null` when no KYB case is linked.", + "examples": [ + "pending" + ], + "type": [ + "string", + "null" + ] + }, + "kybUrl": { + "description": "URL the merchant must visit to continue verification: Iron's hosted identity flow during KYB, or our hosted token-gated signing page once Iron requires document signatures. `null` when no merchant action is pending.", + "examples": [ + "https://kyb.iron.io/verify/abc123" + ], + "type": [ + "string", + "null" + ] + }, + "bankType": { + "type": "string", + "const": "ACH", + "description": "Bank account type" + }, + "bankName": { + "type": "string", + "description": "Display name of the bank.", + "examples": [ + "Chase" + ] + }, + "bankCountry": { + "type": "string", + "description": "ISO 3166-1 alpha-2 country code of the bank.", + "examples": [ + "US" + ] + }, + "accountHolderName": { + "description": "Account holder name as recorded on the bank account.", + "examples": [ + "Acme Corp Inc" + ], + "type": [ + "string", + "null" + ] + }, + "routingNumber": { + "type": "string", + "description": "ABA routing number. Returned in full — it identifies the bank, not the account.", + "examples": [ + "021000021" + ] + }, + "accountLast4": { + "type": "string", + "description": "Last 4 characters of the bank account number. The full account number is never returned over the API.", + "examples": [ + "6789" + ] + } + }, + "required": [ + "id", + "status", + "kybStatus", + "kybUrl", + "bankType", + "bankName", + "bankCountry", + "accountHolderName", + "routingNumber", + "accountLast4" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Fiat settlement ID", + "examples": [ + "fiat_Bk4nWp8XmQj2YrTv6" + ] + }, + "status": { + "type": "string", + "description": "Fiat settlement status. Collapses the KYB lifecycle into broad partner-facing states (`pending_kyb`, `action_required`, `active`, `rejected`). See `kybStatus` for the raw KYB state.", + "examples": [ + "active" + ] + }, + "kybStatus": { + "description": "Raw KYB lifecycle state from the verification provider. Distinguishes `collecting_info` (waiting on merchant to start) from `pending` (verification in flight) — both collapse to `pending_kyb` under `status`. `null` when no KYB case is linked.", + "examples": [ + "pending" + ], + "type": [ + "string", + "null" + ] + }, + "kybUrl": { + "description": "URL the merchant must visit to continue verification: Iron's hosted identity flow during KYB, or our hosted token-gated signing page once Iron requires document signatures. `null` when no merchant action is pending.", + "examples": [ + "https://kyb.iron.io/verify/abc123" + ], + "type": [ + "string", + "null" + ] + }, + "bankType": { + "type": "string", + "const": "unknown", + "description": "Bank account type. `unknown` when no bank account is linked yet." + } + }, + "required": [ + "id", + "status", + "kybStatus", + "kybUrl", + "bankType" + ] + } + ] + }, + "description": "Fiat settlement configurations attached to the merchant." + }, + "crypto": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Crypto settlement ID", + "examples": [ + "crypto_Xk7nWp8XmQj2YrTv6" + ] + }, + "asset": { + "type": "string", + "description": "[CAIP-19](https://chainagnostic.org/CAIPs/caip-19) asset identifier", + "examples": [ + "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" + ] + }, + "destination": { + "type": "string", + "description": "[CAIP-10](https://chainagnostic.org/CAIPs/caip-10) destination wallet", + "examples": [ + "eip155:8453:0x1234567890abcdef1234567890abcdef12345678" + ] + }, + "networkName": { + "description": "Display name of the settlement network, or null if the chain is not recognized", + "examples": [ + "Base" + ], + "type": [ + "string", + "null" + ] + }, + "networkLogoUrl": { + "description": "Logo URL for the settlement network (an admin-uploaded logo when set, otherwise the assets-registry fallback), or null if the chain is not recognized", + "examples": [ + "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "asset", + "destination", + "networkName", + "networkLogoUrl" + ] + }, + "description": "Crypto settlement destinations attached to the merchant." + } + }, + "required": [ + "fiat", + "crypto" + ] + }, + "example": { + "fiat": [ + { + "id": "fiat_Bk4nWp8XmQj2YrTv6", + "status": "active", + "kybStatus": "approved", + "kybUrl": null, + "bankType": "ACH", + "bankName": "Chase", + "bankCountry": "US", + "accountHolderName": "Acme Corp Inc", + "routingNumber": "021000021", + "accountLast4": "6789" + } + ], + "crypto": [ + { + "id": "crypto_Xk7nWp8XmQj2YrTv6", + "asset": "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", + "destination": "eip155:8453:0x1234567890abcdef1234567890abcdef12345678", + "networkName": "Base", + "networkLogoUrl": "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + } + ] + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + } + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "not_found", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "not_found": { + "summary": "Not Found", + "value": { + "code": "not_found", + "message": "Not Found" + } + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "merchantId", + "required": true + } + ], + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/v1/merchants/{merchantId}/settlements/tokens": { + "get": { + "operationId": "Settlements_listAvailableTokens", + "tags": [ + "Settlements" + ], + "summary": "List tokens available for settlement", + "description": "List the tokens this merchant may currently settle in, freshly resolved per request: every asset returned passes the `token_not_enabled` gate on the crypto settlement write endpoints. Derive settlement requests from this list rather than from a platform-wide catalogue. Tokens on a chain where payments are not rolled out for this merchant yet are left out, and the create endpoint rejects them with `token_not_enabled`. This part can lag a rollout change by up to a minute. An asset that already has a settlement pair, in any status, still returns `settlement_asset_conflict` on create. `internal_error` means enablement could not be resolved — retry shortly.", + "responses": { + "200": { + "description": "Tokens available for settlement", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "tokens": { + "type": "array", + "items": { + "type": "object", + "properties": { + "asset": { + "type": "string", + "description": "[CAIP-19](https://chainagnostic.org/CAIPs/caip-19) asset identifier", + "examples": [ + "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" + ] + }, + "caip2ChainId": { + "type": "string", + "description": "[CAIP-2](https://chainagnostic.org/CAIPs/caip-2) chain the token settles on", + "examples": [ + "eip155:8453" + ] + }, + "symbol": { + "type": "string", + "description": "Token symbol", + "examples": [ + "USDC" + ] + }, + "name": { + "type": "string", + "description": "Token display name", + "examples": [ + "USD Coin" + ] + }, + "decimals": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "Token decimals", + "examples": [ + 6 + ] + }, + "logoUrl": { + "description": "Token logo URL, or null when none is registered", + "examples": [ + "https://api.walletconnect.com/assets/v1/image/token/USDC/md" + ], + "type": [ + "string", + "null" + ] + }, + "networkName": { + "description": "Display name of the settlement network, or null if the chain is not recognized", + "examples": [ + "Base" + ], + "type": [ + "string", + "null" + ] + }, + "networkLogoUrl": { + "description": "Logo URL for the settlement network (an admin-uploaded logo when set, otherwise the assets-registry fallback), or null if the chain is not recognized", + "examples": [ + "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "asset", + "caip2ChainId", + "symbol", + "name", + "decimals", + "logoUrl", + "networkName", + "networkLogoUrl" + ] + }, + "description": "Tokens the merchant may settle in. Empty when no tokens are currently enabled for this merchant." + } + }, + "required": [ + "tokens" + ] + }, + "example": { + "tokens": [ + { + "asset": "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", + "caip2ChainId": "eip155:8453", + "symbol": "USDC", + "name": "USD Coin", + "decimals": 6, + "logoUrl": "https://api.walletconnect.com/assets/v1/image/token/USDC/md", + "networkName": "Base", + "networkLogoUrl": "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + } + ] + } + } + } + }, + "400": { + "description": "Settlement management is not available for test partners", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "invalid_params", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "invalid_params": { + "summary": "Invalid request parameters", + "value": { + "code": "invalid_params", + "message": "Invalid request parameters" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + } + } + } + } + }, + "404": { + "description": "Merchant not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "not_found", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "not_found": { + "summary": "Not Found", + "value": { + "code": "not_found", + "message": "Not Found" + } + } + } + } + } + }, + "500": { + "description": "Token enablement could not be resolved", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "internal_error", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "internal_error": { + "summary": "Internal Server Error", + "value": { + "code": "internal_error", + "message": "Internal Server Error" + } + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "merchantId", + "required": true + } + ], + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/v1/merchants/{merchantId}/settlements/crypto": { + "post": { + "operationId": "CryptoSettlement_create", + "tags": [ + "Crypto Settlement" + ], + "summary": "Create crypto settlements", + "description": "Register one or more crypto settlement destinations for the merchant. Each entry pairs a [CAIP-19](https://chainagnostic.org/CAIPs/caip-19) `asset` with a [CAIP-10](https://chainagnostic.org/CAIPs/caip-10) `destination` wallet on the same chain. Each `(merchant, asset)` pair must be unique — registering the same asset twice returns `settlement_asset_conflict`. Crypto and fiat settlements can coexist on the same merchant. Assets must be enabled for the merchant; if any is not, the whole request is rejected with `token_not_enabled` naming every offending asset. An asset on a chain where payments are not rolled out for this merchant yet is rejected the same way. Stellar destinations must be ready to receive their asset — the account must exist on the ledger and hold a trustline for the asset's issuer — otherwise the request is rejected with `settlement_destination_not_ready`.", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "required": true, + "description": "Unique key to ensure idempotent request processing. Max 255 characters.", + "schema": { + "type": "string", + "maxLength": 255 + } + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "merchantId", + "required": true + } + ], + "responses": { + "201": { + "description": "Crypto settlements created", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "settlements": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Crypto settlement ID", + "examples": [ + "crypto_Xk7nWp8XmQj2YrTv6" + ] + }, + "asset": { + "type": "string", + "minLength": 1, + "maxLength": 256, + "pattern": "^[-a-zA-Z0-9]{3,8}:[-a-zA-Z0-9]{1,32}\\/[-a-zA-Z0-9]{3,8}:[-a-zA-Z0-9]{1,128}$", + "description": "[CAIP-19](https://chainagnostic.org/CAIPs/caip-19) asset identifier for the token to settle in. Format: `:/:`. For example, USDC on Base is `eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`.", + "examples": [ + "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" + ] + }, + "destination": { + "type": "string", + "minLength": 1, + "maxLength": 256, + "pattern": "^[-a-zA-Z0-9]{3,8}:[-a-zA-Z0-9]{1,32}:[-a-zA-Z0-9]{1,128}$", + "description": "[CAIP-10](https://chainagnostic.org/CAIPs/caip-10) account identifier for the wallet that should receive the settled funds. Format: `::
`. The chain (`:`) must match the chain of the corresponding `asset`.", + "examples": [ + "eip155:8453:0x1234567890abcdef1234567890abcdef12345678" + ] + } + }, + "required": [ + "id", + "asset", + "destination" + ] + } + } + }, + "required": [ + "settlements" + ] + }, + "example": { + "settlements": [ + { + "id": "crypto_Xk7nWp8XmQj2YrTv6", + "asset": "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", + "destination": "eip155:8453:0x1234567890abcdef1234567890abcdef12345678" + } + ] + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "params_validation", + "invalid_params", + "missing_idempotency_key", + "token_not_enabled" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "description": "Field-level validation issues (present on validation errors)", + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "field", + "message" + ] + } + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "params_validation": { + "summary": "Validation failed", + "value": { + "code": "params_validation", + "message": "Validation failed" + } + }, + "invalid_params": { + "summary": "Invalid request parameters", + "value": { + "code": "invalid_params", + "message": "Invalid request parameters" + } + }, + "missing_idempotency_key": { + "summary": "Missing Idempotency-Key header", + "value": { + "code": "missing_idempotency_key", + "message": "Missing Idempotency-Key header" + } + }, + "token_not_enabled": { + "summary": "This token is not enabled for this merchant yet", + "value": { + "code": "token_not_enabled", + "message": "This token is not enabled for this merchant yet" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + } + } + } + } + }, + "404": { + "description": "Merchant not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "not_found", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "not_found": { + "summary": "Not Found", + "value": { + "code": "not_found", + "message": "Not Found" + } + } + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "idempotency_conflict", + "settlement_asset_conflict", + "settlement_destination_not_ready" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "idempotency_conflict": { + "summary": "Idempotency key conflict: same key was used with a different request body", + "value": { + "code": "idempotency_conflict", + "message": "Idempotency key conflict: same key was used with a different request body" + } + }, + "settlement_asset_conflict": { + "summary": "A settlement already exists for this asset", + "value": { + "code": "settlement_asset_conflict", + "message": "A settlement already exists for this asset" + } + }, + "settlement_destination_not_ready": { + "summary": "The settlement destination is not ready to receive this asset on its network", + "value": { + "code": "settlement_destination_not_ready", + "message": "The settlement destination is not ready to receive this asset on its network" + } + } + } + } + } + }, + "502": { + "description": "Stellar destination check or transit account provisioning failed; retry shortly", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "bad_gateway", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "bad_gateway": { + "summary": "Bad Gateway", + "value": { + "code": "bad_gateway", + "message": "Bad Gateway" + } + } + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "settlements": { + "minItems": 1, + "maxItems": 50, + "type": "array", + "items": { + "type": "object", + "properties": { + "asset": { + "type": "string", + "minLength": 1, + "maxLength": 256, + "pattern": "^[-a-zA-Z0-9]{3,8}:[-a-zA-Z0-9]{1,32}\\/[-a-zA-Z0-9]{3,8}:[-a-zA-Z0-9]{1,128}$", + "description": "[CAIP-19](https://chainagnostic.org/CAIPs/caip-19) asset identifier for the token to settle in. Format: `:/:`. For example, USDC on Base is `eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`.", + "examples": [ + "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" + ] + }, + "destination": { + "type": "string", + "minLength": 1, + "maxLength": 256, + "pattern": "^[-a-zA-Z0-9]{3,8}:[-a-zA-Z0-9]{1,32}:[-a-zA-Z0-9]{1,128}$", + "description": "[CAIP-10](https://chainagnostic.org/CAIPs/caip-10) account identifier for the wallet that should receive the settled funds. Format: `::
`. The chain (`:`) must match the chain of the corresponding `asset`.", + "examples": [ + "eip155:8453:0x1234567890abcdef1234567890abcdef12345678" + ] + } + }, + "required": [ + "asset", + "destination" + ] + }, + "description": "List of asset/destination pairs to register. Up to 50 entries per request." + } + }, + "required": [ + "settlements" + ], + "examples": [ + { + "settlements": [ + { + "asset": "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", + "destination": "eip155:8453:0x1234567890abcdef1234567890abcdef12345678" + }, + { + "asset": "eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", + "destination": "eip155:1:0x1234567890abcdef1234567890abcdef12345678" + } + ] + } + ] + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/v1/merchants/{merchantId}/settlements/crypto/{id}": { + "put": { + "operationId": "CryptoSettlement_update", + "tags": [ + "Crypto Settlement" + ], + "summary": "Update a crypto settlement destination", + "description": "Change the destination wallet for an existing crypto settlement. The new `destination` must be a [CAIP-10](https://chainagnostic.org/CAIPs/caip-10) account on the same chain as the settlement's `asset`.", + "responses": { + "200": { + "description": "Settlement updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Crypto settlement ID", + "examples": [ + "crypto_Xk7nWp8XmQj2YrTv6" + ] + }, + "asset": { + "type": "string", + "minLength": 1, + "maxLength": 256, + "pattern": "^[-a-zA-Z0-9]{3,8}:[-a-zA-Z0-9]{1,32}\\/[-a-zA-Z0-9]{3,8}:[-a-zA-Z0-9]{1,128}$", + "description": "[CAIP-19](https://chainagnostic.org/CAIPs/caip-19) asset identifier for the token to settle in. Format: `:/:`. For example, USDC on Base is `eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`.", + "examples": [ + "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" + ] + }, + "destination": { + "type": "string", + "minLength": 1, + "maxLength": 256, + "pattern": "^[-a-zA-Z0-9]{3,8}:[-a-zA-Z0-9]{1,32}:[-a-zA-Z0-9]{1,128}$", + "description": "[CAIP-10](https://chainagnostic.org/CAIPs/caip-10) account identifier for the wallet that should receive the settled funds. Format: `::
`. The chain (`:`) must match the chain of the corresponding `asset`.", + "examples": [ + "eip155:8453:0x1234567890abcdef1234567890abcdef12345678" + ] + } + }, + "required": [ + "id", + "asset", + "destination" + ] + }, + "example": { + "id": "crypto_Xk7nWp8XmQj2YrTv6", + "asset": "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", + "destination": "eip155:8453:0x1234567890abcdef1234567890abcdef12345678" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "params_validation", + "invalid_params" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "description": "Field-level validation issues (present on validation errors)", + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "field", + "message" + ] + } + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "params_validation": { + "summary": "Validation failed", + "value": { + "code": "params_validation", + "message": "Validation failed" + } + }, + "invalid_params": { + "summary": "Invalid request parameters", + "value": { + "code": "invalid_params", + "message": "Invalid request parameters" + } + } + } + } + } + }, + "404": { + "description": "Settlement not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "not_found", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "not_found": { + "summary": "Not Found", + "value": { + "code": "not_found", + "message": "Not Found" + } + } + } + } + } + }, + "409": { + "description": "Destination not ready to receive the asset", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "settlement_destination_not_ready", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "settlement_destination_not_ready": { + "summary": "The settlement destination is not ready to receive this asset on its network", + "value": { + "code": "settlement_destination_not_ready", + "message": "The settlement destination is not ready to receive this asset on its network" + } + } + } + } + } + }, + "502": { + "description": "Stellar destination check or transit account provisioning failed; retry shortly", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "bad_gateway", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "bad_gateway": { + "summary": "Bad Gateway", + "value": { + "code": "bad_gateway", + "message": "Bad Gateway" + } + } + } + } + } + } + }, + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 256, + "examples": [ + "crypto_Xk7nWp8XmQj2YrTv6" + ] + }, + "required": true, + "description": "Crypto settlement ID" + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "merchantId", + "required": true + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "destination": { + "type": "string", + "minLength": 1, + "maxLength": 256, + "pattern": "^[-a-zA-Z0-9]{3,8}:[-a-zA-Z0-9]{1,32}:[-a-zA-Z0-9]{1,128}$", + "description": "[CAIP-10](https://chainagnostic.org/CAIPs/caip-10) account identifier for the wallet that should receive the settled funds. Format: `::
`. The chain (`:`) must match the chain of the corresponding `asset`.", + "examples": [ + "eip155:8453:0x1234567890abcdef1234567890abcdef12345678" + ] + } + }, + "required": [ + "destination" + ], + "examples": [ + { + "destination": "eip155:8453:0x1234567890abcdef1234567890abcdef12345678" + } + ] + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "delete": { + "operationId": "CryptoSettlement_delete", + "tags": [ + "Crypto Settlement" + ], + "summary": "Delete a crypto settlement", + "description": "Remove a crypto settlement. Future payments in the deleted asset will no longer be auto-settled.", + "responses": { + "200": { + "description": "Settlement deleted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Crypto settlement ID" + }, + "deleted": { + "type": "boolean", + "description": "Whether the settlement was successfully deleted" + } + }, + "required": [ + "id", + "deleted" + ] + }, + "example": { + "id": "crypto_Xk7nWp8XmQj2YrTv6", + "deleted": true + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "invalid_params", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "invalid_params": { + "summary": "Invalid request parameters", + "value": { + "code": "invalid_params", + "message": "Invalid request parameters" + } + } + } + } + } + }, + "404": { + "description": "Settlement not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "not_found", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "not_found": { + "summary": "Not Found", + "value": { + "code": "not_found", + "message": "Not Found" + } + } + } + } + } + } + }, + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 256, + "examples": [ + "crypto_Xk7nWp8XmQj2YrTv6" + ] + }, + "required": true, + "description": "Crypto settlement ID" + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "merchantId", + "required": true + } + ], + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/v1/merchants/{merchantId}/settlements/fiat": { + "post": { + "operationId": "FiatSettlement_create", + "tags": [ + "Fiat Settlement" + ], + "summary": "Create a fiat settlement", + "description": "Register a fiat settlement route for the merchant and kick off KYB verification. The response includes a `kybUrl` that the partner must surface to their merchant — fiat routing is only fully activated once KYB is approved. Currency is determined by `bankType`: SEPA settles in EUR, ACH in USD. ACH additionally requires a US business address and a valid US state code. Re-submitting with the same `Idempotency-Key` returns the original result; submitting a different payload under the same key returns `idempotency_conflict`. Attempting to register a bank account that already exists for the merchant returns `settlement_conflict` — delete the existing settlement first or update it via PATCH.", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "required": true, + "description": "Unique key to ensure idempotent request processing. Max 255 characters.", + "schema": { + "type": "string", + "maxLength": 255 + } + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "merchantId", + "required": true + } + ], + "responses": { + "201": { + "description": "Fiat settlement created. The merchant must complete KYB at `kybUrl` to activate routing.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Fiat settlement ID. Stable identifier — safe to persist on the partner side.", + "examples": [ + "fiat_Bk4nWp8XmQj2YrTv6" + ] + }, + "status": { + "type": "string", + "description": "Fiat settlement status. `pending_kyb` immediately after creation — the merchant must complete KYB at `kybUrl` before payments can route to this account. Transitions to `active` on KYB approval; `rejected` if KYB fails.", + "examples": [ + "pending_kyb" + ] + }, + "kybUrl": { + "description": "URL the merchant must visit to complete KYB verification. Returned at creation; treat as short-lived (hours to days). `null` only when no merchant action is pending.", + "examples": [ + "https://kyb.iron.io/verify/abc123" + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "status", + "kybUrl" + ] + }, + "example": { + "id": "fiat_Bk4nWp8XmQj2YrTv6", + "status": "pending_kyb", + "kybUrl": "https://kyb.iron.io/verify/abc123" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "params_validation", + "invalid_params", + "missing_idempotency_key" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "description": "Field-level validation issues (present on validation errors)", + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "field", + "message" + ] + } + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "params_validation": { + "summary": "Validation failed", + "value": { + "code": "params_validation", + "message": "Validation failed" + } + }, + "invalid_params": { + "summary": "Invalid request parameters", + "value": { + "code": "invalid_params", + "message": "Invalid request parameters" + } + }, + "missing_idempotency_key": { + "summary": "Missing Idempotency-Key header", + "value": { + "code": "missing_idempotency_key", + "message": "Missing Idempotency-Key header" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + } + } + } + } + }, + "404": { + "description": "Merchant not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "not_found", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "not_found": { + "summary": "Not Found", + "value": { + "code": "not_found", + "message": "Not Found" + } + } + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "idempotency_conflict", + "settlement_conflict" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "idempotency_conflict": { + "summary": "Idempotency key conflict: same key was used with a different request body", + "value": { + "code": "idempotency_conflict", + "message": "Idempotency key conflict: same key was used with a different request body" + } + }, + "settlement_conflict": { + "summary": "A settlement with conflicting details already exists for this merchant", + "value": { + "code": "settlement_conflict", + "message": "A settlement with conflicting details already exists for this merchant" + } + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "internal_error", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "internal_error": { + "summary": "Internal Server Error", + "value": { + "code": "internal_error", + "message": "Internal Server Error" + } + } + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "bankDetails": { + "oneOf": [ + { + "type": "object", + "properties": { + "accountHolderName": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "Account holder name as it appears on the bank account. Usually matches the legal business name.", + "examples": [ + "Acme Corp Inc" + ] + }, + "bankName": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "Display name of the bank that holds the account.", + "examples": [ + "Chase" + ] + }, + "bankCountry": { + "description": "ISO 3166-1 alpha-2 country code of the bank.", + "type": "string", + "minLength": 2, + "maxLength": 2 + }, + "bankType": { + "type": "string", + "const": "SEPA", + "description": "Bank account type. `SEPA` settles in EUR via the SEPA network." + }, + "iban": { + "type": "string", + "minLength": 15, + "maxLength": 34, + "pattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]+$", + "description": "International Bank Account Number (ISO 13616). Uppercase alphanumeric with no spaces. Validated for format and mod-97 checksum.", + "examples": [ + "FR1420041010050500013M02606" + ] + } + }, + "required": [ + "accountHolderName", + "bankName", + "bankCountry", + "bankType", + "iban" + ], + "description": "SEPA bank account details. Settles in EUR." + }, + { + "type": "object", + "properties": { + "accountHolderName": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "Account holder name as it appears on the bank account. Usually matches the legal business name.", + "examples": [ + "Acme Corp Inc" + ] + }, + "bankName": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "Display name of the bank that holds the account.", + "examples": [ + "Chase" + ] + }, + "bankCountry": { + "description": "ISO 3166-1 alpha-2 country code of the bank.", + "type": "string", + "minLength": 2, + "maxLength": 2 + }, + "bankType": { + "type": "string", + "const": "ACH", + "description": "Bank account type. `ACH` settles in USD via the US ACH network." + }, + "accountNumber": { + "type": "string", + "minLength": 1, + "pattern": "^[0-9A-Z]{4,17}$", + "description": "US bank account number. 4–17 uppercase letters or digits.", + "examples": [ + "000123456789" + ] + }, + "routingNumber": { + "type": "string", + "minLength": 1, + "pattern": "^[0-9]{9}$", + "description": "9-digit ABA routing number identifying the US bank. Validated for ABA checksum.", + "examples": [ + "021000021" + ] + }, + "phoneNumber": { + "type": "string", + "pattern": "^\\+1[2-9]\\d{2}[2-9]\\d{6}$", + "description": "Business phone number in E.164 format. Required by Iron for ACH onboarding compliance.", + "examples": [ + "+14155551234" + ] + } + }, + "required": [ + "accountHolderName", + "bankName", + "bankCountry", + "bankType", + "accountNumber", + "routingNumber", + "phoneNumber" + ], + "description": "ACH bank account details. Settles in USD. Requires a US business address." + } + ], + "description": "Bank account that will receive fiat settlements. `bankType` discriminates the schema: SEPA requires `iban`; ACH requires `accountNumber`, `routingNumber`, and `phoneNumber`. Currency is implicit — SEPA settles in EUR, ACH in USD." + }, + "businessDetails": { + "type": "object", + "properties": { + "businessName": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "Legal name of the business that operates the merchant account.", + "examples": [ + "Acme Corp Inc" + ] + }, + "address": { + "type": "object", + "properties": { + "line1": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "Street address line 1.", + "examples": [ + "350 Fifth Avenue" + ] + }, + "line2": { + "description": "Optional second address line (suite, apartment, building, etc.). Empty strings are treated as omitted.", + "type": "string", + "maxLength": 255 + }, + "city": { + "type": "string", + "minLength": 2, + "maxLength": 255, + "description": "City or locality.", + "examples": [ + "New York" + ] + }, + "state": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "State, province, or region. For ACH this must be a valid US state or territory 2-letter code (e.g. `NY`).", + "examples": [ + "NY" + ] + }, + "country": { + "description": "ISO 3166-1 alpha-2 country code of the business address. Must be `US` when `bankType` is `ACH`.", + "type": "string", + "minLength": 2, + "maxLength": 2 + }, + "zip": { + "type": "string", + "minLength": 1, + "maxLength": 20, + "description": "Postal or ZIP code.", + "examples": [ + "10118" + ] + } + }, + "required": [ + "line1", + "city", + "state", + "country", + "zip" + ], + "description": "Registered business address used for KYB verification." + } + }, + "required": [ + "businessName", + "address" + ], + "description": "Business identity details collected for KYB verification." + } + }, + "required": [ + "bankDetails", + "businessDetails" + ] + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/v1/merchants/{merchantId}/settlements/fiat/{id}": { + "patch": { + "operationId": "FiatSettlement_update", + "tags": [ + "Fiat Settlement" + ], + "summary": "Update a fiat settlement", + "description": "Partially update the bank or business details on an existing fiat settlement. At least one of `bankDetails` or `businessDetails` must be provided. Only cosmetic fields are mutable here — `iban`, `accountNumber`, and `routingNumber` cannot be changed in place; delete the settlement and re-create it to switch accounts. Iron's `customers.update` API only accepts `email` and `external_id`, so edits to the bank/business name, address, or account-holder name do not flow back to Iron and the merchant does not need to re-verify.", + "responses": { + "200": { + "description": "Settlement updated.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Fiat settlement ID that was updated.", + "examples": [ + "fiat_Bk4nWp8XmQj2YrTv6" + ] + } + }, + "required": [ + "id" + ] + }, + "example": { + "id": "fiat_Bk4nWp8XmQj2YrTv6" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "params_validation", + "invalid_params" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "description": "Field-level validation issues (present on validation errors)", + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "field", + "message" + ] + } + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "params_validation": { + "summary": "Validation failed", + "value": { + "code": "params_validation", + "message": "Validation failed" + } + }, + "invalid_params": { + "summary": "Invalid request parameters", + "value": { + "code": "invalid_params", + "message": "Invalid request parameters" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + } + } + } + } + }, + "404": { + "description": "Settlement not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "not_found", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "not_found": { + "summary": "Not Found", + "value": { + "code": "not_found", + "message": "Not Found" + } + } + } + } + } + }, + "409": { + "description": "Settlement is managed through a partner KYB case attachment", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "settlement_conflict", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "settlement_conflict": { + "summary": "A settlement with conflicting details already exists for this merchant", + "value": { + "code": "settlement_conflict", + "message": "A settlement with conflicting details already exists for this merchant" + } + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "internal_error", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "internal_error": { + "summary": "Internal Server Error", + "value": { + "code": "internal_error", + "message": "Internal Server Error" + } + } + } + } + } + } + }, + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 256, + "examples": [ + "fiat_Bk4nWp8XmQj2YrTv6" + ] + }, + "required": true, + "description": "Fiat settlement ID returned at creation time." + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "merchantId", + "required": true + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "bankDetails": { + "description": "Cosmetic bank-account updates. Account/routing numbers and IBAN cannot be changed in place — delete the settlement and re-create it to switch accounts.", + "type": "object", + "properties": { + "accountHolderName": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "Account holder name as it appears on the bank account. Usually matches the legal business name.", + "examples": [ + "Acme Corp Inc" + ] + }, + "bankName": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "Display name of the bank that holds the account.", + "examples": [ + "Chase" + ] + }, + "bankCountry": { + "description": "ISO 3166-1 alpha-2 country code of the bank.", + "type": "string", + "minLength": 2, + "maxLength": 2 + } + } + }, + "businessDetails": { + "description": "Business identity updates. Iron does not re-verify on cosmetic edits — KYB status is preserved.", + "type": "object", + "properties": { + "businessName": { + "description": "Legal name of the business.", + "examples": [ + "Acme Corp Inc" + ], + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "address": { + "description": "Subset of business address fields to update. Partial updates are merged with the existing record.", + "type": "object", + "properties": { + "line1": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "Street address line 1.", + "examples": [ + "350 Fifth Avenue" + ] + }, + "line2": { + "description": "Optional second address line (suite, apartment, building, etc.). Empty strings are treated as omitted.", + "type": "string", + "maxLength": 255 + }, + "city": { + "type": "string", + "minLength": 2, + "maxLength": 255, + "description": "City or locality.", + "examples": [ + "New York" + ] + }, + "state": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "State, province, or region. For ACH this must be a valid US state or territory 2-letter code (e.g. `NY`).", + "examples": [ + "NY" + ] + }, + "country": { + "description": "ISO 3166-1 alpha-2 country code of the business address. Must be `US` when `bankType` is `ACH`.", + "type": "string", + "minLength": 2, + "maxLength": 2 + }, + "zip": { + "type": "string", + "minLength": 1, + "maxLength": 20, + "description": "Postal or ZIP code.", + "examples": [ + "10118" + ] + } + } + } + } + } + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "delete": { + "operationId": "FiatSettlement_delete", + "tags": [ + "Fiat Settlement" + ], + "summary": "Delete a fiat settlement", + "description": "Soft-delete a fiat settlement route. Future payments will no longer auto-settle to this fiat account. MX notifies the Core API, which handles async deactivation of the underlying autoramps.", + "responses": { + "200": { + "description": "Settlement deleted.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Fiat settlement ID that was deleted.", + "examples": [ + "fiat_Bk4nWp8XmQj2YrTv6" + ] + }, + "deleted": { + "type": "boolean", + "description": "Always `true` on success. Future payments will no longer route to this fiat account.", + "examples": [ + true + ] + } + }, + "required": [ + "id", + "deleted" + ] + }, + "example": { + "id": "fiat_Bk4nWp8XmQj2YrTv6", + "deleted": true + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "invalid_params", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "invalid_params": { + "summary": "Invalid request parameters", + "value": { + "code": "invalid_params", + "message": "Invalid request parameters" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + } + } + } + } + }, + "404": { + "description": "Settlement not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "not_found", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "not_found": { + "summary": "Not Found", + "value": { + "code": "not_found", + "message": "Not Found" + } + } + } + } + } + }, + "409": { + "description": "Settlement is managed through a partner KYB case attachment", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "settlement_conflict", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "settlement_conflict": { + "summary": "A settlement with conflicting details already exists for this merchant", + "value": { + "code": "settlement_conflict", + "message": "A settlement with conflicting details already exists for this merchant" + } + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "internal_error", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "internal_error": { + "summary": "Internal Server Error", + "value": { + "code": "internal_error", + "message": "Internal Server Error" + } + } + } + } + } + } + }, + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 256, + "examples": [ + "fiat_Bk4nWp8XmQj2YrTv6" + ] + }, + "required": true, + "description": "Fiat settlement ID returned at creation time." + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "merchantId", + "required": true + } + ], + "security": [ + { + "apiKey": [] + } + ] + } + } + }, + "tags": [ + { + "name": "Gateway" + }, + { + "name": "Payments" + }, + { + "name": "Webhooks" + }, + { + "name": "Refunds" + }, + { + "name": "Merchant Management" + }, + { + "name": "Settlements" + }, + { + "name": "Crypto Settlement" + }, + { + "name": "Fiat Settlement" + } + ], + "components": { + "schemas": { + "Action": { + "oneOf": [ + { + "type": "object", + "description": "An action that requires a wallet RPC call to complete", + "required": [ + "data", + "type" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/WalletRpcAction", + "description": "An action that requires a wallet RPC call to complete" + }, + "type": { + "type": "string", + "enum": [ + "walletRpc" + ] + } + } + }, + { + "type": "object", + "description": "An action that requires building to complete", + "required": [ + "data", + "type" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/Build", + "description": "An action that requires building to complete" + }, + "type": { + "type": "string", + "enum": [ + "build" + ] + } + } + }, + { + "type": "object", + "description": "Send an amount to an account. The whole action, with no transaction to\nbuild or sign.", + "required": [ + "data", + "type" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/TransferAction", + "description": "Send an amount to an account. The whole action, with no transaction to\nbuild or sign." + }, + "type": { + "type": "string", + "enum": [ + "transfer" + ] + } + } + } + ], + "example": { + "data": { + "chain_id": "eip155:8453", + "method": "eth_signTypedData_v4", + "params": [ + "0x0000000000000000000000000000000000000000", + "{\"domain\":{\"name\":\"USD Coin\",\"version\":\"2\",\"chainId\":\"0x2105\",\"verifyingContract\":\"0x0000000000000000000000000000000000000000\"},\"types\":{\"EIP712Domain\":[{\"type\":\"string\",\"name\":\"name\"},{\"type\":\"string\",\"name\":\"version\"},{\"type\":\"uint256\",\"name\":\"chainId\"},{\"type\":\"address\",\"name\":\"verifyingContract\"}],\"ReceiveWithAuthorization\":[{\"type\":\"address\",\"name\":\"from\"},{\"type\":\"address\",\"name\":\"to\"},{\"type\":\"uint256\",\"name\":\"value\"},{\"type\":\"uint256\",\"name\":\"validAfter\"},{\"type\":\"uint256\",\"name\":\"validBefore\"},{\"type\":\"bytes32\",\"name\":\"nonce\"}]},\"primaryType\":\"ReceiveWithAuthorization\",\"message\":{\"from\":\"0x0000000000000000000000000000000000000000\",\"nonce\":\"0x0000000000000000000000000000000000000000000000000000000000000000\",\"to\":\"0x0000000000000000000000000000000000000000\",\"validAfter\":\"0x0\",\"validBefore\":\"0x0\",\"value\":\"0x0\"}}" + ] + }, + "type": "walletRpc" + } + }, + "Amount": { + "type": "object", + "required": [ + "unit", + "value", + "display" + ], + "properties": { + "display": { + "$ref": "#/components/schemas/AmountDisplay", + "description": "Display information for the amount" + }, + "unit": { + "type": "string", + "description": "Currency unit, prefixed with either \"iso4217/\" or \"caip19/\"", + "example": "iso4217/USD" + }, + "value": { + "type": "string", + "description": "Amount value, in the currency unit's minor units" + } + }, + "example": { + "display": { + "assetName": "USD Coin", "assetSymbol": "USDC", "decimals": 6, "iconUrl": "https://assets.walletconnect.com/usdc.png", @@ -2667,7 +9488,7 @@ "expiresAt": 1718236800, "gatewayUrl": "https://api.pay.walletconnect.com/pay_123", "isFinal": false, - "paymentId": "pay_23a2ecc101M7W4JSEM0EW14VJJTN3H1DW6", + "paymentId": "pay_78a2ecc101M7WG10HBZEA7GEKBQAYVY39R", "pollInMs": 1000, "status": "requires_action" } @@ -2814,7 +9635,7 @@ "example": { "cancelledAt": "2025-01-14T10:30:00Z", "cancelledReason": "cancelled_by_user", - "paymentId": "pay_34a2ecc101M7W4JSEP1H78P1HT49GMNMTT", + "paymentId": "pay_8ba2ecc101M7WG10HDS0VAKCFANFZ6TKXD", "status": "cancelled" } }, @@ -3714,7 +10535,7 @@ "example": { "cancelledAt": "2025-01-14T10:30:00Z", "cancelledReason": "cancelled_by_merchant", - "paymentId": "pay_88a2ecc101M7W4JSEMEY9C69PYKACFTAXB", + "paymentId": "pay_eda2ecc101M7WG10HC6HE6NF47W5XY9JSG", "status": "cancelled" } }, @@ -4193,72 +11014,591 @@ "description": "The canonical (fee-bump) hash, hex." } } - }, - "namespace": { - "type": "string", - "enum": [ - "stellar" - ] + }, + "namespace": { + "type": "string", + "enum": [ + "stellar" + ] + } + } + }, + { + "type": "object", + "required": [ + "data", + "namespace" + ], + "properties": { + "data": { + "type": "object", + "required": [ + "tx_hash" + ], + "properties": { + "tx_hash": { + "type": "string", + "description": "The canonical txID (`sha256(raw_data)`), hex." + } + } + }, + "namespace": { + "type": "string", + "enum": [ + "tron" + ] + } + } + } + ], + "description": "Chain-agnostic confirmed-transaction identifier. Used only as the lifted id on\n`CryptoTransferActionState::Confirmed` and in API responses — never an\nin-flight state." + }, + "WalletRpcAction": { + "type": "object", + "required": [ + "chain_id", + "method", + "params" + ], + "properties": { + "chain_id": { + "type": "string" + }, + "method": { + "type": "string" + }, + "params": { + "type": "array", + "items": {} + } + }, + "example": { + "chain_id": "eip155:8453", + "method": "eth_signTypedData_v4", + "params": [ + "0x0000000000000000000000000000000000000000", + "{\"domain\":{\"name\":\"USD Coin\",\"version\":\"2\",\"chainId\":\"0x2105\",\"verifyingContract\":\"0x0000000000000000000000000000000000000000\"},\"types\":{\"EIP712Domain\":[{\"type\":\"string\",\"name\":\"name\"},{\"type\":\"string\",\"name\":\"version\"},{\"type\":\"uint256\",\"name\":\"chainId\"},{\"type\":\"address\",\"name\":\"verifyingContract\"}],\"ReceiveWithAuthorization\":[{\"type\":\"address\",\"name\":\"from\"},{\"type\":\"address\",\"name\":\"to\"},{\"type\":\"uint256\",\"name\":\"value\"},{\"type\":\"uint256\",\"name\":\"validAfter\"},{\"type\":\"uint256\",\"name\":\"validBefore\"},{\"type\":\"bytes32\",\"name\":\"nonce\"}]},\"primaryType\":\"ReceiveWithAuthorization\",\"message\":{\"from\":\"0x0000000000000000000000000000000000000000\",\"nonce\":\"0x0000000000000000000000000000000000000000000000000000000000000000\",\"to\":\"0x0000000000000000000000000000000000000000\",\"validAfter\":\"0x0\",\"validBefore\":\"0x0\",\"value\":\"0x0\"}}" + ] + } + }, + "MerchantApiErrorCode": { + "type": "string", + "enum": [ + "invalid_params", + "params_validation", + "not_found", + "internal_error", + "bad_gateway", + "rate_limited", + "payment_transition_conflict", + "payment_transition_unavailable", + "settlement_asset_conflict", + "settlement_conflict", + "settlement_destination_not_ready", + "token_not_enabled", + "version_conflict", + "payouts_unavailable", + "payout_not_cancellable", + "logo_too_small", + "logo_too_large", + "logo_not_square", + "logo_file_too_big", + "logo_invalid_mime", + "logo_invalid_dimensions", + "missing_api_key", + "invalid_api_key", + "missing_merchant_id", + "invalid_api_version", + "unknown_api_version", + "api_version_downgrade", + "idempotency_conflict", + "missing_idempotency_key", + "payment_not_succeeded", + "already_refunded", + "receipt_unavailable", + "receipt_service_unavailable", + "payouts_disabled", + "unsupported_asset", + "payout_account_unavailable", + "payout_account_busy", + "screening_unavailable" + ], + "description": "Machine-readable error code" + }, + "MerchantApiErrorResponse": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "$ref": "#/components/schemas/MerchantApiErrorCode" + }, + "issues": { + "type": "array", + "description": "Field-level validation issues (present on validation errors)", + "items": { + "type": "object", + "required": [ + "field", + "message" + ], + "properties": { + "field": { + "type": "string" + }, + "message": { + "type": "string" + } } } + } + } + }, + "MerchantPaymentFiatAmount": { + "type": "object", + "properties": { + "unit": { + "type": "string", + "pattern": "^iso4217\\/", + "description": "Fiat unit, for example \"iso4217/USD\"" }, - { + "value": { + "type": "string", + "description": "Amount in minor units for the fiat currency" + }, + "display": { "type": "object", + "properties": { + "assetSymbol": { + "type": "string" + }, + "assetName": { + "type": "string" + }, + "decimals": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, "required": [ - "data", - "namespace" + "assetSymbol", + "assetName", + "decimals" ], - "properties": { - "data": { + "description": "Display metadata for fiat-denominated amounts" + } + }, + "required": [ + "unit", + "value", + "display" + ], + "description": "Fiat-denominated amount" + }, + "MerchantPaymentTokenAmount": { + "type": "object", + "properties": { + "unit": { + "type": "string", + "pattern": "^caip19\\/", + "description": "Token unit, for example \"caip19/...\"" + }, + "value": { + "type": "string", + "description": "Amount in minor units for the token asset" + }, + "display": { + "anyOf": [ + { "type": "object", - "required": [ - "tx_hash" - ], "properties": { - "tx_hash": { - "type": "string", - "description": "The canonical txID (`sha256(raw_data)`), hex." + "assetSymbol": { + "type": "string" + }, + "assetName": { + "type": "string" + }, + "decimals": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "iconUrl": { + "type": "string" + }, + "networkName": { + "type": "string" + }, + "networkIconUrl": { + "type": "string" } - } + }, + "required": [ + "assetSymbol", + "assetName", + "decimals" + ], + "description": "Display metadata for token-denominated amounts" }, - "namespace": { - "type": "string", - "enum": [ - "tron" - ] + { + "type": "null" } - } + ] } + }, + "required": [ + "unit", + "value", + "display" ], - "description": "Chain-agnostic confirmed-transaction identifier. Used only as the lifted id on\n`CryptoTransferActionState::Confirmed` and in API responses — never an\nin-flight state." + "description": "Token-denominated amount" }, - "WalletRpcAction": { + "MerchantPaymentSettlement": { + "description": "Settlement details. Omitted when settlement details cannot be reported yet. When present, `settled` is always included. When `settled` is `false`, no additional settlement fields are returned. When `settled` is `true`, `amount` is included and `txHash` is included when available.", "type": "object", + "properties": { + "settled": { + "type": "boolean", + "description": "Whether settlement is complete." + }, + "amount": { + "description": "Net settlement amount after fees in the settlement unit. Present when `settled` is `true`.", + "anyOf": [ + { + "$ref": "#/components/schemas/MerchantPaymentFiatAmount" + }, + { + "$ref": "#/components/schemas/MerchantPaymentTokenAmount" + } + ] + }, + "txHash": { + "description": "Settlement transaction hash. Present when `settled` is `true` and an upstream settlement transaction hash is available.", + "type": "string" + } + }, "required": [ - "chain_id", - "method", - "params" + "settled" + ] + }, + "MerchantPaymentExchangeRate": { + "type": "object", + "properties": { + "from": { + "type": "string", + "description": "Unit the payment was priced in", + "examples": [ + "iso4217/EUR" + ] + }, + "fromSymbol": { + "type": "string", + "description": "Display symbol for `from`", + "examples": [ + "EUR" + ] + }, + "to": { + "type": "string", + "description": "Unit the payment settles in", + "examples": [ + "caip19/eip155:8453/erc20:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913" + ] + }, + "toSymbol": { + "type": "string", + "description": "Display symbol for `to`", + "examples": [ + "USDC" + ] + }, + "rate": { + "type": "string", + "description": "How many whole `to` units one whole `from` unit converted into, as a decimal string", + "examples": [ + "1.085" + ] + } + }, + "required": [ + "from", + "fromSymbol", + "to", + "toSymbol", + "rate" ], + "description": "Conversion applied between the payment unit and the settlement unit. Derived from the payment amount and the gross settlement amount (settlement plus fees), so it is the effective rate for this payment rather than a rate quoted independently. Omitted when the payment does not convert, or when the amounts needed to derive it are unavailable." + }, + "MerchantPaymentRefund": { + "type": "object", "properties": { - "chain_id": { - "type": "string" + "status": { + "type": "string", + "description": "Refund state. \"fully_refunded\" is the only value this API emits.", + "examples": [ + "fully_refunded" + ] }, - "method": { + "fullyRefundedAt": { + "description": "ISO 8601 timestamp when the payment was fully refunded. Present only for fully refunded payments.", "type": "string" - }, - "params": { + } + }, + "required": [ + "status" + ], + "description": "Refund details. Not currently populated: refund state is not yet projected into the payment read model, so this field is always omitted today. Reserved for a future release." + }, + "MerchantPaymentsResponse": { + "type": "object", + "properties": { + "data": { "type": "array", - "items": {} + "items": { + "type": "object", + "properties": { + "paymentId": { + "type": "string", + "description": "Unique payment identifier" + }, + "merchant": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Partner-provided merchant ID" + }, + "name": { + "description": "Merchant display name", + "type": "string" + }, + "iconUrl": { + "description": "Merchant logo URL", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id" + ] + }, + "referenceId": { + "type": "string", + "description": "Idempotency / reference ID provided at payment creation" + }, + "status": { + "type": "string", + "enum": [ + "requires_action", + "processing", + "succeeded", + "failed", + "expired" + ] + }, + "isTerminal": { + "type": "boolean", + "description": "Whether the payment has reached a final state" + }, + "fiatAmount": { + "$ref": "#/components/schemas/MerchantPaymentFiatAmount" + }, + "tokenAmount": { + "$ref": "#/components/schemas/MerchantPaymentTokenAmount" + }, + "buyer": { + "description": "Buyer wallet information", + "type": "object", + "properties": { + "accountCaip10": { + "type": "string", + "description": "Buyer address as a [CAIP-10](https://standards.chainagnostic.org/CAIPs/caip-10) account ID", + "examples": [ + "eip155:8453:0x1234567890abcdef1234567890abcdef12345678" + ] + }, + "accountProviderName": { + "description": "Wallet provider name", + "examples": [ + "MetaMask" + ], + "type": "string" + }, + "accountProviderIcon": { + "description": "Wallet provider logo URL", + "type": "string" + } + }, + "required": [ + "accountCaip10" + ] + }, + "transaction": { + "description": "On-chain transaction details", + "type": "object", + "properties": { + "networkId": { + "type": "string", + "description": "Numeric chain ID", + "examples": [ + "8453" + ] + }, + "hash": { + "description": "On-chain transaction hash", + "type": "string" + } + }, + "required": [ + "networkId" + ] + }, + "fees": { + "description": "Fee breakdown derived from payment option data. Omitted when total fee data is unavailable.", + "type": "object", + "properties": { + "total": { + "anyOf": [ + { + "$ref": "#/components/schemas/MerchantPaymentFiatAmount" + }, + { + "$ref": "#/components/schemas/MerchantPaymentTokenAmount" + } + ], + "description": "Total fee amount." + }, + "fixed": { + "description": "Fixed fee component.", + "anyOf": [ + { + "$ref": "#/components/schemas/MerchantPaymentFiatAmount" + }, + { + "$ref": "#/components/schemas/MerchantPaymentTokenAmount" + } + ] + }, + "percentage": { + "description": "Percentage fee component as a decimal percentage string, not a ratio. For example, \"0.4\" means 0.4%.", + "type": "string" + } + }, + "required": [ + "total" + ] + }, + "settlement": { + "$ref": "#/components/schemas/MerchantPaymentSettlement" + }, + "exchangeRate": { + "$ref": "#/components/schemas/MerchantPaymentExchangeRate" + }, + "refund": { + "$ref": "#/components/schemas/MerchantPaymentRefund" + }, + "paymentUrl": { + "description": "Hosted payment page URL for this payment. The hosted page reflects the payment's current state.", + "type": "string", + "format": "uri" + }, + "createdAt": { + "type": "string", + "description": "ISO 8601 timestamp" + }, + "expiresAt": { + "description": "ISO 8601 timestamp of the payment deadline, present only when the payment has an expiration", + "type": "string" + }, + "lastUpdatedAt": { + "type": "string", + "description": "ISO 8601 timestamp" + }, + "settledAt": { + "description": "ISO 8601 timestamp, present only when `settlement.settled` is `true` and a timestamp is available", + "type": "string" + } + }, + "required": [ + "paymentId", + "merchant", + "referenceId", + "status", + "isTerminal", + "createdAt", + "lastUpdatedAt" + ] + } + }, + "nextCursor": { + "description": "Cursor for the next page, or null if no more results", + "type": [ + "string", + "null" + ] + }, + "stats": { + "type": "object", + "properties": { + "totalRevenue": { + "type": "array", + "items": { + "type": "object", + "properties": { + "amount": { + "type": "number", + "description": "Revenue amount in currency's standard unit" + }, + "currency": { + "type": "string", + "description": "ISO 4217 currency code", + "examples": [ + "USD" + ] + } + }, + "required": [ + "amount", + "currency" + ] + }, + "description": "Total revenue over succeeded payments, converted to USD. Always exactly one element — a merchant with no volume gets a zero rather than an empty array. Kept as an array for backwards compatibility." + }, + "totalTransactions": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "Total payments matching the query" + }, + "totalCustomers": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "Unique buyers matching the query" + } + }, + "required": [ + "totalRevenue", + "totalTransactions", + "totalCustomers" + ], + "description": "Aggregate statistics for the query" } }, - "example": { - "chain_id": "eip155:8453", - "method": "eth_signTypedData_v4", - "params": [ - "0x0000000000000000000000000000000000000000", - "{\"domain\":{\"name\":\"USD Coin\",\"version\":\"2\",\"chainId\":\"0x2105\",\"verifyingContract\":\"0x0000000000000000000000000000000000000000\"},\"types\":{\"EIP712Domain\":[{\"type\":\"string\",\"name\":\"name\"},{\"type\":\"string\",\"name\":\"version\"},{\"type\":\"uint256\",\"name\":\"chainId\"},{\"type\":\"address\",\"name\":\"verifyingContract\"}],\"ReceiveWithAuthorization\":[{\"type\":\"address\",\"name\":\"from\"},{\"type\":\"address\",\"name\":\"to\"},{\"type\":\"uint256\",\"name\":\"value\"},{\"type\":\"uint256\",\"name\":\"validAfter\"},{\"type\":\"uint256\",\"name\":\"validBefore\"},{\"type\":\"bytes32\",\"name\":\"nonce\"}]},\"primaryType\":\"ReceiveWithAuthorization\",\"message\":{\"from\":\"0x0000000000000000000000000000000000000000\",\"nonce\":\"0x0000000000000000000000000000000000000000000000000000000000000000\",\"to\":\"0x0000000000000000000000000000000000000000\",\"validAfter\":\"0x0\",\"validBefore\":\"0x0\",\"value\":\"0x0\"}}" - ] - } + "required": [ + "data", + "nextCursor", + "stats" + ] } }, "securitySchemes": { @@ -4278,6 +11618,12 @@ "in": "header", "name": "App-Id", "description": "Public App ID for wallet authentication. When using this auth mode, the Client-Id header is also required." + }, + "apiKey": { + "type": "apiKey", + "in": "header", + "name": "Api-Key", + "description": "Partner API key." } } }, diff --git a/openapi/2026-02-19.preview.json b/openapi/2026-02-19.preview.json index 1dd0100d..c15f433a 100644 --- a/openapi/2026-02-19.preview.json +++ b/openapi/2026-02-19.preview.json @@ -157,7 +157,18 @@ } } } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } }, "/v1/gateway/payment/{id}/cancel": { @@ -304,7 +315,18 @@ } } } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } }, "/v1/gateway/payment/{id}/confirm": { @@ -488,7 +510,18 @@ } } } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } }, "/v1/gateway/payment/{id}/fetch": { @@ -647,7 +680,18 @@ } } } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } }, "/v1/gateway/payment/{id}/options": { @@ -819,7 +863,18 @@ } } } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } }, "/v1/gateway/payment/{id}/status": { @@ -983,7 +1038,18 @@ } } } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } }, "/v1/gateway/payment/{id}/transition": { @@ -1141,7 +1207,18 @@ } } } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } }, "/v1/payments": { @@ -1276,7 +1353,509 @@ } } } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] + }, + "get": { + "operationId": "PartnerPayments_list", + "parameters": [ + { + "name": "WCP-Version", + "in": "header", + "required": false, + "description": "Optional WalletConnect Pay API version override. If omitted, the partner's pinned version is used.", + "schema": { + "type": "string", + "examples": [ + "2026-02-18", + "2026-02-19.preview" + ] + } + }, + { + "in": "query", + "name": "startTs", + "schema": { + "examples": [ + "2026-01-06T00:00:00Z" + ], + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "description": "RFC3339 timestamp, inclusive" + }, + { + "in": "query", + "name": "endTs", + "schema": { + "examples": [ + "2026-01-07T00:00:00Z" + ], + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "description": "RFC3339 timestamp, exclusive" + }, + { + "in": "query", + "name": "token_symbol", + "schema": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "description": "Filter by token symbol (e.g. `USDC`). CAIP-19 identifiers are not supported. Accepts a single value or multiple repeated params:\n\n- Single: `?token_symbol=USDC`\n- Multiple: `?token_symbol=USDC&token_symbol=EURC`" + }, + { + "in": "query", + "name": "network", + "schema": { + "examples": [ + "eip155:8453", + "eip155:8453,eip155:1" + ], + "type": "string" + }, + "description": "Filter by [CAIP-2](https://standards.chainagnostic.org/CAIPs/caip-2) chain ID. Comma-separated for multiple." + }, + { + "in": "query", + "name": "sortBy", + "schema": { + "type": "string", + "enum": [ + "date", + "amount" + ] + }, + "description": "Field to sort by" + }, + { + "in": "query", + "name": "sortDir", + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "description": "Sort direction" + }, + { + "in": "query", + "name": "cursor", + "schema": { + "type": "string" + }, + "description": "Opaque pagination cursor — use the value from `nextCursor` in the previous response." + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 200 + }, + "description": "Page size (default 50, max 200)" + }, + { + "in": "query", + "name": "status", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "requires_action", + "processing", + "succeeded", + "failed", + "expired", + "cancelled" + ] + } + }, + "description": "Filter by payment status. Accepts a single value or multiple repeated params:\n\n- Single: `?status=succeeded`\n- Multiple: `?status=succeeded&status=processing`" + }, + { + "in": "query", + "name": "referenceId", + "schema": { + "type": "string", + "minLength": 3, + "maxLength": 35, + "pattern": "^[A-Za-z0-9 /:.,+-]+$", + "examples": [ + "order-42" + ] + }, + "description": "Substring search on the merchant-provided reference ID. Between 3 and 35 characters. Allowed characters: ASCII letters, digits, and ` /-:.,+`." + }, + { + "in": "query", + "name": "merchantId", + "schema": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + }, + "examples": [ + [ + "acme-store-1" + ], + [ + "acme-store-1", + "widget_co" + ] + ] + }, + "description": "Filter by merchant ID. Accepts a single value or multiple repeated params:\n\n- Single: `?merchantId=acme-store-1`\n- Multiple: `?merchantId=acme-store-1&merchantId=widget_co`" + } + ], + "responses": { + "200": { + "description": "Payments with statistics", + "headers": { + "WCP-Version": { + "description": "WalletConnect Pay API version resolved for this request.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MerchantPaymentsResponse" + }, + "example": { + "data": [ + { + "paymentId": "pay_a1a2ecc101KGF210FP7PN3BK08PZARS1CZ", + "merchant": { + "id": "acme-store-1", + "name": "Acme Store", + "iconUrl": "https://imagedelivery.net/example/icon.png" + }, + "referenceId": "a1b2cad4e5f2783012345678axcdea90", + "status": "succeeded", + "isTerminal": true, + "paymentUrl": "https://pay.walletconnect.com/?pid=pay_a1a2ecc101KGF210FP7PN3BK08PZARS1CZ", + "fiatAmount": { + "unit": "iso4217/USD", + "value": "500", + "display": { + "assetSymbol": "USD", + "assetName": "US Dollar", + "decimals": 2 + } + }, + "tokenAmount": { + "unit": "caip19/eip155:8453/erc20:0x0000000000000000000000000000000000000000", + "value": "5000000", + "display": { + "assetSymbol": "USDC", + "assetName": "USD Coin", + "decimals": 6, + "networkName": "Base", + "iconUrl": "https://api.walletconnect.com/assets/v1/image/token/USDC/md", + "networkIconUrl": "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + } + }, + "buyer": { + "accountCaip10": "eip155:8453:0x0000000000000000000000000000000000000000", + "accountProviderName": "MetaMask", + "accountProviderIcon": "https://api.walletconnect.com/assets/v1/image/wallet/metamask/md" + }, + "transaction": { + "networkId": "8453", + "hash": "0x0000000000000000000000000000000000000000000000000000000000000000" + }, + "settlement": { + "amount": { + "unit": "caip19/eip155:8453/erc20:0x0000000000000000000000000000000000000000", + "value": "4840000", + "display": { + "assetSymbol": "USDC", + "assetName": "USD Coin", + "decimals": 6, + "iconUrl": "https://api.walletconnect.com/assets/v1/image/token/USDC/md", + "networkName": "Base", + "networkIconUrl": "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + } + }, + "settled": true, + "txHash": "0x0000000000000000000000000000000000000000000000000000000000000000" + }, + "fees": { + "total": { + "unit": "caip19/eip155:8453/erc20:0x0000000000000000000000000000000000000000", + "value": "160000", + "display": { + "assetSymbol": "USDC", + "assetName": "USD Coin", + "decimals": 6, + "iconUrl": "https://api.walletconnect.com/assets/v1/image/token/USDC/md", + "networkName": "Base", + "networkIconUrl": "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + } + }, + "fixed": { + "unit": "caip19/eip155:8453/erc20:0x0000000000000000000000000000000000000000", + "value": "140000", + "display": { + "assetSymbol": "USDC", + "assetName": "USD Coin", + "decimals": 6, + "iconUrl": "https://api.walletconnect.com/assets/v1/image/token/USDC/md", + "networkName": "Base", + "networkIconUrl": "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + } + }, + "percentage": "0.4" + }, + "refund": { + "status": "fully_refunded", + "fullyRefundedAt": "2024-01-02T08:30:00.000Z" + }, + "createdAt": "2024-01-01T12:00:00.000Z", + "expiresAt": "2024-01-01T12:15:00.000Z", + "lastUpdatedAt": "2024-01-01T12:00:00.000Z", + "settledAt": "2024-01-01T12:00:00.000Z" + } + ], + "nextCursor": null, + "stats": { + "totalRevenue": [ + { + "amount": 1000, + "currency": "USD" + } + ], + "totalTransactions": 100, + "totalCustomers": 25 + } + } + } + } + }, + "400": { + "description": "Bad request — invalid parameters or API version", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "invalid_params", + "params_validation", + "invalid_api_version", + "unknown_api_version", + "api_version_downgrade" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "description": "Field-level validation issues (present on validation errors)", + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "field", + "message" + ] + } + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "invalid_params": { + "summary": "Invalid request parameters", + "value": { + "code": "invalid_params", + "message": "Invalid request parameters" + } + }, + "params_validation": { + "summary": "Validation failed", + "value": { + "code": "params_validation", + "message": "Validation failed" + } + }, + "invalid_api_version": { + "summary": "Invalid API version", + "value": { + "code": "invalid_api_version", + "message": "Invalid API version" + } + }, + "unknown_api_version": { + "summary": "Unknown API version", + "value": { + "code": "unknown_api_version", + "message": "Unknown API version" + } + }, + "api_version_downgrade": { + "summary": "Requested API version is older than the partner pin", + "value": { + "code": "api_version_downgrade", + "message": "Requested API version is older than the partner pin" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid partner API key", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "internal_error", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "internal_error": { + "summary": "Internal Server Error", + "value": { + "code": "internal_error", + "message": "Internal Server Error" + } + } + } + } + } + } + }, + "tags": [ + "Payments" + ], + "summary": "List payments", + "description": "Retrieve paginated payments with optional filters.", + "security": [ + { + "apiKey": [] + } + ] } }, "/v1/payments/{id}": { @@ -1420,12 +1999,23 @@ } } } - } - } - }, - "/v1/payments/{id}/cancel": { - "post": { - "tags": [ + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] + } + }, + "/v1/payments/{id}/cancel": { + "post": { + "tags": [ "Payments" ], "operationId": "paymentsCancelPayment", @@ -1561,7 +2151,18 @@ } } } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } }, "/v1/payments/{id}/status": { @@ -1719,7 +2320,18 @@ } } } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } }, "/v1/payments/{id}/transition": { @@ -1871,7 +2483,18 @@ } } } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } }, "/v1/webhooks/binance_pay": { @@ -1908,7 +2531,18 @@ "500": { "description": "Internal error (Binance retries)" } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } }, "/v1/webhooks/binance_pay_onchain": { @@ -1948,7 +2582,18 @@ "503": { "description": "Webhook verification is not configured (Binance redelivers)" } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } }, "/v1/webhooks/bybit_pay": { @@ -1988,7 +2633,18 @@ "503": { "description": "Webhook verification or the Bybit client is not configured, or the configured key is unusable (Bybit redelivers)" } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } }, "/v1/webhooks/crypto_com_pay": { @@ -2031,123 +2687,6290 @@ "503": { "description": "Crypto.com Pay is not configured (Crypto.com redelivers)" } - } + }, + "security": [ + { + "API Key": [] + }, + { + "ApiKey": [] + }, + { + "AppId": [] + } + ] } - } - }, - "tags": [ - { - "name": "Gateway" - }, - { - "name": "Payments" }, - { - "name": "Webhooks" - } - ], - "components": { - "schemas": { - "Action": { - "oneOf": [ + "/v1/refunds": { + "post": { + "operationId": "Refunds_create", + "parameters": [ { - "type": "object", - "description": "An action that requires a wallet RPC call to complete", - "required": [ - "data", - "type" - ], - "properties": { - "data": { - "$ref": "#/components/schemas/WalletRpcAction", - "description": "An action that requires a wallet RPC call to complete" - }, - "type": { - "type": "string", - "enum": [ - "walletRpc" - ] - } + "name": "Merchant-Id", + "in": "header", + "required": true, + "description": "Merchant identifier.", + "schema": { + "type": "string", + "examples": [ + "acme-store-1" + ] } }, { - "type": "object", - "description": "An action that requires building to complete", - "required": [ - "data", - "type" - ], - "properties": { - "data": { - "$ref": "#/components/schemas/Build", - "description": "An action that requires building to complete" - }, - "type": { - "type": "string", - "enum": [ - "build" - ] + "name": "WCP-Version", + "in": "header", + "required": false, + "description": "Optional WalletConnect Pay API version override. If omitted, the partner's pinned version is used.", + "schema": { + "type": "string", + "examples": [ + "2026-02-18", + "2026-02-19.preview" + ] + } + } + ], + "responses": { + "200": { + "description": "Payment marked as refunded", + "headers": { + "WCP-Version": { + "description": "WalletConnect Pay API version resolved for this request.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "paymentId": { + "type": "string", + "description": "Payment ID that was marked as refunded" + } + }, + "required": [ + "paymentId" + ] + }, + "example": { + "paymentId": "pay_a1a2ecc101KGF210FP7PN3BK08PZARS1CZ" + } } } }, - { - "type": "object", - "description": "Send an amount to an account. The whole action, with no transaction to\nbuild or sign.", - "required": [ - "data", - "type" - ], - "properties": { - "data": { - "$ref": "#/components/schemas/TransferAction", - "description": "Send an amount to an account. The whole action, with no transaction to\nbuild or sign." - }, - "type": { - "type": "string", - "enum": [ - "transfer" - ] + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "params_validation", + "payment_not_succeeded", + "invalid_api_version", + "unknown_api_version", + "api_version_downgrade" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "description": "Field-level validation issues (present on validation errors)", + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "field", + "message" + ] + } + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "params_validation": { + "summary": "Validation failed", + "value": { + "code": "params_validation", + "message": "Validation failed" + } + }, + "payment_not_succeeded": { + "summary": "Payment is not in a refundable state", + "value": { + "code": "payment_not_succeeded", + "message": "Payment is not in a refundable state" + } + }, + "invalid_api_version": { + "summary": "Invalid API version", + "value": { + "code": "invalid_api_version", + "message": "Invalid API version" + } + }, + "unknown_api_version": { + "summary": "Unknown API version", + "value": { + "code": "unknown_api_version", + "message": "Unknown API version" + } + }, + "api_version_downgrade": { + "summary": "Requested API version is older than the partner pin", + "value": { + "code": "api_version_downgrade", + "message": "Requested API version is older than the partner pin" + } + } + } } } - } - ], - "example": { - "data": { - "chain_id": "eip155:8453", - "method": "eth_signTypedData_v4", - "params": [ - "0x0000000000000000000000000000000000000000", - "{\"domain\":{\"name\":\"USD Coin\",\"version\":\"2\",\"chainId\":\"0x2105\",\"verifyingContract\":\"0x0000000000000000000000000000000000000000\"},\"types\":{\"EIP712Domain\":[{\"type\":\"string\",\"name\":\"name\"},{\"type\":\"string\",\"name\":\"version\"},{\"type\":\"uint256\",\"name\":\"chainId\"},{\"type\":\"address\",\"name\":\"verifyingContract\"}],\"ReceiveWithAuthorization\":[{\"type\":\"address\",\"name\":\"from\"},{\"type\":\"address\",\"name\":\"to\"},{\"type\":\"uint256\",\"name\":\"value\"},{\"type\":\"uint256\",\"name\":\"validAfter\"},{\"type\":\"uint256\",\"name\":\"validBefore\"},{\"type\":\"bytes32\",\"name\":\"nonce\"}]},\"primaryType\":\"ReceiveWithAuthorization\",\"message\":{\"from\":\"0x0000000000000000000000000000000000000000\",\"nonce\":\"0x0000000000000000000000000000000000000000000000000000000000000000\",\"to\":\"0x0000000000000000000000000000000000000000\",\"validAfter\":\"0x0\",\"validBefore\":\"0x0\",\"value\":\"0x0\"}}" - ] }, - "type": "walletRpc" - } - }, - "Amount": { - "type": "object", - "required": [ - "unit", - "value", - "display" - ], - "properties": { - "display": { - "$ref": "#/components/schemas/AmountDisplay", - "description": "Display information for the amount" - }, - "unit": { - "type": "string", - "description": "Currency unit, prefixed with either \"iso4217/\" or \"caip19/\"", - "example": "iso4217/USD" + "401": { + "description": "Unauthorized — missing or invalid API key, or missing merchant id", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key", + "missing_merchant_id" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + }, + "missing_merchant_id": { + "summary": "Missing Merchant ID", + "value": { + "code": "missing_merchant_id", + "message": "Missing Merchant ID" + } + } + } + } + } }, - "value": { - "type": "string", - "description": "Amount value, in the currency unit's minor units" - } - }, - "example": { - "display": { - "assetName": "USD Coin", + "404": { + "description": "Payment not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "not_found", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "not_found": { + "summary": "Not Found", + "value": { + "code": "not_found", + "message": "Not Found" + } + } + } + } + } + }, + "409": { + "description": "Payment is already refunded", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "already_refunded", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "already_refunded": { + "summary": "Payment is already refunded", + "value": { + "code": "already_refunded", + "message": "Payment is already refunded" + } + } + } + } + } + }, + "500": { + "description": "Internal error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "internal_error", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "internal_error": { + "summary": "Internal Server Error", + "value": { + "code": "internal_error", + "message": "Internal Server Error" + } + } + } + } + } + }, + "502": { + "description": "Bad gateway", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "bad_gateway", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "bad_gateway": { + "summary": "Bad Gateway", + "value": { + "code": "bad_gateway", + "message": "Bad Gateway" + } + } + } + } + } + } + }, + "tags": [ + "Refunds" + ], + "summary": "Mark a payment as refunded", + "description": "Request a full refund for a payment. Calling a second time on the same payment returns 409.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "paymentId": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "pattern": "^pay_[A-Za-z0-9]+$", + "description": "Payment ID to refund", + "examples": [ + "pay_a1a2ecc101KGF210FP7PN3BK08PZARS1CZ" + ] + } + }, + "required": [ + "paymentId" + ] + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/v1/merchants/payments": { + "get": { + "operationId": "MerchantPayments_list", + "parameters": [ + { + "name": "Merchant-Id", + "in": "header", + "required": true, + "description": "Merchant identifier.", + "schema": { + "type": "string", + "examples": [ + "acme-store-1" + ] + } + }, + { + "name": "WCP-Version", + "in": "header", + "required": false, + "description": "Optional WalletConnect Pay API version override. If omitted, the partner's pinned version is used.", + "schema": { + "type": "string", + "examples": [ + "2026-02-18", + "2026-02-19.preview" + ] + } + }, + { + "in": "query", + "name": "startTs", + "schema": { + "examples": [ + "2026-01-06T00:00:00Z" + ], + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "description": "RFC3339 timestamp, inclusive" + }, + { + "in": "query", + "name": "endTs", + "schema": { + "examples": [ + "2026-01-07T00:00:00Z" + ], + "type": "string", + "format": "date-time", + "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$" + }, + "description": "RFC3339 timestamp, exclusive" + }, + { + "in": "query", + "name": "token_symbol", + "schema": { + "type": "array", + "items": { + "type": "string", + "minLength": 1 + } + }, + "description": "Filter by token symbol (e.g. `USDC`). CAIP-19 identifiers are not supported. Accepts a single value or multiple repeated params:\n\n- Single: `?token_symbol=USDC`\n- Multiple: `?token_symbol=USDC&token_symbol=EURC`" + }, + { + "in": "query", + "name": "network", + "schema": { + "examples": [ + "eip155:8453", + "eip155:8453,eip155:1" + ], + "type": "string" + }, + "description": "Filter by [CAIP-2](https://standards.chainagnostic.org/CAIPs/caip-2) chain ID. Comma-separated for multiple." + }, + { + "in": "query", + "name": "sortBy", + "schema": { + "type": "string", + "enum": [ + "date", + "amount" + ] + }, + "description": "Field to sort by" + }, + { + "in": "query", + "name": "sortDir", + "schema": { + "type": "string", + "enum": [ + "asc", + "desc" + ] + }, + "description": "Sort direction" + }, + { + "in": "query", + "name": "cursor", + "schema": { + "type": "string" + }, + "description": "Opaque pagination cursor — use the value from `nextCursor` in the previous response." + }, + { + "in": "query", + "name": "limit", + "schema": { + "type": "integer", + "minimum": 1, + "maximum": 200 + }, + "description": "Page size (default 50, max 200)" + }, + { + "in": "query", + "name": "status", + "schema": { + "type": "array", + "items": { + "type": "string", + "enum": [ + "requires_action", + "processing", + "succeeded", + "failed", + "expired", + "cancelled" + ] + } + }, + "description": "Filter by payment status. Accepts a single value or multiple repeated params:\n\n- Single: `?status=succeeded`\n- Multiple: `?status=succeeded&status=processing`" + }, + { + "in": "query", + "name": "referenceId", + "schema": { + "type": "string", + "minLength": 3, + "maxLength": 35, + "pattern": "^[A-Za-z0-9 /:.,+-]+$", + "examples": [ + "order-42" + ] + }, + "description": "Substring search on the merchant-provided reference ID. Between 3 and 35 characters. Allowed characters: ASCII letters, digits, and ` /-:.,+`." + } + ], + "responses": { + "200": { + "description": "Payments with statistics", + "headers": { + "WCP-Version": { + "description": "WalletConnect Pay API version resolved for this request.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/MerchantPaymentsResponse" + }, + "example": { + "data": [ + { + "paymentId": "pay_a1a2ecc101KGF210FP7PN3BK08PZARS1CZ", + "merchant": { + "id": "acme-store-1", + "name": "Acme Store", + "iconUrl": "https://imagedelivery.net/example/icon.png" + }, + "referenceId": "a1b2cad4e5f2783012345678axcdea90", + "status": "succeeded", + "isTerminal": true, + "paymentUrl": "https://pay.walletconnect.com/?pid=pay_a1a2ecc101KGF210FP7PN3BK08PZARS1CZ", + "fiatAmount": { + "unit": "iso4217/USD", + "value": "500", + "display": { + "assetSymbol": "USD", + "assetName": "US Dollar", + "decimals": 2 + } + }, + "tokenAmount": { + "unit": "caip19/eip155:8453/erc20:0x0000000000000000000000000000000000000000", + "value": "5000000", + "display": { + "assetSymbol": "USDC", + "assetName": "USD Coin", + "decimals": 6, + "networkName": "Base", + "iconUrl": "https://api.walletconnect.com/assets/v1/image/token/USDC/md", + "networkIconUrl": "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + } + }, + "buyer": { + "accountCaip10": "eip155:8453:0x0000000000000000000000000000000000000000", + "accountProviderName": "MetaMask", + "accountProviderIcon": "https://api.walletconnect.com/assets/v1/image/wallet/metamask/md" + }, + "transaction": { + "networkId": "8453", + "hash": "0x0000000000000000000000000000000000000000000000000000000000000000" + }, + "settlement": { + "amount": { + "unit": "caip19/eip155:8453/erc20:0x0000000000000000000000000000000000000000", + "value": "4840000", + "display": { + "assetSymbol": "USDC", + "assetName": "USD Coin", + "decimals": 6, + "iconUrl": "https://api.walletconnect.com/assets/v1/image/token/USDC/md", + "networkName": "Base", + "networkIconUrl": "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + } + }, + "settled": true, + "txHash": "0x0000000000000000000000000000000000000000000000000000000000000000" + }, + "fees": { + "total": { + "unit": "caip19/eip155:8453/erc20:0x0000000000000000000000000000000000000000", + "value": "160000", + "display": { + "assetSymbol": "USDC", + "assetName": "USD Coin", + "decimals": 6, + "iconUrl": "https://api.walletconnect.com/assets/v1/image/token/USDC/md", + "networkName": "Base", + "networkIconUrl": "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + } + }, + "fixed": { + "unit": "caip19/eip155:8453/erc20:0x0000000000000000000000000000000000000000", + "value": "140000", + "display": { + "assetSymbol": "USDC", + "assetName": "USD Coin", + "decimals": 6, + "iconUrl": "https://api.walletconnect.com/assets/v1/image/token/USDC/md", + "networkName": "Base", + "networkIconUrl": "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + } + }, + "percentage": "0.4" + }, + "refund": { + "status": "fully_refunded", + "fullyRefundedAt": "2024-01-02T08:30:00.000Z" + }, + "createdAt": "2024-01-01T12:00:00.000Z", + "expiresAt": "2024-01-01T12:15:00.000Z", + "lastUpdatedAt": "2024-01-01T12:00:00.000Z", + "settledAt": "2024-01-01T12:00:00.000Z" + } + ], + "nextCursor": null, + "stats": { + "totalRevenue": [ + { + "amount": 1000, + "currency": "USD" + } + ], + "totalTransactions": 100, + "totalCustomers": 25 + } + } + } + } + }, + "400": { + "description": "Bad request — invalid parameters or API version", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "invalid_params", + "params_validation", + "invalid_api_version", + "unknown_api_version", + "api_version_downgrade" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "description": "Field-level validation issues (present on validation errors)", + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "field", + "message" + ] + } + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "invalid_params": { + "summary": "Invalid request parameters", + "value": { + "code": "invalid_params", + "message": "Invalid request parameters" + } + }, + "params_validation": { + "summary": "Validation failed", + "value": { + "code": "params_validation", + "message": "Validation failed" + } + }, + "invalid_api_version": { + "summary": "Invalid API version", + "value": { + "code": "invalid_api_version", + "message": "Invalid API version" + } + }, + "unknown_api_version": { + "summary": "Unknown API version", + "value": { + "code": "unknown_api_version", + "message": "Unknown API version" + } + }, + "api_version_downgrade": { + "summary": "Requested API version is older than the partner pin", + "value": { + "code": "api_version_downgrade", + "message": "Requested API version is older than the partner pin" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key, or missing merchant id", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key", + "missing_merchant_id" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + }, + "missing_merchant_id": { + "summary": "Missing Merchant ID", + "value": { + "code": "missing_merchant_id", + "message": "Missing Merchant ID" + } + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "internal_error", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "internal_error": { + "summary": "Internal Server Error", + "value": { + "code": "internal_error", + "message": "Internal Server Error" + } + } + } + } + } + } + }, + "tags": [ + "Payments" + ], + "summary": "List payments for a merchant", + "description": "Retrieve paginated payments with optional filters.", + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/v1/merchants/payments/{paymentId}/receipt": { + "post": { + "operationId": "PaymentReceipts_send", + "parameters": [ + { + "name": "Merchant-Id", + "in": "header", + "required": true, + "description": "Merchant identifier.", + "schema": { + "type": "string", + "examples": [ + "acme-store-1" + ] + } + }, + { + "name": "WCP-Version", + "in": "header", + "required": false, + "description": "Optional WalletConnect Pay API version override. If omitted, the partner's pinned version is used.", + "schema": { + "type": "string", + "examples": [ + "2026-02-18", + "2026-02-19.preview" + ] + } + }, + { + "in": "path", + "name": "paymentId", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 64, + "pattern": "^pay_[A-Za-z0-9]+$", + "examples": [ + "pay_a1a2ecc101KGF210FP7PN3BK08PZARS1CZ" + ] + }, + "required": true, + "description": "Payment ID to send the receipt for" + } + ], + "responses": { + "200": { + "description": "Receipt sent, or already sent before", + "headers": { + "WCP-Version": { + "description": "WalletConnect Pay API version resolved for this request.", + "schema": { + "type": "string" + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "paymentId": { + "type": "string", + "description": "Payment ID the receipt is for" + }, + "status": { + "type": "string", + "enum": [ + "sent", + "already_sent" + ], + "description": "`sent`: the receipt is on its way. `already_sent`: a receipt for this payment was already sent, so no new email was sent." + } + }, + "required": [ + "paymentId", + "status" + ] + }, + "example": { + "paymentId": "pay_a1a2ecc101KGF210FP7PN3BK08PZARS1CZ", + "status": "sent" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "params_validation", + "payment_not_succeeded", + "invalid_api_version", + "unknown_api_version", + "api_version_downgrade" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "description": "Field-level validation issues (present on validation errors)", + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "field", + "message" + ] + } + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "params_validation": { + "summary": "Validation failed", + "value": { + "code": "params_validation", + "message": "Validation failed" + } + }, + "payment_not_succeeded": { + "summary": "Payment is not in a refundable state", + "value": { + "code": "payment_not_succeeded", + "message": "Payment is not in a refundable state" + } + }, + "invalid_api_version": { + "summary": "Invalid API version", + "value": { + "code": "invalid_api_version", + "message": "Invalid API version" + } + }, + "unknown_api_version": { + "summary": "Unknown API version", + "value": { + "code": "unknown_api_version", + "message": "Unknown API version" + } + }, + "api_version_downgrade": { + "summary": "Requested API version is older than the partner pin", + "value": { + "code": "api_version_downgrade", + "message": "Requested API version is older than the partner pin" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized — missing or invalid API key, or missing merchant id", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key", + "missing_merchant_id" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + }, + "missing_merchant_id": { + "summary": "Missing Merchant ID", + "value": { + "code": "missing_merchant_id", + "message": "Missing Merchant ID" + } + } + } + } + } + }, + "404": { + "description": "Payment not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "not_found", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "not_found": { + "summary": "Not Found", + "value": { + "code": "not_found", + "message": "Not Found" + } + } + } + } + } + }, + "409": { + "description": "The payment has no on-chain transaction to put on a receipt", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "receipt_unavailable", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "receipt_unavailable": { + "summary": "This payment has no on-chain transaction to put on a receipt", + "value": { + "code": "receipt_unavailable", + "message": "This payment has no on-chain transaction to put on a receipt" + } + } + } + } + } + }, + "429": { + "description": "Too many receipt requests", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "rate_limited", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "rate_limited": { + "summary": "Too Many Requests", + "value": { + "code": "rate_limited", + "message": "Too Many Requests" + } + } + } + } + } + }, + "500": { + "description": "Internal error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "internal_error", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "internal_error": { + "summary": "Internal Server Error", + "value": { + "code": "internal_error", + "message": "Internal Server Error" + } + } + } + } + } + }, + "502": { + "description": "Receipt service unavailable", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "receipt_service_unavailable", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "receipt_service_unavailable": { + "summary": "The receipt service is unavailable", + "value": { + "code": "receipt_service_unavailable", + "message": "The receipt service is unavailable" + } + } + } + } + } + } + }, + "tags": [ + "Payments" + ], + "summary": "Email a payment receipt", + "description": "Email the receipt for a succeeded payment to the customer. A payment gets at most one receipt: if the customer already received one, no new email is sent and the response status is `already_sent`.", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "email": { + "type": "string", + "maxLength": 320, + "format": "email", + "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$", + "description": "Customer email address to send the receipt to", + "examples": [ + "customer@example.com" + ] + } + }, + "required": [ + "email" + ] + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/v1/merchants": { + "post": { + "operationId": "MerchantManagement_create", + "tags": [ + "Merchant Management" + ], + "summary": "Create a merchant", + "description": "Create a new merchant under the authenticated partner. Requires an `Idempotency-Key` header so retries safely return the originally-created merchant rather than creating duplicates.", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "required": true, + "description": "Unique key to ensure idempotent request processing. Max 255 characters.", + "schema": { + "type": "string", + "maxLength": 255 + } + } + ], + "responses": { + "201": { + "description": "Merchant created", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "merchant": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Merchant ID", + "examples": [ + "mrch_7kBz2qR9xPvLmN4Yw" + ] + }, + "name": { + "type": "string", + "description": "Merchant display name" + }, + "email": { + "description": "Contact email", + "examples": [ + "billing@acme.store" + ], + "type": [ + "string", + "null" + ] + }, + "status": { + "type": "string", + "enum": [ + "active", + "inactive", + "suspended" + ], + "description": "Current merchant status", + "examples": [ + "active" + ] + }, + "mcc": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ], + "description": "ISO 18245 merchant category code, or null if not set", + "examples": [ + 5812 + ] + }, + "createdAt": { + "type": "string", + "description": "ISO 8601 creation timestamp", + "examples": [ + "2025-06-15T10:30:00.000Z" + ] + } + }, + "required": [ + "id", + "name", + "email", + "status", + "mcc", + "createdAt" + ] + } + }, + "required": [ + "merchant" + ] + }, + "example": { + "merchant": { + "id": "mrch_7kBz2qR9xPvLmN4Yw", + "name": "Acme Store", + "email": "billing@acme.store", + "status": "active", + "mcc": 5812, + "createdAt": "2025-06-15T10:30:00.000Z" + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "params_validation", + "invalid_params", + "missing_idempotency_key", + "logo_too_small", + "logo_too_large", + "logo_not_square", + "logo_file_too_big", + "logo_invalid_mime", + "logo_invalid_dimensions" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "description": "Field-level validation issues (present on validation errors)", + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "field", + "message" + ] + } + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "params_validation": { + "summary": "Validation failed", + "value": { + "code": "params_validation", + "message": "Validation failed" + } + }, + "invalid_params": { + "summary": "Invalid request parameters", + "value": { + "code": "invalid_params", + "message": "Invalid request parameters" + } + }, + "missing_idempotency_key": { + "summary": "Missing Idempotency-Key header", + "value": { + "code": "missing_idempotency_key", + "message": "Missing Idempotency-Key header" + } + }, + "logo_too_small": { + "summary": "Logo is too small", + "value": { + "code": "logo_too_small", + "message": "Logo is too small" + } + }, + "logo_too_large": { + "summary": "Logo is too large", + "value": { + "code": "logo_too_large", + "message": "Logo is too large" + } + }, + "logo_not_square": { + "summary": "Logo must be square", + "value": { + "code": "logo_not_square", + "message": "Logo must be square" + } + }, + "logo_file_too_big": { + "summary": "Logo file is too large", + "value": { + "code": "logo_file_too_big", + "message": "Logo file is too large" + } + }, + "logo_invalid_mime": { + "summary": "Logo file type is not supported", + "value": { + "code": "logo_invalid_mime", + "message": "Logo file type is not supported" + } + }, + "logo_invalid_dimensions": { + "summary": "Logo dimensions could not be read", + "value": { + "code": "logo_invalid_dimensions", + "message": "Logo dimensions could not be read" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + } + } + } + } + }, + "409": { + "description": "Idempotency conflict", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "idempotency_conflict", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "idempotency_conflict": { + "summary": "Idempotency key conflict: same key was used with a different request body", + "value": { + "code": "idempotency_conflict", + "message": "Idempotency key conflict: same key was used with a different request body" + } + } + } + } + } + }, + "500": { + "description": "Internal error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "internal_error", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "internal_error": { + "summary": "Internal Server Error", + "value": { + "code": "internal_error", + "message": "Internal Server Error" + } + } + } + } + } + }, + "502": { + "description": "Bad gateway", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "bad_gateway", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "bad_gateway": { + "summary": "Bad Gateway", + "value": { + "code": "bad_gateway", + "message": "Bad Gateway" + } + } + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "merchantName": { + "type": "string", + "minLength": 2, + "maxLength": 64, + "description": "Display name for the merchant", + "examples": [ + "Acme Store" + ] + }, + "merchantEmail": { + "type": "string", + "format": "email", + "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$", + "description": "Contact email for the merchant", + "examples": [ + "billing@acme.store" + ] + }, + "iconUrl": { + "default": null, + "description": "Merchant logo URL (HTTPS only), or null to unset. Logo should be square (1:1, ±5%), 500×500px minimum (1024×1024px recommended, 4096×4096px maximum), JPEG/PNG/WebP, up to 2 MB.", + "examples": [ + "https://example.com/logo.png" + ], + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "null" + } + ] + }, + "alwaysCollectData": { + "description": "When true, every checkout forces the buyer to provide compliance data, even repeat buyers whose data is already on file.", + "examples": [ + true + ], + "type": "boolean" + }, + "mcc": { + "default": null, + "description": "ISO 18245 merchant category code describing the merchant's line of business.", + "examples": [ + 5812 + ], + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + } + }, + "required": [ + "merchantName", + "merchantEmail" + ], + "examples": [ + { + "merchantName": "Acme Store", + "merchantEmail": "billing@acme.store", + "iconUrl": "https://example.com/logo.png" + } + ] + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "get": { + "operationId": "MerchantManagement_list", + "tags": [ + "Merchant Management" + ], + "summary": "List merchants", + "description": "List the partner's merchants. Supports filtering by `status`, free-text `search` over name and ID, and cursor-based pagination via `cursor` and `limit`.", + "responses": { + "200": { + "description": "Merchants list", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "merchants": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Merchant ID", + "examples": [ + "mrch_7kBz2qR9xPvLmN4Yw" + ] + }, + "name": { + "type": "string", + "description": "Merchant display name" + }, + "email": { + "description": "Contact email", + "examples": [ + "billing@acme.store" + ], + "type": [ + "string", + "null" + ] + }, + "status": { + "type": "string", + "enum": [ + "active", + "inactive", + "suspended" + ], + "description": "Current merchant status", + "examples": [ + "active" + ] + }, + "iconUrl": { + "description": "Merchant logo URL, or null if not set", + "examples": [ + "https://imagedelivery.net/example/acme-icon.png" + ], + "type": [ + "string", + "null" + ] + }, + "mcc": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ], + "description": "ISO 18245 merchant category code, or null if not set", + "examples": [ + 5812 + ] + }, + "createdAt": { + "type": "string", + "description": "ISO 8601 creation timestamp", + "examples": [ + "2025-06-15T10:30:00.000Z" + ] + } + }, + "required": [ + "id", + "name", + "email", + "status", + "iconUrl", + "mcc", + "createdAt" + ] + } + }, + "totalCount": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "Total number of merchants matching the query (ignoring pagination)" + }, + "nextCursor": { + "description": "Cursor for the next page, or null if no more results", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "merchants", + "totalCount", + "nextCursor" + ] + }, + "example": { + "merchants": [ + { + "id": "mrch_7kBz2qR9xPvLmN4Yw", + "name": "Acme Store", + "email": "billing@acme.store", + "status": "active", + "iconUrl": "https://imagedelivery.net/example/acme-icon.png", + "mcc": 5812, + "createdAt": "2025-06-15T10:30:00.000Z" + }, + { + "id": "mrch_Qx8fTp3YwKjR5vNm2", + "name": "Widget Co", + "email": null, + "status": "active", + "iconUrl": null, + "mcc": null, + "createdAt": "2025-07-01T08:00:00.000Z" + } + ], + "totalCount": 2, + "nextCursor": null + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "params_validation", + "invalid_params" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "description": "Field-level validation issues (present on validation errors)", + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "field", + "message" + ] + } + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "params_validation": { + "summary": "Validation failed", + "value": { + "code": "params_validation", + "message": "Validation failed" + } + }, + "invalid_params": { + "summary": "Invalid request parameters", + "value": { + "code": "invalid_params", + "message": "Invalid request parameters" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + } + } + } + } + } + }, + "parameters": [ + { + "in": "query", + "name": "status", + "schema": { + "type": "string", + "enum": [ + "active", + "inactive", + "suspended" + ] + }, + "description": "Filter by merchant status" + }, + { + "in": "query", + "name": "search", + "schema": { + "examples": [ + "Acme" + ], + "type": "string", + "minLength": 1, + "maxLength": 256 + }, + "description": "Search by merchant name or ID (case-insensitive)" + }, + { + "in": "query", + "name": "cursor", + "schema": { + "type": "string" + }, + "description": "Opaque pagination cursor — use the value from `nextCursor` in the previous response." + }, + { + "in": "query", + "name": "limit", + "schema": { + "default": 20, + "type": "integer", + "minimum": 1, + "maximum": 100 + }, + "description": "Page size (default 20, max 100)" + } + ], + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/v1/merchants/{merchantId}": { + "get": { + "operationId": "MerchantManagement_get", + "tags": [ + "Merchant Management" + ], + "summary": "Get a merchant", + "description": "Fetch a merchant's profile along with its configured `settlements` (crypto and fiat). Crypto settlements use [CAIP-19](https://chainagnostic.org/CAIPs/caip-19) asset IDs and [CAIP-10](https://chainagnostic.org/CAIPs/caip-10) destination accounts.", + "responses": { + "200": { + "description": "Merchant details", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "merchant": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Merchant ID", + "examples": [ + "mrch_7kBz2qR9xPvLmN4Yw" + ] + }, + "name": { + "type": "string", + "description": "Merchant display name" + }, + "email": { + "description": "Contact email", + "examples": [ + "billing@acme.store" + ], + "type": [ + "string", + "null" + ] + }, + "status": { + "type": "string", + "enum": [ + "active", + "inactive", + "suspended" + ], + "description": "Current merchant status", + "examples": [ + "active" + ] + }, + "iconUrl": { + "description": "Merchant logo URL, or null if not set", + "examples": [ + "https://imagedelivery.net/example/acme-icon.png" + ], + "type": [ + "string", + "null" + ] + }, + "mcc": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ], + "description": "ISO 18245 merchant category code, or null if not set", + "examples": [ + 5812 + ] + }, + "createdAt": { + "type": "string", + "description": "ISO 8601 creation timestamp", + "examples": [ + "2025-06-15T10:30:00.000Z" + ] + }, + "alwaysCollectData": { + "type": "boolean", + "description": "When true, every checkout forces the buyer to provide compliance data — even repeat buyers whose data is already on file.", + "examples": [ + false + ] + }, + "mtaAddresses": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Transit account addresses, where payments arrive before they settle, as [CAIP-10](https://standards.chainagnostic.org/CAIPs/caip-10) account IDs. One entry per provisioned chain, and chains in a namespace share an address, so entries repeat. Empty when there is no transit account. May be shared across all of a partner's merchants, so they cannot be used to attribute a payment to a single merchant.", + "examples": [ + [ + "eip155:8453:0x1234567890abcdef1234567890abcdef12345678", + "eip155:10:0x1234567890abcdef1234567890abcdef12345678" + ] + ] + }, + "settlements": { + "type": "object", + "properties": { + "crypto": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Crypto settlement ID" + }, + "asset": { + "type": "string", + "description": "[CAIP-19](https://standards.chainagnostic.org/CAIPs/caip-19) asset ID", + "examples": [ + "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" + ] + }, + "destination": { + "type": "string", + "description": "[CAIP-10](https://standards.chainagnostic.org/CAIPs/caip-10) settlement destination", + "examples": [ + "eip155:8453:0x1234567890abcdef1234567890abcdef12345678" + ] + }, + "networkName": { + "description": "Display name of the settlement network, or null if the chain is not recognized", + "examples": [ + "Base" + ], + "type": [ + "string", + "null" + ] + }, + "networkLogoUrl": { + "description": "Logo URL for the settlement network (an admin-uploaded logo when set, otherwise the assets-registry fallback), or null if the chain is not recognized", + "examples": [ + "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "asset", + "destination", + "networkName", + "networkLogoUrl" + ] + } + }, + "fiat": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Settlement config ID" + }, + "status": { + "type": "string", + "description": "Fiat settlement status" + }, + "bankType": { + "type": "string", + "description": "Bank account type" + } + }, + "required": [ + "id", + "status", + "bankType" + ] + } + }, + "hasSettlementPath": { + "type": "boolean", + "description": "True when the merchant has somewhere for a live payment to settle: a crypto settlement, a fiat settlement config (including one still in setup, and so absent from `fiat` above), or an enabled funding source. Use this rather than the arrays above to decide whether the merchant is payable — they list only what is active. Advisory: pay-core is the authority and rejects a payment it cannot settle with `no_settlement_configuration`." + } + }, + "required": [ + "crypto", + "fiat", + "hasSettlementPath" + ] + } + }, + "required": [ + "id", + "name", + "email", + "status", + "iconUrl", + "mcc", + "createdAt", + "alwaysCollectData", + "mtaAddresses", + "settlements" + ] + } + }, + "required": [ + "merchant" + ] + }, + "example": { + "merchant": { + "id": "mrch_7kBz2qR9xPvLmN4Yw", + "name": "Acme Store", + "email": "billing@acme.store", + "status": "active", + "iconUrl": "https://imagedelivery.net/example/acme-icon.png", + "mcc": 5812, + "createdAt": "2025-06-15T10:30:00.000Z", + "mtaAddresses": [ + "eip155:8453:0x1234567890abcdef1234567890abcdef12345678", + "eip155:10:0x1234567890abcdef1234567890abcdef12345678" + ], + "settlements": { + "crypto": [ + { + "id": "crypto_Xk7nWp8XmQj2YrTv6", + "asset": "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", + "destination": "eip155:8453:0x1234567890abcdef1234567890abcdef12345678", + "networkName": "Base", + "networkLogoUrl": "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + } + ], + "fiat": [ + { + "id": "fiat_Bk4nWp8XmQj2YrTv6", + "status": "active", + "bankType": "ACH" + } + ] + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + } + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "not_found", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "not_found": { + "summary": "Not Found", + "value": { + "code": "not_found", + "message": "Not Found" + } + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "merchantId", + "required": true + } + ], + "security": [ + { + "apiKey": [] + } + ] + }, + "patch": { + "operationId": "MerchantManagement_update", + "tags": [ + "Merchant Management" + ], + "summary": "Update a merchant", + "description": "Update a merchant's profile. At least one of `merchantName`, `merchantEmail`, `iconUrl`, `alwaysCollectData`, or `mcc` must be provided. Pass `iconUrl: null` to unset the existing logo, and `mcc: null` to unset the merchant category code.", + "responses": { + "200": { + "description": "Merchant updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "merchant": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Merchant ID", + "examples": [ + "mrch_7kBz2qR9xPvLmN4Yw" + ] + }, + "name": { + "type": "string", + "description": "Merchant display name" + }, + "email": { + "description": "Contact email", + "examples": [ + "billing@acme.store" + ], + "type": [ + "string", + "null" + ] + }, + "status": { + "type": "string", + "enum": [ + "active", + "inactive", + "suspended" + ], + "description": "Current merchant status", + "examples": [ + "active" + ] + }, + "iconUrl": { + "description": "Merchant logo URL, or null if not set", + "examples": [ + "https://imagedelivery.net/example/acme-icon.png" + ], + "type": [ + "string", + "null" + ] + }, + "mcc": { + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ], + "description": "ISO 18245 merchant category code, or null if not set", + "examples": [ + 5812 + ] + }, + "createdAt": { + "type": "string", + "description": "ISO 8601 creation timestamp", + "examples": [ + "2025-06-15T10:30:00.000Z" + ] + } + }, + "required": [ + "id", + "name", + "email", + "status", + "iconUrl", + "mcc", + "createdAt" + ] + } + }, + "required": [ + "merchant" + ] + }, + "example": { + "merchant": { + "id": "mrch_7kBz2qR9xPvLmN4Yw", + "name": "Acme Store v2", + "email": "billing@acme.store", + "status": "active", + "iconUrl": "https://imagedelivery.net/example/acme-icon.png", + "mcc": 5812, + "createdAt": "2025-06-15T10:30:00.000Z" + } + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "params_validation", + "invalid_params", + "logo_too_small", + "logo_too_large", + "logo_not_square", + "logo_file_too_big", + "logo_invalid_mime", + "logo_invalid_dimensions" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "description": "Field-level validation issues (present on validation errors)", + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "field", + "message" + ] + } + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "params_validation": { + "summary": "Validation failed", + "value": { + "code": "params_validation", + "message": "Validation failed" + } + }, + "invalid_params": { + "summary": "Invalid request parameters", + "value": { + "code": "invalid_params", + "message": "Invalid request parameters" + } + }, + "logo_too_small": { + "summary": "Logo is too small", + "value": { + "code": "logo_too_small", + "message": "Logo is too small" + } + }, + "logo_too_large": { + "summary": "Logo is too large", + "value": { + "code": "logo_too_large", + "message": "Logo is too large" + } + }, + "logo_not_square": { + "summary": "Logo must be square", + "value": { + "code": "logo_not_square", + "message": "Logo must be square" + } + }, + "logo_file_too_big": { + "summary": "Logo file is too large", + "value": { + "code": "logo_file_too_big", + "message": "Logo file is too large" + } + }, + "logo_invalid_mime": { + "summary": "Logo file type is not supported", + "value": { + "code": "logo_invalid_mime", + "message": "Logo file type is not supported" + } + }, + "logo_invalid_dimensions": { + "summary": "Logo dimensions could not be read", + "value": { + "code": "logo_invalid_dimensions", + "message": "Logo dimensions could not be read" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + } + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "not_found", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "not_found": { + "summary": "Not Found", + "value": { + "code": "not_found", + "message": "Not Found" + } + } + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "merchantName": { + "description": "Updated display name", + "examples": [ + "Acme Store v2" + ], + "type": "string", + "minLength": 2, + "maxLength": 64 + }, + "merchantEmail": { + "description": "Updated contact email", + "examples": [ + "new-billing@acme.store" + ], + "type": "string", + "format": "email", + "pattern": "^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$" + }, + "iconUrl": { + "description": "Updated logo URL (HTTPS only), or null to unset. Logo should be square (1:1, ±5%), 500×500px minimum (1024×1024px recommended, 4096×4096px maximum), JPEG/PNG/WebP, up to 2 MB.", + "examples": [ + "https://example.com/new-logo.png" + ], + "anyOf": [ + { + "type": "string", + "format": "uri" + }, + { + "type": "null" + } + ] + }, + "alwaysCollectData": { + "description": "When true, every checkout forces the buyer to provide compliance data, even repeat buyers whose data is already on file.", + "examples": [ + true + ], + "type": "boolean" + }, + "mcc": { + "description": "Updated ISO 18245 merchant category code, or null to unset.", + "examples": [ + 5812 + ], + "anyOf": [ + { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + { + "type": "null" + } + ] + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "merchantId", + "required": true + } + ], + "security": [ + { + "apiKey": [] + } + ] + }, + "delete": { + "operationId": "MerchantManagement_delete", + "tags": [ + "Merchant Management" + ], + "summary": "Delete a merchant", + "description": "Soft-delete a merchant. The merchant is hidden from listings and can no longer accept new payments. Already-deleted merchants return `deleted: true` so the call is idempotent.", + "responses": { + "200": { + "description": "Merchant deleted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Merchant ID" + }, + "deleted": { + "type": "boolean", + "description": "Whether the merchant was successfully deleted" + } + }, + "required": [ + "id", + "deleted" + ] + }, + "example": { + "id": "mrch_7kBz2qR9xPvLmN4Yw", + "deleted": true + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + } + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "not_found", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "not_found": { + "summary": "Not Found", + "value": { + "code": "not_found", + "message": "Not Found" + } + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "merchantId", + "required": true + } + ], + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/v1/merchants/{merchantId}/settlements": { + "get": { + "operationId": "Settlements_list", + "tags": [ + "Settlements" + ], + "summary": "List settlements", + "description": "List the merchant's configured fiat and crypto settlement destinations.", + "responses": { + "200": { + "description": "Settlements list", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "fiat": { + "type": "array", + "items": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Fiat settlement ID", + "examples": [ + "fiat_Bk4nWp8XmQj2YrTv6" + ] + }, + "status": { + "type": "string", + "description": "Fiat settlement status. Collapses the KYB lifecycle into broad partner-facing states (`pending_kyb`, `action_required`, `active`, `rejected`). See `kybStatus` for the raw KYB state.", + "examples": [ + "active" + ] + }, + "kybStatus": { + "description": "Raw KYB lifecycle state from the verification provider. Distinguishes `collecting_info` (waiting on merchant to start) from `pending` (verification in flight) — both collapse to `pending_kyb` under `status`. `null` when no KYB case is linked.", + "examples": [ + "pending" + ], + "type": [ + "string", + "null" + ] + }, + "kybUrl": { + "description": "URL the merchant must visit to continue verification: Iron's hosted identity flow during KYB, or our hosted token-gated signing page once Iron requires document signatures. `null` when no merchant action is pending.", + "examples": [ + "https://kyb.iron.io/verify/abc123" + ], + "type": [ + "string", + "null" + ] + }, + "bankType": { + "type": "string", + "const": "SEPA", + "description": "Bank account type" + }, + "bankName": { + "type": "string", + "description": "Display name of the bank.", + "examples": [ + "BNP Paribas" + ] + }, + "bankCountry": { + "type": "string", + "description": "ISO 3166-1 alpha-2 country code of the bank.", + "examples": [ + "FR" + ] + }, + "accountHolderName": { + "description": "Account holder name as recorded on the bank account.", + "examples": [ + "Acme Corp SAS" + ], + "type": [ + "string", + "null" + ] + }, + "ibanLast4": { + "type": "string", + "description": "Last 4 characters of the IBAN. The full IBAN is never returned over the API.", + "examples": [ + "0189" + ] + } + }, + "required": [ + "id", + "status", + "kybStatus", + "kybUrl", + "bankType", + "bankName", + "bankCountry", + "accountHolderName", + "ibanLast4" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Fiat settlement ID", + "examples": [ + "fiat_Bk4nWp8XmQj2YrTv6" + ] + }, + "status": { + "type": "string", + "description": "Fiat settlement status. Collapses the KYB lifecycle into broad partner-facing states (`pending_kyb`, `action_required`, `active`, `rejected`). See `kybStatus` for the raw KYB state.", + "examples": [ + "active" + ] + }, + "kybStatus": { + "description": "Raw KYB lifecycle state from the verification provider. Distinguishes `collecting_info` (waiting on merchant to start) from `pending` (verification in flight) — both collapse to `pending_kyb` under `status`. `null` when no KYB case is linked.", + "examples": [ + "pending" + ], + "type": [ + "string", + "null" + ] + }, + "kybUrl": { + "description": "URL the merchant must visit to continue verification: Iron's hosted identity flow during KYB, or our hosted token-gated signing page once Iron requires document signatures. `null` when no merchant action is pending.", + "examples": [ + "https://kyb.iron.io/verify/abc123" + ], + "type": [ + "string", + "null" + ] + }, + "bankType": { + "type": "string", + "const": "ACH", + "description": "Bank account type" + }, + "bankName": { + "type": "string", + "description": "Display name of the bank.", + "examples": [ + "Chase" + ] + }, + "bankCountry": { + "type": "string", + "description": "ISO 3166-1 alpha-2 country code of the bank.", + "examples": [ + "US" + ] + }, + "accountHolderName": { + "description": "Account holder name as recorded on the bank account.", + "examples": [ + "Acme Corp Inc" + ], + "type": [ + "string", + "null" + ] + }, + "routingNumber": { + "type": "string", + "description": "ABA routing number. Returned in full — it identifies the bank, not the account.", + "examples": [ + "021000021" + ] + }, + "accountLast4": { + "type": "string", + "description": "Last 4 characters of the bank account number. The full account number is never returned over the API.", + "examples": [ + "6789" + ] + } + }, + "required": [ + "id", + "status", + "kybStatus", + "kybUrl", + "bankType", + "bankName", + "bankCountry", + "accountHolderName", + "routingNumber", + "accountLast4" + ] + }, + { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Fiat settlement ID", + "examples": [ + "fiat_Bk4nWp8XmQj2YrTv6" + ] + }, + "status": { + "type": "string", + "description": "Fiat settlement status. Collapses the KYB lifecycle into broad partner-facing states (`pending_kyb`, `action_required`, `active`, `rejected`). See `kybStatus` for the raw KYB state.", + "examples": [ + "active" + ] + }, + "kybStatus": { + "description": "Raw KYB lifecycle state from the verification provider. Distinguishes `collecting_info` (waiting on merchant to start) from `pending` (verification in flight) — both collapse to `pending_kyb` under `status`. `null` when no KYB case is linked.", + "examples": [ + "pending" + ], + "type": [ + "string", + "null" + ] + }, + "kybUrl": { + "description": "URL the merchant must visit to continue verification: Iron's hosted identity flow during KYB, or our hosted token-gated signing page once Iron requires document signatures. `null` when no merchant action is pending.", + "examples": [ + "https://kyb.iron.io/verify/abc123" + ], + "type": [ + "string", + "null" + ] + }, + "bankType": { + "type": "string", + "const": "unknown", + "description": "Bank account type. `unknown` when no bank account is linked yet." + } + }, + "required": [ + "id", + "status", + "kybStatus", + "kybUrl", + "bankType" + ] + } + ] + }, + "description": "Fiat settlement configurations attached to the merchant." + }, + "crypto": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Crypto settlement ID", + "examples": [ + "crypto_Xk7nWp8XmQj2YrTv6" + ] + }, + "asset": { + "type": "string", + "description": "[CAIP-19](https://chainagnostic.org/CAIPs/caip-19) asset identifier", + "examples": [ + "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" + ] + }, + "destination": { + "type": "string", + "description": "[CAIP-10](https://chainagnostic.org/CAIPs/caip-10) destination wallet", + "examples": [ + "eip155:8453:0x1234567890abcdef1234567890abcdef12345678" + ] + }, + "networkName": { + "description": "Display name of the settlement network, or null if the chain is not recognized", + "examples": [ + "Base" + ], + "type": [ + "string", + "null" + ] + }, + "networkLogoUrl": { + "description": "Logo URL for the settlement network (an admin-uploaded logo when set, otherwise the assets-registry fallback), or null if the chain is not recognized", + "examples": [ + "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "asset", + "destination", + "networkName", + "networkLogoUrl" + ] + }, + "description": "Crypto settlement destinations attached to the merchant." + } + }, + "required": [ + "fiat", + "crypto" + ] + }, + "example": { + "fiat": [ + { + "id": "fiat_Bk4nWp8XmQj2YrTv6", + "status": "active", + "kybStatus": "approved", + "kybUrl": null, + "bankType": "ACH", + "bankName": "Chase", + "bankCountry": "US", + "accountHolderName": "Acme Corp Inc", + "routingNumber": "021000021", + "accountLast4": "6789" + } + ], + "crypto": [ + { + "id": "crypto_Xk7nWp8XmQj2YrTv6", + "asset": "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", + "destination": "eip155:8453:0x1234567890abcdef1234567890abcdef12345678", + "networkName": "Base", + "networkLogoUrl": "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + } + ] + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + } + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "not_found", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "not_found": { + "summary": "Not Found", + "value": { + "code": "not_found", + "message": "Not Found" + } + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "merchantId", + "required": true + } + ], + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/v1/merchants/{merchantId}/settlements/tokens": { + "get": { + "operationId": "Settlements_listAvailableTokens", + "tags": [ + "Settlements" + ], + "summary": "List tokens available for settlement", + "description": "List the tokens this merchant may currently settle in, freshly resolved per request: every asset returned passes the `token_not_enabled` gate on the crypto settlement write endpoints. Derive settlement requests from this list rather than from a platform-wide catalogue. Tokens on a chain where payments are not rolled out for this merchant yet are left out, and the create endpoint rejects them with `token_not_enabled`. This part can lag a rollout change by up to a minute. An asset that already has a settlement pair, in any status, still returns `settlement_asset_conflict` on create. `internal_error` means enablement could not be resolved — retry shortly.", + "responses": { + "200": { + "description": "Tokens available for settlement", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "tokens": { + "type": "array", + "items": { + "type": "object", + "properties": { + "asset": { + "type": "string", + "description": "[CAIP-19](https://chainagnostic.org/CAIPs/caip-19) asset identifier", + "examples": [ + "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" + ] + }, + "caip2ChainId": { + "type": "string", + "description": "[CAIP-2](https://chainagnostic.org/CAIPs/caip-2) chain the token settles on", + "examples": [ + "eip155:8453" + ] + }, + "symbol": { + "type": "string", + "description": "Token symbol", + "examples": [ + "USDC" + ] + }, + "name": { + "type": "string", + "description": "Token display name", + "examples": [ + "USD Coin" + ] + }, + "decimals": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "Token decimals", + "examples": [ + 6 + ] + }, + "logoUrl": { + "description": "Token logo URL, or null when none is registered", + "examples": [ + "https://api.walletconnect.com/assets/v1/image/token/USDC/md" + ], + "type": [ + "string", + "null" + ] + }, + "networkName": { + "description": "Display name of the settlement network, or null if the chain is not recognized", + "examples": [ + "Base" + ], + "type": [ + "string", + "null" + ] + }, + "networkLogoUrl": { + "description": "Logo URL for the settlement network (an admin-uploaded logo when set, otherwise the assets-registry fallback), or null if the chain is not recognized", + "examples": [ + "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "asset", + "caip2ChainId", + "symbol", + "name", + "decimals", + "logoUrl", + "networkName", + "networkLogoUrl" + ] + }, + "description": "Tokens the merchant may settle in. Empty when no tokens are currently enabled for this merchant." + } + }, + "required": [ + "tokens" + ] + }, + "example": { + "tokens": [ + { + "asset": "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", + "caip2ChainId": "eip155:8453", + "symbol": "USDC", + "name": "USD Coin", + "decimals": 6, + "logoUrl": "https://api.walletconnect.com/assets/v1/image/token/USDC/md", + "networkName": "Base", + "networkLogoUrl": "https://api.walletconnect.com/assets/v1/image/network/eip155%3A8453/md" + } + ] + } + } + } + }, + "400": { + "description": "Settlement management is not available for test partners", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "invalid_params", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "invalid_params": { + "summary": "Invalid request parameters", + "value": { + "code": "invalid_params", + "message": "Invalid request parameters" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + } + } + } + } + }, + "404": { + "description": "Merchant not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "not_found", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "not_found": { + "summary": "Not Found", + "value": { + "code": "not_found", + "message": "Not Found" + } + } + } + } + } + }, + "500": { + "description": "Token enablement could not be resolved", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "internal_error", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "internal_error": { + "summary": "Internal Server Error", + "value": { + "code": "internal_error", + "message": "Internal Server Error" + } + } + } + } + } + } + }, + "parameters": [ + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "merchantId", + "required": true + } + ], + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/v1/merchants/{merchantId}/settlements/crypto": { + "post": { + "operationId": "CryptoSettlement_create", + "tags": [ + "Crypto Settlement" + ], + "summary": "Create crypto settlements", + "description": "Register one or more crypto settlement destinations for the merchant. Each entry pairs a [CAIP-19](https://chainagnostic.org/CAIPs/caip-19) `asset` with a [CAIP-10](https://chainagnostic.org/CAIPs/caip-10) `destination` wallet on the same chain. Each `(merchant, asset)` pair must be unique — registering the same asset twice returns `settlement_asset_conflict`. Crypto and fiat settlements can coexist on the same merchant. Assets must be enabled for the merchant; if any is not, the whole request is rejected with `token_not_enabled` naming every offending asset. An asset on a chain where payments are not rolled out for this merchant yet is rejected the same way. Stellar destinations must be ready to receive their asset — the account must exist on the ledger and hold a trustline for the asset's issuer — otherwise the request is rejected with `settlement_destination_not_ready`.", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "required": true, + "description": "Unique key to ensure idempotent request processing. Max 255 characters.", + "schema": { + "type": "string", + "maxLength": 255 + } + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "merchantId", + "required": true + } + ], + "responses": { + "201": { + "description": "Crypto settlements created", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "settlements": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Crypto settlement ID", + "examples": [ + "crypto_Xk7nWp8XmQj2YrTv6" + ] + }, + "asset": { + "type": "string", + "minLength": 1, + "maxLength": 256, + "pattern": "^[-a-zA-Z0-9]{3,8}:[-a-zA-Z0-9]{1,32}\\/[-a-zA-Z0-9]{3,8}:[-a-zA-Z0-9]{1,128}$", + "description": "[CAIP-19](https://chainagnostic.org/CAIPs/caip-19) asset identifier for the token to settle in. Format: `:/:`. For example, USDC on Base is `eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`.", + "examples": [ + "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" + ] + }, + "destination": { + "type": "string", + "minLength": 1, + "maxLength": 256, + "pattern": "^[-a-zA-Z0-9]{3,8}:[-a-zA-Z0-9]{1,32}:[-a-zA-Z0-9]{1,128}$", + "description": "[CAIP-10](https://chainagnostic.org/CAIPs/caip-10) account identifier for the wallet that should receive the settled funds. Format: `::
`. The chain (`:`) must match the chain of the corresponding `asset`.", + "examples": [ + "eip155:8453:0x1234567890abcdef1234567890abcdef12345678" + ] + } + }, + "required": [ + "id", + "asset", + "destination" + ] + } + } + }, + "required": [ + "settlements" + ] + }, + "example": { + "settlements": [ + { + "id": "crypto_Xk7nWp8XmQj2YrTv6", + "asset": "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", + "destination": "eip155:8453:0x1234567890abcdef1234567890abcdef12345678" + } + ] + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "params_validation", + "invalid_params", + "missing_idempotency_key", + "token_not_enabled" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "description": "Field-level validation issues (present on validation errors)", + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "field", + "message" + ] + } + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "params_validation": { + "summary": "Validation failed", + "value": { + "code": "params_validation", + "message": "Validation failed" + } + }, + "invalid_params": { + "summary": "Invalid request parameters", + "value": { + "code": "invalid_params", + "message": "Invalid request parameters" + } + }, + "missing_idempotency_key": { + "summary": "Missing Idempotency-Key header", + "value": { + "code": "missing_idempotency_key", + "message": "Missing Idempotency-Key header" + } + }, + "token_not_enabled": { + "summary": "This token is not enabled for this merchant yet", + "value": { + "code": "token_not_enabled", + "message": "This token is not enabled for this merchant yet" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + } + } + } + } + }, + "404": { + "description": "Merchant not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "not_found", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "not_found": { + "summary": "Not Found", + "value": { + "code": "not_found", + "message": "Not Found" + } + } + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "idempotency_conflict", + "settlement_asset_conflict", + "settlement_destination_not_ready" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "idempotency_conflict": { + "summary": "Idempotency key conflict: same key was used with a different request body", + "value": { + "code": "idempotency_conflict", + "message": "Idempotency key conflict: same key was used with a different request body" + } + }, + "settlement_asset_conflict": { + "summary": "A settlement already exists for this asset", + "value": { + "code": "settlement_asset_conflict", + "message": "A settlement already exists for this asset" + } + }, + "settlement_destination_not_ready": { + "summary": "The settlement destination is not ready to receive this asset on its network", + "value": { + "code": "settlement_destination_not_ready", + "message": "The settlement destination is not ready to receive this asset on its network" + } + } + } + } + } + }, + "502": { + "description": "Stellar destination check or transit account provisioning failed; retry shortly", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "bad_gateway", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "bad_gateway": { + "summary": "Bad Gateway", + "value": { + "code": "bad_gateway", + "message": "Bad Gateway" + } + } + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "settlements": { + "minItems": 1, + "maxItems": 50, + "type": "array", + "items": { + "type": "object", + "properties": { + "asset": { + "type": "string", + "minLength": 1, + "maxLength": 256, + "pattern": "^[-a-zA-Z0-9]{3,8}:[-a-zA-Z0-9]{1,32}\\/[-a-zA-Z0-9]{3,8}:[-a-zA-Z0-9]{1,128}$", + "description": "[CAIP-19](https://chainagnostic.org/CAIPs/caip-19) asset identifier for the token to settle in. Format: `:/:`. For example, USDC on Base is `eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`.", + "examples": [ + "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" + ] + }, + "destination": { + "type": "string", + "minLength": 1, + "maxLength": 256, + "pattern": "^[-a-zA-Z0-9]{3,8}:[-a-zA-Z0-9]{1,32}:[-a-zA-Z0-9]{1,128}$", + "description": "[CAIP-10](https://chainagnostic.org/CAIPs/caip-10) account identifier for the wallet that should receive the settled funds. Format: `::
`. The chain (`:`) must match the chain of the corresponding `asset`.", + "examples": [ + "eip155:8453:0x1234567890abcdef1234567890abcdef12345678" + ] + } + }, + "required": [ + "asset", + "destination" + ] + }, + "description": "List of asset/destination pairs to register. Up to 50 entries per request." + } + }, + "required": [ + "settlements" + ], + "examples": [ + { + "settlements": [ + { + "asset": "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", + "destination": "eip155:8453:0x1234567890abcdef1234567890abcdef12345678" + }, + { + "asset": "eip155:1/erc20:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48", + "destination": "eip155:1:0x1234567890abcdef1234567890abcdef12345678" + } + ] + } + ] + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/v1/merchants/{merchantId}/settlements/crypto/{id}": { + "put": { + "operationId": "CryptoSettlement_update", + "tags": [ + "Crypto Settlement" + ], + "summary": "Update a crypto settlement destination", + "description": "Change the destination wallet for an existing crypto settlement. The new `destination` must be a [CAIP-10](https://chainagnostic.org/CAIPs/caip-10) account on the same chain as the settlement's `asset`.", + "responses": { + "200": { + "description": "Settlement updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Crypto settlement ID", + "examples": [ + "crypto_Xk7nWp8XmQj2YrTv6" + ] + }, + "asset": { + "type": "string", + "minLength": 1, + "maxLength": 256, + "pattern": "^[-a-zA-Z0-9]{3,8}:[-a-zA-Z0-9]{1,32}\\/[-a-zA-Z0-9]{3,8}:[-a-zA-Z0-9]{1,128}$", + "description": "[CAIP-19](https://chainagnostic.org/CAIPs/caip-19) asset identifier for the token to settle in. Format: `:/:`. For example, USDC on Base is `eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913`.", + "examples": [ + "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913" + ] + }, + "destination": { + "type": "string", + "minLength": 1, + "maxLength": 256, + "pattern": "^[-a-zA-Z0-9]{3,8}:[-a-zA-Z0-9]{1,32}:[-a-zA-Z0-9]{1,128}$", + "description": "[CAIP-10](https://chainagnostic.org/CAIPs/caip-10) account identifier for the wallet that should receive the settled funds. Format: `::
`. The chain (`:`) must match the chain of the corresponding `asset`.", + "examples": [ + "eip155:8453:0x1234567890abcdef1234567890abcdef12345678" + ] + } + }, + "required": [ + "id", + "asset", + "destination" + ] + }, + "example": { + "id": "crypto_Xk7nWp8XmQj2YrTv6", + "asset": "eip155:8453/erc20:0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913", + "destination": "eip155:8453:0x1234567890abcdef1234567890abcdef12345678" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "params_validation", + "invalid_params" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "description": "Field-level validation issues (present on validation errors)", + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "field", + "message" + ] + } + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "params_validation": { + "summary": "Validation failed", + "value": { + "code": "params_validation", + "message": "Validation failed" + } + }, + "invalid_params": { + "summary": "Invalid request parameters", + "value": { + "code": "invalid_params", + "message": "Invalid request parameters" + } + } + } + } + } + }, + "404": { + "description": "Settlement not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "not_found", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "not_found": { + "summary": "Not Found", + "value": { + "code": "not_found", + "message": "Not Found" + } + } + } + } + } + }, + "409": { + "description": "Destination not ready to receive the asset", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "settlement_destination_not_ready", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "settlement_destination_not_ready": { + "summary": "The settlement destination is not ready to receive this asset on its network", + "value": { + "code": "settlement_destination_not_ready", + "message": "The settlement destination is not ready to receive this asset on its network" + } + } + } + } + } + }, + "502": { + "description": "Stellar destination check or transit account provisioning failed; retry shortly", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "bad_gateway", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "bad_gateway": { + "summary": "Bad Gateway", + "value": { + "code": "bad_gateway", + "message": "Bad Gateway" + } + } + } + } + } + } + }, + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 256, + "examples": [ + "crypto_Xk7nWp8XmQj2YrTv6" + ] + }, + "required": true, + "description": "Crypto settlement ID" + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "merchantId", + "required": true + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "destination": { + "type": "string", + "minLength": 1, + "maxLength": 256, + "pattern": "^[-a-zA-Z0-9]{3,8}:[-a-zA-Z0-9]{1,32}:[-a-zA-Z0-9]{1,128}$", + "description": "[CAIP-10](https://chainagnostic.org/CAIPs/caip-10) account identifier for the wallet that should receive the settled funds. Format: `::
`. The chain (`:`) must match the chain of the corresponding `asset`.", + "examples": [ + "eip155:8453:0x1234567890abcdef1234567890abcdef12345678" + ] + } + }, + "required": [ + "destination" + ], + "examples": [ + { + "destination": "eip155:8453:0x1234567890abcdef1234567890abcdef12345678" + } + ] + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "delete": { + "operationId": "CryptoSettlement_delete", + "tags": [ + "Crypto Settlement" + ], + "summary": "Delete a crypto settlement", + "description": "Remove a crypto settlement. Future payments in the deleted asset will no longer be auto-settled.", + "responses": { + "200": { + "description": "Settlement deleted", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Crypto settlement ID" + }, + "deleted": { + "type": "boolean", + "description": "Whether the settlement was successfully deleted" + } + }, + "required": [ + "id", + "deleted" + ] + }, + "example": { + "id": "crypto_Xk7nWp8XmQj2YrTv6", + "deleted": true + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "invalid_params", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "invalid_params": { + "summary": "Invalid request parameters", + "value": { + "code": "invalid_params", + "message": "Invalid request parameters" + } + } + } + } + } + }, + "404": { + "description": "Settlement not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "not_found", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "not_found": { + "summary": "Not Found", + "value": { + "code": "not_found", + "message": "Not Found" + } + } + } + } + } + } + }, + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 256, + "examples": [ + "crypto_Xk7nWp8XmQj2YrTv6" + ] + }, + "required": true, + "description": "Crypto settlement ID" + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "merchantId", + "required": true + } + ], + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/v1/merchants/{merchantId}/settlements/fiat": { + "post": { + "operationId": "FiatSettlement_create", + "tags": [ + "Fiat Settlement" + ], + "summary": "Create a fiat settlement", + "description": "Register a fiat settlement route for the merchant and kick off KYB verification. The response includes a `kybUrl` that the partner must surface to their merchant — fiat routing is only fully activated once KYB is approved. Currency is determined by `bankType`: SEPA settles in EUR, ACH in USD. ACH additionally requires a US business address and a valid US state code. Re-submitting with the same `Idempotency-Key` returns the original result; submitting a different payload under the same key returns `idempotency_conflict`. Attempting to register a bank account that already exists for the merchant returns `settlement_conflict` — delete the existing settlement first or update it via PATCH.", + "parameters": [ + { + "name": "Idempotency-Key", + "in": "header", + "required": true, + "description": "Unique key to ensure idempotent request processing. Max 255 characters.", + "schema": { + "type": "string", + "maxLength": 255 + } + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "merchantId", + "required": true + } + ], + "responses": { + "201": { + "description": "Fiat settlement created. The merchant must complete KYB at `kybUrl` to activate routing.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Fiat settlement ID. Stable identifier — safe to persist on the partner side.", + "examples": [ + "fiat_Bk4nWp8XmQj2YrTv6" + ] + }, + "status": { + "type": "string", + "description": "Fiat settlement status. `pending_kyb` immediately after creation — the merchant must complete KYB at `kybUrl` before payments can route to this account. Transitions to `active` on KYB approval; `rejected` if KYB fails.", + "examples": [ + "pending_kyb" + ] + }, + "kybUrl": { + "description": "URL the merchant must visit to complete KYB verification. Returned at creation; treat as short-lived (hours to days). `null` only when no merchant action is pending.", + "examples": [ + "https://kyb.iron.io/verify/abc123" + ], + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id", + "status", + "kybUrl" + ] + }, + "example": { + "id": "fiat_Bk4nWp8XmQj2YrTv6", + "status": "pending_kyb", + "kybUrl": "https://kyb.iron.io/verify/abc123" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "params_validation", + "invalid_params", + "missing_idempotency_key" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "description": "Field-level validation issues (present on validation errors)", + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "field", + "message" + ] + } + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "params_validation": { + "summary": "Validation failed", + "value": { + "code": "params_validation", + "message": "Validation failed" + } + }, + "invalid_params": { + "summary": "Invalid request parameters", + "value": { + "code": "invalid_params", + "message": "Invalid request parameters" + } + }, + "missing_idempotency_key": { + "summary": "Missing Idempotency-Key header", + "value": { + "code": "missing_idempotency_key", + "message": "Missing Idempotency-Key header" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + } + } + } + } + }, + "404": { + "description": "Merchant not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "not_found", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "not_found": { + "summary": "Not Found", + "value": { + "code": "not_found", + "message": "Not Found" + } + } + } + } + } + }, + "409": { + "description": "Conflict", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "idempotency_conflict", + "settlement_conflict" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "idempotency_conflict": { + "summary": "Idempotency key conflict: same key was used with a different request body", + "value": { + "code": "idempotency_conflict", + "message": "Idempotency key conflict: same key was used with a different request body" + } + }, + "settlement_conflict": { + "summary": "A settlement with conflicting details already exists for this merchant", + "value": { + "code": "settlement_conflict", + "message": "A settlement with conflicting details already exists for this merchant" + } + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "internal_error", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "internal_error": { + "summary": "Internal Server Error", + "value": { + "code": "internal_error", + "message": "Internal Server Error" + } + } + } + } + } + } + }, + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "bankDetails": { + "oneOf": [ + { + "type": "object", + "properties": { + "accountHolderName": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "Account holder name as it appears on the bank account. Usually matches the legal business name.", + "examples": [ + "Acme Corp Inc" + ] + }, + "bankName": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "Display name of the bank that holds the account.", + "examples": [ + "Chase" + ] + }, + "bankCountry": { + "description": "ISO 3166-1 alpha-2 country code of the bank.", + "type": "string", + "minLength": 2, + "maxLength": 2 + }, + "bankType": { + "type": "string", + "const": "SEPA", + "description": "Bank account type. `SEPA` settles in EUR via the SEPA network." + }, + "iban": { + "type": "string", + "minLength": 15, + "maxLength": 34, + "pattern": "^[A-Z]{2}[0-9]{2}[A-Z0-9]+$", + "description": "International Bank Account Number (ISO 13616). Uppercase alphanumeric with no spaces. Validated for format and mod-97 checksum.", + "examples": [ + "FR1420041010050500013M02606" + ] + } + }, + "required": [ + "accountHolderName", + "bankName", + "bankCountry", + "bankType", + "iban" + ], + "description": "SEPA bank account details. Settles in EUR." + }, + { + "type": "object", + "properties": { + "accountHolderName": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "Account holder name as it appears on the bank account. Usually matches the legal business name.", + "examples": [ + "Acme Corp Inc" + ] + }, + "bankName": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "Display name of the bank that holds the account.", + "examples": [ + "Chase" + ] + }, + "bankCountry": { + "description": "ISO 3166-1 alpha-2 country code of the bank.", + "type": "string", + "minLength": 2, + "maxLength": 2 + }, + "bankType": { + "type": "string", + "const": "ACH", + "description": "Bank account type. `ACH` settles in USD via the US ACH network." + }, + "accountNumber": { + "type": "string", + "minLength": 1, + "pattern": "^[0-9A-Z]{4,17}$", + "description": "US bank account number. 4–17 uppercase letters or digits.", + "examples": [ + "000123456789" + ] + }, + "routingNumber": { + "type": "string", + "minLength": 1, + "pattern": "^[0-9]{9}$", + "description": "9-digit ABA routing number identifying the US bank. Validated for ABA checksum.", + "examples": [ + "021000021" + ] + }, + "phoneNumber": { + "type": "string", + "pattern": "^\\+1[2-9]\\d{2}[2-9]\\d{6}$", + "description": "Business phone number in E.164 format. Required by Iron for ACH onboarding compliance.", + "examples": [ + "+14155551234" + ] + } + }, + "required": [ + "accountHolderName", + "bankName", + "bankCountry", + "bankType", + "accountNumber", + "routingNumber", + "phoneNumber" + ], + "description": "ACH bank account details. Settles in USD. Requires a US business address." + } + ], + "description": "Bank account that will receive fiat settlements. `bankType` discriminates the schema: SEPA requires `iban`; ACH requires `accountNumber`, `routingNumber`, and `phoneNumber`. Currency is implicit — SEPA settles in EUR, ACH in USD." + }, + "businessDetails": { + "type": "object", + "properties": { + "businessName": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "Legal name of the business that operates the merchant account.", + "examples": [ + "Acme Corp Inc" + ] + }, + "address": { + "type": "object", + "properties": { + "line1": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "Street address line 1.", + "examples": [ + "350 Fifth Avenue" + ] + }, + "line2": { + "description": "Optional second address line (suite, apartment, building, etc.). Empty strings are treated as omitted.", + "type": "string", + "maxLength": 255 + }, + "city": { + "type": "string", + "minLength": 2, + "maxLength": 255, + "description": "City or locality.", + "examples": [ + "New York" + ] + }, + "state": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "State, province, or region. For ACH this must be a valid US state or territory 2-letter code (e.g. `NY`).", + "examples": [ + "NY" + ] + }, + "country": { + "description": "ISO 3166-1 alpha-2 country code of the business address. Must be `US` when `bankType` is `ACH`.", + "type": "string", + "minLength": 2, + "maxLength": 2 + }, + "zip": { + "type": "string", + "minLength": 1, + "maxLength": 20, + "description": "Postal or ZIP code.", + "examples": [ + "10118" + ] + } + }, + "required": [ + "line1", + "city", + "state", + "country", + "zip" + ], + "description": "Registered business address used for KYB verification." + } + }, + "required": [ + "businessName", + "address" + ], + "description": "Business identity details collected for KYB verification." + } + }, + "required": [ + "bankDetails", + "businessDetails" + ] + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + } + }, + "/v1/merchants/{merchantId}/settlements/fiat/{id}": { + "patch": { + "operationId": "FiatSettlement_update", + "tags": [ + "Fiat Settlement" + ], + "summary": "Update a fiat settlement", + "description": "Partially update the bank or business details on an existing fiat settlement. At least one of `bankDetails` or `businessDetails` must be provided. Only cosmetic fields are mutable here — `iban`, `accountNumber`, and `routingNumber` cannot be changed in place; delete the settlement and re-create it to switch accounts. Iron's `customers.update` API only accepts `email` and `external_id`, so edits to the bank/business name, address, or account-holder name do not flow back to Iron and the merchant does not need to re-verify.", + "responses": { + "200": { + "description": "Settlement updated.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Fiat settlement ID that was updated.", + "examples": [ + "fiat_Bk4nWp8XmQj2YrTv6" + ] + } + }, + "required": [ + "id" + ] + }, + "example": { + "id": "fiat_Bk4nWp8XmQj2YrTv6" + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "params_validation", + "invalid_params" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + }, + "issues": { + "description": "Field-level validation issues (present on validation errors)", + "type": "array", + "items": { + "type": "object", + "properties": { + "field": { + "type": "string" + }, + "message": { + "type": "string" + } + }, + "required": [ + "field", + "message" + ] + } + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "params_validation": { + "summary": "Validation failed", + "value": { + "code": "params_validation", + "message": "Validation failed" + } + }, + "invalid_params": { + "summary": "Invalid request parameters", + "value": { + "code": "invalid_params", + "message": "Invalid request parameters" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + } + } + } + } + }, + "404": { + "description": "Settlement not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "not_found", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "not_found": { + "summary": "Not Found", + "value": { + "code": "not_found", + "message": "Not Found" + } + } + } + } + } + }, + "409": { + "description": "Settlement is managed through a partner KYB case attachment", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "settlement_conflict", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "settlement_conflict": { + "summary": "A settlement with conflicting details already exists for this merchant", + "value": { + "code": "settlement_conflict", + "message": "A settlement with conflicting details already exists for this merchant" + } + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "internal_error", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "internal_error": { + "summary": "Internal Server Error", + "value": { + "code": "internal_error", + "message": "Internal Server Error" + } + } + } + } + } + } + }, + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 256, + "examples": [ + "fiat_Bk4nWp8XmQj2YrTv6" + ] + }, + "required": true, + "description": "Fiat settlement ID returned at creation time." + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "merchantId", + "required": true + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "bankDetails": { + "description": "Cosmetic bank-account updates. Account/routing numbers and IBAN cannot be changed in place — delete the settlement and re-create it to switch accounts.", + "type": "object", + "properties": { + "accountHolderName": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "Account holder name as it appears on the bank account. Usually matches the legal business name.", + "examples": [ + "Acme Corp Inc" + ] + }, + "bankName": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "Display name of the bank that holds the account.", + "examples": [ + "Chase" + ] + }, + "bankCountry": { + "description": "ISO 3166-1 alpha-2 country code of the bank.", + "type": "string", + "minLength": 2, + "maxLength": 2 + } + } + }, + "businessDetails": { + "description": "Business identity updates. Iron does not re-verify on cosmetic edits — KYB status is preserved.", + "type": "object", + "properties": { + "businessName": { + "description": "Legal name of the business.", + "examples": [ + "Acme Corp Inc" + ], + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "address": { + "description": "Subset of business address fields to update. Partial updates are merged with the existing record.", + "type": "object", + "properties": { + "line1": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "Street address line 1.", + "examples": [ + "350 Fifth Avenue" + ] + }, + "line2": { + "description": "Optional second address line (suite, apartment, building, etc.). Empty strings are treated as omitted.", + "type": "string", + "maxLength": 255 + }, + "city": { + "type": "string", + "minLength": 2, + "maxLength": 255, + "description": "City or locality.", + "examples": [ + "New York" + ] + }, + "state": { + "type": "string", + "minLength": 1, + "maxLength": 255, + "description": "State, province, or region. For ACH this must be a valid US state or territory 2-letter code (e.g. `NY`).", + "examples": [ + "NY" + ] + }, + "country": { + "description": "ISO 3166-1 alpha-2 country code of the business address. Must be `US` when `bankType` is `ACH`.", + "type": "string", + "minLength": 2, + "maxLength": 2 + }, + "zip": { + "type": "string", + "minLength": 1, + "maxLength": 20, + "description": "Postal or ZIP code.", + "examples": [ + "10118" + ] + } + } + } + } + } + } + } + } + } + }, + "security": [ + { + "apiKey": [] + } + ] + }, + "delete": { + "operationId": "FiatSettlement_delete", + "tags": [ + "Fiat Settlement" + ], + "summary": "Delete a fiat settlement", + "description": "Soft-delete a fiat settlement route. Future payments will no longer auto-settle to this fiat account. MX notifies the Core API, which handles async deactivation of the underlying autoramps.", + "responses": { + "200": { + "description": "Settlement deleted.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Fiat settlement ID that was deleted.", + "examples": [ + "fiat_Bk4nWp8XmQj2YrTv6" + ] + }, + "deleted": { + "type": "boolean", + "description": "Always `true` on success. Future payments will no longer route to this fiat account.", + "examples": [ + true + ] + } + }, + "required": [ + "id", + "deleted" + ] + }, + "example": { + "id": "fiat_Bk4nWp8XmQj2YrTv6", + "deleted": true + } + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "invalid_params", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "invalid_params": { + "summary": "Invalid request parameters", + "value": { + "code": "invalid_params", + "message": "Invalid request parameters" + } + } + } + } + } + }, + "401": { + "description": "Unauthorized", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "enum": [ + "missing_api_key", + "invalid_api_key" + ], + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "missing_api_key": { + "summary": "Missing API key", + "value": { + "code": "missing_api_key", + "message": "Missing API key" + } + }, + "invalid_api_key": { + "summary": "Invalid API key", + "value": { + "code": "invalid_api_key", + "message": "Invalid API key" + } + } + } + } + } + }, + "404": { + "description": "Settlement not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "not_found", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "not_found": { + "summary": "Not Found", + "value": { + "code": "not_found", + "message": "Not Found" + } + } + } + } + } + }, + "409": { + "description": "Settlement is managed through a partner KYB case attachment", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "settlement_conflict", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "settlement_conflict": { + "summary": "A settlement with conflicting details already exists for this merchant", + "value": { + "code": "settlement_conflict", + "message": "A settlement with conflicting details already exists for this merchant" + } + } + } + } + } + }, + "500": { + "description": "Internal server error", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "type": "string", + "const": "internal_error", + "description": "Machine-readable error code" + }, + "details": { + "description": "Additional structured error details", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": {} + } + }, + "required": [ + "message", + "code" + ] + }, + "examples": { + "internal_error": { + "summary": "Internal Server Error", + "value": { + "code": "internal_error", + "message": "Internal Server Error" + } + } + } + } + } + } + }, + "parameters": [ + { + "in": "path", + "name": "id", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 256, + "examples": [ + "fiat_Bk4nWp8XmQj2YrTv6" + ] + }, + "required": true, + "description": "Fiat settlement ID returned at creation time." + }, + { + "schema": { + "type": "string" + }, + "in": "path", + "name": "merchantId", + "required": true + } + ], + "security": [ + { + "apiKey": [] + } + ] + } + } + }, + "tags": [ + { + "name": "Gateway" + }, + { + "name": "Payments" + }, + { + "name": "Webhooks" + }, + { + "name": "Refunds" + }, + { + "name": "Merchant Management" + }, + { + "name": "Settlements" + }, + { + "name": "Crypto Settlement" + }, + { + "name": "Fiat Settlement" + } + ], + "components": { + "schemas": { + "Action": { + "oneOf": [ + { + "type": "object", + "description": "An action that requires a wallet RPC call to complete", + "required": [ + "data", + "type" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/WalletRpcAction", + "description": "An action that requires a wallet RPC call to complete" + }, + "type": { + "type": "string", + "enum": [ + "walletRpc" + ] + } + } + }, + { + "type": "object", + "description": "An action that requires building to complete", + "required": [ + "data", + "type" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/Build", + "description": "An action that requires building to complete" + }, + "type": { + "type": "string", + "enum": [ + "build" + ] + } + } + }, + { + "type": "object", + "description": "Send an amount to an account. The whole action, with no transaction to\nbuild or sign.", + "required": [ + "data", + "type" + ], + "properties": { + "data": { + "$ref": "#/components/schemas/TransferAction", + "description": "Send an amount to an account. The whole action, with no transaction to\nbuild or sign." + }, + "type": { + "type": "string", + "enum": [ + "transfer" + ] + } + } + } + ], + "example": { + "data": { + "chain_id": "eip155:8453", + "method": "eth_signTypedData_v4", + "params": [ + "0x0000000000000000000000000000000000000000", + "{\"domain\":{\"name\":\"USD Coin\",\"version\":\"2\",\"chainId\":\"0x2105\",\"verifyingContract\":\"0x0000000000000000000000000000000000000000\"},\"types\":{\"EIP712Domain\":[{\"type\":\"string\",\"name\":\"name\"},{\"type\":\"string\",\"name\":\"version\"},{\"type\":\"uint256\",\"name\":\"chainId\"},{\"type\":\"address\",\"name\":\"verifyingContract\"}],\"ReceiveWithAuthorization\":[{\"type\":\"address\",\"name\":\"from\"},{\"type\":\"address\",\"name\":\"to\"},{\"type\":\"uint256\",\"name\":\"value\"},{\"type\":\"uint256\",\"name\":\"validAfter\"},{\"type\":\"uint256\",\"name\":\"validBefore\"},{\"type\":\"bytes32\",\"name\":\"nonce\"}]},\"primaryType\":\"ReceiveWithAuthorization\",\"message\":{\"from\":\"0x0000000000000000000000000000000000000000\",\"nonce\":\"0x0000000000000000000000000000000000000000000000000000000000000000\",\"to\":\"0x0000000000000000000000000000000000000000\",\"validAfter\":\"0x0\",\"validBefore\":\"0x0\",\"value\":\"0x0\"}}" + ] + }, + "type": "walletRpc" + } + }, + "Amount": { + "type": "object", + "required": [ + "unit", + "value", + "display" + ], + "properties": { + "display": { + "$ref": "#/components/schemas/AmountDisplay", + "description": "Display information for the amount" + }, + "unit": { + "type": "string", + "description": "Currency unit, prefixed with either \"iso4217/\" or \"caip19/\"", + "example": "iso4217/USD" + }, + "value": { + "type": "string", + "description": "Amount value, in the currency unit's minor units" + } + }, + "example": { + "display": { + "assetName": "USD Coin", "assetSymbol": "USDC", "decimals": 6, "iconUrl": "https://assets.walletconnect.com/usdc.png", @@ -2714,7 +9537,7 @@ "expiresAt": 1718236800, "gatewayUrl": "https://api.pay.walletconnect.com/pay_123", "isFinal": false, - "paymentId": "pay_c8a2ecc101M7W4KR8EF5FM7CMD14MAEK85", + "paymentId": "pay_a0a2ecc101M7WG0ACBEX6FY72RC8M480J5", "pollInMs": 1000, "status": "requires_action" } @@ -2861,7 +9684,7 @@ "example": { "cancelledAt": "2025-01-14T10:30:00Z", "cancelledReason": "cancelled_by_user", - "paymentId": "pay_daa2ecc101M7W4KR8GJK7F86HM8J02BMCT", + "paymentId": "pay_7aa2ecc101M7WG0ACDV5MZVKK7T80HRG8W", "status": "cancelled" } }, @@ -3761,7 +10584,7 @@ "example": { "cancelledAt": "2025-01-14T10:30:00Z", "cancelledReason": "cancelled_by_merchant", - "paymentId": "pay_4aa2ecc101M7W4KR8E2Z6Z02DB70AGET15", + "paymentId": "pay_75a2ecc101M7WG0ACBSBVDW3QGXZ2QKMGK", "status": "cancelled" } }, @@ -4240,72 +11063,592 @@ "description": "The canonical (fee-bump) hash, hex." } } - }, - "namespace": { - "type": "string", - "enum": [ - "stellar" - ] + }, + "namespace": { + "type": "string", + "enum": [ + "stellar" + ] + } + } + }, + { + "type": "object", + "required": [ + "data", + "namespace" + ], + "properties": { + "data": { + "type": "object", + "required": [ + "tx_hash" + ], + "properties": { + "tx_hash": { + "type": "string", + "description": "The canonical txID (`sha256(raw_data)`), hex." + } + } + }, + "namespace": { + "type": "string", + "enum": [ + "tron" + ] + } + } + } + ], + "description": "Chain-agnostic confirmed-transaction identifier. Used only as the lifted id on\n`CryptoTransferActionState::Confirmed` and in API responses — never an\nin-flight state." + }, + "WalletRpcAction": { + "type": "object", + "required": [ + "chain_id", + "method", + "params" + ], + "properties": { + "chain_id": { + "type": "string" + }, + "method": { + "type": "string" + }, + "params": { + "type": "array", + "items": {} + } + }, + "example": { + "chain_id": "eip155:8453", + "method": "eth_signTypedData_v4", + "params": [ + "0x0000000000000000000000000000000000000000", + "{\"domain\":{\"name\":\"USD Coin\",\"version\":\"2\",\"chainId\":\"0x2105\",\"verifyingContract\":\"0x0000000000000000000000000000000000000000\"},\"types\":{\"EIP712Domain\":[{\"type\":\"string\",\"name\":\"name\"},{\"type\":\"string\",\"name\":\"version\"},{\"type\":\"uint256\",\"name\":\"chainId\"},{\"type\":\"address\",\"name\":\"verifyingContract\"}],\"ReceiveWithAuthorization\":[{\"type\":\"address\",\"name\":\"from\"},{\"type\":\"address\",\"name\":\"to\"},{\"type\":\"uint256\",\"name\":\"value\"},{\"type\":\"uint256\",\"name\":\"validAfter\"},{\"type\":\"uint256\",\"name\":\"validBefore\"},{\"type\":\"bytes32\",\"name\":\"nonce\"}]},\"primaryType\":\"ReceiveWithAuthorization\",\"message\":{\"from\":\"0x0000000000000000000000000000000000000000\",\"nonce\":\"0x0000000000000000000000000000000000000000000000000000000000000000\",\"to\":\"0x0000000000000000000000000000000000000000\",\"validAfter\":\"0x0\",\"validBefore\":\"0x0\",\"value\":\"0x0\"}}" + ] + } + }, + "MerchantApiErrorCode": { + "type": "string", + "enum": [ + "invalid_params", + "params_validation", + "not_found", + "internal_error", + "bad_gateway", + "rate_limited", + "payment_transition_conflict", + "payment_transition_unavailable", + "settlement_asset_conflict", + "settlement_conflict", + "settlement_destination_not_ready", + "token_not_enabled", + "version_conflict", + "payouts_unavailable", + "payout_not_cancellable", + "logo_too_small", + "logo_too_large", + "logo_not_square", + "logo_file_too_big", + "logo_invalid_mime", + "logo_invalid_dimensions", + "missing_api_key", + "invalid_api_key", + "missing_merchant_id", + "invalid_api_version", + "unknown_api_version", + "api_version_downgrade", + "idempotency_conflict", + "missing_idempotency_key", + "payment_not_succeeded", + "already_refunded", + "receipt_unavailable", + "receipt_service_unavailable", + "payouts_disabled", + "unsupported_asset", + "payout_account_unavailable", + "payout_account_busy", + "screening_unavailable" + ], + "description": "Machine-readable error code" + }, + "MerchantApiErrorResponse": { + "type": "object", + "required": [ + "message", + "code" + ], + "properties": { + "message": { + "type": "string", + "description": "Human-readable error message" + }, + "code": { + "$ref": "#/components/schemas/MerchantApiErrorCode" + }, + "issues": { + "type": "array", + "description": "Field-level validation issues (present on validation errors)", + "items": { + "type": "object", + "required": [ + "field", + "message" + ], + "properties": { + "field": { + "type": "string" + }, + "message": { + "type": "string" + } } } + } + } + }, + "MerchantPaymentFiatAmount": { + "type": "object", + "properties": { + "unit": { + "type": "string", + "pattern": "^iso4217\\/", + "description": "Fiat unit, for example \"iso4217/USD\"" }, - { + "value": { + "type": "string", + "description": "Amount in minor units for the fiat currency" + }, + "display": { "type": "object", + "properties": { + "assetSymbol": { + "type": "string" + }, + "assetName": { + "type": "string" + }, + "decimals": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + } + }, "required": [ - "data", - "namespace" + "assetSymbol", + "assetName", + "decimals" ], - "properties": { - "data": { + "description": "Display metadata for fiat-denominated amounts" + } + }, + "required": [ + "unit", + "value", + "display" + ], + "description": "Fiat-denominated amount" + }, + "MerchantPaymentTokenAmount": { + "type": "object", + "properties": { + "unit": { + "type": "string", + "pattern": "^caip19\\/", + "description": "Token unit, for example \"caip19/...\"" + }, + "value": { + "type": "string", + "description": "Amount in minor units for the token asset" + }, + "display": { + "anyOf": [ + { "type": "object", - "required": [ - "tx_hash" - ], "properties": { - "tx_hash": { - "type": "string", - "description": "The canonical txID (`sha256(raw_data)`), hex." + "assetSymbol": { + "type": "string" + }, + "assetName": { + "type": "string" + }, + "decimals": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "iconUrl": { + "type": "string" + }, + "networkName": { + "type": "string" + }, + "networkIconUrl": { + "type": "string" } - } + }, + "required": [ + "assetSymbol", + "assetName", + "decimals" + ], + "description": "Display metadata for token-denominated amounts" }, - "namespace": { - "type": "string", - "enum": [ - "tron" - ] + { + "type": "null" } - } + ] } + }, + "required": [ + "unit", + "value", + "display" ], - "description": "Chain-agnostic confirmed-transaction identifier. Used only as the lifted id on\n`CryptoTransferActionState::Confirmed` and in API responses — never an\nin-flight state." + "description": "Token-denominated amount" }, - "WalletRpcAction": { + "MerchantPaymentSettlement": { + "description": "Settlement details. Omitted when settlement details cannot be reported yet. When present, `settled` is always included. When `settled` is `false`, no additional settlement fields are returned. When `settled` is `true`, `amount` is included and `txHash` is included when available.", "type": "object", + "properties": { + "settled": { + "type": "boolean", + "description": "Whether settlement is complete." + }, + "amount": { + "description": "Net settlement amount after fees in the settlement unit. Present when `settled` is `true`.", + "anyOf": [ + { + "$ref": "#/components/schemas/MerchantPaymentFiatAmount" + }, + { + "$ref": "#/components/schemas/MerchantPaymentTokenAmount" + } + ] + }, + "txHash": { + "description": "Settlement transaction hash. Present when `settled` is `true` and an upstream settlement transaction hash is available.", + "type": "string" + } + }, "required": [ - "chain_id", - "method", - "params" + "settled" + ] + }, + "MerchantPaymentExchangeRate": { + "type": "object", + "properties": { + "from": { + "type": "string", + "description": "Unit the payment was priced in", + "examples": [ + "iso4217/EUR" + ] + }, + "fromSymbol": { + "type": "string", + "description": "Display symbol for `from`", + "examples": [ + "EUR" + ] + }, + "to": { + "type": "string", + "description": "Unit the payment settles in", + "examples": [ + "caip19/eip155:8453/erc20:0x833589fcd6edb6e08f4c7c32d4f71b54bda02913" + ] + }, + "toSymbol": { + "type": "string", + "description": "Display symbol for `to`", + "examples": [ + "USDC" + ] + }, + "rate": { + "type": "string", + "description": "How many whole `to` units one whole `from` unit converted into, as a decimal string", + "examples": [ + "1.085" + ] + } + }, + "required": [ + "from", + "fromSymbol", + "to", + "toSymbol", + "rate" ], + "description": "Conversion applied between the payment unit and the settlement unit. Derived from the payment amount and the gross settlement amount (settlement plus fees), so it is the effective rate for this payment rather than a rate quoted independently. Omitted when the payment does not convert, or when the amounts needed to derive it are unavailable." + }, + "MerchantPaymentRefund": { + "type": "object", "properties": { - "chain_id": { - "type": "string" + "status": { + "type": "string", + "description": "Refund state. \"fully_refunded\" is the only value this API emits.", + "examples": [ + "fully_refunded" + ] }, - "method": { + "fullyRefundedAt": { + "description": "ISO 8601 timestamp when the payment was fully refunded. Present only for fully refunded payments.", "type": "string" - }, - "params": { + } + }, + "required": [ + "status" + ], + "description": "Refund details. Not currently populated: refund state is not yet projected into the payment read model, so this field is always omitted today. Reserved for a future release." + }, + "MerchantPaymentsResponse": { + "type": "object", + "properties": { + "data": { "type": "array", - "items": {} + "items": { + "type": "object", + "properties": { + "paymentId": { + "type": "string", + "description": "Unique payment identifier" + }, + "merchant": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Partner-provided merchant ID" + }, + "name": { + "description": "Merchant display name", + "type": "string" + }, + "iconUrl": { + "description": "Merchant logo URL", + "type": [ + "string", + "null" + ] + } + }, + "required": [ + "id" + ] + }, + "referenceId": { + "type": "string", + "description": "Idempotency / reference ID provided at payment creation" + }, + "status": { + "type": "string", + "enum": [ + "requires_action", + "processing", + "succeeded", + "failed", + "expired", + "cancelled" + ] + }, + "isTerminal": { + "type": "boolean", + "description": "Whether the payment has reached a final state" + }, + "fiatAmount": { + "$ref": "#/components/schemas/MerchantPaymentFiatAmount" + }, + "tokenAmount": { + "$ref": "#/components/schemas/MerchantPaymentTokenAmount" + }, + "buyer": { + "description": "Buyer wallet information", + "type": "object", + "properties": { + "accountCaip10": { + "type": "string", + "description": "Buyer address as a [CAIP-10](https://standards.chainagnostic.org/CAIPs/caip-10) account ID", + "examples": [ + "eip155:8453:0x1234567890abcdef1234567890abcdef12345678" + ] + }, + "accountProviderName": { + "description": "Wallet provider name", + "examples": [ + "MetaMask" + ], + "type": "string" + }, + "accountProviderIcon": { + "description": "Wallet provider logo URL", + "type": "string" + } + }, + "required": [ + "accountCaip10" + ] + }, + "transaction": { + "description": "On-chain transaction details", + "type": "object", + "properties": { + "networkId": { + "type": "string", + "description": "Numeric chain ID", + "examples": [ + "8453" + ] + }, + "hash": { + "description": "On-chain transaction hash", + "type": "string" + } + }, + "required": [ + "networkId" + ] + }, + "fees": { + "description": "Fee breakdown derived from payment option data. Omitted when total fee data is unavailable.", + "type": "object", + "properties": { + "total": { + "anyOf": [ + { + "$ref": "#/components/schemas/MerchantPaymentFiatAmount" + }, + { + "$ref": "#/components/schemas/MerchantPaymentTokenAmount" + } + ], + "description": "Total fee amount." + }, + "fixed": { + "description": "Fixed fee component.", + "anyOf": [ + { + "$ref": "#/components/schemas/MerchantPaymentFiatAmount" + }, + { + "$ref": "#/components/schemas/MerchantPaymentTokenAmount" + } + ] + }, + "percentage": { + "description": "Percentage fee component as a decimal percentage string, not a ratio. For example, \"0.4\" means 0.4%.", + "type": "string" + } + }, + "required": [ + "total" + ] + }, + "settlement": { + "$ref": "#/components/schemas/MerchantPaymentSettlement" + }, + "exchangeRate": { + "$ref": "#/components/schemas/MerchantPaymentExchangeRate" + }, + "refund": { + "$ref": "#/components/schemas/MerchantPaymentRefund" + }, + "paymentUrl": { + "description": "Hosted payment page URL for this payment. The hosted page reflects the payment's current state.", + "type": "string", + "format": "uri" + }, + "createdAt": { + "type": "string", + "description": "ISO 8601 timestamp" + }, + "expiresAt": { + "description": "ISO 8601 timestamp of the payment deadline, present only when the payment has an expiration", + "type": "string" + }, + "lastUpdatedAt": { + "type": "string", + "description": "ISO 8601 timestamp" + }, + "settledAt": { + "description": "ISO 8601 timestamp, present only when `settlement.settled` is `true` and a timestamp is available", + "type": "string" + } + }, + "required": [ + "paymentId", + "merchant", + "referenceId", + "status", + "isTerminal", + "createdAt", + "lastUpdatedAt" + ] + } + }, + "nextCursor": { + "description": "Cursor for the next page, or null if no more results", + "type": [ + "string", + "null" + ] + }, + "stats": { + "type": "object", + "properties": { + "totalRevenue": { + "type": "array", + "items": { + "type": "object", + "properties": { + "amount": { + "type": "number", + "description": "Revenue amount in currency's standard unit" + }, + "currency": { + "type": "string", + "description": "ISO 4217 currency code", + "examples": [ + "USD" + ] + } + }, + "required": [ + "amount", + "currency" + ] + }, + "description": "Total revenue over succeeded payments, converted to USD. Always exactly one element — a merchant with no volume gets a zero rather than an empty array. Kept as an array for backwards compatibility." + }, + "totalTransactions": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "Total payments matching the query" + }, + "totalCustomers": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "Unique buyers matching the query" + } + }, + "required": [ + "totalRevenue", + "totalTransactions", + "totalCustomers" + ], + "description": "Aggregate statistics for the query" } }, - "example": { - "chain_id": "eip155:8453", - "method": "eth_signTypedData_v4", - "params": [ - "0x0000000000000000000000000000000000000000", - "{\"domain\":{\"name\":\"USD Coin\",\"version\":\"2\",\"chainId\":\"0x2105\",\"verifyingContract\":\"0x0000000000000000000000000000000000000000\"},\"types\":{\"EIP712Domain\":[{\"type\":\"string\",\"name\":\"name\"},{\"type\":\"string\",\"name\":\"version\"},{\"type\":\"uint256\",\"name\":\"chainId\"},{\"type\":\"address\",\"name\":\"verifyingContract\"}],\"ReceiveWithAuthorization\":[{\"type\":\"address\",\"name\":\"from\"},{\"type\":\"address\",\"name\":\"to\"},{\"type\":\"uint256\",\"name\":\"value\"},{\"type\":\"uint256\",\"name\":\"validAfter\"},{\"type\":\"uint256\",\"name\":\"validBefore\"},{\"type\":\"bytes32\",\"name\":\"nonce\"}]},\"primaryType\":\"ReceiveWithAuthorization\",\"message\":{\"from\":\"0x0000000000000000000000000000000000000000\",\"nonce\":\"0x0000000000000000000000000000000000000000000000000000000000000000\",\"to\":\"0x0000000000000000000000000000000000000000\",\"validAfter\":\"0x0\",\"validBefore\":\"0x0\",\"value\":\"0x0\"}}" - ] - } + "required": [ + "data", + "nextCursor", + "stats" + ] } }, "securitySchemes": { @@ -4325,6 +11668,12 @@ "in": "header", "name": "App-Id", "description": "Public App ID for wallet authentication. When using this auth mode, the Client-Id header is also required." + }, + "apiKey": { + "type": "apiKey", + "in": "header", + "name": "Api-Key", + "description": "Partner API key." } } }, diff --git a/scripts/generate-specs.mjs b/scripts/generate-specs.mjs index 93743663..a1cae941 100644 --- a/scripts/generate-specs.mjs +++ b/scripts/generate-specs.mjs @@ -12,9 +12,19 @@ const NAVIGATION_PATH = join(ROOT, 'content', 'navigation.json'); const REDIRECTS_PATH = join(ROOT, 'redirects.json'); const VERSIONS_URL = 'https://api.pay.walletconnect.com/versions'; -// Only the Core API is documented. The merchant service (api.merchant.pay.walletconnect.com) is -// left out on purpose: its spec isn't part of the public API reference. -const SERVICES = [{ name: 'Core', baseUrl: 'https://api.pay.walletconnect.com' }]; +// Every operation is documented under the Core base URL, the only host integrators call. The API +// gateway on api.pay.walletconnect.com forwards some routes to the merchant service +// (api.merchant.pay.walletconnect.com), so only those are taken from its spec: the rest of it isn't +// reachable through the gateway and isn't part of the public API reference. +const SERVICES = [ + { name: 'Core', baseUrl: 'https://api.pay.walletconnect.com' }, + { + name: 'Merchant', + baseUrl: 'https://api.merchant.pay.walletconnect.com', + isForwarded: (method, path) => + /^\/v1\/(merchants|refunds)(\/|$)/.test(path) || (method === 'get' && path === '/v1/payments'), + }, +]; const VERSION_RE = /^\d{4}-\d{2}-\d{2}(\.preview)?$/; @@ -43,8 +53,17 @@ function mergeSpecs(specs, version) { const seenTags = new Set(); - for (const spec of specs) { - for (const [path, methods] of Object.entries(spec.paths || {})) { + for (const [i, spec] of specs.entries()) { + const { isForwarded } = SERVICES[i]; + for (const [path, allMethods] of Object.entries(spec.paths || {})) { + const methods = {}; + for (const [method, op] of Object.entries(allMethods)) { + if (isForwarded && !isForwarded(method, path)) continue; + if (merged.paths[path]?.[method]) throw new Error(`${method.toUpperCase()} ${path} is in more than one spec`); + // Only the first spec's top-level security survives the merge, so each operation keeps its own. + methods[method] = op.security || !spec.security ? op : { ...op, security: spec.security }; + } + if (Object.keys(methods).length === 0) continue; merged.paths[path] = { ...(merged.paths[path] || {}), ...methods }; for (const op of Object.values(methods)) { for (const tagName of op.tags || []) { @@ -57,7 +76,8 @@ function mergeSpecs(specs, version) { } for (const tag of spec.tags || []) { - if (!seenTags.has(tag.name)) { + // A filtered spec's other tags belong to operations that were left out. + if (!seenTags.has(tag.name) && !isForwarded) { seenTags.add(tag.name); merged.tags.push(tag); } From 83a42c2daf25073accc61e9fb82139282bf79da9 Mon Sep 17 00:00:00 2001 From: Tom Ra Date: Wed, 25 Nov 2026 17:11:38 -0300 Subject: [PATCH 2/4] Document gateway route filter for generated Pay API reference - Explain that the API reference merges the Core spec with only the merchant-service routes forwarded by api.pay.walletconnect.com. - Point contributors to `isForwarded` in scripts/generate-specs.mjs as the first place to check when an endpoint is missing. --- AGENTS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/AGENTS.md b/AGENTS.md index 70a80505..e8a76e01 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -201,6 +201,7 @@ Put imports right after the frontmatter. Reuse a snippet instead of copying the ## Generated files (don't hand-edit) - `openapi/*.json`, `content/docs/payments/api-reference//`, the API Reference tab in `navigation.json` and the `/payments/api-reference/latest` redirect are all rewritten by `pnpm generate` (also the **Update OpenAPI Specs** workflow). Change `scripts/generate-specs.mjs` instead. `content/docs/payments/api-reference/{index,authentication,versioning}.mdx` are hand-written. +- The API reference merges the Core spec with only the merchant-service routes that the gateway on `api.pay.walletconnect.com` forwards (`isForwarded` in `scripts/generate-specs.mjs`, copied from `terraform/pay-core/api-gateway/routes.tf` in WalletConnect/pay-core). Everything is documented under the Core base URL. If an endpoint is missing from the reference, check that filter first. - `.source/` is generated by `fumadocs-mdx`. - `out/` is the static export from `pnpm build`, and `.wrangler/` is Wrangler's local state. From 5ef5c897bc84daf190e8bf20271cf61ecacd7622 Mon Sep 17 00:00:00 2001 From: Tom Ra Date: Wed, 25 Nov 2026 17:11:54 -0300 Subject: [PATCH 3/4] Add operation text and merge auth schemes in Pay API spec generator - Supply titles and descriptions for cancel, transition and fetch operations whose specs have none, so pages stop falling back to "METHOD /path" titles. Entries yield once pay-core adds its own. - Reuse an earlier spec's security scheme when it covers the same credential (same type, location and header), so the reference shows one Api-Key input instead of one per spec. - Keep only tags used by documented operations, in first-use order, and take descriptions from the first spec that defines them. - Note that the merchant route filter is a hand copy of the gateway routes in pay-core and must be updated when routes are added. --- scripts/generate-specs.mjs | 88 +++++++++++++++++++++++++++++++------- 1 file changed, 73 insertions(+), 15 deletions(-) diff --git a/scripts/generate-specs.mjs b/scripts/generate-specs.mjs index a1cae941..47c3947a 100644 --- a/scripts/generate-specs.mjs +++ b/scripts/generate-specs.mjs @@ -21,11 +21,55 @@ const SERVICES = [ { name: 'Merchant', baseUrl: 'https://api.merchant.pay.walletconnect.com', + // Hand copy of the gateway's routes to the merchant service in WalletConnect/pay-core + // (terraform/pay-core/api-gateway/routes.tf). When the gateway starts forwarding another route + // (payouts, for example), add it here too, or the docs won't pick it up. isForwarded: (method, path) => /^\/v1\/(merchants|refunds)(\/|$)/.test(path) || (method === 'get' && path === '/v1/payments'), }, ]; +// Titles and descriptions for operations whose spec has none: a page without a summary is titled +// with its method and path. Applied only while the spec still lacks them; once pay-core adds its +// own, it wins and the script logs that the entry here can go. +const OPERATION_TEXT = { + 'post /v1/gateway/payment/{id}/fetch': { + description: + 'Builds the actions the wallet must complete to pay with the selected payment option (`optionId`). Select each action by its `type`, not by its position in `actions`.', + }, + 'post /v1/gateway/payment/{id}/cancel': { + summary: 'Cancel a payment', + description: + 'Cancels a payment from the wallet, on behalf of the user. The payment moves to `cancelled`, and the response includes the cancellation reason and time.', + }, + 'post /v1/gateway/payment/{id}/transition': { + summary: 'Simulate a status transition', + description: + 'Test mode only. Moves a test payment to the `status` in the request body. This is the wallet-authenticated version of `POST /v1/payments/{id}/transition`: the wallet comes from the request credentials, so the `processing` transition takes no `wallet_id`. See [allowed status transitions](/payments/test-mode#allowed-status-transitions).', + }, + 'post /v1/payments/{id}/cancel': { + summary: 'Cancel a payment', + description: + 'Cancels a payment as the merchant. The payment moves to `cancelled`, and the response includes the cancellation reason and time.', + }, + 'post /v1/payments/{id}/transition': { + summary: 'Simulate a status transition', + description: + "Test mode only. Moves a test payment to the `status` in the request body, as the dashboard's simulation actions do. Returns `400` for a live payment or a transition that isn't allowed. See [allowed status transitions](/payments/test-mode#allowed-status-transitions).", + }, +}; + +function withOperationText(method, path, op) { + const text = OPERATION_TEXT[`${method} ${path}`]; + if (!text) return op; + const missing = Object.fromEntries(Object.entries(text).filter(([field]) => !op[field])); + for (const field of Object.keys(text)) { + if (!(field in missing)) + console.log(`${method.toUpperCase()} ${path} now has a ${field} in its spec; remove it from OPERATION_TEXT`); + } + return { ...op, ...missing }; +} + const VERSION_RE = /^\d{4}-\d{2}-\d{2}(\.preview)?$/; async function fetchJson(url) { @@ -51,36 +95,53 @@ function mergeSpecs(specs, version) { security: [], }; - const seenTags = new Set(); + // Tags in the order operations first use them. Only tags used by a documented operation are kept. + const tags = new Map(); for (const [i, spec] of specs.entries()) { const { isForwarded } = SERVICES[i]; + + // A scheme for the same credential as one from an earlier spec (the merchant spec's `apiKey` and + // Core's `API Key` are both the `Api-Key` header) reuses that scheme, so the reference shows one + // auth input per credential rather than one per spec. Only earlier specs count: Core's own + // schemes stay as they are, even where two of them share a header. + const earlierSchemes = Object.entries(merged.components.securitySchemes); + const schemeNames = {}; + for (const [name, scheme] of Object.entries(spec.components?.securitySchemes || {})) { + const same = earlierSchemes.find( + ([, s]) => s.type === scheme.type && s.in === scheme.in && s.name?.toLowerCase() === scheme.name?.toLowerCase(), + ); + schemeNames[name] = same ? same[0] : name; + if (!same) merged.components.securitySchemes[name] = scheme; + } + const renameSchemes = (security) => + security.map((requirement) => + Object.fromEntries(Object.entries(requirement).map(([name, scopes]) => [schemeNames[name] ?? name, scopes])), + ); + for (const [path, allMethods] of Object.entries(spec.paths || {})) { const methods = {}; for (const [method, op] of Object.entries(allMethods)) { if (isForwarded && !isForwarded(method, path)) continue; if (merged.paths[path]?.[method]) throw new Error(`${method.toUpperCase()} ${path} is in more than one spec`); // Only the first spec's top-level security survives the merge, so each operation keeps its own. - methods[method] = op.security || !spec.security ? op : { ...op, security: spec.security }; + const security = op.security ?? spec.security; + const documented = withOperationText(method, path, op); + methods[method] = security ? { ...documented, security: renameSchemes(security) } : documented; } if (Object.keys(methods).length === 0) continue; merged.paths[path] = { ...(merged.paths[path] || {}), ...methods }; for (const op of Object.values(methods)) { for (const tagName of op.tags || []) { - if (!seenTags.has(tagName)) { - seenTags.add(tagName); - merged.tags.push({ name: tagName }); - } + if (!tags.has(tagName)) tags.set(tagName, { name: tagName }); } } } + // Operations only name their tags; the descriptions live in `spec.tags`. When two specs define + // the same tag, the first definition wins. for (const tag of spec.tags || []) { - // A filtered spec's other tags belong to operations that were left out. - if (!seenTags.has(tag.name) && !isForwarded) { - seenTags.add(tag.name); - merged.tags.push(tag); - } + if (tags.has(tag.name) && !tags.get(tag.name).description) tags.set(tag.name, tag); } for (const [name, schema] of Object.entries(spec.components?.schemas || {})) { @@ -89,12 +150,9 @@ function mergeSpecs(specs, version) { } merged.components.schemas[name] = schema; } - - for (const [name, scheme] of Object.entries(spec.components?.securitySchemes || {})) { - merged.components.securitySchemes[name] = scheme; - } } + merged.tags = [...tags.values()]; merged.security = specs[0]?.security || []; return merged; } From 76ebeaad69850b8a0d51e3b307c87391cd06ff32 Mon Sep 17 00:00:00 2001 From: Tom Ra Date: Wed, 25 Nov 2026 17:12:33 -0300 Subject: [PATCH 4/4] Show operation descriptions and summaries in the Pay API reference - Render each operation's description right under the page title by enabling `showDescription` and moving the description slot above the endpoint bar in a custom operation layout. - Add summaries and descriptions to the cancel and transition endpoints, plus the payment actions endpoint, so pages get readable titles like "Cancel a payment" instead of the raw method and path. - Add tag descriptions for Gateway, Payments, Webhooks and Refunds. - Use the "API Key" security scheme everywhere and drop the duplicate `apiKey` scheme, so auth appears once per operation. - Fold the 503 "not configured" cases into 401 for the Binance and Bybit webhooks to match the actual responses. - Refresh the example payment IDs in the regenerated specs. --- components/api-page.client.tsx | 24 +++++- components/api-page.tsx | 5 +- .../post-v1-gateway-payment-id-cancel.mdx | 2 +- .../post-v1-gateway-payment-id-transition.mdx | 2 +- .../2026-02-18/post-v1-payments-id-cancel.mdx | 2 +- .../post-v1-payments-id-transition.mdx | 2 +- .../post-v1-gateway-payment-id-cancel.mdx | 2 +- .../post-v1-gateway-payment-id-transition.mdx | 2 +- .../post-v1-payments-id-cancel.mdx | 2 +- .../post-v1-payments-id-transition.mdx | 2 +- openapi/2026-02-18.json | 78 ++++++++++--------- openapi/2026-02-19.preview.json | 78 ++++++++++--------- 12 files changed, 117 insertions(+), 84 deletions(-) diff --git a/components/api-page.client.tsx b/components/api-page.client.tsx index 392a1773..0b96158d 100644 --- a/components/api-page.client.tsx +++ b/components/api-page.client.tsx @@ -1,4 +1,26 @@ 'use client'; import { createOpenAPIPage } from 'fumadocs-openapi/ui'; -export const OpenAPIPage = createOpenAPIPage(); +export const OpenAPIPage = createOpenAPIPage({ + content: { + // Fumadocs' default operation layout, with the description moved above the endpoint bar so it + // reads as the page's intro, right under the title. + renderOperationLayout: (slots) => ( +
+
+ {slots.header} + {slots.description} + {slots.apiPlayground} + {slots.authSchemes} + {slots.parameters} + {slots.body} + {slots.responses} + {slots.callbacks} +
+
+ {slots.apiExample} +
+
+ ), + }, +}); diff --git a/components/api-page.tsx b/components/api-page.tsx index a96a3534..1f82f418 100644 --- a/components/api-page.tsx +++ b/components/api-page.tsx @@ -12,5 +12,8 @@ export async function APIPage({ ...props }: Omit & { document: string }) { const schema = await openapi.getSchema(document); - return ; + // `showDescription` renders each operation's description from the spec, which is off by default. + return ( + + ); } diff --git a/content/docs/payments/api-reference/2026-02-18/post-v1-gateway-payment-id-cancel.mdx b/content/docs/payments/api-reference/2026-02-18/post-v1-gateway-payment-id-cancel.mdx index ab7df5b6..ab7abffb 100644 --- a/content/docs/payments/api-reference/2026-02-18/post-v1-gateway-payment-id-cancel.mdx +++ b/content/docs/payments/api-reference/2026-02-18/post-v1-gateway-payment-id-cancel.mdx @@ -1,5 +1,5 @@ --- -title: "POST /v1/gateway/payment/{id}/cancel" +title: "Cancel a payment" _openapi: method: POST --- diff --git a/content/docs/payments/api-reference/2026-02-18/post-v1-gateway-payment-id-transition.mdx b/content/docs/payments/api-reference/2026-02-18/post-v1-gateway-payment-id-transition.mdx index 037a1778..a7f14789 100644 --- a/content/docs/payments/api-reference/2026-02-18/post-v1-gateway-payment-id-transition.mdx +++ b/content/docs/payments/api-reference/2026-02-18/post-v1-gateway-payment-id-transition.mdx @@ -1,5 +1,5 @@ --- -title: "POST /v1/gateway/payment/{id}/transition" +title: "Simulate a status transition" _openapi: method: POST --- diff --git a/content/docs/payments/api-reference/2026-02-18/post-v1-payments-id-cancel.mdx b/content/docs/payments/api-reference/2026-02-18/post-v1-payments-id-cancel.mdx index a3e135d0..8b940af2 100644 --- a/content/docs/payments/api-reference/2026-02-18/post-v1-payments-id-cancel.mdx +++ b/content/docs/payments/api-reference/2026-02-18/post-v1-payments-id-cancel.mdx @@ -1,5 +1,5 @@ --- -title: "POST /v1/payments/{id}/cancel" +title: "Cancel a payment" _openapi: method: POST --- diff --git a/content/docs/payments/api-reference/2026-02-18/post-v1-payments-id-transition.mdx b/content/docs/payments/api-reference/2026-02-18/post-v1-payments-id-transition.mdx index 73dc2854..fb3cedd6 100644 --- a/content/docs/payments/api-reference/2026-02-18/post-v1-payments-id-transition.mdx +++ b/content/docs/payments/api-reference/2026-02-18/post-v1-payments-id-transition.mdx @@ -1,5 +1,5 @@ --- -title: "POST /v1/payments/{id}/transition" +title: "Simulate a status transition" _openapi: method: POST --- diff --git a/content/docs/payments/api-reference/2026-02-19.preview/post-v1-gateway-payment-id-cancel.mdx b/content/docs/payments/api-reference/2026-02-19.preview/post-v1-gateway-payment-id-cancel.mdx index f4abe171..51d1f2b0 100644 --- a/content/docs/payments/api-reference/2026-02-19.preview/post-v1-gateway-payment-id-cancel.mdx +++ b/content/docs/payments/api-reference/2026-02-19.preview/post-v1-gateway-payment-id-cancel.mdx @@ -1,5 +1,5 @@ --- -title: "POST /v1/gateway/payment/{id}/cancel" +title: "Cancel a payment" _openapi: method: POST --- diff --git a/content/docs/payments/api-reference/2026-02-19.preview/post-v1-gateway-payment-id-transition.mdx b/content/docs/payments/api-reference/2026-02-19.preview/post-v1-gateway-payment-id-transition.mdx index 0ec3bcc0..492124d1 100644 --- a/content/docs/payments/api-reference/2026-02-19.preview/post-v1-gateway-payment-id-transition.mdx +++ b/content/docs/payments/api-reference/2026-02-19.preview/post-v1-gateway-payment-id-transition.mdx @@ -1,5 +1,5 @@ --- -title: "POST /v1/gateway/payment/{id}/transition" +title: "Simulate a status transition" _openapi: method: POST --- diff --git a/content/docs/payments/api-reference/2026-02-19.preview/post-v1-payments-id-cancel.mdx b/content/docs/payments/api-reference/2026-02-19.preview/post-v1-payments-id-cancel.mdx index 8cab5aa5..4b014ce9 100644 --- a/content/docs/payments/api-reference/2026-02-19.preview/post-v1-payments-id-cancel.mdx +++ b/content/docs/payments/api-reference/2026-02-19.preview/post-v1-payments-id-cancel.mdx @@ -1,5 +1,5 @@ --- -title: "POST /v1/payments/{id}/cancel" +title: "Cancel a payment" _openapi: method: POST --- diff --git a/content/docs/payments/api-reference/2026-02-19.preview/post-v1-payments-id-transition.mdx b/content/docs/payments/api-reference/2026-02-19.preview/post-v1-payments-id-transition.mdx index 9575b961..a565c569 100644 --- a/content/docs/payments/api-reference/2026-02-19.preview/post-v1-payments-id-transition.mdx +++ b/content/docs/payments/api-reference/2026-02-19.preview/post-v1-payments-id-transition.mdx @@ -1,5 +1,5 @@ --- -title: "POST /v1/payments/{id}/transition" +title: "Simulate a status transition" _openapi: method: POST --- diff --git a/openapi/2026-02-18.json b/openapi/2026-02-18.json index ee112c70..bdf30d6a 100644 --- a/openapi/2026-02-18.json +++ b/openapi/2026-02-18.json @@ -316,6 +316,8 @@ } } }, + "summary": "Cancel a payment", + "description": "Cancels a payment from the wallet, on behalf of the user. The payment moves to `cancelled`, and the response includes the cancellation reason and time.", "security": [ { "API Key": [] @@ -681,6 +683,7 @@ } } }, + "description": "Builds the actions the wallet must complete to pay with the selected payment option (`optionId`). Select each action by its `type`, not by its position in `actions`.", "security": [ { "API Key": [] @@ -1208,6 +1211,8 @@ } } }, + "summary": "Simulate a status transition", + "description": "Test mode only. Moves a test payment to the `status` in the request body. This is the wallet-authenticated version of `POST /v1/payments/{id}/transition`: the wallet comes from the request credentials, so the `processing` transition takes no `wallet_id`. See [allowed status transitions](/payments/test-mode#allowed-status-transitions).", "security": [ { "API Key": [] @@ -1852,7 +1857,7 @@ "description": "Retrieve paginated payments with optional filters.", "security": [ { - "apiKey": [] + "API Key": [] } ] } @@ -2151,6 +2156,8 @@ } } }, + "summary": "Cancel a payment", + "description": "Cancels a payment as the merchant. The payment moves to `cancelled`, and the response includes the cancellation reason and time.", "security": [ { "API Key": [] @@ -2483,6 +2490,8 @@ } } }, + "summary": "Simulate a status transition", + "description": "Test mode only. Moves a test payment to the `status` in the request body, as the dashboard's simulation actions do. Returns `400` for a live payment or a transition that isn't allowed. See [allowed status transitions](/payments/test-mode#allowed-status-transitions).", "security": [ { "API Key": [] @@ -2570,16 +2579,13 @@ "description": "Missing headers" }, "401": { - "description": "Signature verification failed" + "description": "Signature verification failed, or webhook verification is not configured or its key is unusable (Binance redelivers)" }, "403": { "description": "Webhook addressed to another partner" }, "500": { - "description": "Verification key/client unavailable or transient failure (Binance redelivers)" - }, - "503": { - "description": "Webhook verification is not configured (Binance redelivers)" + "description": "Client unavailable or transient failure (Binance redelivers)" } }, "security": [ @@ -2621,7 +2627,7 @@ "description": "Missing `timestamp` or `signature` header" }, "401": { - "description": "Signature verification failed, or the timestamp is outside the accepted window" + "description": "Signature verification failed, the timestamp is outside the accepted window, or webhook verification is not configured or its key is unusable (Bybit redelivers)" }, "500": { "description": "Storage failure, write contention, or an internal invariant violation (Bybit redelivers)" @@ -2630,7 +2636,7 @@ "description": "The order re-query to Bybit failed (Bybit redelivers)" }, "503": { - "description": "Webhook verification or the Bybit client is not configured, or the configured key is unusable (Bybit redelivers)" + "description": "The Bybit client is not configured (Bybit redelivers)" } }, "security": [ @@ -3117,7 +3123,7 @@ }, "security": [ { - "apiKey": [] + "API Key": [] } ] } @@ -3608,7 +3614,7 @@ "description": "Retrieve paginated payments with optional filters.", "security": [ { - "apiKey": [] + "API Key": [] } ] } @@ -4097,7 +4103,7 @@ }, "security": [ { - "apiKey": [] + "API Key": [] } ] } @@ -4606,7 +4612,7 @@ }, "security": [ { - "apiKey": [] + "API Key": [] } ] }, @@ -4928,7 +4934,7 @@ ], "security": [ { - "apiKey": [] + "API Key": [] } ] } @@ -5292,7 +5298,7 @@ ], "security": [ { - "apiKey": [] + "API Key": [] } ] }, @@ -5704,7 +5710,7 @@ ], "security": [ { - "apiKey": [] + "API Key": [] } ] }, @@ -5851,7 +5857,7 @@ ], "security": [ { - "apiKey": [] + "API Key": [] } ] } @@ -6309,7 +6315,7 @@ ], "security": [ { - "apiKey": [] + "API Key": [] } ] } @@ -6629,7 +6635,7 @@ ], "security": [ { - "apiKey": [] + "API Key": [] } ] } @@ -7077,7 +7083,7 @@ }, "security": [ { - "apiKey": [] + "API Key": [] } ] } @@ -7394,7 +7400,7 @@ }, "security": [ { - "apiKey": [] + "API Key": [] } ] }, @@ -7545,7 +7551,7 @@ ], "security": [ { - "apiKey": [] + "API Key": [] } ] } @@ -8117,7 +8123,7 @@ }, "security": [ { - "apiKey": [] + "API Key": [] } ] } @@ -8542,7 +8548,7 @@ }, "security": [ { - "apiKey": [] + "API Key": [] } ] }, @@ -8835,7 +8841,7 @@ ], "security": [ { - "apiKey": [] + "API Key": [] } ] } @@ -8843,16 +8849,20 @@ }, "tags": [ { - "name": "Gateway" + "name": "Gateway", + "description": "Gateway API for wallets to fulfill payments" }, { - "name": "Payments" + "name": "Payments", + "description": "Payment operations" }, { - "name": "Webhooks" + "name": "Webhooks", + "description": "Inbound provider webhooks (no API key; verified per-provider)." }, { - "name": "Refunds" + "name": "Refunds", + "description": "Refund operations for partners." }, { "name": "Merchant Management" @@ -9488,7 +9498,7 @@ "expiresAt": 1718236800, "gatewayUrl": "https://api.pay.walletconnect.com/pay_123", "isFinal": false, - "paymentId": "pay_78a2ecc101M7WG10HBZEA7GEKBQAYVY39R", + "paymentId": "pay_dea2ecc101M89WVMNPFRKE36MF5RPS89MS", "pollInMs": 1000, "status": "requires_action" } @@ -9635,7 +9645,7 @@ "example": { "cancelledAt": "2025-01-14T10:30:00Z", "cancelledReason": "cancelled_by_user", - "paymentId": "pay_8ba2ecc101M7WG10HDS0VAKCFANFZ6TKXD", + "paymentId": "pay_d3a2ecc101M89WVMNQ2Z3Z16YQ43DV3T07", "status": "cancelled" } }, @@ -10535,7 +10545,7 @@ "example": { "cancelledAt": "2025-01-14T10:30:00Z", "cancelledReason": "cancelled_by_merchant", - "paymentId": "pay_eda2ecc101M7WG10HC6HE6NF47W5XY9JSG", + "paymentId": "pay_ffa2ecc101M89WVMNPM484PCJX5XD6652T", "status": "cancelled" } }, @@ -11618,12 +11628,6 @@ "in": "header", "name": "App-Id", "description": "Public App ID for wallet authentication. When using this auth mode, the Client-Id header is also required." - }, - "apiKey": { - "type": "apiKey", - "in": "header", - "name": "Api-Key", - "description": "Partner API key." } } }, diff --git a/openapi/2026-02-19.preview.json b/openapi/2026-02-19.preview.json index c15f433a..6991ec7b 100644 --- a/openapi/2026-02-19.preview.json +++ b/openapi/2026-02-19.preview.json @@ -316,6 +316,8 @@ } } }, + "summary": "Cancel a payment", + "description": "Cancels a payment from the wallet, on behalf of the user. The payment moves to `cancelled`, and the response includes the cancellation reason and time.", "security": [ { "API Key": [] @@ -681,6 +683,7 @@ } } }, + "description": "Builds the actions the wallet must complete to pay with the selected payment option (`optionId`). Select each action by its `type`, not by its position in `actions`.", "security": [ { "API Key": [] @@ -1208,6 +1211,8 @@ } } }, + "summary": "Simulate a status transition", + "description": "Test mode only. Moves a test payment to the `status` in the request body. This is the wallet-authenticated version of `POST /v1/payments/{id}/transition`: the wallet comes from the request credentials, so the `processing` transition takes no `wallet_id`. See [allowed status transitions](/payments/test-mode#allowed-status-transitions).", "security": [ { "API Key": [] @@ -1853,7 +1858,7 @@ "description": "Retrieve paginated payments with optional filters.", "security": [ { - "apiKey": [] + "API Key": [] } ] } @@ -2152,6 +2157,8 @@ } } }, + "summary": "Cancel a payment", + "description": "Cancels a payment as the merchant. The payment moves to `cancelled`, and the response includes the cancellation reason and time.", "security": [ { "API Key": [] @@ -2484,6 +2491,8 @@ } } }, + "summary": "Simulate a status transition", + "description": "Test mode only. Moves a test payment to the `status` in the request body, as the dashboard's simulation actions do. Returns `400` for a live payment or a transition that isn't allowed. See [allowed status transitions](/payments/test-mode#allowed-status-transitions).", "security": [ { "API Key": [] @@ -2571,16 +2580,13 @@ "description": "Missing headers" }, "401": { - "description": "Signature verification failed" + "description": "Signature verification failed, or webhook verification is not configured or its key is unusable (Binance redelivers)" }, "403": { "description": "Webhook addressed to another partner" }, "500": { - "description": "Verification key/client unavailable or transient failure (Binance redelivers)" - }, - "503": { - "description": "Webhook verification is not configured (Binance redelivers)" + "description": "Client unavailable or transient failure (Binance redelivers)" } }, "security": [ @@ -2622,7 +2628,7 @@ "description": "Missing `timestamp` or `signature` header" }, "401": { - "description": "Signature verification failed, or the timestamp is outside the accepted window" + "description": "Signature verification failed, the timestamp is outside the accepted window, or webhook verification is not configured or its key is unusable (Bybit redelivers)" }, "500": { "description": "Storage failure, write contention, or an internal invariant violation (Bybit redelivers)" @@ -2631,7 +2637,7 @@ "description": "The order re-query to Bybit failed (Bybit redelivers)" }, "503": { - "description": "Webhook verification or the Bybit client is not configured, or the configured key is unusable (Bybit redelivers)" + "description": "The Bybit client is not configured (Bybit redelivers)" } }, "security": [ @@ -3118,7 +3124,7 @@ }, "security": [ { - "apiKey": [] + "API Key": [] } ] } @@ -3610,7 +3616,7 @@ "description": "Retrieve paginated payments with optional filters.", "security": [ { - "apiKey": [] + "API Key": [] } ] } @@ -4099,7 +4105,7 @@ }, "security": [ { - "apiKey": [] + "API Key": [] } ] } @@ -4608,7 +4614,7 @@ }, "security": [ { - "apiKey": [] + "API Key": [] } ] }, @@ -4930,7 +4936,7 @@ ], "security": [ { - "apiKey": [] + "API Key": [] } ] } @@ -5294,7 +5300,7 @@ ], "security": [ { - "apiKey": [] + "API Key": [] } ] }, @@ -5706,7 +5712,7 @@ ], "security": [ { - "apiKey": [] + "API Key": [] } ] }, @@ -5853,7 +5859,7 @@ ], "security": [ { - "apiKey": [] + "API Key": [] } ] } @@ -6311,7 +6317,7 @@ ], "security": [ { - "apiKey": [] + "API Key": [] } ] } @@ -6631,7 +6637,7 @@ ], "security": [ { - "apiKey": [] + "API Key": [] } ] } @@ -7079,7 +7085,7 @@ }, "security": [ { - "apiKey": [] + "API Key": [] } ] } @@ -7396,7 +7402,7 @@ }, "security": [ { - "apiKey": [] + "API Key": [] } ] }, @@ -7547,7 +7553,7 @@ ], "security": [ { - "apiKey": [] + "API Key": [] } ] } @@ -8119,7 +8125,7 @@ }, "security": [ { - "apiKey": [] + "API Key": [] } ] } @@ -8544,7 +8550,7 @@ }, "security": [ { - "apiKey": [] + "API Key": [] } ] }, @@ -8837,7 +8843,7 @@ ], "security": [ { - "apiKey": [] + "API Key": [] } ] } @@ -8845,16 +8851,20 @@ }, "tags": [ { - "name": "Gateway" + "name": "Gateway", + "description": "Gateway API for wallets to fulfill payments" }, { - "name": "Payments" + "name": "Payments", + "description": "Payment operations" }, { - "name": "Webhooks" + "name": "Webhooks", + "description": "Inbound provider webhooks (no API key; verified per-provider)." }, { - "name": "Refunds" + "name": "Refunds", + "description": "Refund operations for partners." }, { "name": "Merchant Management" @@ -9537,7 +9547,7 @@ "expiresAt": 1718236800, "gatewayUrl": "https://api.pay.walletconnect.com/pay_123", "isFinal": false, - "paymentId": "pay_a0a2ecc101M7WG0ACBEX6FY72RC8M480J5", + "paymentId": "pay_dea2ecc101M89WVMNPFRKE36MF5RPS89MS", "pollInMs": 1000, "status": "requires_action" } @@ -9684,7 +9694,7 @@ "example": { "cancelledAt": "2025-01-14T10:30:00Z", "cancelledReason": "cancelled_by_user", - "paymentId": "pay_7aa2ecc101M7WG0ACDV5MZVKK7T80HRG8W", + "paymentId": "pay_d3a2ecc101M89WVMNQ2Z3Z16YQ43DV3T07", "status": "cancelled" } }, @@ -10584,7 +10594,7 @@ "example": { "cancelledAt": "2025-01-14T10:30:00Z", "cancelledReason": "cancelled_by_merchant", - "paymentId": "pay_75a2ecc101M7WG0ACBSBVDW3QGXZ2QKMGK", + "paymentId": "pay_ffa2ecc101M89WVMNPM484PCJX5XD6652T", "status": "cancelled" } }, @@ -11668,12 +11678,6 @@ "in": "header", "name": "App-Id", "description": "Public App ID for wallet authentication. When using this auth mode, the Client-Id header is also required." - }, - "apiKey": { - "type": "apiKey", - "in": "header", - "name": "Api-Key", - "description": "Partner API key." } } },