Skip to main content

An API Client to interact with Pesos

Project description

# Pesos
`python-python` is the officially supported library for communicating to Pesos
via our public APIs (

Note: The library is currently in alpha, but already used in a few projects.

Pesos API Docs are available [here](

### Getting Started
`pip install pesos-python` to get the library installed.

### Authentication
Get your access token from the [Developer Dashboard](

from pesos import Client
client = Client('YOUR ACCESS TOKEN')

### Resources
#### Accounts

To get information about your account you should make the following requests:


To make changes to your account:

#### Payments
**Action: Create**

response = client.payment.create(
description='A useful short description',
tracking_id='your internal identifier',

Note: You'll need to pull `approval_url` out of the response dict and redirect
your user to it, so the payment can be approved.

**Possible arguments:**

|argument |type |required |
|--- |--- | --- |
|amount | decimal | x |
|description | string | x |
|tracking_id | string | |
|redirect_url | string | x |

**Action: Process**
To process a payment, you'll need to provide the `id`.

client.payment.process('payment id')

**Action: Refund**
To refund a payment, you'll also need to provide the `id`.
client.payment.refund('payment id')

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
pesos-python-0.0.7.dev1.tar.gz (4.4 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page