Author: | Oji Setyawan <[email protected]> |
---|---|
Company: | PT Tenten Digital Indonesia |
Version: | 1.0.0 |
License: | GNU GPL v3 |
Table of content
python module to access SNAP BCA API.
Feature :
- check balance.
- account statement (history).
- Clone or download this repo https://github.com/tentendigital-id/Snap-BCA-API.git.
- Move this entire project to your project's directory.
- Import library to your project
from snap_bca_api.bca import BCA_SNAP
. - Initiate config your BCA API
bca = BCA_SNAP(
client_id=client_id,
client_secret=client_secret,
private_key=private_key,
channel_id=channel_id,
partner_id=partner_id,
host=host,
debug=False
)
- Call
BCA_SNAP
function.
get_balance = bca.getBalance(
account_number=ACCOUNT_NUMBER,
partnerReferenceNo=PARTNER_REFERENCE_NO,
)
print(get_balance)
get_statement = bca.getStatement(
account_number=ACCOUNT_NUMBER,
partnerReferenceNo=PARTNER_REFERENCE_NO,
fromDateTime=FROM_DATE,
toDateTime=TO_DATE
)
print(get_statement)
Note:
FROM_DATE
andTO_DATE
useyyyy-MM-ddT00:00:00+07:00
format.- Maximum date to get from start to end is 31 day.