Overview

The Hyfin API connects your software to Hyfin, so the merchants who use it get paid faster without typing anything twice.

You keep creating invoices where you do today. Hyfin sends each one to the customer by text or email, the customer pays from their phone or any device with no app to install, and Hyfin handles reminders, fees and cash discounts. When the money comes in, Hyfin tells your software, so the invoice is marked paid on both sides.

How an integration works

Your software
Hyfin
Your customer
1 Add/Update Customer and Invoice
Save the _id in each response
2 Text or email with a link to pay
3 Pays by card or bank account
4 Payment webhook
allocations[].ref is the invoice _id
5 Get Invoice, Get Payment
By _id, when you need it

1. Send customers and invoices

Call Add/Update Customer when a customer is created or changes in your software, and Add/Update Invoice when an invoice is ready. Each response returns Hyfin's _id for the record. Save it next to your own record.

To update the record later, send that _id back. Without it, Hyfin updates the record with the same externalId, or adds a new one when none matches.

2. Hyfin sends the invoice and collects

Hyfin texts or emails the invoice with a link to pay. Your customer pays by card or bank account from any device, with no app to install. Hyfin sends reminders and applies fees or cash discounts when the merchant has them turned on.

3. A webhook tells your software

When a payment reaches a new status, Hyfin posts it to the invoice's webhookUrl, or to the site's webhook URL when the invoice has none. Each entry in allocations names the invoice it paid in ref, which is the invoice _id you saved. Use it to mark the invoice paid in your software.

4. Read it back when you need to

Get Invoice and Get Payment return one record by its _id. The list endpoints return the records that changed after updated_after, which is how you catch up after your software was offline.

Quick start takes your first invoice from sent to paid.

An API access token is required to access the API. Please visit the Authentication section for details on how to obtain and use API access tokens.