🧪 Sample Demos
Explore some of our code samples to see how to integrate OpenPay into real-world applications. These demos are designed to help you get up and running quickly, so whether you're testing hosted checkout, working with webhooks, or building fully custom payment flows.
In this documentation, you’ll find some of our demos. Each demo includes setup instructions and showcases a different use case.
Hosted Checkout – TypeScriptCopied!
-
Description: End-to-end demo built with OpenPay’s TypeScript SDK for creating customers and redirecting them to OpenPay’s hosted checkout page using
-
Tech stack: Express, TypeScript
-
Key features:
-
Create customer
-
Generate hosted checkout session
-
Handle return/success URLs
-
-
Repository: OpenPay’s Hosted Checkout Example
One-Time Invoices Generator (Overage Billing via REST API)Copied!
-
Description: Shows how to create a one-time invoice by combining product, price, and invoice creation via OpenPay’s REST API calls using Axios.
-
Tech stack: JavaScript, OpenPay API.
-
Key features:
-
Create a product and price dynamically
-
Generate a one-time invoice (overage or add-on billing)
-
Works with licensed (non-metered) usage
-
-
Repository: OpenPay’s One-Time Invoice Generator Example (REST API)
One-Time Invoices Generator (Overage Billing with TypeScript SDK)Copied!
-
Description: End-to-end demo for programmatically charging a customer for extra usage using OpenPay’s TypeScript SDK.
-
Tech stack: TypeScript +
@getopenpay/client
- TypeScript SDK -
Key features:
-
Uses the OpenPay SDK to create products and prices
-
Pulls the customer’s stored payment method
-
Finalizes and auto-charges a one-time invoice
-
-
Repository: OpenPay’s One-Time Generator Example (TypeScript SDK)