Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 851 Bytes

README.md

File metadata and controls

35 lines (24 loc) · 851 Bytes

Kash API Python Client

This is the KASH API client for the the Server facing API.

Create a client connected to the test environment: from kash import SecretClient

sk = '<secret key>'
customerId = '<customer id>'
sc = SecretClient(secretKey=sk, test=True)

Create an an authorization for payment:

try:
    authorizationDict = sc.createAuthorization(customerId, '2000')
    authorizationId = authorizationDict['authorization_id']
except Exception as e:
    print e

Clear an authorization:

try:
    sc.removeAuthorization(authorizationId)
except Exception as e:
    print e

Create a transaction:

try:
    authorizationDict = sc.createAuthorization(customerId, '2000')
    authorizationId = authorizationDict['authorization_id']
except Exception as e:
    print e