post
https://api.sandbox.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 is refused when the account has locked bank enrollment (enrollmentPolicy.bankEnrollmentLockedistrueon the subaccount) and the subaccount'senrollmentPolicy.bankEnrollmentvalue does not allow a bank link for this card. Otherwise the check does not refuse. 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.403PLAID_CUSTOMIZATION_NOT_PROVISIONED: Plaid refused the Link customization this link asked for, because the account's Plaid client cannot use it, and no fallback applied. Nothing is created. The message isThis account is not fully set up for Plaid bank linking yet. A customization other thanamex_only(one set by the bank-linking policy'splaidLinkCustomizationName) answers this at once. When Plaid refusesamex_only, fromfilters.linkCustomizationNameor from the policy, the create is retried once with the environment's pinned customization in its place, or with no customization when the environment pins none. If Plaid accepts the retry, the link is created as usual: its hosted session opens without theamex_onlycustomization, and its completion is still held to American Express institutions. Foramex_only, only a refused retry answers this error. Astrada fixes it in the account's Plaid setup, so sending the same request again does not help.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…
