The PayGate PayBatch Web Service provides a SOAP-based interface to submit and manage batch transactions such as Authorisations, Settlements, and Refunds via your own backend systems.
It supports flexible language environments, clear message schemas, and strong authentication via Basic Auth.
Integration Options
The PayBatch web service supports any environment that can make HTTPS requests and handle SOAP messages. Supported languages include:
-
Java
-
.NET
-
PHP
-
Any other language that supports SOAP
Endpoints
| Environment | Endpoint |
|---|---|
| Live | https://secure.paygate.co.za/paybatch/1.2/process.trans |
| WSDL | https://secure.paygate.co.za/paybatch/1.2/PayBatch.wsdl |
Authentication
PayBatch uses HTTP Basic Authentication. Provide your PayGate ID as the username and your encryption key as the password. The Authorization header must include a base64-encoded string of PayGateID:EncryptionKey.
Example:
Authorization: Basic MTAwMTEwNzIxMzA6dGVzdA==Transaction Flow
graph TD Start[Start] Auth[Auth Request] Settle[Settle Request] Refund[Refund Request] Confirm[Confirm Batch] Query[Query Batch] Start --> Auth --> Confirm --> Query Start --> Settle --> Confirm --> Query Start --> Refund --> Confirm --> Query
Batch Line Format
Each transaction in a batch file is submitted using the following CSV-like format:
A,transaction_reference,Joe Soap,18566ddc-b13b-4c9f-9e88-9a2f9a9dd64a,00,1000
| Position | Field | Description |
|---|---|---|
| 1 | Transaction Type | A = Auth, S = Settle, R = Refund |
| 2 | Transaction Reference | Your internal transaction ID |
| 3 | Cardholder Name | Customer name |
| 4 | Vault ID | Tokenised card reference |
| 5 | Budget Period | Two-digit value |
| 6 | Amount | In cents (e.g. 1000 = R10.00) |
Supported Operations
Auth Request & Response
Use Auth to submit an Authorisation batch. Below is a simplified sample of the SOAP request and expected response.
You can also view or test the full payload via Postman Collection.
<Auth>
<BatchReference>AuthBatch20240701</BatchReference>
<NotificationUrl>https://yourdomain.com/notify</NotificationUrl>
<BatchData>
<BatchLine>A, test123, Joe Soap, 18566ddc-..., 00, 1000</BatchLine>
</BatchData>
</Auth><AuthResponse>
<Return>
<Total>1</Total>
<Valid>1</Valid>
<Invalid>0</Invalid>
<UploadID>292cd489f5afe15cbd362bddfde0b3bc</UploadID>
<Message/>
</Return>
</AuthResponse>Follow the same structure for:
-
Settle request / response
-
Refund request / response
-
Confirm
-
Query
Example Batch Results
Successful batch results can be retrieved using the Query operation.
<TransResult>
71737522,A,transaction_reference,123456,1,Approved,990017,Auth Done
</TransResult>
| Position | Field | Description |
|---|---|---|
| 1 | Transaction ID | |
| 2 | Type | A, S, or R |
| 3 | Reference | |
| 4 | Auth Code | |
| 5 | Status Code | |
| 6 | Status Description | |
| 7 | Result Code | |
| 8 | Result Description |
