Paga Connect is a merchant library for Paga business clients that want to have a seamless integration with Paga without the need to require their users to always approve transactions. Users give permissions and approve the first time and then subsequent transactions are performed on behalf of the user.
Paga connect uses the OAuth 2.0 Specification to enable secure integration with our 3rd party clients. Paga connect is currently implemented based on the final release of the OAuth2 Specification (RFC6749).
In order to make request on behalf of a user, the OAuth2 Client must obtain an Access Token from the OAuth2 Service and provide the Access Token with each request on behalf of the user. The Access Token represents the permission that the user and the service have provided to the Client to make specific requests on behalf-of the user.
- Forward the user to the authorization endpoint URI.
- The user will be asked to authenticate, and authorize your Client to execute operations on their behalf.
- After validating authorization from the user, we will redirect the user’s agent back to a Uri provided by you (redirect_uri parameter provided with authorization request) and include in there a one-time Authorization Code.
- Your Client will extract the Authorization Code and make a separate request (not visible to the User) to get an Access Token, providing the one-time Authorization Code and your Client credentials (client id and password provided to you).
- If the request for the Access Token is valid, we will return a new Access Token in the response.
- Your Client can now make requests to secured URIs on behalf of the user, by providing the Access Token with the request.
As of this time, Paga connect authentication details have to be obtained directly from Paga. That will change in the near future.
The steps required to obtain authentication details are outlined below.
- Create a Paga Business Account
- Send and Email to the Paga Operations Support team.
- You will be contacted by a Paga representative that will provide you with the information you require.
The Following parameters would be needed in initializing the library
Client_ID : This is identifier for your OAuth 2.0 client. You will be assigned a unique client id for your client along with a client secret (password) that will be discussed later. Note that individual organizations would have multiple client ids if they implement multiple OAuth 2.0 clients.
Scope : This is a set of strings that allows the client to specify the scope of access required. This scope is also used by the authorization server to inform the users of what permissions they are providing to the client. The scope parameters are outlined in table below.
Scope Description MERCHANT_PAYMENT This permission allows you to charge a user's Paga account USER_REQUEST_ACCOUNT_BALANCE This allows you to request the Paga user's account balance MONEY_TRANSFER This allows you to transfer money to a Credit a paga User's account USER_DETAILS_REQUEST This allows you to request a user's details (See UserData Table for more)
User_Data : This is an optional set of strings that allows the client to specify the scope of user data required. This scope is also used by the authorization server to inform the users of what permissions they are providing to the client. The user_data parameters are outlined in the table below.
User Data 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 Get the user's paga email address. USERNAME Get the user's paga username
Updated over 2 years ago