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

# 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.

# Packages

* File Created: Sunday, 30th July 2023 12:22:26 pm * Author: Abdul Hamid ([email protected]) * * Copyright (c) 2023 Author */.
* File Created: Saturday, 29th July 2023 10:39:48 pm * Author: Abdul Hamid ([email protected]) * * Copyright (c) 2023 Author */.
* File Created: Wednesday, 23rd August 2023 9:53:20 pm * Author: Abdul Hamid ([email protected]) * * Copyright (c) 2023 Author */.
* File Created: Saturday, 2nd September 2023 2:00:18 pm * Author: Abdul Hamid ([email protected]) * * Copyright (c) 2023 Author */.
* File Created: Thursday, 21st September 2023 5:34:18 pm * Author: Abdul Hamid ([email protected]) * * Copyright (c) 2023 Author */.
* File Created: Monday, 18th September 2023 11:34:33 am * Author: Abdul Hamid ([email protected]) * * Copyright (c) 2023 Author */.
* File Created: Thursday, 24th August 2023 6:36:34 pm * Author: Abdul Hamid ([email protected]) * * Copyright (c) 2023 Author */.
* File Created: Tuesday, 5th September 2023 11:13:37 pm * Author: Abdul Hamid ([email protected]) * * Copyright (c) 2023 Author */.
* File Created: Sunday, 3rd September 2023 10:52:49 am * Author: Abdul Hamid ([email protected]) * * Copyright (c) 2023 Author */.
* File Created: Friday, 1st September 2023 11:29:23 am * Author: Abdul Hamid ([email protected]) * * Copyright (c) 2023 Author */.
* File Created: Saturday, 2nd September 2023 3:34:54 pm * Author: Abdul Hamid ([email protected]) * * Copyright (c) 2023 Author */.
* File Created: Tuesday, 29th August 2023 10:51:29 pm * Author: Abdul Hamid ([email protected]) * * Copyright (c) 2023 Author */.

# Functions

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

# Constants

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

# Structs

No description provided by the author
CustomerAddress is part of Customer for attribute Address.
DisbursementApproveOption is paramaeter for approve disbursement API.
DisbursementApprovePayload is payload for request approve disbursement API.
DisbursementFetchItemsOption is parameter for Fetch Disbursement Items API.
DisbursementItemPayload is part of DisbursementPayload for attribute items.
DisbursementOption is parameter for submit disbursement API.
DisbursementPayload is payload for request disbursement API.
DisbursementTopupPayload is payload for request Topup Amount API.
DisbursementValidatePayload is payload for request validate disbursement API.
Error is commons response error DurianPay.
No description provided by the author
EwalletAccountLinkPayload is payload for Link E-Wallet Account API.
Invoice is part of InvoicePay for attribute Invoices.
InvoiceCreate represents payload for Create Invoice API.
InvoiceFetchOption represents paramater for List Invoices API.
InvoiceManualPay represents payload for Manual Payment for Invoice API.
InvoicePay represents payload for Pay Invoice API.
InvoiceUpdate represents payload for Update Invoice API.
OrderFetchByIDOption is parameter for requests Order Fetch By ID API.
OrderFetchOption is parameter for requests Orders Fetch API.
OrderItem is part of CreatePayload for attribute Items.
OrderPayload is payload for requests Create Orders API.
OrderPaymentLinkCustomer is part of OrderPaymentLinkPayload.
OrderPaymentLinkPayload is payload for requests Create Payment Link API.
PaymentCapturePayload is payload for Payment Capture API.
PaymentChargeBNPLPayload is requests payload for Payment Charge API.
PaymentChargeCardPayload is requests payload for Payment Charge API.
PaymentChargeEwalletPayload is requests payload for Payment Charge API.
PaymentChargeOnlineBankingPayload is requests payload for Payment Charge API.
PaymentChargeQRISPayload is requests payload for Payment Charge API.
PaymentChargeRetailStorePayload is requests payload for Payment Charge API.
PaymentChargeVAPayload is requests payload for Payment Charge API.
PaymentCustomerInfo is part of PaymentRequestOnlineBanking for attribute Customer Info.
PaymentFetchByIDOption is parameter for Payment Fetch by ID API.
PaymentFetchOption is parameter for Payment Fetch API.
PaymentMDRFeesOption is parameter for MDR Fees Calculation API.
PaymentSandboxOption is option for request payment charge as Sanbox Mode.
PaymentVerifyPayload is payload for Verify Payments API.
PromoDetails is part of PromoPayload.
PromoPayload use for Create & Update Promo API.
RefundFetchOption is parameter for Refund Fetch API.
RefundPayload is struct for payload Create Refund API.
SettlementOption is parameter for Fetch and Details API.
VirtualAccountCustomer is part of VirtualAccountPayload for attribute Customer.
VirtualAccountFetchOption is parameter for Virtual Account Fetch API.
VirtualAccountPatchPayload is payload for Virtual Account Patch By ID API.
VirtualAccountPayload is payload for Virtual Account Create API.
VirtualAccountPaymentSimulatePayload is payload for Virtual Account Payment Simulate API.