Go Libraries

Accepting credit card payments with Go

The following example uses PinPayments Library by Alex Skripov:

config := pinpayments.NewConfig(true, YOUR_SECRET_KEY_HERE, YOUR_PUBLISHABLE_KEY_HERE)

client, err := pinpayments.NewClient(nil, config)
if err != nil {
  panic(err) // Or your way of handling errors

client.Charges.CreateCharge(ChargesRequest {
  Email: "customer@email.com",
  Description: "Widgets",
  Amount: 4999,
  Currency: "USD",
  CardToken: "card_nytGw7koRg23EEp9NTmz9w",
  IPAddress: "",

Go libraries compatible with Pin Payments:

Pin Payments acknowledges the Traditional Owners and Custodians of the Country throughout Australia and recognises their continuing connection to land, water and community.
We pay our respects to Aboriginal and Torres Strait Islander cultures, and to Elders past and present.