Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
The Paga Collect API allows anyone to initiate a payment request to a third party and automatically get notified when the payment request is fulfilled. This library makes it easier and faster for developers to integrate the API
Make sure you have pip
installed, then run the command below
pip install paga-collect
Once installed to use the library see sample code below:
from paga_collect import Collect;
principal = "public_key"
credentials = "private"
hash_key = "hash_key"
collect = Collect(principal, credentials, hash_key, False)
Now that you have created a collect api object you easily call its operations
Register a new request for payment between a payer and a payee. Once a payment request is initiated successfully, the payer is notified by the platform (this can be suppressed) and can proceed to authorize/execute the payment. Once the payment is fulfilled, a notification is sent to the supplied callback URL. See the callback notification section for more details.
To make a payment request see sample code below:
payment_request_payload = {
"referenceNumber": "6020000011z",
"amount": "100",
"currency": "NGN",
"payer": {
"name": "John Doe",
"phoneNumber": "07033333333",
"bankId": "3E94C4BC-6F9A-442F-8F1A-8214478D5D86"
},
"payee": {
"name": "Payee Tom",
"accountNumber": "1188767464",
"bankId": "40090E2F-7446-4217-9345-7BBAB7043C4C",
"bankAccountNumber": "0000000000",
"financialIdentificationNumber": "03595843212"
},
"expiryDateTimeUTC": "2021-05-27T00:00:00",
"isSuppressMessages": "true",
"payerCollectionFeeShare": "0.5",
"recipientCollectionFeeShare": "0.5",
"isAllowPartialPayments": "true",
"callBackUrl": "http://localhost:9091/test-callback",
"paymentMethods": ["BANK_TRANSFER", "FUNDING_USSD"]
}
response = collect.payment_request(payment_request_payload)
An operation for business to create Persistent Payment Account Numbers that can be assigned to their customers for payment collection.
To create a persistent payment account see sample code below:
register_persistent_payment_account_payload = {
"referenceNumber": "test123451",
"phoneNumber": "07022222222",
"accountName": "Joh Doe",
"firstName": "John",
"lastName": "Doe",
"email": "john@doe.com",
"accountReference": "22222222222220",
"financialIdentificationNumber": "22182799077",
"callbackUrl": "http://localhost:9091/test-callback"
}
response = collect.register_persistent_payment_account(register_persistent_payment_account_payload)
Query the current status of a submitted request
To check the status of a submitted request see sample code below:
status_payload = {"referenceNumber": "82000001109", }
response = collect.get_status(status_payload)
Get payment requests for a period between given start and end dates. The period window should not exceed 1 month.
See sample code below:
history_payload = {
"referenceNumber": "82000001109",
"startDateTimeUTC" : "2021-05-13T19:15:22",
"endDateTimeUTC" : "2021-05-20T19:15:22"
}
response = collect.get_history(history_payload)
Retrieve a list of supported banks and their complementary unique ids on the bank. This is required for populating the payer (optional) and payee objects in the payment request model.
See usage sample code below:
banks_payload = {"referenceNumber": "0001109"}
response = collect.get_banks(status_payload)
FAQs
A helper class/SDK to enable developers easily integrate Paga Collect API
We found that paga-collect demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.