Categorygithub.com/abmid/dpay-sdk-go
repositorypackage
0.1.0-beta
Repository: https://github.com/abmid/dpay-sdk-go.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

DurianPay SDK for Go

Test Status License: MIT

Table of Contents

Overview

🚧 The SDK is currently undergoing heavy development with frequent changes, because of this the current major version is zero (v0.x.x) 🚧

Durianpay is a payments platform and aggregator which helps business to connect with different payment service providers (PSPs) and gateways.

Durianpay provides SDKs in several programming languages but not Go. Because of this, this SDK was created.

For more information, visit the DurianPay API Official documentation.

Installation

Make sure you are using go version 1.18 or later

go get github.com/abmid/dpay-sdk-go

Documentation

package main

import (
	"context"

	durianpay "github.com/abmid/dpay-sdk-go"
	"github.com/abmid/dpay-sdk-go/client"
)

func main() {
	// Init client to access all difference resources
	c := client.NewClient(client.Options{
		ServerKey: "XXX-XXX",
	})

	//----------------------------------------------
	// Example Validate Disbursement
	//----------------------------------------------
	payload := durianpay.DisbursementValidatePayload{
		XIdempotencyKey: "1",
		AccountNumber:   "12345678",
		BankCode:        "bca",
	}

	res, err := c.Disbursement.Validate(context.Background(), payload)
	if err != nil {
		// Handle error
	}
}

For more examples, please check directory example.

API Supports

  • ORDERS
    • Create Order
    • Fetch Orders
    • Fetch By ID
    • Create Payment Link
  • PAYMENTS
    • Charge Payment
    • Fetch Payments
    • Fetch Payment By ID
    • Check Payment Status
    • Verify Payment
    • Cancel Payment
    • MDR Fees Calculation
  • PROMOS
    • Create Promo
    • Fetch Promos
    • Fetch Promo By ID
    • Delete Promo
    • Update Promo
  • DISBURSEMENTS
    • Submit Disbursement
    • Approve Disbursment
    • Validate Disbursement (Tested)
    • Fetch Bank List
    • Topup Amount
    • Fetch Topup Detail By ID
    • Fetch Balance
    • Fetch Disbursement Items By ID
    • Fetch Disbursement By ID
    • Delete Disbusement By ID
  • SETTLEMENTS
    • Fetch Settlements
    • Detail Settlement By ID
    • Status Settlement By ID
    • Fetch Settlement By ID
  • REFUNDS
    • Create Refund
    • Fetch Refunds
    • Fetch Refund By ID
  • E-WALLET Account
    • Link E-Wallet Account
    • Unlink E-Wallet Account
    • Detail E-Wallet Account
  • VIRTUAL ACCOUNTS
    • Create VA
    • Fetch VAs
    • Fetch VA By ID
    • Patch VA By ID
    • Simulate VA Payment
  • INVOINCES
    • Create Invoince
    • Generate Checkout URL
    • Fetch Invoice By ID
    • Fetch Invoices / List Invoices
    • Update Invoice
    • Pay Invoice
    • Manual Payment Invoice
    • Delete Invoice

Contributing

We are open and grateful for any contribution. If you want to contribute please do PR and follow the code guide.

License

Copyright (c) 2023-present Abdul Hamid and Contributors. This SDK is free and open-source software licensed under the MIT License.