Skip to content

cynco-labs/cynco-go

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Cynco Go SDK

Go Reference License: MIT

The official Go SDK for the Cynco API.

Installation

go get github.com/cynco-labs/cynco-go

Usage

package main

import (
    "context"
    "fmt"

    "github.com/cynco-labs/cynco-go"
)

func main() {
    client := cynco.New("cy_...")

    invoice, err := client.Invoices.Create(context.Background(), &cynco.InvoiceCreateParams{
        Customer: "cus_abc123",
        Items: []cynco.Item{
            {Description: "Consulting", Amount: 5000},
        },
    })
    if err != nil {
        panic(err)
    }

    fmt.Println(invoice.ID)
}

Configuration

client := cynco.New(
    "cy_...",                              // or use CYNCO_API_KEY env var
    cynco.WithBaseURL("..."),              // optional
    cynco.WithTimeout(30 * time.Second),   // optional
)

Resources

License

MIT

About

Official Go SDK for the Cynco API

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages