StripePaymentProcessor — Secure Backend Integration for Stripe Payments and Subscriptions in ServiceNow#2377
Conversation
wiz0floyd
left a comment
There was a problem hiding this comment.
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.
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.
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.
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.
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()