🚧 The SDK is currently undergoing heavy development with frequent changes, because of this please get the latest update of the SDK 🚧
Compatibility: The SDK has been developed using Indonesia Payment API version 4 and currently does not support Singapore Payments.
Fazz previously Xfers, is a company that provides financial services in Southeast Asia such as sending and receiving payments, grow their capital, and get funding.
Fazz provides SDKs in several programming languages but not in Go. Because of this the SDK was created.
For more information, visit the Fazz Payments API Official documentation.
Make sure you are using go version 1.18
or later
go get -u github.com/abmid/fazz-sdk-go
package main
import (
"context"
"fmt"
"github.com/abmid/fazz-sdk-go"
"github.com/abmid/fazz-sdk-go/client"
)
func main() {
c := client.New(client.Options{ApiKey: "test_apikey", SecretKey: "secretkey"})
payload := fazz.ValidateBankAccountPayload{
AccountNo: "000501003219303",
BankShortCode: "BRI",
}
res, err := c.ValidationService.BankAccount(context.Background(), payload)
if err != nil {
// Handle case error
}
fmt.Println(res)
}
Example Create Payment for Virtual Account
// ========== Example Create VA ==========
payload := fazz.PaymentCreateVAPayload{
Payment: fazz.Payment{
Amount: 15000,
ReferenceId: "SDK_TEST_01",
ExpiredAt: time.Now().Add(70 * time.Minute).Format(time.RFC3339),
Description: "SDK desc",
},
PaymentMethodOptions: fazz.PaymentVAOptions{
BankShortCode: "BCA",
DisplayName: "GOOD Man",
SuffixNo: "123456",
},
}
res, err := c.Payment.CreateVA(context.Background(), payload)
if err != nil {
// handle case error
fmt.Println(err)
}
fmt.Println(res)
For more examples, please check directory example and Godoc
- PAYMENTS
- Create a payment
- Get a payment
- Get a list of payments
- Update a payment
- PAYMENT METHODS
- Create a payment method
- Get a payment method
- Get a list of payments for a payment method
- Create a mock payment for a payment method
- PAYMENT LINKS
- Create a payment link
- Get a payment link
- Update a payment link
- DISBURSEMENTS
- Create a disbursement
- Get a disbursement
- Get a list of disbursements
- Update a disbursement
- Get a list of banks
- ACCOUNTS
- Get account balance
- VALIDATIONS
- validate a bank account
We are open and grateful for any contribution. If you want to contribute please do PR and follow the code guide.
Copyright (c) 2023-present Abdul Hamid and Contributors. This SDK is free and open-source software licensed under the MIT License.