Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
213 changes: 206 additions & 7 deletions openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -913,6 +913,7 @@ paths:
- $ref: '#/components/schemas/UnverifiedCustomer'
- $ref: '#/components/schemas/ReceiveOnlyCustomer'
- $ref: '#/components/schemas/VerifiedPersonalCustomer'
- $ref: '#/components/schemas/VerifiedSolePropCustomer'
- $ref: '#/components/schemas/VerifiedBusinessCustomer'
'403':
description: forbidden
Expand Down Expand Up @@ -8544,11 +8545,23 @@ paths:
post:
tags:
- sandbox simulations
summary: Simulate bank transfer processing (Sandbox only)
summary: Sandbox simulations (bank transfers, VAN transfers, or customer verification directives)
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.
Sandbox-only endpoint with three modes:

**Simulate bank transfer processing** — Omit the body or send an empty JSON object. Processes or fails
the last 500 bank transfers on the authorized application or Sandbox account (and initiated micro-deposits).
If webhooks are configured, events are delivered. If a bank-to-bank transaction involves two users,
call this twice to process debit and credit sides. Returns **200** with a HAL document including `total`.

If a bank-to-bank transaction is initiated between two users, call this endpoint twice to process both the debit and credit sides.
**Simulate VAN (virtual) transfers** — Send a JSON body with `type` set to `virtual` and a `transfers`
array (up to 10 items). External transfers are created and processed immediately. Returns **202 Accepted**.

**Simulate verification directives** — For a business Verified Customer in **`retry`** or **`document`**
status, send `type`: `customer-verification`, `_links.customer.href` pointing at that customer, and
`errorCode` set to one of: `PersonalIDRequired`, `POBoxNotAllowed`, `AddressNotAssociatedWithBusiness`,
`EINDocumentRequired`. Returns **200** with HAL `_links.self` and `errorCode`. Then **GET** the Customer;
the same code appears in `_embedded.errors` for end-to-end testing.
operationId: simulateBankTransferProcessing
x-speakeasy-name-override: simulate
x-codeSamples:
Expand All @@ -8562,18 +8575,54 @@ paths:
- $ref: '#/components/parameters/Accept'
requestBody:
required: false
description: Optional JSON body. Typically empty; presence of body is not required.
description: |
Optional. For bank transfer processing, omit the body or send `{}`. For VAN simulation, send `type`: `virtual` and a `transfers` array. For verification
directives, send `type`: `customer-verification`, `_links.customer`, and `errorCode` (see schema).
content:
application/vnd.dwolla.v1.hal+json:
schema:
type: object
$ref: '#/components/schemas/SandboxSimulationRequest'
responses:
'200':
description: Simulation executed. Pending bank transfers and micro-deposits were processed or failed.
description: |
Success. **Bank transfer processing** returns HAL with `total`. **Customer verification directives**
return HAL `_links.self` and `errorCode` (retrieve the Customer for `_embedded.errors`).
content:
application/vnd.dwolla.v1.hal+json:
schema:
type: object
oneOf:
- $ref: '#/components/schemas/SandboxSimulationBankProcessingResponse'
- $ref: '#/components/schemas/SandboxSimulationCustomerVerificationResponse'
examples:
bankTransferProcessing:
summary: Bank transfer processing
value:
_links:
self:
href: https://api-sandbox.dwolla.com/sandbox-simulations
type: application/vnd.dwolla.v1.hal+json
resource-type: sandbox-simulation
total: 8
customerVerificationDirective:
summary: Customer verification directive simulation
value:
_links:
self:
href: https://api-sandbox.dwolla.com/sandbox-simulations
type: application/vnd.dwolla.v1.hal+json
resource-type: sandbox-simulation
errorCode: AddressNotAssociatedWithBusiness
'202':
description: |
Accepted. Virtual (VAN) transfer simulation: requested transfers were accepted for immediate
processing in Sandbox.
'400':
description: |
Bad Request.
content:
application/vnd.dwolla.v1.hal+json:
schema:
$ref: '#/components/schemas/BadRequestError'
'401':
description: unauthorized
content:
Expand Down Expand Up @@ -15934,6 +15983,156 @@ components:
type: integer
format: int32
example: 1
SandboxSimulationVirtualTransferItem:
title: SandboxSimulationVirtualTransferItem
description: One simulated external (VAN) transfer in a sandbox-simulations request.
type: object
required:
- _link
- amount
properties:
_link:
type: object
description: Link wrapper for the destination funding source (Dwolla HAL-style single link).
required:
- destination
properties:
destination:
type: object
required:
- href
properties:
href:
type: string
format: uri
example: https://api-sandbox.dwolla.com/funding-sources/5880e310-675a-4ce3-87d9-a475cc565e09
amount:
$ref: '#/components/schemas/TransferAmount'
SandboxSimulationVirtualAccountTransfersRequest:
title: SandboxSimulationVirtualAccountTransfersRequest
description: |
Simulate Virtual Account Number (VAN) / external transfers in Sandbox. Up to 10 transfers per request;
transfers are created and processed immediately. Successful response is 202 Accepted.
type: object
required:
- type
- transfers
properties:
type:
type: string
const: virtual
description: Must be set to virtual for VAN transfer simulation.
transfers:
type: array
description: Transfers to simulate (max 10 per request).
minItems: 1
maxItems: 10
items:
$ref: '#/components/schemas/SandboxSimulationVirtualTransferItem'
SandboxSimulationCustomerVerificationRequest:
title: SandboxSimulationCustomerVerificationRequest
description: |
Simulate a verification directive for a business Verified Customer in Sandbox. The customer must be in
`retry` or `document` status. After a successful call, retrieve the Customer resource; the given `errorCode`
appears under `_embedded.errors`. See Dwolla documentation for verification directive meanings.
type: object
required:
- type
- _links
- errorCode
properties:
type:
type: string
const: customer-verification
description: Must be set to customer-verification for verification directive simulation.
_links:
type: object
required:
- customer
properties:
customer:
type: object
required:
- href
properties:
href:
type: string
format: uri
description: URL of the Sandbox customer to attach the simulated directive to.
example: https://api-sandbox.dwolla.com/customers/00000000-0000-0000-0000-000000000000
errorCode:
type: string
description: Verification directive to simulate for the linked customer.
enum:
- PersonalIDRequired
- POBoxNotAllowed
- AddressNotAssociatedWithBusiness
- EINDocumentRequired
example: AddressNotAssociatedWithBusiness
SandboxSimulationBankProcessingRequest:
title: SandboxSimulationBankProcessingRequest
description: |
Omit the request body or send an empty JSON object (`{}`). Triggers processing (or failure) for the last
500 bank transfers on the authorized application or Sandbox account, and initiated micro-deposits.
Successful response is 200 with a HAL body including total.
type: object
additionalProperties: false
SandboxSimulationRequest:
title: SandboxSimulationRequest
description: |
Bank transfer processing (omit body or `{}`), VAN transfer simulation (`type` virtual + transfers), or
verification directive simulation (`type` customer-verification, customer link, and errorCode). Typed bodies
are mutually exclusive; use only an omitted body or `{}` for bank processing.
oneOf:
- $ref: '#/components/schemas/SandboxSimulationVirtualAccountTransfersRequest'
- $ref: '#/components/schemas/SandboxSimulationCustomerVerificationRequest'
- $ref: '#/components/schemas/SandboxSimulationBankProcessingRequest'
SandboxSimulationBankProcessingResponse:
title: SandboxSimulationBankProcessingResponse
description: Response when simulating bank transfer processing (200 OK).
type: object
required:
- _links
- total
properties:
total:
type: integer
format: int32
example: 8
description: Count of bank transfers (and related items) affected by the simulation run.
_links:
type: object
required:
- self
properties:
self:
$ref: '#/components/schemas/HalLink'
SandboxSimulationCustomerVerificationResponse:
title: SandboxSimulationCustomerVerificationResponse
description: |
Response when simulating customer verification directives (200 OK). Echoes the simulated `errorCode`;
retrieve the Customer resource to inspect `_embedded.errors`.
type: object
required:
- _links
- errorCode
properties:
_links:
type: object
required:
- self
properties:
self:
$ref: '#/components/schemas/HalLink'
errorCode:
type: string
description: Verification directive that was simulated.
enum:
- PersonalIDRequired
- POBoxNotAllowed
- AddressNotAssociatedWithBusiness
- EINDocumentRequired
example: AddressNotAssociatedWithBusiness
ExchangePartner:
title: ExchangePartner
type: object
Expand Down
1 change: 1 addition & 0 deletions specs/resources/customers/retrieveUpdateCustomer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ get:
- $ref: '../../schemas/customers/Customer.yml#/UnverifiedCustomer'
- $ref: '../../schemas/customers/Customer.yml#/ReceiveOnlyCustomer'
- $ref: '../../schemas/customers/Customer.yml#/VerifiedPersonalCustomer'
- $ref: '../../schemas/customers/Customer.yml#/VerifiedSolePropCustomer'
- $ref: '../../schemas/customers/Customer.yml#/VerifiedBusinessCustomer'
'403':
description: forbidden
Expand Down
63 changes: 55 additions & 8 deletions specs/resources/sandbox-simulations.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,23 @@
post:
tags:
- sandbox simulations
summary: Simulate bank transfer processing (Sandbox only)
summary: Sandbox simulations (bank transfers, VAN transfers, or customer verification directives)
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.
Sandbox-only endpoint with three modes:

If a bank-to-bank transaction is initiated between two users, call this endpoint twice to process both the debit and credit sides.
**Simulate bank transfer processing** — Omit the body or send an empty JSON object. Processes or fails
the last 500 bank transfers on the authorized application or Sandbox account (and initiated micro-deposits).
If webhooks are configured, events are delivered. If a bank-to-bank transaction involves two users,
call this twice to process debit and credit sides. Returns **200** with a HAL document including `total`.

**Simulate VAN (virtual) transfers** — Send a JSON body with `type` set to `virtual` and a `transfers`
array (up to 10 items). External transfers are created and processed immediately. Returns **202 Accepted**.

**Simulate verification directives** — For a business Verified Customer in **`retry`** or **`document`**
status, send `type`: `customer-verification`, `_links.customer.href` pointing at that customer, and
`errorCode` set to one of: `PersonalIDRequired`, `POBoxNotAllowed`, `AddressNotAssociatedWithBusiness`,
`EINDocumentRequired`. Returns **200** with HAL `_links.self` and `errorCode`. Then **GET** the Customer;
the same code appears in `_embedded.errors` for end-to-end testing.
operationId: simulateBankTransferProcessing
x-speakeasy-name-override: simulate
x-codeSamples:
Expand All @@ -19,18 +31,54 @@ post:
- $ref: '../schemas/common.yml#/components/parameters/Accept'
requestBody:
required: false
description: Optional JSON body. Typically empty; presence of body is not required.
description: |
Optional. For bank transfer processing, omit the body or send `{}`. For VAN simulation, send `type`: `virtual` and a `transfers` array. For verification
directives, send `type`: `customer-verification`, `_links.customer`, and `errorCode` (see schema).
content:
application/vnd.dwolla.v1.hal+json:
schema:
type: object
$ref: '../schemas/sandbox/SandboxSimulations.yml#/SandboxSimulationRequest'
responses:
'200':
description: Simulation executed. Pending bank transfers and micro-deposits were processed or failed.
description: |
Success. **Bank transfer processing** returns HAL with `total`. **Customer verification directives**
return HAL `_links.self` and `errorCode` (retrieve the Customer for `_embedded.errors`).
content:
application/vnd.dwolla.v1.hal+json:
schema:
type: object
oneOf:
- $ref: '../schemas/sandbox/SandboxSimulations.yml#/SandboxSimulationBankProcessingResponse'
- $ref: '../schemas/sandbox/SandboxSimulations.yml#/SandboxSimulationCustomerVerificationResponse'
examples:
bankTransferProcessing:
summary: Bank transfer processing
value:
_links:
self:
href: https://api-sandbox.dwolla.com/sandbox-simulations
type: application/vnd.dwolla.v1.hal+json
resource-type: sandbox-simulation
total: 8
customerVerificationDirective:
summary: Customer verification directive simulation
value:
_links:
self:
href: https://api-sandbox.dwolla.com/sandbox-simulations
type: application/vnd.dwolla.v1.hal+json
resource-type: sandbox-simulation
errorCode: AddressNotAssociatedWithBusiness
'202':
description: |
Accepted. Virtual (VAN) transfer simulation: requested transfers were accepted for immediate
processing in Sandbox.
'400':
description: |
Bad Request.
content:
application/vnd.dwolla.v1.hal+json:
schema:
$ref: '../schemas/common.yml#/components/schemas/BadRequestError'
'401':
description: unauthorized
content:
Expand All @@ -57,4 +105,3 @@ post:
message:
type: string
example: Not authorized to simulate transfer processing.

Loading