Skip to content
Listen at SoundCloud
import express from "express"; import Stripe from "stripe"; import AWS from "aws-sdk"; const app = express(); const stripe = new Stripe(process.env.STRIPE_SECRET_KEY); const s3 = new AWS.S3({ region: "us-east-1" }); app.use(express.json()); // 1) Create checkout session app.post("/create-checkout-session", async (req, res) => { const session = await stripe.checkout.sessions.create({ mode: "payment", line_items: [{ price: process.env.STRIPE_PRICE_ID, quantity: 1 }], success_url: `${process.env.SITE_URL}/thanks?session_id={CHECKOUT_SESSION_ID}`, cancel_url: `${process.env.SITE_URL}/`, }); res.json({ url: session.url }); }); // 2) After success, verify payment and return expiring download URL app.get("/download", async (req, res) => { const { session_id } = req.query; const session = await stripe.checkout.sessions.retrieve(session_id); if (session.payment_status !== "paid") return res.status(403).send("Not paid"); const url = s3.getSignedUrl("getObject", { Bucket: process.env.S3_BUCKET, Key: "music/song_320_tagged.mp3", Expires: 60 * 10 // 10 minutes }); res.json({ url }); }); app.listen(3000, () => console.log("running on :3000"));
Buy “Pull Me In”

“Pull Me In” — Download

MUSIC TRACKS

MP3

Show Schedule

SATURDAY, JUNE 1ST
Madison Square Garden, New York, NY, 8pm
FRIDAY, JUNE 14th
Prudential Center, Newark, NJ, 7:30pm
SATURDAY, JUNE 25TH
The Forum, Inglewood, CA, 8pm
SATURDAY, JULY 1ST
The Forum, Inglewood, CA, 8pm
FRIDAY, JULY 12TH
T-Mobile Arena, Las Vegas, NV, 7:30pm
SATURDAY, JULY 13TH
T-Mobile Arena, Las Vegas, NV, 8pm
FRIDAY, JULY 27TH
Pechanga Arena, San Diego, CA, 7:30pm
SATURDAY, JULY 28TH
Pechanga Arena, San Diego, CA, 8pm

Document Title Goes Here

Your description text goes here. You can edit all of this text and replace it with whatever you like. For example, you can include any additional details about the document you want your visitors to know.

Download "sample document.pdf"