Skip to content

RevenueMonster/rm-python-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RM-API-SDK-Python

This is an Python SDK that maps some of the RESTful methods of Open API that are documented at Revenue Monster Open API Documentation.

Getting Started

Installation

pip3 install rmsdk

Registration and obtain credentials

Before using the SDK, users must obtain credentials from merchant portal first. Click here for tutorial.

Usage Examples

This section explains the basic usage of the SDK. Detail usage for individual modules are prepared in the examples folder.

A dictionary that contains clientID, clientSecret, environment and privateKey (path to private key) is expected to passed in as argument. An object of the RMSDK class will be instantiated. All modules covered in this SDK will be available under the instantiated object.

For instance, to use the store module, simply,

response = client.store.methodName(*args)

For full parameter, please refer Revenue Monster Open API Documentation.

Authentication

from rmsdk import RMSDK

client = RMSDK(configs={
    "environment": "sandbox", # or production
    "clientID": "client-id",
    "clientSecret": "client-secret",
    "privateKey": "path-to-private-key"
})

accessToken, refreshToken = client.accessToken, client.refreshToken

Payment

quickpay_payload = {
    "authCode": "1234567890",
    "order": {
        "amount": 100,
        "currencyType":"MYR",
        "id":"1312331232",
        "title":"title",
        "detail":"desc",
        "additonalData":"API Test"
   },
    "ipAddress": "8.8.8.8",
    "terminalId": "19382734937293999",
    "storeId": "6170506694335521334"
}

response = client.quickPay.quickPay(accessToken, quickpay_payload)

For full examples, please visit the examples folder

Covered Functions

  • Client Credentials (Authentication)
  • Refresh Token (Authentication)
  • Get Merchant Profile
  • Get Merchant Subscriptions
  • Get Stores
  • Get Stores By ID
  • Create Store
  • Update Store
  • Delete Store
  • Get User Profile
  • Payment (Transaction QR) - Create Transaction QRCode/URL
  • Payment (Transaction QR) - Get Transaction QRCode/URL
  • Payment (Transaction QR) - Get Transaction QRCode/URL By Code
  • Payment (Transaction QR) - Get Transactions By Code
  • Payment (Quick Pay) - Payment
  • Payment (Quick Pay) - Refund
  • Payment (Quick Pay) - Reverse
  • Payment (Quick Pay) - Get All Payment Transactions
  • Payment (Quick Pay) - Get All Payment Transaction By ID
  • Payment (Quick Pay) - Daily Settlement Report
  • Give Loyalty Point
  • Get Loyalty Members
  • Get Loyalty Member
  • Get Loyalty Member Point History
  • Issue Voucher
  • Void Voucher
  • Get Voucher By Code
  • Get Voucher Batches
  • Get Voucher Batch By Key
  • Send Notification (Merchant)
  • Send Notification (Store)
  • Send Notification (User)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages