Product
Paya Connect
Paya Connect Developers Tool Kit
Description
While this is a guide for best practices, we suggest working with the Paya SDK Team for additional consultation. The intended audience for this article is our Integration Partners and their Development Teams. Please note that additional code work must be done and any referenced sample(s) are only for educational purposes.
**THIS IS INTENDED FOR DEVELOPER/INTEGRATOR USE ONLY**
Resolution
Some integrators will look to automatically create a Paya Connect local integration user to drive the API and hosted requests coming from their Paya Connect Integrated solution. The process outlined below will take the integrator through the workflow of creating a local integration user for each Merchant that is onboarded to their solution.
Glossary
Global Integration User - This is a hardcoded integration user that controls the creation of an integration user. While this user might be used for other purposes, we will refer to its user creation capabilities.
Local Integration User - This is the location-level integration user that will drive all ISV integrated solutions API and hashed requests.
Process
- Run a GET on the 'locationinfo' endpoint by using the Global Integration User credentials to gather the Location ID using the supplied Location API ID. As part of your onboarding and experience discussion, your team will work with Paya's Experience Team to determine what information will be set as the Location API ID (most integrators choose an internal account number):
- PHP GitHub example of the GET on 'locationinfo'
- Additional documentation on the endpoint (you will find a sample of the response our APIs will return for this request)
- The API call would be {host}/v2/locationinfos?[location-api-id]
- Gather the Location ID and submit a POST request to the 'users' endpoint by using the Global Integration Users credentials, to create the 'Local Integration User'. Important items to consider:
- The integration will need to create:
- Unique username
- Unique API key (between 24 and 64 characters)
- Unique HASH key (between 24 and 64 characters) *only needed for PayForm and AccountForm integrations.
- These values would need to keep on record as the location's local integration user credentials.
- PHP GitHub example of the POST on 'users'
- Additional endpoint documentation here
- The integration will need to create:
- Gather the Local Integration User's User ID from the response of the creation of the user for the POST to 'authroleusers' endpoint by using the 'Global Integration User' credentials, to assign the integration roles.
- PHP GitHub example of the POST to 'authroleusers'
- Please note, that in GitHub, we show only the sandbox authrole ids, production roles will be supplied after certification is completed.
Please contact the SDK Support Team with any additional integration questions.