From e6e905a78849cee2810d95ec69b0292066625368 Mon Sep 17 00:00:00 2001 From: Shreya Thapa Date: Wed, 29 Oct 2025 10:21:07 -0500 Subject: [PATCH 1/5] Add Sandbox-Simulations endpoint --- specs/resources/sandbox-simulations.yml | 58 +++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 specs/resources/sandbox-simulations.yml diff --git a/specs/resources/sandbox-simulations.yml b/specs/resources/sandbox-simulations.yml new file mode 100644 index 0000000..1071cb7 --- /dev/null +++ b/specs/resources/sandbox-simulations.yml @@ -0,0 +1,58 @@ +post: + tags: + - sandbox simulations + summary: Simulate bank transfer processing (Sandbox only) + description: | + Triggers processing for the last 500 bank transfers on the authorized application or Sandbox account. This endpoint is only available in the Sandbox environment. It will process or fail pending bank-to-bank transactions (including both sides of a transfer when applicable) and initiated micro-deposits. If webhooks are configured, corresponding events will be delivered. + + If a bank-to-bank transaction is initiated between two users, call this endpoint twice to process both the debit and credit sides. + operationId: simulateBankTransferProcessing + x-speakeasy-name-override: simulate + x-codeSamples: + - lang: bash + source: | + POST https://api-sandbox.dwolla.com/sandbox-simulations + Accept: application/vnd.dwolla.v1.hal+json + Content-Type: application/vnd.dwolla.v1.hal+json + Authorization: Bearer {Your access token} + requestBody: + required: false + description: Optional JSON body. Typically empty; presence of body is not required. + content: + application/vnd.dwolla.v1.hal+json: + schema: + type: object + responses: + '200': + description: Simulation executed. Pending bank transfers and micro-deposits were processed or failed. + content: + application/vnd.dwolla.v1.hal+json: + schema: + type: object + '401': + description: unauthorized + content: + application/vnd.dwolla.v1.hal+json: + schema: + type: object + properties: + code: + type: string + example: InvalidAccessToken + message: + type: string + example: Invalid access token. + '403': + description: forbidden + content: + application/vnd.dwolla.v1.hal+json: + schema: + type: object + properties: + code: + type: string + example: forbidden + message: + type: string + example: Not authorized to simulate transfer processing. + From f644dcf4fe7e0653a03bdde579a537cb7e9f9b3e Mon Sep 17 00:00:00 2001 From: Shreya Thapa Date: Wed, 29 Oct 2025 10:22:19 -0500 Subject: [PATCH 2/5] Add sandbox-simulations to spec.yml --- specs/spec.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/specs/spec.yml b/specs/spec.yml index be87022..dda21d8 100644 --- a/specs/spec.yml +++ b/specs/spec.yml @@ -114,6 +114,8 @@ paths: $ref: './resources/webhooks/retrieveWebhook.yml' /webhooks/{id}/retries: $ref: './resources/webhooks/listRetriesAndRetryWebhook.yml' + /sandbox-simulations: + $ref: './resources/sandbox-simulations.yml' /exchange-partners: $ref: './resources/exchanges/listExchangePartners.yml' /exchange-partners/{id}: @@ -180,3 +182,5 @@ tags: description: Operations related to Webhooks - name: client tokens description: Operations related to Client Tokens + - name: sandbox simulations + description: Sandbox-only operations for simulating processing of bank transfers From 4d7a349cab34303227274218a938adf2aa863645 Mon Sep 17 00:00:00 2001 From: Shreya Thapa Date: Thu, 30 Oct 2025 07:33:09 -0500 Subject: [PATCH 3/5] Fix customer funding-source creation schemas + add idempotency-key example --- openapi.yml | 111 +++++++++++++++++- .../mass-payments/initiateMassPayment.yml | 1 + .../resources/transfers/initiateTransfer.yml | 1 + .../CreateCustomerFundingSource.yml | 44 ++++++- 4 files changed, 151 insertions(+), 6 deletions(-) diff --git a/openapi.yml b/openapi.yml index 4ea6371..252211d 100644 --- a/openapi.yml +++ b/openapi.yml @@ -54,6 +54,8 @@ tags: description: Operations related to Webhooks - name: client tokens description: Operations related to Client Tokens + - name: sandbox simulations + description: Sandbox-only operations for simulating processing of bank transfers paths: /token: post: @@ -4198,6 +4200,7 @@ paths: schema: type: string in: header + example: 19051a62-3403-11e6-ac61-9e71128cae77 requestBody: required: true description: Parameters to initiate a transfer @@ -5344,6 +5347,7 @@ paths: schema: type: string in: header + example: 19051a62-3403-11e6-ac61-9e71128cae77 requestBody: required: true description: Parameters for initiating a mass payment @@ -8049,6 +8053,64 @@ paths: application/vnd.dwolla.v1.hal+json: schema: $ref: '#/components/schemas/NotFoundError' + /sandbox-simulations: + post: + tags: + - sandbox simulations + summary: Simulate bank transfer processing (Sandbox only) + description: | + Triggers processing for the last 500 bank transfers on the authorized application or Sandbox account. This endpoint is only available in the Sandbox environment. It will process or fail pending bank-to-bank transactions (including both sides of a transfer when applicable) and initiated micro-deposits. If webhooks are configured, corresponding events will be delivered. + + If a bank-to-bank transaction is initiated between two users, call this endpoint twice to process both the debit and credit sides. + operationId: simulateBankTransferProcessing + x-speakeasy-name-override: simulate + x-codeSamples: + - lang: bash + source: | + POST https://api-sandbox.dwolla.com/sandbox-simulations + Accept: application/vnd.dwolla.v1.hal+json + Content-Type: application/vnd.dwolla.v1.hal+json + Authorization: Bearer {Your access token} + requestBody: + required: false + description: Optional JSON body. Typically empty; presence of body is not required. + content: + application/vnd.dwolla.v1.hal+json: + schema: + type: object + responses: + '200': + description: Simulation executed. Pending bank transfers and micro-deposits were processed or failed. + content: + application/vnd.dwolla.v1.hal+json: + schema: + type: object + '401': + description: unauthorized + content: + application/vnd.dwolla.v1.hal+json: + schema: + type: object + properties: + code: + type: string + example: InvalidAccessToken + message: + type: string + example: Invalid access token. + '403': + description: forbidden + content: + application/vnd.dwolla.v1.hal+json: + schema: + type: object + properties: + code: + type: string + example: forbidden + message: + type: string + example: Not authorized to simulate transfer processing. /exchange-partners: get: tags: @@ -11747,8 +11809,8 @@ components: message: type: string example: The kba session has expired. - CreateCustomerBankFundingSource: - title: CreateCustomerBankFundingSource + CreateCustomerBankFundingSourceViaNumbers: + title: CreateCustomerBankFundingSourceViaNumbers type: object description: Schema for creating a basic bank funding source using routing and account numbers. This is the traditional method of adding a bank account. required: @@ -11783,9 +11845,51 @@ components: description: Use when creating an unverified bank account. const: false example: false + channels: + type: array + items: + type: string + enum: + - wire + description: An array containing a list of processing channels. ACH is the default processing channel for bank transfers. + _links: + type: object + properties: + on-demand-authorization: + type: object + required: + - href + properties: + href: + type: string + format: uri + example: https://api-sandbox.dwolla.com/on-demand-authorizations/30e7c028-0bdf-e511-80de-0aa34a9b2388 + CreateCustomerBankFundingSourceViaPlaid: + title: CreateCustomerBankFundingSourceViaPlaid + type: object + description: Schema for creating a bank funding source using a Plaid processor token. + required: + - plaidToken + - bankAccountType + - name + properties: plaidToken: type: string description: A processor token obtained from Plaid for adding and verifying a bank + example: processor-sandbox-plaidauth-123456 + bankAccountType: + type: string + enum: + - checking + - savings + - general-ledger + - loan + description: Type of bank account + example: checking + name: + type: string + description: Arbitrary nickname for the funding source. Must be 50 characters or less. + example: Jane Doe's Checking channels: type: array items: @@ -11883,7 +11987,8 @@ components: - Exchange: Using IAV through exchange partners (Plaid, MX, etc.) - Virtual Account: Creating Virtual Account Numbers (VANs) oneOf: - - $ref: '#/components/schemas/CreateCustomerBankFundingSource' + - $ref: '#/components/schemas/CreateCustomerBankFundingSourceViaNumbers' + - $ref: '#/components/schemas/CreateCustomerBankFundingSourceViaPlaid' - $ref: '#/components/schemas/CreateCustomerExchangeFundingSource' - $ref: '#/components/schemas/CreateCustomerVirtualAccountFundingSource' InactiveExchangeError: diff --git a/specs/resources/mass-payments/initiateMassPayment.yml b/specs/resources/mass-payments/initiateMassPayment.yml index 279b0f6..484e19e 100644 --- a/specs/resources/mass-payments/initiateMassPayment.yml +++ b/specs/resources/mass-payments/initiateMassPayment.yml @@ -435,6 +435,7 @@ post: schema: type: string in: header + example: 19051a62-3403-11e6-ac61-9e71128cae77 requestBody: required: true description: Parameters for initiating a mass payment diff --git a/specs/resources/transfers/initiateTransfer.yml b/specs/resources/transfers/initiateTransfer.yml index 50c6753..d86cb77 100644 --- a/specs/resources/transfers/initiateTransfer.yml +++ b/specs/resources/transfers/initiateTransfer.yml @@ -321,6 +321,7 @@ post: schema: type: string in: header + example: 19051a62-3403-11e6-ac61-9e71128cae77 requestBody: required: true description: Parameters to initiate a transfer diff --git a/specs/schemas/funding-sources/CreateCustomerFundingSource.yml b/specs/schemas/funding-sources/CreateCustomerFundingSource.yml index ed55d75..9d2aa97 100644 --- a/specs/schemas/funding-sources/CreateCustomerFundingSource.yml +++ b/specs/schemas/funding-sources/CreateCustomerFundingSource.yml @@ -6,11 +6,12 @@ CreateCustomerFundingSource: - Exchange: Using IAV through exchange partners (Plaid, MX, etc.) - Virtual Account: Creating Virtual Account Numbers (VANs) oneOf: - - $ref: '#/CreateCustomerBankFundingSource' + - $ref: '#/CreateCustomerBankFundingSourceViaNumbers' + - $ref: '#/CreateCustomerBankFundingSourceViaPlaid' - $ref: '#/CreateCustomerExchangeFundingSource' - $ref: '#/CreateCustomerVirtualAccountFundingSource' -CreateCustomerBankFundingSource: - title: CreateCustomerBankFundingSource +CreateCustomerBankFundingSourceViaNumbers: + title: CreateCustomerBankFundingSourceViaNumbers type: object description: Schema for creating a basic bank funding source using routing and account numbers. This is the traditional method of adding a bank account. required: @@ -41,9 +42,46 @@ CreateCustomerBankFundingSource: description: Use when creating an unverified bank account. const: false example: false + channels: + type: array + items: + type: string + enum: [wire] + description: An array containing a list of processing channels. ACH is the default processing channel for bank transfers. + _links: + type: object + properties: + on-demand-authorization: + type: object + required: + - href + properties: + href: + type: string + format: uri + example: https://api-sandbox.dwolla.com/on-demand-authorizations/30e7c028-0bdf-e511-80de-0aa34a9b2388 +CreateCustomerBankFundingSourceViaPlaid: + title: CreateCustomerBankFundingSourceViaPlaid + type: object + description: Schema for creating a bank funding source using a Plaid processor token. + required: + - plaidToken + - bankAccountType + - name + properties: plaidToken: type: string description: A processor token obtained from Plaid for adding and verifying a bank + example: processor-sandbox-plaidauth-123456 + bankAccountType: + type: string + enum: [checking, savings, general-ledger, loan] + description: Type of bank account + example: checking + name: + type: string + description: Arbitrary nickname for the funding source. Must be 50 characters or less. + example: Jane Doe's Checking channels: type: array items: From b55b6bb8d0b6f416b836bfb12dd4051acae3ac78 Mon Sep 17 00:00:00 2001 From: Shreya Thapa Date: Thu, 30 Oct 2025 07:40:26 -0500 Subject: [PATCH 4/5] Remove loan and gl bank types from plaid and exchange schemas --- openapi.yml | 4 ---- specs/schemas/funding-sources/CreateCustomerFundingSource.yml | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/openapi.yml b/openapi.yml index 252211d..c1f62dd 100644 --- a/openapi.yml +++ b/openapi.yml @@ -11882,8 +11882,6 @@ components: enum: - checking - savings - - general-ledger - - loan description: Type of bank account example: checking name: @@ -11946,8 +11944,6 @@ components: enum: - checking - savings - - general-ledger - - loan description: Type of bank account example: checking name: diff --git a/specs/schemas/funding-sources/CreateCustomerFundingSource.yml b/specs/schemas/funding-sources/CreateCustomerFundingSource.yml index 9d2aa97..b9b8c94 100644 --- a/specs/schemas/funding-sources/CreateCustomerFundingSource.yml +++ b/specs/schemas/funding-sources/CreateCustomerFundingSource.yml @@ -75,7 +75,7 @@ CreateCustomerBankFundingSourceViaPlaid: example: processor-sandbox-plaidauth-123456 bankAccountType: type: string - enum: [checking, savings, general-ledger, loan] + enum: [checking, savings] description: Type of bank account example: checking name: @@ -134,7 +134,7 @@ CreateCustomerExchangeFundingSource: example: https://api-sandbox.dwolla.com/on-demand-authorizations/30e7c028-0bdf-e511-80de-0aa34a9b2388 bankAccountType: type: string - enum: [checking, savings, general-ledger, loan] + enum: [checking, savings] description: Type of bank account example: checking name: From 01a6879588e5bf18fb67dd789708d74ca377f248 Mon Sep 17 00:00:00 2001 From: Shreya Thapa Date: Thu, 30 Oct 2025 09:00:32 -0500 Subject: [PATCH 5/5] Address review comments --- openapi.yml | 12 ++++++------ .../funding-sources/CreateCustomerFundingSource.yml | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/openapi.yml b/openapi.yml index c1f62dd..68b51d4 100644 --- a/openapi.yml +++ b/openapi.yml @@ -11809,8 +11809,8 @@ components: message: type: string example: The kba session has expired. - CreateCustomerBankFundingSourceViaNumbers: - title: CreateCustomerBankFundingSourceViaNumbers + CreateCustomerBankFundingSourceWithAccountNumbers: + title: CreateCustomerBankFundingSourceWithAccountNumbers type: object description: Schema for creating a basic bank funding source using routing and account numbers. This is the traditional method of adding a bank account. required: @@ -11864,8 +11864,8 @@ components: type: string format: uri example: https://api-sandbox.dwolla.com/on-demand-authorizations/30e7c028-0bdf-e511-80de-0aa34a9b2388 - CreateCustomerBankFundingSourceViaPlaid: - title: CreateCustomerBankFundingSourceViaPlaid + CreateCustomerBankFundingSourceWithPlaid: + title: CreateCustomerBankFundingSourceWithPlaid type: object description: Schema for creating a bank funding source using a Plaid processor token. required: @@ -11983,8 +11983,8 @@ components: - Exchange: Using IAV through exchange partners (Plaid, MX, etc.) - Virtual Account: Creating Virtual Account Numbers (VANs) oneOf: - - $ref: '#/components/schemas/CreateCustomerBankFundingSourceViaNumbers' - - $ref: '#/components/schemas/CreateCustomerBankFundingSourceViaPlaid' + - $ref: '#/components/schemas/CreateCustomerBankFundingSourceWithAccountNumbers' + - $ref: '#/components/schemas/CreateCustomerBankFundingSourceWithPlaid' - $ref: '#/components/schemas/CreateCustomerExchangeFundingSource' - $ref: '#/components/schemas/CreateCustomerVirtualAccountFundingSource' InactiveExchangeError: diff --git a/specs/schemas/funding-sources/CreateCustomerFundingSource.yml b/specs/schemas/funding-sources/CreateCustomerFundingSource.yml index b9b8c94..683fe8c 100644 --- a/specs/schemas/funding-sources/CreateCustomerFundingSource.yml +++ b/specs/schemas/funding-sources/CreateCustomerFundingSource.yml @@ -6,12 +6,12 @@ CreateCustomerFundingSource: - Exchange: Using IAV through exchange partners (Plaid, MX, etc.) - Virtual Account: Creating Virtual Account Numbers (VANs) oneOf: - - $ref: '#/CreateCustomerBankFundingSourceViaNumbers' - - $ref: '#/CreateCustomerBankFundingSourceViaPlaid' + - $ref: '#/CreateCustomerBankFundingSourceWithAccountNumbers' + - $ref: '#/CreateCustomerBankFundingSourceWithPlaid' - $ref: '#/CreateCustomerExchangeFundingSource' - $ref: '#/CreateCustomerVirtualAccountFundingSource' -CreateCustomerBankFundingSourceViaNumbers: - title: CreateCustomerBankFundingSourceViaNumbers +CreateCustomerBankFundingSourceWithAccountNumbers: + title: CreateCustomerBankFundingSourceWithAccountNumbers type: object description: Schema for creating a basic bank funding source using routing and account numbers. This is the traditional method of adding a bank account. required: @@ -60,8 +60,8 @@ CreateCustomerBankFundingSourceViaNumbers: type: string format: uri example: https://api-sandbox.dwolla.com/on-demand-authorizations/30e7c028-0bdf-e511-80de-0aa34a9b2388 -CreateCustomerBankFundingSourceViaPlaid: - title: CreateCustomerBankFundingSourceViaPlaid +CreateCustomerBankFundingSourceWithPlaid: + title: CreateCustomerBankFundingSourceWithPlaid type: object description: Schema for creating a bank funding source using a Plaid processor token. required: