### Account Creation Success

A webhook with the `account_id` will be posted if your API account is configured for Payment Account Webhooks upon successful account creation via Widget UI.

The `redirect_url` provided with the `widget_params` will have the `accountId` and `widget_id` parameters appended and URL encoded.

### Account Creation Failure

A webhook with the `error_code` will be posted if your API account is configured for Payment Account Webhooks upon failing to create/authenticate a user's bank account.

The `redirect_url` provided with the `widget_params` will have the `accountId`, `widget_id`, and `errorCode` parameters appended and URL encoded.

### Link Provider

Due to requirements from Chase Bank, clients should migrate to `link_provider` `PLAID`. Plaid's Hosted Link meets Chase Bank's requirements for webviews and browser-based account linking.

On mobile devices, the Plaid Hosted Link domain must be served in an **out of process webview**. In process webviews are not supported by Chase Bank.

**Plaid Hosted Link is not supported as an iFrame element.**

### Parameters

- **payer_id**  
  Type: string  
  Required: Yes  
  Description: Payer ID

- **recipient_id**  
  Type: string  
  Required: Yes  
  Description: Recipient ID

- **account_id**  
  Type: string  
  Required: Optional  
  Description: Required if the bank account requires a re-authorization process with Plaid Link

- **mobile_device**  
  Type: boolean  
  Default: false  
  Description: Indicate mobile device to render appropriate UI

- **link_provider**  
  Type: string (enum)  
  Default: INTERCHECKS  
  Description: Determines the link workflow  
  Allowed: `PLAID`, `INTERCHECKS`

### Example API Request

```bash
curl --request POST \
     --url https://test.api.interchecks.io/api/v2/payer_id/widgets/accounts/bank \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '{
  "account_id": "optional",
  "mobile_device": false,
  "link_provider": "INTERCHECKS"
}'
```

### Response Codes
- **201** - Result  
- **400** - Bad Request - invalid Recipient ID  
- **400** - Bad Request - invalid Account ID
