modulepackage
0.0.0-20210420073028-a4d3d0833f27
Repository: https://github.com/ianeinser/bca-api-go.git
Documentation: pkg.go.dev
# README
🏦 BCA (Bank Central Asia) API's Go Library
Go(lang) library to speed up your BCA (Bank Central Asia) API integration process. See this official documentation of BCA API
Usage
import (
"context"
"github.com/ianeinser/bca-api-go"
"github.com/ianeinser/bca-api-go/business"
)
func main() {
cfg := bca.Config{
URL: "https://sandbox.bca.co.id",
ClientID: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
ClientSecret: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
APIKey: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
APISecret: "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
CorporateID: "BCAAPI2016", //Based on API document
OriginHost: "localhost", // CORS
}
businessClient := business.NewClient(cfg)
authClient := auth.NewClient(cfg)
ctx := context.Background()
ptr_authToken, err := authClient.GetToken(ctx)
if err != nil {
panic(err)
}
businessClient.AccessToken = (*ptr_authToken).AccessToken
ctx := context.Background()
ptr_balanceInfo, err := client.GetBalanceInfo(ctx, []string{"0201245680", "0063001004"})
fmt.Println(*ptr_balanceInfo)
}
Example
We have attached usage examples in this repository in folder example
.
Please proceed there for more detail on how to run the example.
License
See LICENSE.
Contribution
# Functions
NewAPI is used to initialize new APIImplementation.
# Structs
AccountStatement represents account statement information.
AccountStatementOfflineRequest is to get your bulk statement in form of file for a period up to 7 days.
AccountStatementOfflineResponse is to get your bulk statement in form of file for a period up to 7 days.
AccountStatementRequest is to get your KlikBCA Bisnis account statement for a period up to 31 days.
AccountStatementResponse is to get your KlikBCA Bisnis account statement for a period up to 31 days.
AmendmentTeleTransferAmendCashTransfer represents amendment details to amend cash-transfer.
APIImplementation represents config that used for HTTP client needs.
Auth represents authentication info used in FIRe transaction.
AuthToken represents response of BCA OAuth 2.0 response message.
BalanceFailedBBBalanceInformationResponse represents account balance details when it cannot be retrieved.
BalanceInformationRequest is to get your KlikBCA Bisnis account balance information with maximum of 20 accounts in a request.
BalanceInformationResponse is to get your KlikBCA Bisnis account balance information with maximum of 20 accounts in a request.
BalanceSuccessBBBalanceInformationResponse represents account balance details when it is successfully retrieved.
BeneficiaryAccountRequest represents beneficiary details used in TTAccountRequest.
BeneficiaryTTAccountResponse represents beneficiary details for response message.
BeneficiaryInquiryAccountRequest represents beneficiary details to inquire account(s).
BeneficiaryInquiryAccountResponse represents response payload to inquire accounts.
BeneficiaryInquiryTransactionResponse represents beneficiary details for response message.
BeneficiaryTTAmendCashTransfer represents beneficiary details to amend cash-transfer.
BeneficiaryTeleTransferCashTransferRequest represents beneficiary details used in TTCashTransferRequest.
BeneficiaryTeleTransferCashTransferResponse represents beneficiary details in response message.
Config represents configuration that needed by BCA API.
No description provided by the author
DetailsBill represents bills details to retrieve Virtual Account payment status.
DomesticFundTransferRequest is to send fund transfer instructions to BCA using this service.
DomesticFundTransferResponse is to send fund transfer instructions to BCA using this service.
Error represent BCA error response messsage.
ErrorLang represent BCA error response message language.
InquiryAccountBalanceRequest represents FID details to inquire account balance.
FIInquiryAccountBalanceResponse represents FID details in response message.
No description provided by the author
No description provided by the author
FundTransferRequest is to send fund transfer instructions to BCA using this service.
FundTransferResponse is to send fund transfer instructions to BCA using this service.
InquiryAccountBalanceRequest is to provide service to Inquiry balance for Vostro’s Account.
TTInquiryAccountBalanceResponse is to provide service to Inquiry balance for Vostro’s Account.
InquiryAccountRequest is to provide service to Inquiry BCA’s Account name or Other Bank Switching’s Account name.
InquiryAccountResponse is to provide service to Inquiry BCA’s Account name or Other Bank Switching’s Account name.
InquiryDomesticAccountRequest is to get beneficiary account information including beneficiary account name.
InquiryDomesticAccountResponse is to get beneficiary account information including beneficiary account name.
InquiryStatusPaymentRequest represents Virtual Account payment status request message.
VAInquiryStatusPaymentResponse represents Virtual Account payment status response message.
InquiryTransactionRequest is to provide service to Inquiry Transaction that has been submitted before.
InquiryTransactionResponse is to provide service to Inquiry Transaction that has been submitted before.
InquiryTransferStatusRequest is to get fund transfer status.
InquiryTransferStatusResponse is to get fund transfer status.
No description provided by the author
ReasonInquiryTransferStatusResponse represents.
SenderAccountRequest represents sender details used in TTAccountRequest.
SenderInquiryTransactionResponse represents sender details for response message.
SenderTeleTransferAmendCashTransfer represents sender details to amend cash-transfer.
SenderTeleTransferCashTransferRequest represents sender details used in TTCashTransferRequest.
TeleTransferAccountRequest is to provides service transaction “Transaction to BCA’s Account” and also “Transfer to Other Bank”.
TTAccountResponse is to provide service transaction “Transaction to BCA’s Account” and also “Transfer to Other Bank”.
TeleTransferAmendCashTransferRequest is to provide service for Amendment “Cash Transfer” to Non account holder.
TeleTransferAmendCashTransferResponse is to provide service for Amendment “Cash Transfer” to Non account holder.
TTCancelCashTransferRequest is to provide service for Cancellation “Cash Transfer” to Non account holder.
TTCancelCashTransferResponse is to provide service for Cancellation “Cash Transfer” to Non account holder.
TeleTransferCashTransferRequest is to provide service for transaction “Cash Transfer” to Non account holder.
TTCashTransferResponse is to provide service for transaction “Cash Transfer” to Non account holder.
Transaction1TeleTransferAmendCashTransfer represents transaction details to amend cash-transfer.
Transaction2TeleTransferAmendCashTransfer represents transaction details to amend cash-transfer.
TransactionTTAccountRequest represents transaction details used in TTAccountRequest.
TransactionTTAccountResponse represents transaction details for response message.
TransactionTTInquiryTransactionRequest represents transaction details to inquire transaction.
TransactionTTCancelCashTransferRequest represents transaction details to cancel cash-transfer.
TransactionTTCancelCashTransferResponse represents transaction details to cancel cash-transfer.
TransactionTeleTransferCashTransferRequest represents transaction details used in TTCashTransferRequest.
TransactionTeleTransferCashTransferResponse represents transaction details in response message.
TransactionTTAmendCashTransferResponse represents transaction details to amend cash-transfer.
TransactionInquiryTransactionResponse represents transaction details for response message.
VAInquiryStatusPaymentResponse represents Virtual Account transaction info.
# Interfaces
API is an interface for making call to BCA API.