Patasente Api

Patasente API documentation

Welcome to Patasente’s API documentation. The Patasente API is REST based. All responses shall be returned using JSON .

You access Patasente’s API at the following endpoint

https://patasente.me/phantom-api/

Getting started

Authentication

All requests must use https. Patasente API uses Widget Token and API key for authentication. Both keys are generated in Payment Settings of your Patasente account.
Follow this Home>Profile>Payment Settings>Website Widgets

api_key

5384z9XT7

widget_key

53525880bd675362d449b60185f82ddf

Payment By Mobile Money Payment Gateway

This section will take you through the steps for making a mobile money payment on Patasente API.

For Airtel Uganda a user has to initiate a cash withdraw and then enter the secret code and amount in the fields above.

A POST request should be made to this API endpoint

For Mtn Uganda a user has to request a six (6) digit transaction token from Patasente and then enter the secret code and amount in the fields above.

https://patasente.me/phantom-api/send-transaction-token/5384z9XT7/53525880bd675362d449b60185f82ddf?phone=25678000000&mobile_money_company_id=1

A json response with 200 success code will be returned

{ "message": "A Six (6) digit code has been sent to 2567800000001",

A POST request should be made to this API endpoint

https://patasente.me/phantom-api/pay-with-patasente/$api_key/$widget_key

The parameter that should be sent to this endpoint is the "email", "phone" ,"secret_code" ,"mobile_money_company_id" ,"reason" ,"metadata" and "amount".

https://patasente.me/phantom-api/pay-with-patasente/5384z9XT7/53525880bd675362d449b60185f82ddf?email=developers@patasente.com&amount=2000&phone=2567528000000
&secret_code=123456&mobile_money_company_id=2&reason=i am making a donation&metadata=this is an array of any custom metadata

A json response with 200 success code will be returned

{ "message": "Thank you! Your payment was successful", "metadata": { "my_id": "123ASDAsd123" }, }

If there any errors, a json response with 400 error code will be returned

{ "error": "Your can't make payments to this account" }

Below are the fields required by the API

. .
Field Type Required Description
phone number Yes This the registered mobile money phone number and it should be in international format without plus (+) sign
amount number Yes This is the amount that should be paid
metadata array No This is Any custom metadata that can be added to the request when it was created and its returned when the transaction has been processed
email string No This is an optional email of the user making a payment
mobile_money_company_id number Yes This mobile_money_company_id is required and it should either be 1 for MTN Uganda or 2 for Airtel Uganda
secret_code number No This is a 6 (six) digit secret code issued by Airtel Uganda during Cash Withdraw that should be deposited
transaction_code number Required This is a 6 (six) digit transaction code issued by Patasente
reason text Yes This is the description for this payment

Payment By Merchant Account

This section will take you through the steps for making a payment using merchant account on Patasente API.

A POST request should be made to this API endpoint to receive a transaction token

https://patasente.me/phantom-api/send-transaction-token/$api_key/$widget_key

The parameter that should be sent to this endpoint is the "username"

The username can be an email , merchant code or phone number that is used to login into a Patasente Account

https://patasente.me/phantom-api/send-transaction-token/5384z9XT7/53525880bd675362d449b60185f82ddf?username=developers@developer.com

https://patasente.me/phantom-api/send-transaction-token/5384z9XT7/53525880bd675362d449b60185f82ddf?username=M234242

https://patasente.me/phantom-api/send-transaction-token/5384z9XT7/53525880bd675362d449b60185f82ddf?username=25678000000

A second POST request should be made to this API endpoint

https://patasente.me/phantom-api/pay-with-patasente/$api_key/$widget_key

The parameters that should be sent to this endpoint is the "username", "token" ,"mobile_money_company_id" ,"reason" ,"metadata" and "amount".

https://patasente.me/phantom-api/pay-with-patasente/5384z9XT7/53525880bd675362d449b60185f82ddf?username=developers@patasente.com&amount=2000
&token=1234563&reason=i am making a payment with merchant account&metadata=this is an array of any custom metadata

A json response with 200 success code will be returned

{ "message": "Thank you! Your payment was successful", "metadata": { "my_id": "123ASDAsd123" }, }

If there any errors, a json response with 400 error code will be returned

{ "error": "Your can't make payments to this account" }

Below are the fields required by the API

Field Type Required Description
username number Yes This is an email, merchant code or phone number that is used to login into a Patasente Account.
amount number Yes This is the amount that should be paid
metadata array No This is Any custom metadata that can be added to the request when it was created and its returned when the transaction has been processed
token number No This is a 6 (six) digit transaction token sent to either the email or phone number registered to reiceive notifications on a Patasente Account.
reason text Yes This is the description for this payment

Acknowledgements

© 2018, 2019.

Patasente is developed and maintained by @LebronBrian23 .