---
title: "Cancel an open payment request the organization made"
method: POST
path: "/pay-requests/{payRequestId}/cancel"
tags: ["pay-requests"]
---

# Cancel an open payment request the organization made

`POST /pay-requests/{payRequestId}/cancel`

## Request

- Base URL: `https://api.catena.com/v1/agent-api`
- URL: `https://api.catena.com/v1/agent-api/pay-requests/{payRequestId}/cancel`
- Auth: HTTP bearer

## Path parameters

- `payRequestId` string, required

## Response `200`

Canceled, or already canceled. A deposit that arrives later stays an ordinary deposit

- object
  - `payRequest` object, required
    - `id` string, required
    - `status` string, required: open until Catena matches a deposit to it, then paid; canceled once the requester withdraws it; expired once expiresAt passes while open
    - `amount` object, required
      - `value` string, required
      - `currency` 'USD', required
    - `description` string, required
    - `payer` object, required: Who was asked: by email, or as an organization chosen by name in the console
      - `email` string, nullable, required
      - `name` string, nullable, required
    - `payTo` object[], required
      - `network` string, required
      - `asset` string, required
      - `address` string, required
    - `link` string, required: The public link: anyone with it can read the request and check the agent's signature, with no Catena credentials
    - `createdAt` string, date-time, required
    - `expiresAt` string, date-time, required: After this an open request reads expired, and a payment that arrives stays an ordinary deposit, unless it comes from a send linked to the request before then
    - `paidAt` string, date-time, nullable, required
    - `signed` object, nullable, required: Null for a request a member made in the console, which no agent signed
      - `request` string, required: The agent's compact JWS (typ payment-request+jwt), signed with its registered key
    - `viewedAt` string, date-time, nullable, required: When anyone first opened the request's public link
    - `paidTransactionId` string, nullable, required: The deposit Catena matched to the request, shown only to the requesting organization
    - `requester` object, required
      - `organization` object, required
        - `id` string, required
        - `name` string, required
      - `agent` object, nullable, required: The agent that made the request, or null for a member's
        - `id` string, required
        - `name` string, required
      - `member` object, nullable, required: The member who made the request in the console
        - `name` string, required
    - `payments` object[], required: The sends the caller's organization recorded as paying this request
      - `intentId` string, required
      - `status` string, required
      - `resolution` union, required: Exact terminal outcome, or null while the intent is nonterminal. Known values are completed, blocked, denied, expired, failed, and cancelled; clients must preserve future nonblank strings.
        - 'completed' | 'blocked' | 'denied' | 'expired' | 'failed' | 'cancelled'
        - string

## Other responses

- `403`: Payment requests are not enabled for the organization
- `404`: Payment request not found among those the organization made
- `409`: The request is already paid (`pay_request_already_paid`), or a linked payment still holds it, on its way or until a day after its money left (`pay_request_payment_in_progress`); the request stays open and its deposit can still pay it

---

[API](https://skmtc.dev/catena/apis/catena-agent-api.md) - [All operations](https://skmtc.dev/catena/apis/catena-agent-api/llms.txt) - [OpenAPI document](https://skmtc.dev/catena/apis/catena-agent-api/revisions/9b72e32d21f1?raw)
