Shopify is one of the most popular ecommerce solutions in the world. uAfrica paved the way for South African sellers to integrate with Shopify and use PayFast for secure payments for South Africans.
- Local app integration
- Themes or custom design
- Hosting & domain management
- CMS Product Management
- Order Management
- Level 1 PCI compliant
- Log into your Shopify Store
- Navigate to Settings -> ‘Payment providers’
- Under ‘Accept Credit Cards’ select ‘PayFast’ and insert your PayFast merchant ID and Key
- To run PayFast in test/sandbox mode select ‘Use Test Mode’ and click save
- Once you are ready to go live un-check ‘Use Test Mode’ and click save. Ensure that the merchant ID and key fields are populated correctly after doing so, as they may have been pre-populated with an email address by the browser when un-checking ‘Use Test Mode’
Note: The base currency of your Shopify store must be ZAR
South African VAT Setup
- In the admin section of your Shopify store, click on the Settings cog at the bottom left-hand corner.
- Once on the settings page, click on Taxes.
- On the Taxes page, set up VAT for South Africa so that all 9 provinces are set to be 15%.
- Please leave the top part that reads Tax settings unchecked, as in the screenshot.
1. Setup recurring billing on your PayFast account:
- Login into your PayFast account and click on ‘Settings’>’Integration’
- Click on ‘Enable’ next to ‘Recurring Billing’, then check ‘Enable’ and click ‘Update’ (do not set a notify URL)
2. On the ‘Settings’>’Integration’ page click on ‘Enable’ next to ‘Recurring Billing – Shopify’
3. Check ‘Enable Shopify Recurring Billing’
4. Enter your full shop URL in the ‘Shopify Store URL’ field
5. You will be redirected to Shopify to allow the Payfast Recurring Application to interact with your store.
6. Enter your login details to log into your store.
7. Grant Permission to the Subscription Application by clicking the ‘Install app’ button.
8. You will be directed back to Payfast and should be presented with a notification that your changes were saved successfully. You should also see a Shopify Store Token that has been assigned to your account.
9. You can now setup your recurring billing on your products, based on either the Variations Method, or the SKU Method. The instructions are outlined below.
Shopify Product Setup – via Variations
1. Create a new Shopify product.
2. Add a product variant and its period (you may name this field whatever you would like, you can also have a single option).
3. Add a second option for the number of times to repeat the period that has just been added.
4. Fill in the recurring amount per option. You can disable certain items if you do not want them.
5. You are then able to view the product on your website.
Shopify Product Setup – via Barcode/SKU fields
1. Products can also be created without variants by defining the SKU or Barcode as follows:
- Enter a barcode or SKU in the following manner:
- This is defined as follows:
- PF = Indicate this is a recurring item
- MYREFERENCE = User defined reference
- The period
- 3 – Monthly
- 4 – Quarterly
- 5 – Bi-Annually
- 6 – Annually
- 12 = the number of cycles required (input 0 for infinite cycles)
- 150 = The recurring amount to be charged (optional if different from price)
- When configured as above any price set on the item will be the initial amount charged.
- When setting up a subscription there is a limit of 1 item per checkout (you can make use of OrderLogic if you would like to)
- Once created the subscription is managed via your PayFast account, not Shopify
Why is PayFast not showing in the payment gateway list?
You will need to ensure that the Shop address is a South African address, and that the currency is set to ZAR.
I receive a 500 error when redirected to Payfast
This would be caused by an incorrect merchant ID and/or Key set on the PayFast configuration page on your Shopify site. You will need to ensure that the merchant ID and Key set on your Shopify store are identical to the merchant ID and key on your PayFast account and that no spaces have been adjoined to these values when copying them across.
When un-checking ‘Use Test Mode’ after testing the module, ensure that the merchant ID and key fields are populated correctly after doing so, as they may have been pre-populated with an email address by the browser. This is because Shopify treats the merchant ID and key fields as username and password fields, which are then auto-populated by some browsers.
Can I test recurring billing in sandbox mode?
Unfortunately, you will not be able to test recurring billing in sandbox mode. Only once off payments can be tested in sandbox mode.
For South African VAT, why can I not select “All taxes are included in my prices”, as this is the South African standard?
When the products are set up with the total price, and the tax settings are configured as per our instructions, this naturally displays the price to the customer as the total VAT inclusive price. This will be the case for all amounts, including recurring amounts.
Unfortunately, a different configuration of tax settings will not be suitable for South African requirements, as Shopify does not cater for this.