Skip to main content

Cuenca API Client

Project description

Cuenca – Python client library


Create transfer

import cuenca

cuenca.configure(sandbox=True)  # if using sandbox

transfer = cuenca.Transfer.create(
    recipient_name='Benito Juárez',
    amount=12345,  # Mx$123.45
    descriptor='sending money',  # As it'll appear for the customer
    idempotency_key='unique string',

# To get updated status (estado)

Retrieve by id

import cuenca

transfer = cuenca.Transfer.retrieve('tr_123')

Query by idempotency_key, account_number and status

Results are always returned in descending order of created_at

The methods that can be used:

  • one() - returns a single result. Raises NoResultFound if there are no results and MultipleResultsFound if there are more than one
  • first() - returns the first result or None if there aren't any
  • all() - returns a generator of all matching results. Pagination is handled automatically as you iterate over the response
  • count() - returns an integer with the count of the matching results
import cuenca
from cuenca.types import Status

# find the unique transfer using the idempotency key
transfer ='unique string')

# returns a generator of all succeeded transfers to the specific account
transfers = cuenca.Transfer.all(

# the total number of succeeded transfers
count = cuenca.Transfer.count(status=Status.succeeded)

Api Keys

Roll the ApiKey

import cuenca

# create new key and deactive old key in 60 mins
old_key, new_key = cuenca.ApiKey.roll(60)

Project details

Release history Release notifications | RSS feed

Download files

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

Files for cuenca, version 0.0.1.dev0
Filename, size File type Python version Upload date Hashes
Filename, size cuenca-0.0.1.dev0-py3-none-any.whl (11.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size cuenca-0.0.1.dev0.tar.gz (8.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page