---
title: "Withdraw an open payment link"
method: DELETE
path: "/clients/{id}/payment-links/{linkId}"
tags: ["Agencies"]
---

# Withdraw an open payment link

`DELETE /clients/{id}/payment-links/{linkId}`

## Request

- Base URL: `https://api.hypamoon.com/api/v1`
- URL: `https://api.hypamoon.com/api/v1/clients/{id}/payment-links/{linkId}`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://app.hypamoon.com/oauth/authorize`, token URL `https://api.hypamoon.com/oauth/token`, scopes: `clients:write`)

Marks an open payment link of your agency as expired, also after your relation with the client ended. The checkout at your payment provider expires on its own; if it is still paid, the money is on your own account.

## Path parameters

- `id` string, uuid, required
- `linkId` string, uuid, required

## Response `200`

The withdrawn payment link.

- object
  - `object` 'client_payment_link' | 'client_subscription', required
  - `id` string, uuid, required
  - `client_project_id` string, uuid, required
  - `status` 'open' | 'paid' | 'failed' | 'expired' | 'active' | 'canceled', required
  - `amount_cents` integer, required
  - `fee_cents` integer, required
  - `currency` string, required
  - `description` string, required
  - `interval` 'month' | 'year' | 'null', nullable
  - `paid_until` string, nullable
  - `canceled_at` string, nullable
  - `test` boolean, required
  - `checkout_url` string, nullable, required
  - `paid_at` string, nullable, required
  - `created_at` string, required

## Other responses

- `401`: Unauthorized: unauthorized, missing_api_key, invalid_api_key, api_key_revoked, project_deleted.
- `403`: Forbidden: project_not_enabled, key_mode_mismatch, missing_scope, verification_required, forbidden.
- `404`: Not Found: not_found.
- `429`: Too Many Requests: rate_limited.
- `500`: Internal Server Error: internal_error.
- `503`: Service Unavailable: service_unavailable.

---

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