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: "1.2.3.4",
})

Go libraries compatible with Pin Payments:

Southern Payment Systems Pty Ltd
t/a Pin Payments
ABN: 46 154 451 582
Level 4, 356 Collins St,
Melbourne VIC 3000

A Checkout.com company

Privacy Policy Terms Security Status

Australia