post
https://api.astrada.co/bank-links
Creates a new bank link to initiate a bank enrollment. The response includes a hostedLink URL where the user can connect their bank account via Plaid.
The hosted link expires after 4 hours. If the link expires before the user completes enrollment, retrieve the bank link via GET /bank-links/{bankLinkId} to get a refreshed URL.
Creating a bank link with an ID that already exists for the account will return a 409 Conflict error, unless the existing link has expired.
A refused create returns a JSON body with statusCode and message. These errors also carry a code, a stable name to branch on so that you never match on message text (the 409 above has no code):
404SUBACCOUNT_NOT_FOUND:subaccountIdis not one of the account's subaccounts. Nothing is created. The message isSubaccount not found for this account.403BANK_ENROLLMENT_DISABLED: a create can be refused when the subaccount'senrollmentPolicy.bankEnrollmentdoes not allow a bank link for this card and the account has locked it (enrollmentPolicy.bankEnrollmentLockedistrueon the subaccount). Nothing is created. The message isBank linking is not enabled for this card on this account. The body also has areason:bank-enrollment-offwhen the setting isoff,network-not-allowedwhen it does not allow the card's network, andnetwork-unknownwhen it limits the networks and the request does not show the card's network. The card's network comes from the request: American Express when the link uses theamex_onlycustomization, otherwisebin6(a first digit of4is Visa,2or5is Mastercard, and any other digit, a3included, is unknown). Withoutbin6it is unknown.403MASTERCARD_CLIENT_NOT_PROVISIONEDandPLAID_EC_NOT_PROVISIONED: the account is not set up for bank linking on that provider yet. The messages areThis account is not set up for Mastercard bank linking yetandThis account is not set up for Plaid bank linking yet.400INVALID_LINK_FILTERS:filtersasks for more than the account's bank-linking policy allows, or for a customization that is not allowed.400PROVIDER_NOT_ENABLED_FOR_ACCOUNT:provideris not enabled for the account.400PROVIDER_NOT_SUPPORTED_FOR_COUNTRY: no provider supportscountryCodefor the chosenprovider.
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
