Skip to main content

Credit cards API

Get card scheme

The first six digits of a card number are the Bank Issuer Number (BIN). The BIN indicates which bank issued the credit card. This is sometimes known as an Issuer identification number (IIN). Use this resource to return the card scheme from the BIN.

This resource is useful in combination with listing accepted cards and listing card surcharges in the Businesses API.

Request

GET /credit-cards/card-schemes/{cardBIN}

Use your Publishable API key to access this resource.

Path parameters
Parameter Name Format Description
cardBIN string The first six digits of a card number.
Request body

None.

Response

If successful, this method returns the following in the response body.

Field Format Description
links Array of Links Links to related documents and resources.
cardScheme string The card scheme code. One of VISA, MASTERCARD, AMEX, DINERS, JCB, or UNIONPAY.

For example:

{
  "links": [],
  "cardScheme": "VISA"
}
HTTP status codes

See HTTP Status Codes for more.

Status Code Description More information
200 OK The request has succeeded.
404 NOT FOUND The cardBIN path parameter did not match any known BIN.
422 UNPROCESSABLE ENTITY The cardBIN path parameter was an invalid number, less-than or greater-than 6 digits, or not a valid card BIN. View more
Westpac Privacy Statement

Privacy Statement (for individuals whose personal information may be collected - in this clause referred to as "you"). All personal information we collect about you is collected, used and disclosed by us in accordance with our Privacy Statement which is available at Privacy Statement or by calling us through your relationship manager or Westpac representative. Our Privacy Statement also provides information about how you can access and correct your personal information and make a complaint. You do not have to provide us with any personal information but, if you don't, we may not be able to process an application or a request for a product or service.