Skip to content

Repository files navigation

vPOS Python

package

This python library helps you easily interact with the vPOS API, Allowing merchants apps/services to request a payment from a client through his/her mobile phone number.

The service currently works for solutions listed below:

EMIS GPO (Multicaixa Express)

Want to know more about how we are empowering merchants in Angola? See our website

Features

  • Simple interface
  • Uniform plain old objects are returned by all official libraries, so you don't have to serialize/deserialize the JSON returned by our API.

Documentation

Does interacting directly with our API service sound better to you? See our documentation on developer.vpos.ao

Installation

pipinstallvpos

Configuration

This python library requires you set up the following environment variables on your machine before interacting with the API using this library:

VariableDescriptionRequired
GPO_POS_IDThe Point of Sale ID provided by EMIStrue
GPO_SUPERVISOR_CARDThe Supervisor card ID provided by EMIStrue
MERCHANT_VPOS_TOKENThe API token provided by vPOStrue
PAYMENT_CALLBACK_URLThe URL that will handle payment notificationsfalse
REFUND_CALLBACK_URLThe URL that will handle refund notificationsfalse

or using one of the optional arguments

VariableDescriptionRequired
pos_idThe Point of Sale ID provided by EMISfalse
supervisor_cardThe Supervisor card ID provided by EMISfalse
tokenThe API token provided by vPOSfalse
payment_callback_urlThe URL that will handle payment notificationsfalse
refund_callback_urlThe URL that will handle refund notificationsfalse

Don't have this information? Talk to us

Use

create instance

Creates a new instance of Vpos

importvposmerchant=Vpos()
# or use optional argumentsmerchant=Vpos(token='your_token_here')

Get a specific Transaction

Retrieves a transaction given a valid transaction ID

transaction=merchant.get_transaction('1kTFGhJH8i58uD9MdJpMjWnoE')

New Payment

transactions=merchant.new_payment('900111222', '123.45')
ArgumentDescriptionType
mobileThe mobile number of the client who will paystring
amountThe amount the client should pay, eg. "259.99", "259000.00"string

Request Refund

transaction=merchant.new_refund('1jHbXEbRTIbbwaoJ6w06nLcRG7X')

Poll Transaction Status

Poll the status of a transaction given a valid request_id.

Note: The request_id in this context is essentially the transaction_id of an existing request.

transaction=merchant.get_request('1jHbXEbRTIbbwaoJ6w06nLcRG7X')
ArgumentDescriptionType
request_idThe ID of transaction you wish to pollstring

Have any doubts?

In case of any doubts, bugs, or the like, please leave an issue. We would love to help.

License

The library is available as open source under the terms of the MIT License.

About

vPOS Python Library

Topics

Resources

Stars

6 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages