Buyblock
Buyblock lets you accept PayPal payments on EmDash: a Buy Now button on any page or post, with orders created and captured on your server with your own PayPal app.
Free on npm, no account or key: npm install @zachristudio/buyblock-paypal. See Install.
Requirements
- EmDash 1.3 or later, on Astro 6 or later
- A PayPal developer account for Sandbox, and a PayPal Business account to take real payments
What it does
- A PayPal button block you can add to any page or post. One product can be on many pages.
- A Buyblock app in the admin with Orders, Products and Settings.
- Prices always come from your store, so buyers can’t change them in the browser. Captured amounts are checked against the expected total.
- Separate Sandbox and Live keys, each checked with PayPal before it’s saved.
- Per-product button style: label, colour and corners.
- A dashboard widget with revenue and orders for the last 30 days.
Free and Pro
Free: up to 5 products (archived ones don’t count), Sandbox and Live, and the last 30 days of orders. No account or key.
Pro (coming soon): payments that update themselves, order and receipt emails, digital downloads, donations, unlimited products, full order history and CSV export. Pro isn’t on sale yet; every site runs the free plan.
Why it installs from npm
A payment button on a public page needs a site component and a browser script. EmDash only allows that for trusted (native) plugins that you add in astro.config.mjs, and native plugins can’t be published to the EmDash registry. So Buyblock installs from npm. Its EmDash registry entry is a setup guide that points here.
Not included yet
- Webhooks: a payment that settles later (PayPal status “pending”) isn’t updated automatically. Re-check it from the order.
- Refunds: refund in PayPal; Buyblock doesn’t sync them yet.
- Cart, coupons, tax and subscriptions.