---
title: "Create a payment link for a client"
method: POST
path: "/clients/{id}/payment-links"
tags: ["Agencies"]
---

# Create a payment link for a client

`POST /clients/{id}/payment-links`

## Request

- Base URL: `https://api.hypamoon.com/api/v1`
- URL: `https://api.hypamoon.com/api/v1/clients/{id}/payment-links`
- 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`)

A one-time payment on your agency's own payment account (connected on your agency project), with the client project in the metadata. The money goes to your agency; Hypamoon keeps only the transaction fee you accepted when connecting. Give checkout_url to your client yourself; nothing is emailed. Test until payments on your agency project are live. Events: client_payment.paid and client_payment.failed on your webhooks.

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `amount_cents` integer, required
  - `currency` string
  - `description` string, required
  - `redirect_url` string, uri, required
  - `idempotency_key` string

## Response `200`

The payment link made earlier with this idempotency_key.

- 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

- `201`: The payment link.
- `400`: Bad Request: invalid_json.
- `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.
- `409`: Conflict: conflict.
- `422`: Unprocessable Content: validation_failed.
- `429`: Too Many Requests: rate_limited.
- `500`: Internal Server Error: internal_error.
- `502`: Bad Gateway: upstream_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)
