-
Notifications
You must be signed in to change notification settings - Fork 907
StripePaymentProcessor — Secure Backend Integration for Stripe Payments and Subscriptions in ServiceNow #2377
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
Conversation
wiz0floyd
left a comment
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.
It appears that a significant amount of AI was used to generate this script. Have you tested that it actually works? As this isn't exactly a small reusable snippet of code, I'm not sure that it's even a great fit for this repository.
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.
This should be set up using connection and credential aliases so that non-prod can use a test api and credentials
| recordid | ||
| ); | ||
| var methodid = paymethod.payment_method_id; | ||
| var grUTH = new GlideRecord("u_transaction_history"); |
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.
This table needs to be created and isn't mentioned in the readme.
| - 💳 Create and confirm **Stripe PaymentIntents** | ||
| - 🔁 Create and manage **Stripe Subscriptions** | ||
| - 🧠 Auto-link **PaymentMethods** with customers | ||
| - 💬 Update `u_transaction_history` and webhook logs automatically | ||
| - 🔒 Securely interacts with the Stripe API via REST | ||
| - 🌐 Fully dynamic REST message creation — no need for integrations in UI |
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.
There's a significant amount of AI used here. How much original work is in this script?
| payment_method: paymentData.payment_method_id, | ||
| confirmation_method: "automatic", | ||
| confirm: true, | ||
| return_url: "https://npsm.service.service-now.com/", |
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.
This needs to be updated for prod vs non prod.
|
Please make the requested changes and reopen this pull request! Thank you |
Overview
This PR introduces the StripePaymentProcessor Script Include — a secure, server-side integration between ServiceNow and Stripe.
It enables full payment and subscription workflows through the Stripe Payment Widget on Service Portal pages.
The Script Include interacts with the Stripe REST API to create, confirm, and manage PaymentIntents and Subscriptions, providing a complete, PCI-compliant transaction flow directly within ServiceNow.
🔑 Key Features
stripe_payment_key)u_transaction_historyand webhooks tou_stripe_event_log🔗 Integration Path
This backend Script Include connects directly with the Stripe Payment Widget from the companion PR:
🧭 Demo Page:
/sp?id=stripe_payment_checkoutglobal.StripePaymentProcessor()