Complete guide to integrating PayFast South African payment solutions
Trusted payment solutions for South African businesses
Visit PayFast Registration and create a new account.
Provide business documentation and complete the verification process.
Log into your PayFast dashboard to access integration settings.
Navigate to "Settings" β "Integration" to get your merchant credentials.
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/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"
}
}
/api/finance/deposit/fiat/payfast/verify
Verifies PayFast payment status from return URL
/api/finance/deposit/fiat/payfast/webhook
Handles PayFast ITN (Instant Transaction Notification) callbacks
/api/finance/deposit/fiat/payfast/status
Checks PayFast payment status and handles expiration