PaySubs allows you to set up recurring billing on customer cards — think of it as a debit order via credit card. This is ideal for merchants selling subscription-based products or services.
Rather than storing sensitive card information yourself, PaySubs safely hosts this data and manages subscription billing based on your configured schedule. This reduces your PCI DSS compliance burden and frees up your development team to focus on building your core product. Enjoy predictable revenue streams and streamlined customer management with PaySubs; effortlessly scale your subscription business without the headaches of complex payment processing.
Benefits of Using PaySubs
- No SSL certificate required — the hosted page is secure
- All card data is stored and tokenised by PayGate
- Easy to set up on your website
- PaySubs supports initial (once-off) payment + ongoing subscriptions
- Merchants can also manage subscriptions via the PayGate Back Office
Integration Flow
There are two main steps to integrating PaySubs:
- Redirect the customer to PaySubs to complete the subscription setup
- Receive the response back on your
RETURN_URLto process the result
sequenceDiagram
participant Merchant Website
participant Customer
participant PaySubs
participant "Return URL"
participant "PayGate DB"
Customer->>Merchant Website: Selects subscription
Merchant Website->>PaySubs: Redirect via HTML form POST
PaySubs->>Customer: Hosted card input form
PaySubs->>"PayGate DB": Create subscription
PaySubs-->>"Return URL": Redirect with transaction result
All transaction data is posted to PaySubs via an HTML form with hidden fields. The response will return to your system via the URL provided.
Create the Subscription (Reference page)
Redirect to PaySubs
Method: POST
Endpoint:
https://www.paygate.co.za/paysubs/process.transBody Type: x-www-form-urlencoded (or HTML form)
Parameters (fields):
| Field | Description | Required |
|---|---|---|
| VERSION | PaySubs Web Interface version (use 21) | ✅ |
| PAYGATE_ID | Your assigned PayGate ID | ✅ |
| REFERENCE | Your internal reference for the subscription | ✅ |
| AMOUNT | Amount in cents (e.g. R32.99 = 3299) | ✅ |
| CURRENCY | Always ZAR | ✅ |
| RETURN_URL | URL to return the customer after processing | ✅ |
| TRANSACTION_DATE | Current UTC timestamp, e.g. 2025-06-30 10:00 | ✅ |
| SUBS_START_DATE | First subscription run date, e.g. 2025-07-01 | ✅ |
| SUBS_END_DATE | Final run date for the subscription | ✅ |
| SUBS_FREQUENCY | Frequency code (see Subscription Frequency section) | ✅ |
| PROCESS_NOW | YES or NO — whether to process an immediate transaction | ✅ |
| PROCESS_NOW_AMOUNT | Amount (in cents) for the immediate transaction **if **PROCESS_NOW = YES | ✅ |
| Customer’s email address (optional, but recommended) | ❌ | |
| CHECKSUM | MD5 hash of all posted fields + your encryption key | ✅ |
Checksum Calculation: Use the exact order of fields as listed above. More on this in the Security & Hashing section.
Response handling
Handling the Response
Once the subscription process is complete, the user is redirected back to the RETURN_URL you provided.
PayGate appends a set of query parameters containing the result of the transaction. These include:
| Field | Description |
|---|---|
| PAYGATE_ID | Same PayGate ID sent in the request |
| REFERENCE | Your internal reference |
| TRANSACTION_STATUS | Final status of the transaction (Approved / Declined) |
| RESULT_CODE | Numeric result code |
| RESULT_DESC | Description of the result |
| AUTH_CODE | Only returned if PROCESS_NOW = YES and was approved |
| AMOUNT | The transaction amount processed |
| TRANSACTION_ID | Unique PayGate transaction reference |
| SUBSCRIPTION_ID | Unique PayGate subscription reference |
| RISK_INDICATOR | e.g. Y (3DS authentication) or X (not applicable) |
| CHECKSUM | MD5 checksum of all response values + encryption key |
You must validate the response checksum to ensure the payload has not been tampered with.
Subscription Frequency Codes
These frequency codes determine when subscription transactions are processed. Codes are included as the SUBS_FREQUENCY parameter when creating a PaySubs subscription request.
Each code defines a specific interval and date pattern for recurring charges.
Be sure to select a code appropriate to your customer’s billing expectations and the length of your subscription agreement.
Weekly Schedules
| Code | Description |
|---|---|
| 111 | Weekly on Sunday |
| 112 | Weekly on Monday |
| 113 | Weekly on Tuesday |
| 114 | Weekly on Wednesday |
| 115 | Weekly on Thursday |
| 116 | Weekly on Friday |
| 117 | Weekly on Saturday |
Biweekly Schedules
| Code | Description |
|---|---|
| 121 | 2nd Weekly on Sunday |
| 122 | 2nd Weekly on Monday |
| 123 | 2nd Weekly on Tuesday |
| 124 | 2nd Weekly on Wednesday |
| 125 | 2nd Weekly on Thursday |
| 126 | 2nd Weekly on Friday |
| 127 | 2nd Weekly on Saturday |
3rd Weekly Schedules
| Code | Description |
|---|---|
| 131 | 3rd Weekly on Sunday |
| 132 | 3rd Weekly on Monday |
| 133 | 3rd Weekly on Tuesday |
| 134 | 3rd Weekly on Wednesday |
| 135 | 3rd Weekly on Thursday |
| 136 | 3rd Weekly on Friday |
| 137 | 3rd Weekly on Saturday |
Monthly Schedules
| Code | Description |
|---|---|
| 201–228 | Monthly on 1st–28th |
| 229 | Last day of the month |
Every 2nd Month
| Code | Description |
|---|---|
| 301–328 | Every 2nd month on 1st–28th |
| 329 | Every 2nd month on last day |
Every 3rd Month
| Code | Description |
|---|---|
| 401–428 | Every 3rd month on 1st–28th |
| 429 | Every 3rd month on last day |
