Skip to content

Commit 9e5595a

Browse files
authored
feat(transactions): add sentAmount, exchangeRate, quoteId, refund to base Transaction (#725)
## Summary Changes to the Grid transaction resources: 1. **Base-transaction fields** — moves `sentAmount`, `exchangeRate`, `quoteId`, and `refund` onto the base `Transaction` schema as **optional** properties. `IncomingTransaction` now inherits all four as optional fields (it had none before); `OutgoingTransaction` continues to enforce `sentAmount` as required. 2. **Incoming fees denomination** — the incoming-transaction `fees` field is now documented as expressed in the smallest unit of the **sending** currency (previously the receiving currency), matching the outgoing `fees` field. 3. **Remove `IncomingRateDetails`** — the `rateDetails` field and its `IncomingRateDetails` schema are removed from the incoming-transaction resource. ## Changes - `openapi/components/schemas/transactions/Transaction.yaml` — add optional `sentAmount`, `exchangeRate`, `quoteId`, `refund`. - `openapi/components/schemas/transactions/OutgoingTransaction.yaml` — remove the now-inherited `exchangeRate`, `quoteId`, `refund` definitions; keep `sentAmount` defined and required (the Redocly `no-required-schema-properties-undefined` rule requires a required property to be defined in the same subschema). - `openapi/components/schemas/transactions/IncomingTransaction.yaml` — change `fees` description from receiving to sending currency; remove the `rateDetails` field. - `openapi/components/schemas/transactions/IncomingRateDetails.yaml` — deleted (no remaining references). - `openapi.yaml`, `mintlify/openapi.yaml` — regenerated bundle (`make build`). `IncomingTransaction` picks up the four optional base fields via its `allOf` reference to `Transaction`. ## Docs audit (all changes) No guide or example needed correction: - Incoming-transaction examples (e.g. the receiving-payments guide, incoming-payment webhook samples) don't render a `fees` or `rateDetails` field or assert a fee currency, and the four new fields are optional, so existing examples stay valid. - `snippets/receipts.mdx` already maps `fees` as "smallest unit of the sending currency" — now consistent for incoming too. - The `quote-system` / `cross-currency` notes describe quote-level rate-detail components and the Quote's own `rateDetails`, which are unaffected. ## Note on implementation This is a spec/contract change. The backend that populates these resources is sparkcore; landing the actual behavior (populating the new fields on incoming transactions, converting incoming `fees` to sending currency, and dropping the incoming rate-details payload) is separate follow-up work there. ## Verification - `make build` — bundle regenerated cleanly. - `make lint-openapi` — passes (exit 0). Additive base fields are non-breaking; removing `IncomingRateDetails` is a removal from the incoming response shape. No `info.version` bump made — flag if the rate-details removal should be treated as a breaking version bump. Original PR: #723
1 parent 4a5ebca commit 9e5595a

7 files changed

Lines changed: 122 additions & 235 deletions

File tree

.stainless/stainless.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,6 @@ resources:
323323
transaction_status: '#/components/schemas/TransactionStatus'
324324
base_transaction_source: "#/components/schemas/BaseTransactionSource"
325325
transaction_source_one_of: "#/components/schemas/TransactionSourceOneOf"
326-
incoming_rate_details: "#/components/schemas/IncomingRateDetails"
327326
reconciliation_instructions: "#/components/schemas/ReconciliationInstructions"
328327
transaction_list_response: "#/components/schemas/TransactionListResponse"
329328
cancel_transaction_request: "#/components/schemas/CancelTransactionRequest"

mintlify/openapi.yaml

Lines changed: 53 additions & 86 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)