
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
stripe-astro-loader
Advanced tools
Fetch data from the Stripe API and use it in Astro collections — only has products for now.
npm i stripe stripe-astro-loader
import { defineCollection } from "astro:content";
import { stripePriceLoader, stripeProductLoader } from "stripe-astro-loader";
import Stripe from "stripe";
const stripe = new Stripe("SECRET_KEY");
const products = defineCollection({
loader: stripeProductLoader(stripe),
});
const prices = defineCollection({
loader: stripePriceLoader(stripe),
});
export const collections = { products, prices };
Make sure to enable the experimental content layer in your Astro config:
import { defineConfig } from "astro/config";
export default defineConfig({
experimental: {
contentLayer: true,
},
});
// pages/index.astro
---
import { getCollection } from 'astro:content';
const products = await getCollection('products');
---
// pages/products/[id].astro
---
import { getCollection,render } from 'astro:content';
export async function getStaticPaths() {
const products = await getCollection('products');
return products.map(product => ({
params: { id: product.id }, props: { product },
}));
}
const { product } = Astro.props;
const { Content, headings } = await render(product);
---
<h1>{product.data.name}</h1>
<pre>{JSON.stringify({product, headings}, null, 2)}</pre>
<Content />
FAQs
Load Stripe data in Astro.
We found that stripe-astro-loader demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.