From 40882639d8b913677ca112a97094f66a22b01abe Mon Sep 17 00:00:00 2001 From: Peng Ying Date: Fri, 29 May 2026 12:32:23 -0700 Subject: [PATCH] feat(transfers): allow selecting payment rail on transfer-out destination Add an optional `paymentRail` field to the transfer-out destination, mirroring the rail selection already available on quote destinations. Introduces a dedicated `ExternalAccountDestinationReference` schema (accountId + paymentRail) so the shared `ExternalAccountReference` used by transfer-in is left unchanged. The field reuses the common `PaymentRail` enum. Co-Authored-By: Claude Opus 4.8 (1M context) --- mintlify/openapi.yaml | 16 +++++++++++++++- openapi.yaml | 16 +++++++++++++++- .../ExternalAccountDestinationReference.yaml | 15 +++++++++++++++ .../schemas/transfers/TransferOutRequest.yaml | 2 +- openapi/paths/transfers/transfer_out.yaml | 1 + 5 files changed, 47 insertions(+), 3 deletions(-) create mode 100644 openapi/components/schemas/transfers/ExternalAccountDestinationReference.yaml diff --git a/mintlify/openapi.yaml b/mintlify/openapi.yaml index 634d37ee..29b614c7 100644 --- a/mintlify/openapi.yaml +++ b/mintlify/openapi.yaml @@ -2143,6 +2143,7 @@ paths: accountId: InternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 destination: accountId: ExternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 + paymentRail: ACH amount: 12550 responses: '201': @@ -16123,6 +16124,19 @@ components: mapping: INCOMING: '#/components/schemas/IncomingTransaction' OUTGOING: '#/components/schemas/OutgoingTransaction' + ExternalAccountDestinationReference: + type: object + required: + - accountId + properties: + accountId: + type: string + description: Reference to an external account ID + example: ExternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 + paymentRail: + description: The payment rail to use for the transfer. Must be one of the rails supported by the destination account. If not specified, the system will select a default rail. + allOf: + - $ref: '#/components/schemas/PaymentRail' TransferOutRequest: type: object required: @@ -16133,7 +16147,7 @@ components: $ref: '#/components/schemas/InternalAccountReference' description: Source internal account details destination: - $ref: '#/components/schemas/ExternalAccountReference' + $ref: '#/components/schemas/ExternalAccountDestinationReference' description: Destination external account details amount: type: integer diff --git a/openapi.yaml b/openapi.yaml index 634d37ee..29b614c7 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -2143,6 +2143,7 @@ paths: accountId: InternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 destination: accountId: ExternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 + paymentRail: ACH amount: 12550 responses: '201': @@ -16123,6 +16124,19 @@ components: mapping: INCOMING: '#/components/schemas/IncomingTransaction' OUTGOING: '#/components/schemas/OutgoingTransaction' + ExternalAccountDestinationReference: + type: object + required: + - accountId + properties: + accountId: + type: string + description: Reference to an external account ID + example: ExternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 + paymentRail: + description: The payment rail to use for the transfer. Must be one of the rails supported by the destination account. If not specified, the system will select a default rail. + allOf: + - $ref: '#/components/schemas/PaymentRail' TransferOutRequest: type: object required: @@ -16133,7 +16147,7 @@ components: $ref: '#/components/schemas/InternalAccountReference' description: Source internal account details destination: - $ref: '#/components/schemas/ExternalAccountReference' + $ref: '#/components/schemas/ExternalAccountDestinationReference' description: Destination external account details amount: type: integer diff --git a/openapi/components/schemas/transfers/ExternalAccountDestinationReference.yaml b/openapi/components/schemas/transfers/ExternalAccountDestinationReference.yaml new file mode 100644 index 00000000..61934522 --- /dev/null +++ b/openapi/components/schemas/transfers/ExternalAccountDestinationReference.yaml @@ -0,0 +1,15 @@ +type: object +required: + - accountId +properties: + accountId: + type: string + description: Reference to an external account ID + example: ExternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 + paymentRail: + description: >- + The payment rail to use for the transfer. Must be one of the rails + supported by the destination account. If not specified, the system + will select a default rail. + allOf: + - $ref: ../common/PaymentRail.yaml diff --git a/openapi/components/schemas/transfers/TransferOutRequest.yaml b/openapi/components/schemas/transfers/TransferOutRequest.yaml index 50e97f6a..c6906fde 100644 --- a/openapi/components/schemas/transfers/TransferOutRequest.yaml +++ b/openapi/components/schemas/transfers/TransferOutRequest.yaml @@ -7,7 +7,7 @@ properties: $ref: ./InternalAccountReference.yaml description: Source internal account details destination: - $ref: ./ExternalAccountReference.yaml + $ref: ./ExternalAccountDestinationReference.yaml description: Destination external account details amount: type: integer diff --git a/openapi/paths/transfers/transfer_out.yaml b/openapi/paths/transfers/transfer_out.yaml index a14dab02..e0afde18 100644 --- a/openapi/paths/transfers/transfer_out.yaml +++ b/openapi/paths/transfers/transfer_out.yaml @@ -31,6 +31,7 @@ post: accountId: InternalAccount:a12dcbd6-dced-4ec4-b756-3c3a9ea3d123 destination: accountId: ExternalAccount:e85dcbd6-dced-4ec4-b756-3c3a9ea3d965 + paymentRail: ACH amount: 12550 responses: '201':