---
title: "Update recurring payment"
method: PATCH
path: "/v1/payments/recurring-payments/{id}"
tags: ["Payments"]
---

# Update recurring payment

`PATCH /v1/payments/recurring-payments/{id}`

Updates an SDP-custody recurring payment. Pending records are updated directly. Active metadata and due-date edits are applied in place, while active term, source, destination, or token edits create a replacement Solana subscription, authorize it, cancel the old subscription, and then swap the recurring payment to the replacement records.

## Path parameters

- `id` string, required — SDP recurring payment record ID.

## Headers

- `x-project-id` string — Selects the active project for this request. Required for session/dashboard callers. Ignored when authenticating with an API key, whose scope is fixed to the key's project.

## Request body

- object — Updates a recurring payment. Pending payments are edited directly. Active metadata or due-date updates are applied in place, while active term/source/destination/token updates create and authorize a replacement subscription before canceling the old one.
  - `sourceWalletId` string — Optional replacement SDP custody wallet — the `walletId` field returned by GET /v1/wallets. The wallet record `id` and the public key are not accepted. Active replacements require write access to both the old and new source wallets.
  - `counterpartyId` string — Optional replacement counterparty. When provided, counterpartyAccountId is also required.
  - `counterpartyAccountId` string — Optional replacement counterparty account. Without counterpartyId, this changes the account for the current counterparty.
  - `token` string — Optional replacement token. Must be a USD stablecoin (e.g. USDC) or a token issued in this project; native SOL is not supported.
  - `amount` string — Optional replacement amount in UI units.
  - `periodHours` integer — Optional replacement billing period length in hours. Active term changes create a replacement on-chain subscription.
  - `firstCollectionAt` string, date-time, nullable — Pending-only first collection timestamp. Use null to clear the pending first collection override.
  - `nextCollectionDueAt` string, date-time, nullable — Active-only next due timestamp. Use null to reset to the earliest eligible collection time.
  - `metadataUri` string, uri, nullable — Optional plan metadata URI. Use null to clear it. Active metadata-only edits update the existing on-chain plan in place.

## Response `200`

Recurring payment updated

- object — Standard success response envelope.
  - `data` object, required — Recurring payment response payload.
    - `recurringPayment` object, required — SDP-custody outbound recurring payment record.
      - `id` string, required — SDP recurring payment ID.
      - `organizationId` string, required — Organization identifier.
      - `projectId` string, required — Project identifier.
      - `sourceWalletId` string, required — SDP custody wallet that funds the recurring payment.
      - `sourceAddress` string, required — Source wallet address.
      - `counterpartyId` string, required — Counterparty ID.
      - `counterpartyAccountId` string, required — Counterparty account ID.
      - `destinationAddress` string, required — Counterparty wallet owner address.
      - `destinationTokenAccount` string, nullable, required — Derived counterparty token account used for collection.
      - `token` string, required — SPL token mint address.
      - `amount` string, required — Token amount in UI units (decimal string).
      - `periodHours` integer, required
      - `firstCollectionAt` string, date-time, nullable, required — Requested first collection timestamp.
      - `nextCollectionDueAt` string, date-time, nullable, required — Next due collection timestamp.
      - `planId` string, nullable, required — Linked SDP subscription plan ID.
      - `subscriptionId` string, nullable, required — Linked SDP subscription ID.
      - `planPda` string, nullable, required — On-chain plan PDA.
      - `planCreatedAt` string, nullable, required — On-chain plan createdAt value as an unsigned integer string.
      - `planCreationSignature` string, nullable, required — Solana signature for plan creation.
      - `subscriptionPda` string, nullable, required — On-chain subscription PDA.
      - `subscriptionAuthorityAddress` string, nullable, required — On-chain subscription authority address.
      - `authorizationSignature` string, nullable, required — Solana signature for subscription authorization.
      - `status` 'pending_activation' | 'activating' | 'active' | 'updating' | 'canceling' | 'resuming' | 'paused' | 'canceled' | 'expired', required — Recurring payment status.
      - `metadataUri` string, nullable, required — Optional plan metadata URI.
      - `createdBy` string, nullable, required — Creator user ID or API key ID.
      - `createdAt` string, date-time, required — ISO 8601 timestamp.
      - `updatedAt` string, date-time, required — ISO 8601 timestamp.
  - `meta` object, required — Response metadata.
    - `requestId` string, required — Request identifier for tracing.
    - `timestamp` string, date-time, required — ISO 8601 timestamp.

## Other responses

- `400` — Error
- `401` — Error
- `403` — Error
- `404` — Error
- `409` — Error
- `500` — Error

---

[API](https://skmtc.net/solana/apis/solana-developer-platform-api.md) · [All operations](https://skmtc.net/solana/apis/solana-developer-platform-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/solana/solana-developer-platform-api/revisions/672b1916ba61/schema)
