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/.
- 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
To install the Cryptomus SDK Go, you need to run the following command:
go get github.com/Aldiwildan77/cryptomus-sdk-go
Here is an example of how to use the Cryptomus SDK Go, you can see the full example in the examples directory.
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)
}
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.