Why enrolling a card answers 403 when its card type, such as consumer or commercial, is blocked on the subaccount, and how to unblock it.
Description
POST /card-subscriptions answers 403 because the card's type is in the subaccount's blockedCardTypes for the card's network (configurations.<NETWORK>.single-enrollment). The account's default blocked types are always part of that list. detail names the card type from the BIN data: CONSUMER, COMMERCIAL, CORPORATE or SMALL_BUSINESS.
{
"detail": "This card type is not supported (CONSUMER card)",
"title": "Forbidden",
"type": "https://docs.astrada.co/reference/errors-subaccount_blocking_card_type",
"errorCode": "card_subscription.subaccount_blocking_card_type"
}The same code comes back when the subaccount's enrollmentPolicy.bankEnrollment is amex-visa and a Visa card is not classified as a business card. That body adds reasonCode and cardClass, and cardClass can also be GIFT, PREPAID, SPECIALTY or UNCLASSIFIED:
{
"detail": "This card type is not supported (CONSUMER card)",
"title": "Forbidden",
"type": "https://docs.astrada.co/reference/errors-subaccount_blocking_card_type",
"errorCode": "card_subscription.subaccount_blocking_card_type",
"reasonCode": "card_subscription.bank_enrollment_required",
"cardClass": "CONSUMER"
}How to solve
Enroll a card of a type the subaccount allows, or remove the type from the subaccount's blockedCardTypes with PATCH /subaccounts/{subaccountId}. A type in the account's defaults cannot be removed at the subaccount. With reasonCode card_subscription.bank_enrollment_required, enroll the card through bank linking instead.
