Skip to content

dpay SDK · Go

Online payments in Go with the ready-made dpay SDK.

Add payments to a Go backend without hand-crafting every API call. The official SDK helps with checksums, transaction registration, IPN and integration errors.

  • Official dpay library
  • Automatic checksums
  • IPN verification
  • Consistent error handling

Install

Go
Go modules
go get github.com/dpayglobal/dpay-go-sdk
Requirements
Go 1.22+
Ecosystem
Go modules

The short answer

What is the dpay SDK for Go?

A dpay SDK is an official library that simplifies online payment integration with the dpay API. It reduces custom code for checksums, API calls, IPN verification and error handling.

Backend ecosystem

Go payments in popular frameworks and custom architectures.

The SDK is a backend library. Keep the dpay client in your service layer and load Payment Point credentials from secure server configuration.

01

net/http

In a net/http application, keep the Go SDK client in the service layer shared by checkout and IPN handling.

02

Gin, Fiber i Echo

In a Gin, Fiber i Echo application, keep the Go SDK client in the service layer shared by checkout and IPN handling.

03

Mikroserwisy Go

In a Mikroserwisy Go application, keep the Go SDK client in the service layer shared by checkout and IPN handling.

Integration layer

Payment plumbing you do not need to build from scratch.

The Go library wraps recurring payment lifecycle tasks in methods and types that fit the language ecosystem.

Checksums without manual assembly

The library calculates the checksum required for each request.

Request integrity

Payment lifecycle

Ready methods simplify payment registration and transaction handling.

Less HTTP code

Verified IPN

The SDK helps validate a notification before the order status changes.

Secure webhooks

Controlled errors

Exceptions and error codes make logging, retries and diagnosis clearer.

Predictable handling

Starter code

Create a dpay client in Go.

Get service credentials from the Payment Point settings. Store the Secret Hash in environment configuration or a secrets manager, never in the repository or frontend code.

Secret Hash → server only

go
import dpay "github.com/dpayglobal/dpay-go-sdk"

client, err := dpay.New("service_name", "secret_hash")
if err != nil {
    return err
}

Implementation flow

From a Payment Point to a confirmed order.

The secure implementation flow stays the same across technologies.

  1. 01

    Install the library

    Add the official package to your backend and pin the version according to your project rules.

  2. 02

    Configure the client

    Pass the service name and Secret Hash from secure server configuration only.

  3. 03

    Register the payment

    Send the amount plus success, failure and IPN URLs, then redirect the customer to the returned payment URL.

  4. 04

    Verify IPN

    After successful notification verification, update the order status in your database.

Other technologies

The same API in your team's backend.

Compare the available libraries and choose the language that best fits your product architecture.

Integrator FAQ

Before the first line of code.

How do I add online payments in Go?

Install the package with “go get github.com/dpayglobal/dpay-go-sdk”, create a client with the service name and Secret Hash, then call the payment registration method described in the Go SDK documentation.

Does the SDK generate checksums?

Yes. Published dpay SDKs calculate checksums according to the API specification. The Secret Hash must still remain secure on the server.

How does the SDK handle IPN?

The library helps verify the IPN signature and parse the notification. Change order state only after successful verification.

Which dashboard credentials do I need?

You need Payment Point credentials, primarily the service name and Secret Hash. See the library documentation for its complete requirements.

Full documentation

Every Go SDK method in one place.

See installation, complete examples, IPN handling, errors and the remaining operations available in the library.