View create_stripe_subscription_with_checkout.rb
# Michael Bianco <mike@suitesync.io>
# Description: Example of collecting a card and creating a subscription with Stripe
# this subscription can integrated directly into NetSuite using http://suitesync.io/
# Usage:
#
# export STRIPE_KEY=sk_test STRIPE_PUBLIC_KEY=pk_test_
# gem install sinatra stripe pry
# ruby create_stripe_subscription_with_checkout.rb
# open http://localhost:4567
View classify_netsuite_revenue_using_stripe.rb
# Michael Bianco <mike@suitesync.io>
# Description: Classify NetSuite income and revenue by passing a department or location
# into Stripe using metadata.
# Usage:
#
# export STRIPE_KEY=sk_test
# gem install stripe
# ruby classify_netsuite_revenue_using_stripe.rb
#
View netsuite_copy_transaction_fields_to_payment.js
/*
Author: <mike@suitesync.io>
Description: Copies department, class, and location from the order (SalesOrder, Invoice)
to the transaction (customer deposit, customer refund, and customer payment).
This can be customized to copy custom
Installation:
1. https://system.sandbox.netsuite.com/app/common/scripting/uploadScriptFile.nl
2. User Event
3. Name: Copy Order Fields to Transaction
View stripe_simple_netsuite_ecommerce_with_relay.rb
# Michael Bianco <mike@suitesync.io>
# Description: Example of how to create a NetSuite SalesOrder (or Invoice) with an
# associated payment using the Stripe Relay API
# Usage:
# gem install stripe
# export STRIPE_KEY=sk_test_
# ruby stripe_simple_netsuite_ecommerce_with_relay.rb
require 'stripe'
View suitesync_detect_capture_or_scheduled_payment_failures.js
function isWebServicesContext() {
var context = nlapiGetContext();
var executionContext = context.getExecutionContext();
return executionContext == 'webservices';
}
function isEmpty(obj) {
return obj === undefined || obj === null || obj === "";
}
View stripe_usage_based_billing_with_subscriptions.rb
# Mike Bianco <mike@suitesync.io>
# Description: Example of using Stripe's subscription billing to add usage based billing
# information to the customer's recurring invoice
require 'stripe'
require 'sinatra'
Stripe.api_key = ENV['STRIPE_KEY']
# This example uses sinatra to listen for webhooks. You can easily use rails, or any other framework/language.
View stripe_customers_whose_email_changed.rb
# Author <mike@suitesync.io>
require 'stripe'
Stripe.api_key = 'sk_test_123'
Stripe.api_version = '2017-08-15'
target_date = 1500422400
events = []
View stripe_fraud_integration_with_netsuite.js
/*
Author: <mike@suitesync.io>
Description: Detects if a transaction is marked as fraudulent/safe by Stripe's fraud system
https://dashboard.suitesync.io/docs/fraud-prevention
Installation:
1. https://system.sandbox.netsuite.com/app/common/scripting/uploadScriptFile.nl
2. User Event
3. Name: Stripe Fraud Handler
4. ID: _stripe_fraud_handler
View create_and_pay_netsuite_invoice_with_stripe.rb
# Michael Bianco <mike@suitesync.io>
# Description: Example of creating a NetSuite invoice using SuiteTalk and paying
# it using a Stripe payment.
# https://dashboard.suitesync.io/docs/payment-application
#
# Usage:
#
# export STRIPE_KEY=sk_test NETSUITE_EMAIL=user@company.com NETSUITE_PASSWORD=password NETSUITE_ACCOUNT=
# gem install stripe netsuite
# ruby create_and_pay_netsuite_invoice_with_stripe.rb
View create_netsuite_journal_entry.rb
# Michael Bianco <mike@suitesync.io>
# Description: Example of creating a journal entry using the SuiteTalk API
#
# Usage:
#
# export NETSUITE_EMAIL=user@company.com NETSUITE_PASSWORD=password NETSUITE_ACCOUNT= NETSUITE_APPLICATION_ID=
# gem install netsuite
# ruby create_netsuite_journal_entry.rb
#