Skip to content

Go SDK for Cryptomus – seamless crypto payments integration (payments, payouts, and transaction tracking).

License

Notifications You must be signed in to change notification settings

Aldiwildan77/cryptomus-sdk-go

Repository files navigation

Cryptomus SDK Go

Cryptomus SDK Go is a Go library for interacting with the Cryptomus API. You can see the documentation for the Cryptomus API at https://doc.cryptomus.com/.

Features

  • Payments Integration (Create Invoice, Get Invoice, Get Invoices, Cancel Invoice, etc.)
  • Payout Integration (Create Payout, Get Payout, Get Payouts, Cancel Payout, etc.)
  • Recurring Payment Integration (Create Recurring Payment, Get Recurring Payment, Get Recurring, Cancel Recurring Payment, etc.)
  • Webhooks Integration (Verify Webhook, Resend Webhook)
  • Static Wallet
  • Support Balance Information
  • Support Exchange Rate Information

Installation

To install the Cryptomus SDK Go, you need to run the following command:

Go Reference

go get github.com/Aldiwildan77/cryptomus-sdk-go

Usage

Here is an example of how to use the Cryptomus SDK Go, you can see the full example in the examples directory.

Create Invoice

package main

import (
 "log"

 cryptomus "github.com/Aldiwildan77/cryptomus-sdk-go"
)

func main() {
 sdk := cryptomus.New(
  cryptomus.WithMerchant("fill your merchant id"),
  cryptomus.WithPaymentToken("fill your payment token"),
 )

 result, err := sdk.CreateInvoice(&cryptomus.CreateInvoiceRequest{
  Amount:   "15",
  Currency: "USD",
  OrderID:  "123456",
  Lifetime: 3600,
 })

 if err != nil {
  log.Fatal(err)
 }

 log.Println("Create invoice successfully.")
 log.Printf("Create invoice: %#+v", result)
}

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Muhammad Wildan Aldiansyah

About

Go SDK for Cryptomus – seamless crypto payments integration (payments, payouts, and transaction tracking).

Topics

Resources

License

Stars

Watchers

Forks

Languages