Difference between revisions of "Stripe"
(→Troubleshooting) |
(→Setup) |
||
Line 26: | Line 26: | ||
<div class="docs-alert-info">'''Transaction Fees:''' Stripe returns transaction fees in the default currency of the Stripe account. If you have a different default currency in WHMCS, you must ensure you have configured the currency of the Stripe account in ''Setup > Payments > Currencies'' to allow WHMCS to successfully convert the fee to other currencies.</div> | <div class="docs-alert-info">'''Transaction Fees:''' Stripe returns transaction fees in the default currency of the Stripe account. If you have a different default currency in WHMCS, you must ensure you have configured the currency of the Stripe account in ''Setup > Payments > Currencies'' to allow WHMCS to successfully convert the fee to other currencies.</div> | ||
− | |||
− | |||
==Apple Pay== | ==Apple Pay== |
Revision as of 11:44, 14 December 2016
Contents
Supported Features
Type | One Time | Recurring | Refunds | 3D Secure |
---|---|---|---|---|
Token | Yes | Yes | Yes | No |
Remote Update Card | Remote Delete Card | AddPayMethod API |
---|---|---|
Yes | Yes | No |
The WHMCS Official Stripe module was introduced in WHMCS 7.1.
Stripe is a tokenised gateway. As a result, customers personal credit card information is submitted to and stored remotely by Stripe. Using a tokenised gateway is recommended for security and reduced liability.
Setup
- Begin by activating the Stripe module in Setup > Payments > Payment Gateways
- Stripe uses API keys for authentication. Upon activation, you will be asked to enter the Secret and Publishable API Keys.
- These can be found inside the Stripe portal at https://dashboard.stripe.com/account/apikeys
- Customise the Display Name as desired, we recommend Credit Card
- Enable Apple Pay if required
- Customise the Statement Descriptor if required
- Click Save Changes to complete the setup
Stripe is now active and ready for use.
Apple Pay
When enabled, Apple Pay allows access to payment details that users have stored in their Wallet. If they're using Safari on their iPhone or iPad, when they tap "Buy with Apple Pay" on your site, they'll be shown a modal payment sheet. If they're using Safari on their Mac, and have an iOS device in range, they'll be prompted on their device to authorize the payment, which will then be sent to the browser.
Enabling Apple Pay
To use Apple Pay with a live Stripe API key, it is required to register with Apple all of your web domains that will be showing an Apple Pay button. This includes both top-level domains (e.g. whmcs.com) and subdomains (e.g. shop.whmcs.com).
- Download this domain association file and host it at /.well-known/apple-developer-merchantid-domain-association on your site. For example, if you're registering https://example.com, make that file available at https://example.com/.well-known/apple-developer-merchantid-domain-association.
- Next, tell Stripe to register the domain with Apple. This is done by going to the Apple Pay tab in the Account Settings of Stripe Dashboard
Payment Workflow
- Automated recurring and on-demand billing is supported.
- When making a payment, customers are able to select to use a previously stored card or enter a new one.
- Customers can update their credit card at any time from the client area.
- Admin level users with the necessary permissions can also perform card updates from the admin area.
- Customers never leave your WHMCS installation during checkout or updating their card.
- Personal card information is submitted directly to Stripe and is never stored in your local WHMCS installation.
- The Stripe API is used for refunds and obtaining transaction information.
- The stripe.js library is used for payments and card updates.
Migrating to Stripe
Our Stripe module supports migrating credit card details stored locally within WHMCS to the Stripe tokenisation system. This allows for a seamless transition from another merchant gateway provider to Stripe.
For an existing client with a credit card stored locally, the first time a payment capture is attempted for an invoice using Stripe, the credit card details will be submitted to Stripe and a token created and stored. Any card details stored locally for that client will be removed.
To migrate all of your credit card processing to Stripe, follow the steps below:
- Navigate to Setup > Payments > Payment Gateways
- Ensure the Stripe module has been activated
- Select the Deactivate link for your previous merchant gateway provider
- When prompted to choose a replacement gateway to switch users of the previous gateway module to, select Stripe
- Click OK to complete the process
Migrating from a 3rd Party Stripe Module
The Official WHMCS Stripe module uses the Stripe "cus_" reference to capture payments - e.g. cus_9MvIb7UlgJfJTn. For any 3rd party module which also uses this reference, the official module can replace it.
To verify if your current Stripe module uses the "cus_" reference, navigate to a client you know to have an active Stripe token and click the Credit Card Information link on the Client Summary page. Verify the token listed there has the "cus_" prefix.
To convert to the Official Stripe module, activate the module as described above. Then deactivate your previous Stripe module, and when prompted, select the new Stripe module to update and switch existing customers to.
Troubleshooting
This section runs through common issues found running Stripe. These issues often occur after using a 3rd party Stripe module.
No Stripe Details Found for Update
This message will be in the Gateway Log when card details are being updated at Stripe, but a token and customer does not exist. This means that the Stripe token generated on submission of the card details not being sent correctly to WHMCS. Investigation has found this has been caused by one or more of the following:
- A hook has been left in place from a third party module. This is usually a stripe.php file in the includes/hooks/ directory. This file should be removed.
- The templates have not been updated correctly. See Template Changes for the changes from 7.0 to 7.1 that need to be applied to all templates, especially custom ones.
Network error [errno 35]: Unsupported SSL protocol version
Seeing this "Unexpected error communicating with Stripe" error in the Gateway Log indicates a server configuration issue. The server is attempting a secure connection to Stripe using an outdated SSL protocol. As this is no longer secure, most providers now require connections be made using the newer TLS protocol instead: Stripe TLS Documentation.
To resolve this issue, work with a server admin or hosting provider to ensure that remote cURL connections are made using the TLS protocol by default, rather than the outdated SSL protocol. Updating the OpenSSL version may also be required.