Hosted API
This document provides a comprehensive guide to integrate with the Pay Agency. The Hosted API allows non-seamless payment processing without using card details. The API endpoint and payload details are provided below, along with examples in multiple programming languages.
API Endpoint
Parameters
Parameter | Type | Description | Required |
---|---|---|---|
first_name | String | First name of the cardholder | Yes |
last_name | String | Last name of the cardholder | Yes |
email | String | Email address of the user | Yes |
address | String | Billing address | Yes |
country | String | Country code (ISO 3166-1 alpha-3 format) | Yes |
city | String | City of the cardholder | Yes |
state | String | State of the cardholder | Yes |
zip | String | ZIP or postal code | Yes |
ip_address | String | IP address of the user | Yes |
phone_number | String | Phone number of the cardholder | Yes |
amount | Number | Transaction amount in smallest currency unit | Yes |
currency | String | Currency code (ISO 4217 format) | Yes |
redirect_url | String | URL to redirect users after payment | Yes |
webhook_url | String | URL for server-to-server webhook notifications | NO |
order_id | String | Unique order from merchant side | NO |
terminal_id | String | Connector unique terminal_id (It's usefull when you want to bypass all routing and cascading logic) | NO |
Payload
The payload should be sent in JSON format. Below is the structure of the payload:
Example Responses
Success Response
Error Response
Integration Examples
Below are examples of how to integrate with the API using different languages.
Encryption Key in Settings
The encryption key, used for securing sensitive data, can be found on the Settings page. This key is essential for encryption and decryption processes, ensuring data confidentiality. Make sure to store it securely and avoid sharing it with unauthorized users.