Once you've acquired an access code for a user, your Client will store the access token and provide it with secured operation request to impersonate the user credibly. The secure operation URI depends on the operation being executed, and are listed later.
When executing a secured operation, per the specification, the Access Token is provided as a HTTP header with the ‘Bearer’ prefix eg. if the access token value is 3cad5173-7b2a-4626-86be-0ff67804bd59, the header would be:
For the secured resource requests you should supply the HTTP Accept header to determine the formatting of the response sent back from the operation. The header value must be either application/json (for a JSON formatted response body) or application/xml (for XML formatted response body). The default if not specified is application/json.
The following Secure operations can be performed.
Paga supports both XML and JSON response types. However JSON is the recommended format.
1. Merchant Payments
This is the operation executed to make a payment to you on behalf of the customer.
Parameters passed to the operation
referenceNumber = <unique reference number> This is a unique reference number provided by the client to uniquely identify the transaction and for use in retrieving the transaction records later
amount = <amount> Amount to charge the user
merchantCustomerReference = <your customer identification> Unique identifier for your customer eg. Phone number, email, id etc.
merchantProductCode = <your product code> This is an optional code that you can use to verify your payments.
currency = <currency> This is the currency code of the transaction, NGN is the only supported currency as of now (February 2016)
There are several ways in which this operation can be executed, as listed below
1. REST-Style parameterized URL with all parameters provided.
This Operation allows the client to get the user's personal details. The data requested is included in the authentication and authorization request in the data parameter. Additionally, the scope parameter must contain the USER_DETAILS_REQUEST option.
FIRST_NAME: Get the user's first name
LAST_NAME: Get the user's last name
MOBILE_NUMBER: Get the user's paga mobile number
EMAIL: Get the user's paga email address.
USERNAME: Get the user's paga username
ACCOUNT_BALANCE: To Get the user's account balance
Parameters passed to the operation.
publicId (optional) This public Id is passed if the request is initiated from a web redirect, e.g. from the Paga business portal. In order to verify that the request is genuine, the parameter is passed along. Normal requests won't require that parameter.
referenceNumber This is a unique reference number provided by the client to uniquely identify the transaction and for use in retrieving the transaction records later.
There are several ways in which this operation can be executed
REST-type url with the referenceNumber and user's publicId provided.