Parrot Batch v1 & v2 Overview


Parrot Versioning

This reference documentation refers to older versions of the Parrot Batch API (v1 and v2). We no longer support onboarding new customers to Parrot Batch v1 and v2 and don't make updates to the API Reference content.

If you're new to Parrot Batch or already using Parrot Batch API v3, see the Parrot Batch v3 Overview.

If you're unsure which version of Parrot Batch you're using, contact your account manager for assistance.


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

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 batch/database/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 batch/database/updates. The response will include a JSON file of updated records.

Decrypted Updates

Parrot Batch v1

When calling the /batch/database/updates endpoint for updates in Parrot Batch v1, Parrot batch returns your data in an encrypted file by default. However, you can choose to pass the optional cursor value in your call, which will return a decrypted JSON file and will generally result in faster operation time when calling for updates:

  1. Pass the version and cursor value in your /batch/database/updates call
  2. When you send first call with a cursor value of 0, Parrot Batch will return a next_cursor value
  3. You can stop requesting for updates when the next_cursor value is returned as “null“

Parrot Batch v2

In Parrot Batch v2, you can get decrypted updates by setting the ecrypted parameter to false when calling the /batch/database/updates/v2 endpoint for updates.