Payment management in ShipMySaaS
ShipMySaaS integrates payment management seamlessly with Stripe, offering built-in tools to handle transactions and monitor your business's financial health. This includes a comprehensive dashboard for tracking sales, customer activity, and monthly revenue.
Dashboard overview
ShipMySaaS provides a built-in dashboard that enables you to:
- Monitor sales: View real-time updates on transactions.
- Track customer activity: Manage customer data and payment statuses.
- Analyze revenue: Get insights into your monthly revenue to optimize your growth strategy.
This dashboard centralizes critical financial information to simplify your business management.
Retrieving invoices
Thanks to Wabe, you can access all your invoices programmatically. This ensures transparency and makes it easy to integrate financial reporting into your workflows.
Here is the documentatio for retrieving invoices: Wabe Invoice Guide.
Payment configuration
Here is an example of the payment
configuration in server.ts
:
server.ts
const wabeApp = new Wabe<BackTypes>({
payment: {
adapter:
process.env.NODE_ENV === 'production'
? new StripeAdapter('YOUR_STRIPE_SECRET_KEY')
: new PaymentDevAdapter(),
currency: Currency.USD,
supportedPaymentMethods: ['card', 'paypal'],
},
// Other options...
})
Creating a payment
To create a payment, you can easily use the createPayment
function from the PaymentController
of Wabe. You have an example in the file makePaymen.ts
.
Here is an example:
export const makePaymentRoute: WabeRoute = {
method: 'GET',
path: '/makePayment',
handler: async (context) => {
const paymentController = context.wabe.wabe.controllers.payment
if (!paymentController)
return context.res.send('No payment controller', {
status: 400,
})
const url = await paymentController.createPayment({
cancelUrl: 'https://shipmysaas.com',
successUrl: 'https://app.shipmysaas.com/signin',
paymentMode: PaymentMode.payment,
products: [{ name: 'ShipMySaaS', quantity: 1, unitAmount: 18500 }],
automaticTax: true,
})
context.redirect(url)
return context.res.send('OK')
},
}
For a detailed guide on Wabe billing see the Wabe Payment Guide.