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.


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



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

The information contained in this publication is provided for learning purposes only and is subject to change. Revisions may be issued from time to time that encompass changes or additions to this module.

This is a guide only and it is not comprehensive. It does not impinge on or overrule any formal arrangement you may enter into with the Bank. The Bank and its officers shall not have any liability for any losses of any kind incurred in connection with any action, inaction or decision taken in reliance on the information herein or for any inaccuracies, errors or omissions. In this publication references to the "Bank" are to Westpac Banking Corporation ABN 33 007 457 141 and to any of its operating Divisions, including BankSA and St.George.