Overview
PayFast is South Africa's largest payment gateway – cards, EFT, Instant EFT (SiD), MobiCred, Mukuru, Zapper, plus tokenized recurring billing. The Automize PayFast connector covers transaction lookups, refunds, subscriptions (recurring billing), tokenised charging, and connectivity testing.
- Regions: South Africa only. Customers must have a ZA bank account or card issued for ZA processing.
- Plans: Pay-per-transaction. Tiered fees by volume + transaction type. No monthly fees.
Setting up the connection
Auth type: Bearer Token.
- Sign in to my.payfast.com → Settings → Integration.
- Note your Merchant ID + Merchant Key (used for hashing) + the Passphrase.
- For the REST API specifically, generate an API key under Integration → API.
- In Automize, open Settings → Connectors → PayFast → Add connection. Paste credentials.
Find your credentials at https://my.payfast.com/eng/account/integration.
Rate limits
PayFast doesn't publish per-second limits. The connector retries 429 with backoff. For sustained high traffic talk to PayFast support.
Data model
Two product lines:
One-off / hosted checkout (handled outside this connector – server-to-server form post)
REST API ─┬─ Tokenized cards (charge stored cards programmatically)
├─ Subscriptions (recurring billing tokens)
└─ Transactions (lookup + refund)
Tokens come from initial checkout flow with 'subscription_type=1'. Once
you have a token, you can charge or manage via the REST API.Available operations
8 operations available. Click any row to jump to its detail.
| Operation | Category | What it does |
|---|---|---|
| Cancel subscription | General | Cancel a PayFast subscription. |
| Charge tokenized card | General | Charge a tokenized credit card via PayFast (adhoc payment). |
| Fetch subscription | General | Get subscription/recurring billing details from PayFast. |
| Get transaction | General | Get transaction details by ID from PayFast. |
| Pause subscription | General | Pause a PayFast subscription. |
| Ping | General | Test API connectivity to PayFast. |
| Refund transaction | General | Refund a PayFast transaction (full or partial). |
| Unpause subscription | General | Resume a paused PayFast subscription. |
Operations
Cancel subscription
Cancel a PayFast subscription.
| Parameter | Required | Type | Description |
|---|---|---|---|
Subscription token token | Yes | text |
Tips
- Cancels the recurring billing. Irreversible – start a new subscription if needed.
Charge tokenized card
Charge a tokenized credit card via PayFast (adhoc payment).
| Parameter | Required | Type | Description |
|---|---|---|---|
Card token token | Yes | text | |
Amount (cents) amount | Yes | number | |
Item name item_name | Yes | text | |
Description item_description | No | text |
Tips
- token: from previous subscription_type=1 transaction.
- amount in ZAR cents. item_name shown on the customer's statement.
- Use for adhoc charges (one-off using saved card) – not for subscriptions.
Fetch subscription
Get subscription/recurring billing details from PayFast.
| Parameter | Required | Type | Description |
|---|---|---|---|
Subscription token token | Yes | text |
Tips
- token. Returns frequency, cycles, run_date, amount, status.
Get transaction
Get transaction details by ID from PayFast.
| Parameter | Required | Type | Description |
|---|---|---|---|
Payment ID pf_payment_id | Yes | text |
Tips
- pf_payment_id: the PayFast transaction ID (different from m_payment_id which is your reference).
Pause subscription
Pause a PayFast subscription.
| Parameter | Required | Type | Description |
|---|---|---|---|
Subscription token token | Yes | text |
Tips
- Pauses the recurring billing. Use Unpause to resume.
Ping
Test API connectivity to PayFast.
No input parameters.
Tips
- Health check – verifies credentials + connectivity. Use during onboarding to validate setup.
Refund transaction
Refund a PayFast transaction (full or partial).
| Parameter | Required | Type | Description |
|---|---|---|---|
Payment ID pf_payment_id | Yes | text | |
Amount amount | No | number |
Tips
- pf_payment_id + optional amount (in cents) for partial refunds. Omit amount to refund in full.
Errors
transaction_not_refundable– Transaction not yet settled or already fully refunded.
Unpause subscription
Resume a paused PayFast subscription.
| Parameter | Required | Type | Description |
|---|---|---|---|
Subscription token token | Yes | text |
Tips
- Resumes a paused subscription. Next charge happens on the next scheduled run_date.
FAQ
- Tokenized charge vs subscription – which?
- Tokenized charge = one-off, customer-initiated. Subscription = recurring on a schedule. Both use saved-card tokens from the initial checkout.
- Sandbox vs production?
- PayFast Sandbox uses sandbox.payfast.co.za with test cards. Get sandbox credentials from your PayFast account → Integration → Sandbox. Create separate Automize connections per environment.
- Webhooks (ITN) – how?
- PayFast posts Instant Transaction Notifications (ITN) for events. Configure the ITN URL in PayFast UI to point at your Automize webhook ingest. This connector handles the API side; webhooks are configured separately.
- Why does my Ping work but charge fail?
- Ping only validates credentials. Charge can fail for other reasons – token expired, customer's card blocked, daily limit hit, MID restrictions. Look at the response's reason field.