This is a demo web app, built to showcase a basic Zaprite API integration.
The example API integration showcases a demo donation page where anonymous supporters can make a donation to help bitcoin core development.
The following flow has been built:
- The visitor is presented with various donation buttons, or a custom amount field.
- The visitor clicks a button or enters a custom amount to initiate a donation.
- The app uses Zaprite's API to create an Order (
/v1/order), using the Zaprite user's preferred Checkout and Payment Methods. - The visitor is redirected to the
checkoutUrlreturned from the API. - The visitor makes a payment and is redirected back to the
redirectUrlspecified in the original Order request. - A 'success' page uses the Order information to query the Order at Zaprite (
/v1/order/{id}) and display the relevant information to the customer.
You can learn more about Zaprite's API at:
This app was built using Next.js, bootstrapped with create-next-app. It uses Tailwind and Shadcn.
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devOpen http://localhost:3000 with your browser to see the result.
You will need an API key associated with your Zaprite Organization to interact with our API. You can request API access by logging into your Zaprite Organization, creating a Sandbox Organization for testing, and then navigating to Settings > API.
Learn more about Zaprite Sandbox Organizations at:
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.