> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mangopay.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Co-branded cards

export const Bin = ({content}) => <Tooltip tip="Unique set of digits assigned to an issuing bank, which can give information about an issuer and the card issued.">
        {content}
    </Tooltip>;

In certain regions and countries, regulations require that cardholders be given the choice of the card brand (e.g. Visa, CB) that they wish to use when paying with a co-branded card.

This feature can be allow users to collect rewards, for example, tied to a specific scheme. It can also lead to reduced processing costs.

To support co-branded cards, your platform needs to obtain the choice of card brand from the user at the moment they authorize the transaction, and pass this choice on to Mangopay when you make the pay-in API request.

<Check>
  **Best practice – Integrate via Checkout SDK**

  The <a href="/sdks/checkout">Checkout SDK</a> identifies and presents co-branded cards to the user at payment, meaning you only have to pass this information on to Mangopay in the pay-in call.
</Check>

## How to support co-branded cards

Your platform can manage co-branded cards as follows:

<Steps>
  <Step title="Register the card">
    Tokenize the user's card as described in the [card registration](/guides/payment-methods/card#card-registration) guide.
  </Step>

  <Step title="Obtain the card BIN from the Card object">
    Call the [GET View a Card](/api-reference/cards/view-card) endpoint to obtain the Card's `Alias`. The first six digits are the card's <Bin content="BIN" />.
  </Step>

  <Step title="Look up the BIN to see if it's a co-branded card">
    Call the [POST Look up metadata for a payment method](/api-reference/payment-method-metadata/lookup-payment-method-metadata) with the card BIN.

    In the API response, if the card is co-branded then two `BinData` object parameters are returned. For example:

    ```json theme={null}
    {
      "Type": "BIN",
      "Bin": "497355",
      "IssuerCountryCode": "FR",
      "IssuingBank": "SOCIETE GENERALE, S.A.",
      "BinData": [
          {
              "CardType": null,
              "CommercialIndicator": null,
              "SubType": null,
              "Brand": "CB"
          },
          {
              "CardType": "DEBIT",
              "CommercialIndicator": "PERSONAL",
              "SubType": "CLASSIC",
              "Brand": "VISA"
          }
      ]
    }
    ```
  </Step>

  <Step title="If co-branded, present the choice to the user">
    In the example above, the user needs to be able to choose between CB and VISA.
  </Step>

  <Step title="Send the user's choice in the pay-in">
    Once the user has indicated their choice, send the value in the `PreferredCardNetwork` parameter in the transaction API call. This allows Mangopay to ensure the correct network is used to request the payment.

    The `PreferredCardNetwork` parameter has the allowed values `VISA`, `MASTERCARD`, `CB`, `MAESTRO`.

    The parameter is available on the following endpoints:

    * <a href="/api-reference/direct-card-payins/create-direct-card-payin">POST Create a Direct Card PayIn</a>
    * <a href="/api-reference/recurring-card-payins/create-recurring-payin-cit">POST Create a Recurring PayIn (CIT)</a>
    * <a href="/api-reference/preauthorizations/create-preauthorization">POST Create a Preauthorization</a>
    * <a href="/api-reference/deposit-preauthorizations/create-deposit-preauthorization">POST Create a Deposit Preauthorization</a>
    * <a href="/api-reference/card-validations/create-card-validation">POST Create a Card Validation</a>
  </Step>
</Steps>

## Related resources

<CardGroup col={2}>
  <Card title="Guides" href="/sdks/checkout">
    Get started with Checkout SDK
  </Card>

  <Card title="Endpoint" href="/api-reference/payment-method-metadata/lookup-payment-method-metadata">
    POST Look up metadata for a payment method
  </Card>
</CardGroup>
