Building with Adfin
This guide will help you get started building with Adfin. It covers how to access our Postman collection, where to find our Node.js example repository, and how to set up your development environment correctly.
Postman Collection
We provide a Postman collection to help you quickly explore and test Adfin’s APIs.
- Environment Variables: Make sure you configure the following variables in Postman:
- URL: https://staging.api.adfin.com
- CLIENT_ID
- CLIENT_SECRET
- REDIRECT_URI
To get started, fork this collection in your own Postman workspace, so you can change it and add your environment variables etc.
Node.js Repository
We maintain a Node.js example repository to help you get up and running quickly. It demonstrates how to authenticate, create invoices, and handle payments.
Repo Link:
- Clone the Repo: https://github.com/Adfin-Engineering/adfin-nodejs
Or install via npm:
npm i @adfin/nodejs
Local Host development
Instead of running Adfin locally on localhost, you can use ngrok to expose your development server to the internet with a secure, public URL.
This is our recommended approach to LocalHost and can be found on their website here: https://ngrok.com/
This is especially useful for testing webhooks or integrations where Adfin needs to call back to your environment. After installing ngrok, run ngrok http 3000 (or whichever port your app runs on) and it will give you a temporary HTTPS URL. You can then configure Adfin to point to this URL instead of http://localhost:3000, allowing external services to interact with your local environment.
This makes it easier to test real-world Adfin flows without deploying to staging, or if you don't have a staging environment available.
Updated 9 days ago