Payment API
The Payment API, sometimes called the Direct Post method, is the simplest way to post transactions directly from your server to the gateway. It supports both web‑based and non web‑based applications but places greater PCI responsibilities on the integrator.
Overview
At its core, the Payment API is a simple HTTP interface for processing transactions. Your server sends a POST request containing order details, payment information and authentication credentials. The gateway returns a response indicating whether the transaction was approved or declined. This method gives you complete control over the payment flow, but you are responsible for handling sensitive data securely and ensuring compliance with industry standards.
Prerequisites & PCI Considerations
Before implementing the Payment API, you should perform a PCI vulnerability scan and ensure that your systems meet all data security requirements. Independent sources note that the direct post method is better suited for businesses with the resources to handle PCI compliance themselves. If you operate in a high‑risk environment or lack a dedicated security team, consider using a tokenisation or hosted solution instead.
To protect your account during development, never use live credentials or real card data in test environments. Always use a test merchant account and designated test keys. The official documentation stresses this point and warns developers not to use real API keys when testing.
Usage
To submit a transaction you will send a POST request to the payment endpoint with name/value pairs representing the transaction type, amount, card details and customer information. A typical request might include fields such as username, password,amount, payment_token or card data, and order identifiers. The gateway will return a response string containing an approval indicator, response message and transaction ID.
Tips for sending requests
- Use HTTPS for all communication to ensure data is encrypted in transit.
- Store your API credentials securely and rotate passwords regularly.
- Validate all input on your server to prevent injection or tampering.
- Test against the gateway’s sandbox environment before going live. Real cards should never be used for testing.
Considerations
The Payment API offers maximum control but also brings additional responsibilities. Because your server handles cardholder data directly, you must maintain a secure environment and ensure compliance with the Payment Card Industry Data Security Standard (PCI DSS). Many integrators choose tokenisation or hosted solutions to reduce scope. If you decide to proceed with the Payment API, budget time and resources for regular security audits and vulnerability scans.
