Better Pay
  • Introduction to Better Pay
  • Getting Started
    • Quickstart
  • Providers
    • Stripe
    • Square
    • Dodo Payments
  • Razorpay
  • Polar
  • Reference
    • Contributing
Powered by GitBook
On this page
  1. Getting Started

Quickstart

PreviousIntroduction to Better PayNextStripe

Last updated 1 month ago

1

Installation

Let's start by adding Better Pay to your project.

npm i better-pay
2

Create a Better Pay Instance

import { BetterPay } from "better-pay"

const provider = new BetterPay({
    //
})
3

Add Payment Provider

import { BetterPay } from "better-pay"

const provider = new BetterPay({
    provider: 'stripe', // or any provider
    apiKey: 'YOUR_STRIPE_API_KEY'
});

4

That's it 🎉

That's it! You're now ready to use Better Pay in your application. Continue to to learn how to use the provider instance to make payments.

providers