Build on Payfriend
REST API and MCP server for managing invoices, customers, payments, and collection flows. Integrate directly or let AI agents handle your workflows.
{
"total_count": 847, "total_amount": 2458350.00, "overdue_count": 23, "overdue_amount": 156200.50, "paid_this_month": 412800.00, "currency": "DKK"}Get started in minutes
Create an API token, make your first request, and start building.
Create a token
Go to Settings → API Tokens in the Payfriend dashboard. Create a token with the scopes you need.
Make a request
Use your token as a Bearer token in the Authorization header. All endpoints return JSON.
Build your integration
Use the REST API for custom integrations, or the MCP server to let AI agents manage your workflows.
Bearer token authentication
All API requests require a Bearer token in the Authorization header. Create tokens in Settings → API Tokens.
Tokens never expire — revoke anytime from the dashboard
Scoped permissions — create read-only or full-access tokens
SHA-256 hashed — token values are never stored in plain text
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 across 6 resource groups. All responses are JSON with standard HTTP status codes.
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 with MCP
Connect Claude, Cursor, or any MCP-compatible client. 25 tools for managing your entire collection workflow conversationally.
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_statsJust talk naturally
Ready to integrate?
Create your API token and start building. Free tier includes full API access.