💳

# PayFast Payment Gateway

Complete guide to integrating PayFast South African payment solutions

P

### PayFast - South African Payment Leader

Trusted payment solutions for South African businesses

#### 🇿🇦 South African Focus

- • Leading SA payment processor
- • ZAR currency support
- • Local banking integration
- • POPI Act compliant

#### 💳 Payment Methods

- • Credit & Debit Cards
- • Instant EFT
- • Masterpass
- • Bitcoin

## 🔑 How to Create PayFast Account

1

#### Sign Up for PayFast

Visit PayFast Registration and create a new account.

2

#### Complete Business Verification

Provide business documentation and complete the verification process.

3

#### Access Dashboard

Log into your PayFast dashboard to access integration settings.

4

#### Get Integration Details

Navigate to "Settings" → "Integration" to get your merchant credentials.

## ⚙️ Environment Configuration

Add these environment variables to your .env file:

`APP_PAYFAST_MERCHANT_ID="your_merchant_id" APP_PAYFAST_MERCHANT_KEY="your_merchant_key" APP_PAYFAST_PASSPHRASE="your_passphrase" APP_PAYFAST_SANDBOX="true"`

Note: Set SANDBOX to "false" for production environment.

## 🔌 API Endpoints

POST `/api/finance/deposit/fiat/payfast/`

Creates PayFast payment with form-based integration

Request Body:

`{ "amount": 100.00, "currency": "ZAR", "customer": { "name": "John Doe", "email": "john@example.com" } }`
POST `/api/finance/deposit/fiat/payfast/verify`

Verifies PayFast payment status from return URL

POST `/api/finance/deposit/fiat/payfast/webhook`

Handles PayFast ITN (Instant Transaction Notification) callbacks

GET `/api/finance/deposit/fiat/payfast/status`

Checks PayFast payment status and handles expiration

## ✨ Supported Features

### Payment Methods

- Credit Cards (Visa, Mastercard)
- Instant EFT
- Masterpass
- Bitcoin
- Mobicred
- SCode

### Key Features

- ZAR currency support
- Local banking integration
- POPI Act compliant
- Fraud protection
- Real-time notifications
- Sandbox testing