Skip to content

ramon/getnet-py

Repository files navigation

getnet-py Build Status Coverage Status

This project provider a SDK to handler with Santander Getnet API.

Installation

To install getnet-py you can use pip:

$ pip install getnet-py

or pipenv:

$ pipenv install getnet-py

Usage

For use this library the following information is needed:

  • Seller ID
  • Client ID
  • Client Secret

The following environments are supported:

  • Staging
  • Homolog
  • Production

Instancing the client

from getnet import Environment, Client

client = Client("seller_id", "client_id", "client_secret", Environment.SANDBOX)
client.auth() # Optional, will be executed if needed

Using the Services

With client instanced, the services can be accessed in two ways:

Using the client shotcuts:

service = client.token_service()
service.generate(...)

or instancing the services and passing the client as the first param:

from getnet.services.token import Service

service = Service(client)
service.generate(...)

At moment, we have support to the following services:

  • Token
  • Cards (Cofre)
  • Payments
    • Credit Card
    • Boleto
  • Subscriptions
    • Customers
    • Plans
    • Charges

Author

Ramon Soares contact@ramon.dev.br