- [WHMCS Payment gateway module for Stripe Checkout by RoudiApp](#whmcs-payment-gateway-module-for-stripe-checkout-by-roudiapp) - [Features](#features) - [Change Log](#change-log) - [Installation Instruction](#installation-instruction) - [Terminologies used in this document](#terminologies-used-in-this-document) - [Upgrade Stripe PHP API](#upgrade-stripe-php-api) - [Install RoudiAPP Stripe Checkout NEW module](#install-roudiapp-stripe-checkout-new-module) - [Configuration](#configuration) - [Webhook Configuration](#webhook-configuration) # WHMCS Payment gateway module for Stripe Checkout by RoudiApp * This is a native WHMCS Payment Gateway Module for New Stripe Checkout by RoudiApp.com. * Stripe API version used for this module: 2019-05-16 | More about setting version on your stripe panel: https://stripe.com/docs/api/versioning * Latest and default API versions are advertised here: https://dashboard.stripe.com/test/developers * The quickest way to build beautiful, conversion-optimized payment forms, hosted on Stripe. * The new service was released by Stripe on April 16, 2019. | More on this at: https://stripe.com/docs/payments/checkout * For the legacy version of Checkout view: https://stripe.com/docs/checkout Here at RoudiApp we no longer support the legacy version and this module is available for free at: https://github.com/roudiapp/whmcs-stripe-checkout-legacy # Features * Supports Card and Apple Pay payments only. * Suitable for one time payments only. * 100% PCI compliance. * Supports automated 3D Secure checks * Supports Strong Customer Authentication (SCA). * Supports Full and Partial refund * Supports Instant Payment Verification * Supports Radar, enable address check and configure your Radar Rules to fully benefit form this feature. * Supports all currencies supported by stripe. * Supports Webhook for accurate payment confirmation, failed payment and refund confirmation. * Supports automatic Transaction Fee calculation, this is for finance report only and will not add any surcharge. # Change Log - Version 1.15.0 * Added Apple Pay support * Added 3D secure support * Added SCA support * Stripe PHP API is upgraded * Bug Fix: Added transaction fee with automated currency conversion feature. * Bug Fix: When add funds, does not automatically redirect to invoice page. * Removed: Alipay support is removed as Stripe Checkout no longer supports Alipay. Alipay support is added to a new module. * Removed: Bitcoin support, the new checkout integration does not offer Bitcoin support. # Installation Instruction * **Please make sure that you have full backup from your existing installation and that a record is stored locally.** * Existing native Stripe module by WHMCS is using a version of Stripe PHP API that is little behind the latest API. * To support the latest Stripe Checkout with SCA and 3D secure the Stripe PHP API must be upgraded. * Follow the instructions below to successfully install the module. ## Terminologies used in this document * WHMCS ROOT folder, where WHMCS is installed. You should be able to see your admin, templates and vendor folder here. * stripeXXX, this is the Stripe PHP API. The XXXX represents the API version used in this module. * Webhook, this is the endpoint that you should be using when you setup your webhook in stripe. ## Upgrade Stripe PHP API * **Please install with caution. This is a temporary fix until WHMCS updates their Stripe API.** - Deactivate Native Stripe Module if activated from WHMCS payment gateway management. - Remove the native stripe API from the following locations [use your FTP client to navigate between folders and delete]: * Navigate to WHMCS ROOT folder > vendor folder > delete the entire stripe folder. * WHMCS ROOT folder > gateways folder > delete stripe.php file and stripe folder. - If you have installed previous versions of our Stripe Checkout Module, you must upgrade: * Navigate to WHMCS ROOT folder > gateways folder > delete all stripeXXX folders (if you have more than one!). * Unzip your new package, find the legacy folder and upload roudiappstripecheckout.php file to: ROOT/modules/gateways AND upload callback/roudiappstripecheckout_payment.php to: ROOT/modules/gateways/callback folder in your server. This will override your existing stripe checkout module and enforce the module to use the new Stripe PHP API. - From your new package, find the stripeXXXX folder and upload the entire folder to: ROOT/modules/gateways/ folder in your server. ## Install RoudiAPP Stripe Checkout NEW module * From your new package, upload roudiappstripecard.php file to ROOT/modules/gateways folder in your server. * From your new package folder > find webhook folder and upload the entire folder to ROOT/modules/gateways folder in your server. * Install and configure your RoudiApp Stripe Checkout module from Admin menu > Setup > Payments > Payment Gateways * Find RoudiAPP Stripe Checkout NEW module to activate. # Configuration * Display Name: a client friendly name for your payment method. * Live Publishable Key: Stripe live publishable key, optain this from stripe panel > left hand side menu > Developers > API Keys. You must ensure that your account is activated and is live. To test and optain test keys, switch your account to test mode. * Live Secret Key: Stripe live secret key, follow the instructions provided above. * Test Publishable Key: Switch to test mode to see your test api keys. eg: pk_test_XXXXXX * Test Secret Key: Switch to test mode to see your secret key: sk_test_XXXXX * Webhook Signing Secret: Required for checking webhook signatures. | More about webhooks: https://stripe.com/docs/webhooks * Statement Description: maximum of 20 characters, this will appear on customer bank statement. More information on how to setup your webhook is provided in next section. * Stripe Settlement Currency: This is the currency that stripe will settle the payments with you. Your user can pay in any currency that stripe supports, but the settlement currency is fixed to the country that you resides. This is used for automated fee calculations. * Pay Button Text: The pay button text on client side. * Test Mode: Tick to enable test mode. * Stripe Checkout Language: Leave empty for automated functionality. * Collect Billing Address: If enabled, stripe will always collect billing address information. * Auto Collect Billing Address: If ticked/enabled, stripe will only prompt users to enter address when necessary. For this option to work, you must leave the above option unchecked. * Convert To For Processing: Leave this unselected. You must not convert at gateway level. Set user default currency to your desired currency. # Webhook Configuration * Logon to your stripe account - In stripe Dashboard, Webhook settings: https://dashboard.stripe.com/account/webhooks * Click on Add endpoint button [top right corner] * A window will pop up, enter your endpoint URL: eg: https://yourdomain.com/whmcs/modules/gateways/webhook/roudiappstripecard_webhook.php * Version: select the latest API version (2019-05-16) * Events to send: select multiple events: checkout.session.completed and charge.refunded and charge.refund.updated and payment_intent.payment_failed * Once all 4 events are added, click on Add Endpoint button. - Now that you have created your endpoint click on your endpoint to see the webhook details: * From Signing secret section find your webhook key: eg: whsec_XXXXXX * You should also be able to see list of webhook attempts and its results. For debugging purposes we might ask you to inspect this section. Following this section is the Logs section. All attmpts and logs come with status. Successfull webhook calls will have Successed status and failed ones will have Failed status. * Logs also come in 200 (OK) or 401 (ERR) status.