Introduction

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:

  1. Redirect the customer to PaySubs to complete the subscription setup
  2. Receive the response back on your RETURN_URL to 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.trans

Body Type: x-www-form-urlencoded (or HTML form)

Parameters (fields):

FieldDescriptionRequired
VERSIONPaySubs Web Interface version (use 21)
PAYGATE_IDYour assigned PayGate ID
REFERENCEYour internal reference for the subscription
AMOUNTAmount in cents (e.g. R32.99 = 3299)
CURRENCYAlways ZAR
RETURN_URLURL to return the customer after processing
TRANSACTION_DATECurrent UTC timestamp, e.g. 2025-06-30 10:00
SUBS_START_DATEFirst subscription run date, e.g. 2025-07-01
SUBS_END_DATEFinal run date for the subscription
SUBS_FREQUENCYFrequency code (see Subscription Frequency section)
PROCESS_NOWYES or NO — whether to process an immediate transaction
PROCESS_NOW_AMOUNTAmount (in cents) for the immediate transaction **if **PROCESS_NOW = YES
EMAILCustomer’s email address (optional, but recommended)
CHECKSUMMD5 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:

FieldDescription
PAYGATE_IDSame PayGate ID sent in the request
REFERENCEYour internal reference
TRANSACTION_STATUSFinal status of the transaction (Approved / Declined)
RESULT_CODENumeric result code
RESULT_DESCDescription of the result
AUTH_CODEOnly returned if PROCESS_NOW = YES and was approved
AMOUNTThe transaction amount processed
TRANSACTION_IDUnique PayGate transaction reference
SUBSCRIPTION_IDUnique PayGate subscription reference
RISK_INDICATORe.g. Y (3DS authentication) or X (not applicable)
CHECKSUMMD5 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

CodeDescription
111Weekly on Sunday
112Weekly on Monday
113Weekly on Tuesday
114Weekly on Wednesday
115Weekly on Thursday
116Weekly on Friday
117Weekly on Saturday

Biweekly Schedules

CodeDescription
1212nd Weekly on Sunday
1222nd Weekly on Monday
1232nd Weekly on Tuesday
1242nd Weekly on Wednesday
1252nd Weekly on Thursday
1262nd Weekly on Friday
1272nd Weekly on Saturday

3rd Weekly Schedules

CodeDescription
1313rd Weekly on Sunday
1323rd Weekly on Monday
1333rd Weekly on Tuesday
1343rd Weekly on Wednesday
1353rd Weekly on Thursday
1363rd Weekly on Friday
1373rd Weekly on Saturday

Monthly Schedules

CodeDescription
201–228Monthly on 1st–28th
229Last day of the month

Every 2nd Month

CodeDescription
301–328Every 2nd month on 1st–28th
329Every 2nd month on last day

Every 3rd Month

CodeDescription
401–428Every 3rd month on 1st–28th
429Every 3rd month on last day