Poynt Python SDK
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
poynt
.gitignore
CHANGELOG.md
LICENSE
MANIFEST.in
README.md
setup.cfg
setup.py

README.md

Poynt Python SDK

This SDK helps you connect to the Poynt API from your Python apps. You can easily get/create business information, subscribe to webhooks, and send cloud messages to your terminal app.

Documentation

After you've signed up for a Poynt developer account, check out our API reference or our developer guides!

Installation

Install this package:

pip install poynt

Usage

You can connect to the Poynt API by passing either a filename or a string containing your PEM-encoded private key you downloaded from Poynt.net.

import poynt

poynt.application_id = 'urn:aid:your-application-id'
poynt.filename = '/path/to/your/key.pem'

or

import poynt

poynt.application_id = 'urn:aid:your-application-id'
poynt.key = '-----BEGIN RSA PRIVATE KEY-----\n.....\n-----END RSA PRIVATE KEY-----'

If you downloaded your API credentials from EU Dev Portal (https://eu.poynt.net) specify the region. This will ensure that the SDK is sending API calls to EU API endpoint (https://services-eu.poynt.net)

poynt.region = 'eu'

Then, make a request signed with your app private key:

business, status_code = poynt.Business.get_business('00000000-0000-0000-0000-000000000000')

if status_code is 200:
    # do something with business
else:
    # throw an error

We'll handle all the request signing, token refresh, etc. for you!

Namespaces and methods

CloudMessages

  • poynt.CloudMessage.send_cloud_message
  • poynt.CloudMessage.send_raw_cloud_message

Hooks

  • poynt.Hook.get_hooks
  • poynt.Hook.create_hook
  • poynt.Hook.get_hook
  • poynt.Hook.delete_hook

Businesses

  • poynt.Business.get_business

Stores

  • poynt.Store.get_store

Orders

  • poynt.Order.get_orders
  • poynt.Order.get_order

Transactions

  • poynt.Transaction.get_transactions
  • poynt.Transaction.get_transaction

Customers

  • poynt.Customer.get_customers
  • poynt.Customer.get_customer

Catalogs

  • poynt.Catalog.get_catalogs
  • poynt.Catalog.get_catalog
  • poynt.Catalog.get_full_catalog
  • poynt.Catalog.create_catalog
  • poynt.Catalog.create_full_catalog
  • poynt.Catalog.update_catalog
  • poynt.Catalog.delete_catalog
  • poynt.Catalog.get_category
  • poynt.Catalog.create_category
  • poynt.Catalog.lookup_categories
  • poynt.Catalog.delete_category
  • poynt.Catalog.update_category

Products

  • poynt.Product.get_products
  • poynt.Product.get_products_summary
  • poynt.Product.lookup_products
  • poynt.Product.get_product
  • poynt.Product.create_product
  • poynt.Product.delete_product
  • poynt.Product.update_product

Taxes

  • poynt.Tax.get_taxes
  • poynt.Tax.get_tax
  • poynt.Tax.create_tax
  • poynt.Tax.delete_tax
  • poynt.Tax.update_tax

Business Users

  • poynt.BusinessUser.get_business_users
  • poynt.BusinessUser.get_business_user