3rd Party API credentials for development
To work on all of the features monetr provides locally, you will need access to several sets of API credentials. These credentials are outlines here in order of significance. monetr or people representing monetr will not provide any of these credentials to you. You are responsible for gaining access to these credentials on your own. None of the credentials require that you pay for them for development purposes.
Plaid
It is recommended to use Sandbox credentials from Plaid for local development. The “production” credentials (as Plaid designates them) are for live bank accounts, however they can only be used a limited number of times.
-
Start by creating a Plaid account at: Plaid Sign Up
-
Fill out the form to the best of your abilities. Please do not use
monetr
for the company name. -
Once you have created your Plaid account, you can find your credentials here: Plaid Keys
For monetr you will need your client_id
as well as your sandbox
secret.
Add your credentials to the file $HOME/.monetr/development.env
:
PLAID_CLIENT_ID=...
PLAID_CLIENT_SECRET=...
These credentials will be used the next time you run the monetr local development stack.
OAuth
TODO
ngrok
ngrok is used to test code for webhooks. It allows requests to be made to your local development instance from an external endpoint. You can use ngrok without an API key; however, the tunnels will only last a short amount of time, and the external endpoint will change each time. This might cause difficulty if you plan on working on webhook related features. It is recommended to sign up for the free plan of ngrok and use the API key they provide you.
You can sign up for ngrok here: ngrok Sign Up
Add your token and desired ngrok domain to your development environment file:
NGROK_AUTH=...
NGROK_HOSTNAME=...
Stripe
If you want to work on billing related features, you can also provide Stripe credentials to the local development environment. It is required to provide ngrok credentials along-side Stripe for local development. You can sign up for a Stripe account here: Stripe Sign Up
You will need two sets of keys to work with Stripe.
- A test mode Stripe secret key. (Not the public key)
- A webhook secret, configured for your ngrok endpoint and with the proper scopes selected.
Once you have made a Stripe account you can follow this guide to retrieve your keys.
Secret key
Navigate to your Stripe API Keys page within the dashboard. Make sure you are in “Test mode”.
You will need to click Reveal test key
in order to retrieve the API key.
Webhook secret
On the Stripe Webhooks page click + Add endpoint
.
Enter your ngrok base URL here with the suffix: /api/stripe/webhook
Then you can add events that you need to work with. At a minimum the following events should be added as monetr requires them.
checkout.session.completed
customer.deleted
customer.subscription.created
customer.subscription.deleted
customer.subscription.updated
Once the webhook endpoint has been created click Reveal
under Signing Secret to retrieve the secret for the webhook
endpoint.
ReCAPTCHA
TODO
Sentry
TODO
SMTP
TODO
Google Cloud KMS
Google Cloud KMS support is currently being added to improve the security of storing encrypted secrets in monetr. Documentation to follow.
TODO