How do I add an enhanced API key security on Paytia?
Generating a key is step one. This covers the controls worth switching on afterwards — IP restriction and token-based access — and how to pre-authorise your requests.
How to Add Enhanced API Key Security on Paytia
Adding enhanced security to your API integration ensures a more secure and streamlined experience when connecting to the Paytia platform. Follow these instructions to generate an API key, activate tokens, and configure security settings.
Step 1: Generate an API Key
- Navigate to
Account Security > API Secret Keyin the Paytia administration portal.
- Click the Generate API Key button. An API key will be created and displayed in the API key list.

Step 2: Configure API Key Settings
Restrict Access by IP Address (Optional):
- Enter the IP address of your server or application in the designated field to limit API key usage to specified IPs.

- Enter the IP address of your server or application in the designated field to limit API key usage to specified IPs.
Select Webhook Output Format:
- Single JSON Data: Outputs data as a single string.
- Multiple JSON Data: Outputs each field on a separate line (specific to Worldpay Corporate Gateway).
-
Click Save to activate your settings.
Step 3: Generate Tokens
- Locate your API key in the list and click Generate Tokens under the "Action" column.
- You will receive the following:
- Client ID: A unique public identifier for your app.
- Client Secret: A secure, private value for authentication.
- Access Token: A short-lived token for API requests (expires in one hour).
- Refresh Token: Used to renew expired access tokens automatically.

Important Notes:
- Client ID: Must be unique across all Paytia client API connections.
- Client Secret: Should be highly random and secure.
- Access Token: Authenticate API requests. Expires in one hour.
- Refresh Token: Renew access tokens when expired.
Step 4: Enable Enhanced Security
- Toggle the Enhance Security switch to activate this feature. The switch should be set to green.

Step 5: Authorize API Access
Use the /api/authorize endpoint to pre-authorize your API requests.
Example https://accounts.paytia.com/api/authorize
Example POST Request:
curl --location 'https://accounts.paytia.com/api/authorize' \
--header 'X-API-KEY: your_api_key_here' \
--header 'ACCESS-TOKEN: your_access_token_here' \
--data-raw '{
"client_id": "your_client_id_here",
"client_secret": "your_client_secret_here"
}'
- Replace
your_api_key_here,your_access_token_here,your_client_id_here, andyour_client_secret_herewith the appropriate values.curl --location 'https://accounts.paytia.com/api/payment_service' \--header 'X-API-KEY: 1fa7c6470f54e14f948d0d830a775c3efb328bef5f6a464869fca627ca979818' \--header 'ACCESS-TOKEN: cWMJZimvoWr9QAo5ZZZZBPX5q83rCiTx4xCy1=' \
Step 6: Refresh Tokens
When the access token expires, use the refresh token to generate a new access token. Paytia will return a new refresh token with each renewal to maintain secure credentials.
By following these steps, you ensure that your integration with Paytia is secured with advanced token-based authentication, reducing risks and enhancing operational reliability.
More in API
How do I use Paytia Webhooks?
Webhooks let our platform send notifications and data out to third-party providers — useful when you're integrating Agent Capture Assist with an external telephony partner. Setting one up takes a couple of minutes.
How to Add an API Key on Paytia
Generating an API key from Account Security then API Secret Key, plus the optional IP restriction that limits where the key can be used from.
Integrating Paytia: A Comprehensive Guide to the Connection Points you must consider
There are three places Paytia connects to your world — your host system, your telephony, and your payment gateway. This walks through what each connection needs so you can plan an integration properly.
Paytia API - Braintree payment gateway - using the gateway_customer_control field to control the passed value in the gateway_customer_id field
The gateway_customer_control field lets you set your own Braintree customer IDs. Here are the valid values and the exact errors you'll get when one is wrong.
Paytia API exception handling
The webhooks we send when something goes wrong mid-payment — the customer rejects the amount, the call drops, the card fails. Here's each case and what lands on your endpoint.
Paytia API services
Three API versions, depending on how much of the flow you want to control yourself. This is the overview of what each does and which one to pick.
Still need help?
Our support team is here to help. Submit a ticket and we'll get back to you within one business day.