-
Couldn't load subscription status.
- Fork 890
Stripe Payment Widget — Seamless Stripe.js Integration for ServiceNow Service PortalPayment #2359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
abhix2112
wants to merge
1
commit into
ServiceNowDevProgram:main
from
abhix2112:stripe_payment_widget
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
91 changes: 91 additions & 0 deletions
91
Modern Development/Service Portal Widgets/Stripe Payment Widget/Readme.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| # 💳 Stripe Payment Widget for ServiceNow Service Portal | ||
|
|
||
| ### Overview | ||
|
|
||
| The **Stripe Payment Widget** enables secure and modern payment experiences directly inside the **ServiceNow Service Portal** using **Stripe.js v3**. | ||
| It supports one-time payments and subscription flows, with integrated address fields, real-time validation, and full Stripe Element styling. | ||
|
|
||
| Built entirely using **client**, **server**, and **HTML/CSS** components — this widget can be plugged into any portal page to accept payments or donations seamlessly. | ||
|
|
||
| --- | ||
|
|
||
| ### ✨ Features | ||
|
|
||
| - 🔐 Powered by **Stripe.js v3** (secure, PCI-compliant) | ||
| - 🧾 Supports **PaymentIntent** and **Subscription** flows | ||
| - 🌍 Includes **Address Element** and live validation | ||
| - 💬 Displays dynamic messages and status indicators | ||
| - 💅 Modern, responsive design using Tailwind-like CSS | ||
| - ⚙️ Fully compatible with ServiceNow **Service Portal widgets** | ||
| - 🔒 No card details ever stored in ServiceNow | ||
|
|
||
| --- | ||
|
|
||
| ### 🧩 Folder Structure | ||
|
|
||
| | File Name | Description | | ||
| | ---------------------------- | -------------------------------------------------------------------------------------------- | | ||
| | `Readme.md` | Project documentation | | ||
| | `Stripe_Payment_html` | Widget HTML template | | ||
| | `Stripe_Payment_css` | Widget styling (responsive modern design) | | ||
| | `Stripe_Payment_client_code` | AngularJS client controller with Stripe.js logic | | ||
| | `Stripe_Payment_server_code` | Server script handling secure backend processing via `StripePaymentProcessor` Script Include | | ||
|
|
||
| --- | ||
|
|
||
| ### 🧰 Technical Dependencies | ||
|
|
||
| - **ServiceNow Instance** with Service Portal enabled | ||
| - **Stripe API Key** stored in a system property: | ||
| - Property Name → `stripe_element_key` | ||
| - Example Value → `pk_test_51Nxxxxx` | ||
| - **Script Include**: `StripePaymentProcessor` | ||
| Handles backend communication with Stripe API securely. | ||
|
|
||
| --- | ||
|
|
||
| ### ⚙️ Installation Steps | ||
|
|
||
| 1. Create a **new Service Portal Widget** in your instance. | ||
| 2. Copy each file’s content into its respective section: | ||
| - HTML → Widget HTML | ||
| - CSS → Widget CSS | ||
| - Client Script → Widget Client Controller | ||
| - Server Script → Widget Server Script | ||
| 3. Add a system property: | ||
| - Name: `stripe_element_key` | ||
| - Value: Your Stripe Publishable Key | ||
| 4. Add the widget to a portal page (like `/checkout` or `/donate`). | ||
| 5. (Optional) Create Script Include: `StripePaymentProcessor` to handle backend API calls. | ||
|
|
||
| --- | ||
|
|
||
| ### 💳 Example Use Cases | ||
|
|
||
| - 🎗️ Donation collection for NGOs / non-profits | ||
| - 🧾 Subscription renewal systems | ||
| - 🛒 Checkout page for internal app store | ||
| - 💼 Invoice or expense reimbursement payment portals | ||
|
|
||
| --- | ||
|
|
||
| ### 🧠 Future Enhancements | ||
|
|
||
| - Support **Apple Pay** and **Google Pay** | ||
| - Add **multi-currency** and **tax calculation** | ||
| - Enable **webhook-based status sync** | ||
| - Dashboard to track transactions and refunds | ||
|
|
||
| --- | ||
|
|
||
| ### 🧑💻 Author | ||
|
|
||
| **Abhishek Aggarwal** | ||
| ServiceNow Developer | Hacktoberfest 2025 Contributor | ||
| 🌐 [GitHub Profile](https://github.com/abhishek-aggarwal) | ||
|
|
||
| --- | ||
|
|
||
| ### 🏷️ Tags | ||
|
|
||
| `ServiceNow` `ServicePortal` `Stripe` `Hacktoberfest` `Widget` `Payment Integration` `Donation` | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of this is not needed