---
title: "Execute a payment file"
method: POST
path: "/pay-file/{id}/execute"
tags: ["pay-file"]
---

# Execute a payment file

`POST /pay-file/{id}/execute`

## Request

- Base URL: `https://identity.moneyhub.co.uk`
- URL: `https://identity.moneyhub.co.uk/pay-file/{id}/execute`
- Auth: API key in header `Authorization`

Executes a payment file by ID. Requires **pay_file:write** scope.

## Path parameters

- `id` string, uuid, required

## Response `200`

Successful Pay File Execution Response

- object
  - `data` PayFileExecution
    - `id` string, uuid, required: The id of the pay file
    - `status` 'InitiationPending' | 'InitiationFailed' | 'InitiationCompleted'
    - `createdAt` string, date-time, required: The date that the pay file consent was created
    - `payFileConsents` object, required
      - `fileReference` string: The name or description given to the recurring payment
      - `numberOfTransactions` integer: The number of transactions within the file
      - `controlSum` string: The total amount of the transactions within the file
  - `meta` object

## Other responses

- `400`: Unsuccessful Response - Bad request - Missing or invalid parameters

## Changes

- **2026-11-03** `e004d9ee1fdb`: 2 warning
  - removed the optional property `id` from the response with the `400` status
  - removed the optional property `userId` from the response with the `400` status

[Operation history](https://skmtc.dev/moneyhubenterprise/apis/moneyhub-identity-service/changes/pay-file/:id/execute/post.md)

---

[API](https://skmtc.dev/moneyhubenterprise/apis/moneyhub-identity-service.md) - [All operations](https://skmtc.dev/moneyhubenterprise/apis/moneyhub-identity-service/llms.txt) - [OpenAPI document](https://skmtc.dev/moneyhubenterprise/apis/moneyhub-identity-service/revisions/e004d9ee1fdb?raw)
