Byg med Payfriend
REST API og MCP-server til håndtering af fakturaer, kunder, betalinger og inkassoflows. Integrér direkte eller lad AI-agenter styre dine workflows.
{
"total_count": 847, "total_amount": 2458350.00, "overdue_count": 23, "overdue_amount": 156200.50, "paid_this_month": 412800.00, "currency": "DKK"}Kom i gang på få minutter
Opret et API-token, send din første forespørgsel, og begynd at bygge.
Opret et token
Gå til Indstillinger → API-tokens i Payfriend-dashboardet. Opret et token med de rettigheder du har brug for.
Send en forespørgsel
Brug dit token som Bearer-token i Authorization-headeren. Alle endpoints returnerer JSON.
Byg din integration
Brug REST API'et til custom integrationer, eller MCP-serveren til at lade AI-agenter styre dine workflows.
Bearer-token autentificering
Alle API-kald kræver et Bearer-token i Authorization-headeren. Opret tokens under Indstillinger → API-tokens.
Tokens udløber aldrig — tilbagekald når som helst fra dashboardet
Afgrænsede rettigheder — opret skrivebeskyttede eller fuld-adgang tokens
SHA-256 hashed — token-værdier gemmes aldrig i klartekst
curl -X GET https://app.payfriend.io/api/v1/customers \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json"{
"message": "Unauthenticated."
}API-reference
24 endpoints fordelt på 6 ressourcegrupper. Alle svar er JSON med standard HTTP-statuskoder.
Base URL: https://app.payfriend.io/api/v1
Customers
5 endpoints
/api/v1/customers/api/v1/customers/{id}/api/v1/customers/api/v1/customers/{id}/api/v1/customers/searchInvoices
6 endpoints
/api/v1/invoices/api/v1/invoices/{id}/api/v1/invoices/api/v1/invoices/{id}/status/api/v1/invoices/{id}/mark-paid/api/v1/invoices/statsPayments
2 endpoints
/api/v1/payments/api/v1/paymentsCollection Flows
7 endpoints
/api/v1/flows/api/v1/flows/{id}/api/v1/flows/api/v1/flows/{id}/api/v1/flows/{id}/activate/api/v1/flows/{id}/deactivate/api/v1/flows/{id}/executionsCredit Notes
3 endpoints
/api/v1/credit-notes/api/v1/credit-notes/{id}/api/v1/credit-notesCollection Stats
1 endpoints
/api/v1/collection/statscurl -X GET "https://app.payfriend.io/api/v1/invoices?status=overdue&page=1" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Accept: application/json"AI-native med MCP
Forbind Claude, Cursor eller enhver MCP-kompatibel klient. 25 værktøjer til at styre hele din inkasso-workflow via samtale.
claude mcp add payfriend -s user -- npx -y payfriend-mcp --token=YOUR_TOKEN
# Verify connection
claude mcp list
# payfriend: ✓ ConnectedCustomers
5 toolscustomers_listcustomers_getcustomers_createcustomers_updatecustomers_searchInvoices
6 toolsinvoices_listinvoices_getinvoices_createinvoices_update_statusinvoices_mark_paidinvoices_statsPayments
2 toolspayments_listpayments_registerFlows
5 toolsflows_listflows_getflows_activateflows_deactivateflows_executionsCredit Notes
3 toolscredit_notes_listcredit_notes_getcredit_notes_createExecutions
3 toolsexecutions_pauseexecutions_resumeexecutions_cancelStats
1 toolcollection_statsTal helt naturligt
Klar til at integrere?
Opret dit API-token og begynd at bygge. Gratis plan inkluderer fuld API-adgang.