Skip to content

Latest commit

 

History

History
44 lines (28 loc) · 950 Bytes

README.md

File metadata and controls

44 lines (28 loc) · 950 Bytes

Conekta

Package conekta is a wrapper for the conekta API modify by nubleer team.

Important!!

This package is considered alpha and the public API will still change slightly before it's considered stable.

Getting Started

First, get your account's private API key. This package will need it in order to authenticate your requests.

export CONEKTA_API_KEY=YOUR_PRIVATE_KEY

Or

  client := conekta.NewClient()
  client.ApiKey = "YOUR_PRIVATE_KEY"

Get the package

go get github.com/nubleer/conekta-go/conekta

Usage

package main

import "github.com/nubleer/conekta"

func main() {
  client := conekta.NewClient()
  client.ApiKey = "YOUR_PRIVATE_KEY"

  charge := conekta.Charge{
    Description: "Some description",
    Amount: 45000,
    Cash: PaymentOxxo{"type":"oxxo"},
  }

  charge, err = client.Charges.Create(charge)