Skip to content

Commit 5d3168e

Browse files
docs(fx-payment): expose currentState on PaymentInstructionResponse
Mirrors the fx-payment change in #61 (Mario's review): payment instructions now carry a `currentState` object instead of a flat `status` string, matching the existing `OperationState` pattern. - Rename orphaned `BeneficiaryStatus` schema → `InstructionStatus` (the values were always instruction-status anyway: PENDING_REVIEW, APPROVED, REJECTED). - New `InstructionState` schema (status, reason, createdAt) modeled after `OperationState`. - `PaymentInstructionResponse.status` (enum) → `currentState` (`InstructionState`). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent 1173f8e commit 5d3168e

1 file changed

Lines changed: 25 additions & 11 deletions

File tree

apis/fx-payment/openapi.yml

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -236,15 +236,34 @@ components:
236236
- status
237237
- reason
238238
- createdAt
239-
BeneficiaryStatus:
239+
InstructionStatus:
240240
type: string
241241
enum:
242242
- PENDING_REVIEW
243243
- APPROVED
244244
- REJECTED
245245
description: |
246-
Compliance review status. New beneficiaries start in `PENDING_REVIEW` and transition
247-
asynchronously to `APPROVED` or `REJECTED`.
246+
Compliance review status of a payment instruction. New instructions start in
247+
`PENDING_REVIEW` and transition asynchronously to `APPROVED` or `REJECTED`.
248+
InstructionState:
249+
type: object
250+
description: A single entry in a payment instruction's state history. Carries a status, optional reason, and the time the state was entered.
251+
properties:
252+
status:
253+
$ref: "#/components/schemas/InstructionStatus"
254+
reason:
255+
oneOf:
256+
- $ref: "#/components/schemas/Reason"
257+
- type: "null"
258+
description: Justification for entering this status (e.g., why an instruction was `REJECTED`). `null` for non-terminal or non-rejected states.
259+
createdAt:
260+
type: string
261+
format: date-time
262+
description: Time the instruction entered this status.
263+
required:
264+
- status
265+
- reason
266+
- createdAt
248267
Rail:
249268
type: string
250269
enum:
@@ -1398,13 +1417,8 @@ components:
13981417
type: string
13991418
description: Asset/currency for this instruction.
14001419
example: "BRL"
1401-
status:
1402-
type: string
1403-
enum:
1404-
- PENDING_REVIEW
1405-
- APPROVED
1406-
- REJECTED
1407-
description: Compliance review status of this payment instruction.
1420+
currentState:
1421+
$ref: "#/components/schemas/InstructionState"
14081422
address:
14091423
$ref: "#/components/schemas/FinancialAddress"
14101424
createdAt:
@@ -1414,7 +1428,7 @@ components:
14141428
required:
14151429
- id
14161430
- asset
1417-
- status
1431+
- currentState
14181432
- address
14191433
- createdAt
14201434
responses:

0 commit comments

Comments
 (0)