Skip to main content


Learn how to install and configure our GO SDK to use Efí APIs


Requests made to Efí APIs using the GO SDK require the certificate generated in your Efí account in .pem format.

Check here for a step-by-step guide on converting your P12 certificate to PEM format.

Installation via GO

$ go mod init

Installation via Git

Our SDK is also available in our Efí Github repository.

$ git clone

Tested with

go 1.8, 1.11.4, 1.16.5 and 1.19.2

Basic Usage

import (

func main(){

credentials := configs.Credentials
efi := efipay.NewEfiPay(credentials)

body := map[string]interface{} {
"items": []map[string]interface{}{
"name": "Product 1",
"value": 1000,
"amount": 2,
"shippings": []map[string]interface{} {
"name": "Default Shipping Cost",
"value": 100,

res, err := efi.CreateCharge(body)

if err != nil {
} else {


You can run the examples inside _examples with $ go run example.go:

$ go run charge/create_charge.go

Just remember to set the correct credentials within _examples/configs.go before running.


To run the tests, simply run:

$ go test