Skip to main content

# vPOS Python

![package](https://github.com/nextbss/vpos-python/workflows/package/badge.svg?branch=main) [![](https://img.shields.io/badge/nextbss-opensource-blue.svg)](https://www.nextbss.co.ao)

This python package allows you to interact with the vPOS API

## Installation

`python pip install vpos `

## Configuration | Variable | Description | Required | | — | — | — | | GPO_POS_ID | The Point of Sale ID provided by EMIS | true | | GPO_SUPERVISOR_CARD | The Supervisor card ID provided by EMIS | true | | MERCHANT_VPOS_TOKEN | The API token provided by vPOS | true | | PAYMENT_CALLBACK_URL | The URL that will handle payment notifications | false | | REFUND_CALLBACK_URL | The URL that will handle refund notifications | false | | VPOS_ENVIRONMENT | The vPOS environment, leave empty for sandbox mode and use “prd” for production. | false |

Don’t have this information? [Talk to us](suporte@vpos.ao)

## Use

### Get all transactions This method retrieves all transactions

`python import vpos transactions = vpos.get_transactions() `

### Get a specific Transaction Retrieves a transaction given a valid transaction ID `python import vpos transaction = vpos.get_transaction("1kTFGhJH8i58uD9MdJpMjWnoE") `

### New Payment `python import vpos transactions = vpos.new_payment("900111222", "123.45") ` | Argument | Description | Type | | — | — | — | | mobile | The mobile number of the client who will pay | string | amount | The amount the client should pay, eg. “259.99”, “259,000.00” | string

### Request Refund `python import vpos transaction = vpos.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.

`python import vpos transaction = vpos.get_request("1jHbXEbRTIbbwaoJ6w06nLcRG7X") `

Argument | Description | Type |
— | — | — |
request_id | The ID of transaction you wish to poll | string

### 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](http://opensource.org/licenses/MIT).

Metadata

Release files for vpos 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vpos 1.0
File Size Uploaded
vpos-1.0.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for vpos 1.0
File Interpreter ABI Platform
vpos-1.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.4 kB

Release files / vpos-1.0.tar.gz

Download URL vpos-1.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e504fa79eabd997afa3dc4042905eba2d862a43cf53dcbd55a337b596dfeccd2
BLAKE2b-256 checksum
How to use checksums
7d556037a1f5fa1153d6de2dfa0a4e5f24c028ed45ba98c2718cd9bbb470a3fc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.23.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.6

Release files / vpos-1.0-py3-none-any.whl

Download URL vpos-1.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
738797799fa230931c5c7c6a2b54c3f60f8501161c364e705c15badcd3968894
BLAKE2b-256 checksum
How to use checksums
c263c8b165512e064e2c000bfea6af3017561d14e4624791025534fee208cf07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.23.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.6

Release history Release notifications | RSS feed

This release

1.0 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page