To create payment link with stripe, you can use the createPaymentLink function provided by the provider. It takes object with following properties:
Properties
Name
Amount
Quantity (optional)
Metadata (optional)
import { BetterPay } from "better-pay"
const provider = new BetterPay({
provider: 'stripe',
apiKey: 'YOUR_STRIPE_API_KEY'
})
const response = await provider.createPaymentLink({
name: ['NAME_OF_YOUR_PRODUCT'], // You can add for multiple products.
amount: [1000], // You can add for multiple products.
currency: 'usd',
quantity: '', // optional. By default set to 1
metadat: {} // optional
})