rl404 / xfers-go

Unofficial golang API wrapper for xfers (V4 Indonesia).

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Xfers-go

Go Report Card License: MIT Go Reference

xfers-go is unofficial golang API wrapper for xfers. Only for V4 indonesian xfers.

For official documentation, go here.

Features

  • Get xfers account's balance
  • Get disbursement bank list
  • Validate bank account
  • Create payment
    • virtual account
    • retail outlet
    • QRIS
    • e-wallet
  • Get payment
  • Get payment list + filter + pagination
  • Simulate payment
  • Create disbursement
  • Get disbursement
  • Get disbursement list + filter + pagination

Installation

go get github.com/rl404/xfers-go

Quick Start

package main

import (
	"log"

	"github.com/rl404/xfers-go"
)

func main() {
	// Prepare API and secret key.
	apiKey := "test_xxx"
	secretKey := "abc123"

	// Create xfers client.
	x := xfers.NewDefault(apiKey, secretKey, xfers.Sandbox)

	// Get your xfers's account balance.
	balance, code, err := x.GetBalance()
	if err != nil {
		log.Println(code, err)
		return
	}

	log.Println(code, balance)
}

For more detail config and usage, please go to the documentation.

License

MIT License

Copyright (c) 2021 Axel

About

Unofficial golang API wrapper for xfers (V4 Indonesia).

License:MIT License


Languages

Language:Go 100.0%