Parrot Batch


  • Generate encrypted data on POST on-premise/database/export
  • Download generated file from GET on-premise/database/export
  • Decrypt records using our SDK
  • Get updates of data from on-premise/database/updates?version='', where version is the version of the Pagos BIN Database that was previous generated for you. Version comes in on-premise/database/export response. After receiving updates, a new version comes in on-premise/database/updates?version='', and you're are responsible for storing it locally so you receive valid updates.

Initial Download of the Encrypted BIN Tables

As a user of Parrot, if you have purchased the Parrot Batch product, you'll be able to generate a download link in the Parrot Dashboard UI to obtain the base version of the BIN Tables.

Decryption SDK Usage

Install SDK

pip install askparrot-decryption-sdk

Get Started

Import pagos_data_cipher class

from pagos_data_cipher import pagos_data_cipher

Create new class instance with your decryption key

key = 'c5eecea51092f900b10ffc6e07345f72' #16bytes in hex form
cipher = pagos_data_cipher(key)

Decrypt data

data = {'cardType': 'd048354e1921fade74c9307fd38bd497'} 

decrypted = cipher.decrypt_object(data)

# decrypted = {'cardType': 'visa'}

decrypt_object function accepts data with the type of dict and decrypts the following fields:

  • cardType
  • cardCountry
  • brand
  • bank_name
  • product_code
  • clean_bank_name
  • creditOrDebit
  • cardCountry_alpha3


Our BIN data is updated at a minimum on a weekly basis. To update your local copy:

  1. Call on-premise/database/export/last-version to check the latest version of our BIN data.
  2. Compare the latest version with the version you have stored locally.
  3. If you have an outdated version of our BIN data, call on-premise/database/updates. The response will include a JSON file of updated records.