https://api.gofermata.com
Authentication is done with HTTP Basic Authentication with your company ID in the username and your API key in the password.
Example:
POST /v1/companies/{company_id}/accounts
stripe_id
parameter. If you leave this off, then we will create a Stripe customer for you in your Stripe account.
If you have a Stripe card element generating tokens, you can pass that token in a token
parameter to assign the card to this account.
"enable_card_collector":1
and you’ll get back the URL on the output.
POST /v1/accounts/{account_id}/events
gate_on_balance
parameter will cause the API call to response with a 402 error if the user doesn’t have enough balance to pay for the event. Fermata will keep track of the gated event in a separate location
for record keeping purposes but their balance will not be charged.
If you don’t specify the gate_on_balance
parameter then every event will be billed and the user will be allowed to go into a negative balance. Fermata will notify your system via webhooks if you have those configured.
GET /v1/companies/{company_id}/events
POST /v1/accounts/{account_id}/changeplan
POST /v1/companies/{company_id}/webhooks
w_
.
The username and password are used to prevent anyone from spoofing our requests. Fermata will send those with HTTP Basic Authentication on every request.
Once you have the webhook ID, you can subscribe the webhook to various events.
POST /v1/companies/{company_id}/webhooks/{webhook_id}/subscribe/{topic}
An example of a topic would be pause_balance
to indicate that the user is out of balance on an account.
A webhook payload to your application would look something like this: