Payhawk
App · 25 actions
Create, review and pay expenses in Payhawk, manage suppliers, cards, users and custom field values, read bank statements, and follow new expenses, payments and cards.
Actions
| Action | What it does |
|---|---|
| Archive or restore supplier | Archive a supplier so it can't be chosen, or make an archived one active again. |
| Create custom field value | Add a value people can choose for a list custom field, such as a new project or cost center. |
| Create expense | Create a bill, reimbursable or cash expense for a user, ready for them to add a receipt and submit. |
| Create supplier | Add a supplier to the account. |
| Delete custom field value | Delete a value from a custom field. |
| Delete expense | Delete an unpaid bill, reimbursable or cash expense. |
| Freeze or unfreeze card | Freeze a card, unfreeze it, or close it for good. |
| Get bank statement | Get a fund account's statement lines (money in and out), newest first, optionally between two times. |
| Get expense | Get an expense with its amounts, category, supplier, document details and approval status. |
| Invite user | Invite someone to the Payhawk account. |
| List cards | List the account's cards with their status, limit and spending, optionally one user's or by status. |
| List custom field values | List the values people can choose for a custom field. |
| List custom fields | List the account's custom fields, such as cost centers or projects, with their type. |
| List expense categories | List the account's expense categories with their account codes. |
| List expense payments | List the card or bank payments made for an expense, with fees and exchange rates. |
| List expenses | List expenses, newest first, optionally by status, owner, supplier or when they were created, changed, settled or reviewed. |
| List fund accounts | List the account's Payhawk balances and linked bank accounts with their available amount. |
| List suppliers | List the account's active or archived suppliers with their tax and contact details. |
| List users | List the account's users with their role, or find one by email address. |
| Mark bill as paid | Record that a bill was paid by bank transfer outside Payhawk, with the payment date and reference. |
| Remove user | Remove a user from the Payhawk account. |
| Review expense | Mark an expense as reviewed, or send it back to draft for another look. |
| Submit expense | Submit an expense for approval, checking the account's required fields. |
| Update expense | Change an expense's note, category, supplier, document number or document date. |
| Update supplier | Change a supplier's details. |
Archive or restore supplier
Archive a supplier so it can't be chosen, or make an archived one active again.
Inputs
- Supplier
supplier_idtextRequired - The supplier.
- Set to
statustextRequired - Archived or active.One of:
archived,active.
Outputs
dataobject- The response from Payhawk.
Example output
{
"data": {
"address": "example",
"contactEmail": "example",
"contactName": "example",
"contactPhone": "example",
"countryCode": "example",
"externalId": "example",
"externalSource": "example",
"id": "example",
"name": "example",
"status": "example",
"taxId": "example",
"uic": "example",
"vat": "example"
}
}Create custom field value
Add a value people can choose for a list custom field, such as a new project or cost center.
Inputs
- Custom field
custom_field_idtextRequired - The custom field.
- Name
labeltextRequired - The value's name.
- External ID
external_idtext - The value's ID in your accounting or ERP system.
- Parent value ID
parent_idtext - The ID of the value this one sits under, for nested lists.
Outputs
dataobject- The response from Payhawk.
Example output
{
"data": {
"externalId": "example",
"id": "example",
"label": "example",
"parentId": "example"
}
}Create expense
Create a bill, reimbursable or cash expense for a user, ready for them to add a receipt and submit.
Inputs
- Type
typetextRequired - The kind of expense.One of:
bank(Bill (paid by bank transfer)),reimbursable(Reimbursable (paid by the employee)),cash. - User
created_bytextRequired - The user the expense is for.
- Total amount
total_amountnumber - The total amount, including tax.At least 0.
- Tax amount
tax_amountnumber - The tax included in the total.At least 0.
- Currency
currencytext - The amount's currency, as a three-letter code such as EUR.
- Category
category_idtext - The expense category.
- Supplier
supplier_idtext - The supplier.
- Document number
document_numbertext - The invoice or receipt number.
- Note
notetext - A note about the expense.
Outputs
dataobject- The response from Payhawk.
Example output
{
"data": {
"items": [
{
"approvalProcess": {
"status": "example",
"submittedAt": "example"
},
"category": {
"fullName": "example",
"id": "example",
"name": "example"
},
"createdAt": "example",
"createdBy": {
"email": "example",
"externalId": "example",
"firstName": "example",
"id": "example",
"lastName": "example"
},
"document": {
"documentDate": "example",
"documentNumber": "example",
"documentType": "example"
},
"id": "example",
"isPaid": true,
"modifiedAt": "example",
"note": "example",
"owner": {
"email": "example",
"externalId": "example",
"firstName": "example",
"id": "example",
"lastName": "example"
},
"reconciliation": {
"baseCurrency": "example",
"baseTotalAmount": 1,
"currency": "example",
"taxAmount": 1,
"totalAmount": 1
},
"reviewedAt": "example",
"settledAt": "example",
"status": "example",
"supplier": {
"id": "example",
"name": "example"
},
"title": "example",
"type": "example"
}
],
"total": 1
}
}Create supplier
Add a supplier to the account.
Inputs
- Name
nametextRequired - The supplier's name.
- Tax ID
tax_idtext - The supplier's tax ID.
- VAT number
vattext - The supplier's VAT number.
- Company registration number
registration_numbertext - The supplier's company registration number.
- Country code
country_codetext - The supplier's country, as a two-letter code such as GB or DE.
- Address
addresstext - The supplier's address.
- Contact name
contact_nametext - The person to contact at the supplier.
- Contact email
contact_emailtext - The supplier's contact email address.
- Contact phone
contact_phonetext - The supplier's contact phone number.
- External ID
external_idtext - The supplier's ID in your accounting or ERP system.
Outputs
dataobject- The response from Payhawk.
Example output
{
"data": {
"address": "example",
"contactEmail": "example",
"contactName": "example",
"contactPhone": "example",
"countryCode": "example",
"externalId": "example",
"externalSource": "example",
"id": "example",
"name": "example",
"status": "example",
"taxId": "example",
"uic": "example",
"vat": "example"
}
}Delete custom field value
Delete a value from a custom field.
Inputs
- Custom field
custom_field_idtextRequired - The custom field.
- Value ID
value_idtextRequired - The value's ID, from List custom field values or Create custom field value.
Outputs
dataobject- The response from Payhawk.
Example output
{
"data": {}
}Delete expense
Delete an unpaid bill, reimbursable or cash expense.
Inputs
- Expense ID
expense_idtextRequired - The expense's ID in Payhawk, from List expenses or an earlier step.
Outputs
dataobject- The response from Payhawk.
Example output
{
"data": {}
}Freeze or unfreeze card
Freeze a card, unfreeze it, or close it for good. A closed card can't be used again.
Inputs
- Card
card_idtextRequired - The card.
- Set card to
statustextRequired - What to do with the card.One of:
blocked(Frozen),active,closed(Closed (can't be undone)).
Outputs
dataobject- The response from Payhawk.
Example output
{
"data": {}
}Get bank statement
Get a fund account's statement lines (money in and out), newest first, optionally between two times.
Inputs
- Fund account
fund_account_idtextRequired - The Payhawk balance or bank account.
- From
fromdate and time - Only lines on or after this time.
- To
todate and time - Only lines on or before this time.
- Records to skip
skipnumber - How many records to skip, to read the next page. Leave empty to start at the first.At least 0.
- Records to return
takenumber - How many records to return. Leave empty for 100.From 1 to 1000.
Outputs
dataobject- The response from Payhawk.
Example output
{
"data": {
"lines": [
{
"amount": 1,
"currency": "example",
"date": "example",
"description": "example",
"expenseIds": [
"example"
],
"fundAccountId": "example",
"id": "example",
"paidAmount": 1,
"paidCurrency": "example",
"paymentId": "example",
"type": "example"
}
],
"total": 1
}
}Get expense
Get an expense with its amounts, category, supplier, document details and approval status.
Inputs
- Expense ID
expense_idtextRequired - The expense's ID in Payhawk, from List expenses or an earlier step.
Outputs
dataobject- The response from Payhawk.
Example output
{
"data": {
"approvalProcess": {
"status": "example",
"submittedAt": "example"
},
"category": {
"fullName": "example",
"id": "example",
"name": "example"
},
"createdAt": "example",
"createdBy": {
"email": "example",
"externalId": "example",
"firstName": "example",
"id": "example",
"lastName": "example"
},
"document": {
"documentDate": "example",
"documentNumber": "example",
"documentType": "example"
},
"id": "example",
"isPaid": true,
"modifiedAt": "example",
"note": "example",
"owner": {
"email": "example",
"externalId": "example",
"firstName": "example",
"id": "example",
"lastName": "example"
},
"reconciliation": {
"baseCurrency": "example",
"baseTotalAmount": 1,
"currency": "example",
"taxAmount": 1,
"totalAmount": 1
},
"reviewedAt": "example",
"settledAt": "example",
"status": "example",
"supplier": {
"id": "example",
"name": "example"
},
"title": "example",
"type": "example"
}
}Invite user
Invite someone to the Payhawk account. Payhawk emails them an invitation.
Inputs
- Email
emailtextRequired - Their email address.
- Role
roletext - Their role in Payhawk. Leave empty for employee.Default:
employee. - First name
first_nametext - Their first name.
- Last name
last_nametext - Their last name.
Outputs
dataobject- The response from Payhawk.
Example output
{
"data": {}
}List cards
List the account's cards with their status, limit and spending, optionally one user's or by status.
Inputs
- Cardholder
cardholder_idtext - Only this user's cards.
- Status
statustext - Only cards with this status.One of:
active,inactive(Not activated),processing,blocked_by_user(Frozen by the cardholder),blocked_by_admin(Frozen by an admin),closed(Closed (can't be undone)),closed_by_payhawk(Closed by Payhawk). - Records to skip
skipnumber - How many records to skip, to read the next page. Leave empty to start at the first.At least 0.
- Records to return
takenumber - How many records to return. Leave empty for 100.From 1 to 1000.
Outputs
dataobject- The response from Payhawk.
Example output
{
"data": {
"items": [
{
"approvedFunds": 1,
"budgetLeft": 1,
"createdAt": "example",
"currency": "example",
"embossName": "example",
"fundAccountId": "example",
"id": "example",
"isAtmAllowed": true,
"isPhysical": true,
"isSingleUse": true,
"lastDigits": "example",
"limit": 1,
"name": "example",
"spendPolicyId": "example",
"spentAmount": 1,
"status": "example",
"userId": "example"
}
],
"total": 1
}
}List custom field values
List the values people can choose for a custom field.
Inputs
- Custom field
custom_field_idtextRequired - The custom field.
Outputs
dataobject- The response from Payhawk.
Example output
{
"data": {
"items": [
{
"externalId": "example",
"id": "example",
"label": "example",
"parentId": "example"
}
],
"total": 1
}
}List custom fields
List the account's custom fields, such as cost centers or projects, with their type.
Inputs
None.
Outputs
dataobject- The response from Payhawk.
Example output
{
"data": {
"items": [
{
"description": "example",
"externalId": "example",
"externalSource": "example",
"id": "example",
"isRequired": true,
"label": "example",
"type": "example"
}
],
"total": 1
}
}List expense categories
List the account's expense categories with their account codes.
Inputs
None.
Outputs
dataobject- The response from Payhawk.
Example output
{
"data": {
"items": [
{
"accountCode": "example",
"createdAt": "example",
"fullName": "example",
"id": "example",
"name": "example",
"parentId": "example"
}
],
"total": 1
}
}List expense payments
List the card or bank payments made for an expense, with fees and exchange rates.
Inputs
- Expense ID
expense_idtextRequired - The expense's ID in Payhawk, from List expenses or an earlier step.
Outputs
dataobject- The response from Payhawk.
Example output
{
"data": {
"items": [
{
"amount": 1,
"cardId": "example",
"cardLastDigits": "example",
"currency": "example",
"date": "example",
"description": "example",
"expenseIds": [
"example"
],
"fundAccountId": "example",
"id": "example",
"originalAmount": 1,
"originalCurrency": "example",
"status": "example",
"type": "example"
}
],
"total": 1
}
}List expenses
List expenses, newest first, optionally by status, owner, supplier or when they were created, changed, settled or reviewed.
Inputs
- Status
statustext - Only expenses with this status.One of:
draft,ready(Reviewed),archived. - Created after
created_afterdate and time - Only expenses created after this time.
- Changed after
modified_afterdate and time - Only expenses changed after this time.
- Settled after
settled_afterdate and time - Only expenses whose payment settled after this time.
- Reviewed after
reviewed_afterdate and time - Only expenses reviewed after this time.
- Owner
owner_idtext - Only this user's expenses.
- Supplier name
supplier_nametext - Only expenses from the supplier with this exact name.
- Order
ordertext - Newest or oldest first. Leave empty for newest first.One of:
desc,asc. Default:desc. - Records to skip
skipnumber - How many records to skip, to read the next page. Leave empty to start at the first.At least 0.
- Records to return
takenumber - How many records to return. Leave empty for 100.From 1 to 1000.
Outputs
dataobject- The response from Payhawk.
Example output
{
"data": {
"items": [
{
"approvalProcess": {
"status": "example",
"submittedAt": "example"
},
"category": {
"fullName": "example",
"id": "example",
"name": "example"
},
"createdAt": "example",
"createdBy": {
"email": "example",
"externalId": "example",
"firstName": "example",
"id": "example",
"lastName": "example"
},
"document": {
"documentDate": "example",
"documentNumber": "example",
"documentType": "example"
},
"id": "example",
"isPaid": true,
"modifiedAt": "example",
"note": "example",
"owner": {
"email": "example",
"externalId": "example",
"firstName": "example",
"id": "example",
"lastName": "example"
},
"reconciliation": {
"baseCurrency": "example",
"baseTotalAmount": 1,
"currency": "example",
"taxAmount": 1,
"totalAmount": 1
},
"reviewedAt": "example",
"settledAt": "example",
"status": "example",
"supplier": {
"id": "example",
"name": "example"
},
"title": "example",
"type": "example"
}
],
"total": 1
}
}List fund accounts
List the account's Payhawk balances and linked bank accounts with their available amount.
Inputs
None.
Outputs
dataobject- The response from Payhawk.
Example output
{
"data": {
"items": [
{
"balance": {
"availableAmount": 1,
"reservedAmount": 1
},
"currency": "example",
"id": "example",
"status": "example",
"type": "example"
}
],
"total": 1
}
}List suppliers
List the account's active or archived suppliers with their tax and contact details.
Inputs
- Status
statustext - Active or archived suppliers. Leave empty for active.One of:
active,archived. Default:active. - Records to skip
skipnumber - How many records to skip, to read the next page. Leave empty to start at the first.At least 0.
- Records to return
takenumber - How many records to return. Leave empty for 100.From 1 to 1000.
Outputs
dataobject- The response from Payhawk.
Example output
{
"data": {
"items": [
{
"address": "example",
"contactEmail": "example",
"contactName": "example",
"contactPhone": "example",
"countryCode": "example",
"externalId": "example",
"externalSource": "example",
"id": "example",
"name": "example",
"status": "example",
"taxId": "example",
"uic": "example",
"vat": "example"
}
],
"total": 1
}
}List users
List the account's users with their role, or find one by email address.
Inputs
- Email
emailtext - Only the user with this email address.
Outputs
dataobject- The response from Payhawk.
Example output
{
"data": {
"items": [
{
"createdAt": "example",
"deactivationDate": "example",
"email": "example",
"externalId": "example",
"firstName": "example",
"id": "example",
"lastName": "example",
"phoneNumber": "example",
"role": "example",
"startDate": "example"
}
],
"total": 1
}
}Mark bill as paid
Record that a bill was paid by bank transfer outside Payhawk, with the payment date and reference.
Inputs
- Expense ID
expense_idtextRequired - The expense's ID in Payhawk, from List expenses or an earlier step.
- Paid on
datedate and timeRequired - When it was paid.
- Payment reference
payment_referencetext - The bank transfer's reference.
- Paid from
account_numbertext - The account it was paid from: an account number, IBAN or the bank account's name.
Outputs
dataobject- The response from Payhawk.
Example output
{
"data": {}
}Remove user
Remove a user from the Payhawk account.
Inputs
- User
member_idtextRequired - The user.
Outputs
dataobject- The response from Payhawk.
Example output
{
"data": {}
}Review expense
Mark an expense as reviewed, or send it back to draft for another look.
Inputs
- Expense ID
expense_idtextRequired - The expense's ID in Payhawk, from List expenses or an earlier step.
- Set to
statustextRequired - Reviewed, or back to draft.One of:
ready(Reviewed),draft.
Outputs
dataobject- The response from Payhawk.
Example output
{
"data": {
"approvalProcess": {
"status": "example",
"submittedAt": "example"
},
"category": {
"fullName": "example",
"id": "example",
"name": "example"
},
"createdAt": "example",
"createdBy": {
"email": "example",
"externalId": "example",
"firstName": "example",
"id": "example",
"lastName": "example"
},
"document": {
"documentDate": "example",
"documentNumber": "example",
"documentType": "example"
},
"id": "example",
"isPaid": true,
"modifiedAt": "example",
"note": "example",
"owner": {
"email": "example",
"externalId": "example",
"firstName": "example",
"id": "example",
"lastName": "example"
},
"reconciliation": {
"baseCurrency": "example",
"baseTotalAmount": 1,
"currency": "example",
"taxAmount": 1,
"totalAmount": 1
},
"reviewedAt": "example",
"settledAt": "example",
"status": "example",
"supplier": {
"id": "example",
"name": "example"
},
"title": "example",
"type": "example"
}
}Submit expense
Submit an expense for approval, checking the account's required fields.
Inputs
- Expense ID
expense_idtextRequired - The expense's ID in Payhawk, from List expenses or an earlier step.
Outputs
dataobject- The response from Payhawk.
Example output
{
"data": {
"approvalProcess": {
"status": "example",
"submittedAt": "example"
},
"category": {
"fullName": "example",
"id": "example",
"name": "example"
},
"createdAt": "example",
"createdBy": {
"email": "example",
"externalId": "example",
"firstName": "example",
"id": "example",
"lastName": "example"
},
"document": {
"documentDate": "example",
"documentNumber": "example",
"documentType": "example"
},
"id": "example",
"isPaid": true,
"modifiedAt": "example",
"note": "example",
"owner": {
"email": "example",
"externalId": "example",
"firstName": "example",
"id": "example",
"lastName": "example"
},
"reconciliation": {
"baseCurrency": "example",
"baseTotalAmount": 1,
"currency": "example",
"taxAmount": 1,
"totalAmount": 1
},
"reviewedAt": "example",
"settledAt": "example",
"status": "example",
"supplier": {
"id": "example",
"name": "example"
},
"title": "example",
"type": "example"
}
}Update expense
Change an expense's note, category, supplier, document number or document date. Only the fields filled in change.
Inputs
- Expense ID
expense_idtextRequired - The expense's ID in Payhawk, from List expenses or an earlier step.
- Note
notetext - A note about the expense.
- Category
category_idtext - The expense category.
- Supplier
supplier_idtext - The supplier.
- Document number
document_numbertext - The invoice or receipt number.
- Document date
document_datedate and time - When the invoice or receipt was issued.
Outputs
dataobject- The response from Payhawk.
Example output
{
"data": {
"approvalProcess": {
"status": "example",
"submittedAt": "example"
},
"category": {
"fullName": "example",
"id": "example",
"name": "example"
},
"createdAt": "example",
"createdBy": {
"email": "example",
"externalId": "example",
"firstName": "example",
"id": "example",
"lastName": "example"
},
"document": {
"documentDate": "example",
"documentNumber": "example",
"documentType": "example"
},
"id": "example",
"isPaid": true,
"modifiedAt": "example",
"note": "example",
"owner": {
"email": "example",
"externalId": "example",
"firstName": "example",
"id": "example",
"lastName": "example"
},
"reconciliation": {
"baseCurrency": "example",
"baseTotalAmount": 1,
"currency": "example",
"taxAmount": 1,
"totalAmount": 1
},
"reviewedAt": "example",
"settledAt": "example",
"status": "example",
"supplier": {
"id": "example",
"name": "example"
},
"title": "example",
"type": "example"
}
}Update supplier
Change a supplier's details. Only the fields filled in change.
Inputs
- Supplier
supplier_idtextRequired - The supplier.
- Name
nametext - The supplier's name.
- Tax ID
tax_idtext - The supplier's tax ID.
- VAT number
vattext - The supplier's VAT number.
- Company registration number
registration_numbertext - The supplier's company registration number.
- Country code
country_codetext - The supplier's country, as a two-letter code such as GB or DE.
- Address
addresstext - The supplier's address.
- Contact name
contact_nametext - The person to contact at the supplier.
- Contact email
contact_emailtext - The supplier's contact email address.
- Contact phone
contact_phonetext - The supplier's contact phone number.
- External ID
external_idtext - The supplier's ID in your accounting or ERP system.
Outputs
dataobject- The response from Payhawk.
Example output
{
"data": {
"address": "example",
"contactEmail": "example",
"contactName": "example",
"contactPhone": "example",
"countryCode": "example",
"externalId": "example",
"externalSource": "example",
"id": "example",
"name": "example",
"status": "example",
"taxId": "example",
"uic": "example",
"vat": "example"
}
}