https://github.com/haritsfahreza/go-bca
Bank BCA API's Go SDK
https://github.com/haritsfahreza/go-bca
bca bca-sdk golang payment-integration
Last synced: 5 months ago
JSON representation
Bank BCA API's Go SDK
- Host: GitHub
- URL: https://github.com/haritsfahreza/go-bca
- Owner: haritsfahreza
- License: mit
- Archived: true
- Created: 2018-08-10T10:22:42.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-08-14T04:08:18.000Z (almost 8 years ago)
- Last Synced: 2025-08-15T02:22:54.992Z (11 months ago)
- Topics: bca, bca-sdk, golang, payment-integration
- Language: Go
- Homepage: https://developer.bca.co.id/documentation/
- Size: 15.6 KB
- Stars: 4
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🏦 BCA (Bank Central Asia) API's Go Library
[]()
[](https://goreportcard.com/report/github.com/haritsfahreza/go-bca)
[](LICENSE)
[](https://travis-ci.org/haritsfahreza/go-bca)
Go(lang) library to speed up your BCA (Bank Central Asia) API integration process. See this [official documentation of BCA API](https://developer.bca.co.id/documentation/)
## Usage
```
import (
"context"
"github.com/haritsfahreza/go-bca"
"github.com/haritsfahreza/go-bca/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",
}
businessClient := business.NewClient(cfg)
authClient := auth.NewClient(cfg)
ctx := context.Background()
authToken, err := authClient.GetToken(ctx)
if err != nil {
panic(err)
}
businessClient.AccessToken = authToken.AccessToken
ctx := context.Background()
response, err := client.GetBalanceInfo(ctx, []string{"0201245680", "0063001004"})
}
```
## 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](LICENSE).