---
title: "Prepare subscription collection"
method: POST
path: "/v1/payments/subscriptions/{subscriptionId}/prepare-collection"
tags: ["Payments"]
---

# Prepare subscription collection

`POST /v1/payments/subscriptions/{subscriptionId}/prepare-collection`

Prepares the collector-signed Solana subscriptions transfer transaction for an active subscription. The transaction must still be signed and submitted by the collector/fee-payer flow.

## Path parameters

- `subscriptionId` string, required — SDP subscription 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 — Inputs for preparing the collector-signed Solana subscriptions transfer transaction. The amount is always derived from the stored plan.
  - `receiverTokenAccount` string, required — Receiver token account for the pulled subscription payment. It must be allowed by the on-chain plan.

## Response `200`

Subscription collection prepared

- object — Standard success response envelope.
  - `data` object, required — Prepared subscription collection response payload.
    - `subscription` object, required — Recurring payment subscription record.
      - `id` string, required — SDP subscription ID.
      - `organizationId` string, required — Organization identifier.
      - `projectId` string, required — Project identifier.
      - `planId` string, required — SDP subscription plan ID.
      - `counterpartyId` string, required — Counterparty ID.
      - `subscriberAddress` string, required — Base58-encoded Solana address.
      - `subscriberTokenAccount` string, nullable, required — Subscriber token account address.
      - `subscriptionPda` string, nullable, required — On-chain subscription PDA.
      - `subscriptionAuthorityAddress` string, nullable, required — On-chain subscription authority address.
      - `authorizationSignature` string, nullable, required — Customer authorization transaction signature.
      - `status` 'pending_authorization' | 'active' | 'paused' | 'canceling' | 'canceled' | 'expired', required — Subscription status.
      - `currentPeriodStartAt` string, date-time, nullable, required — ISO 8601 timestamp.
      - `nextCollectionDueAt` string, date-time, nullable, required — ISO 8601 timestamp.
      - `cancelAt` string, date-time, nullable, required — ISO 8601 timestamp.
      - `canceledAt` string, date-time, nullable, required — ISO 8601 timestamp.
      - `createdBy` string, nullable, required
      - `createdAt` string, date-time, required — ISO 8601 timestamp.
      - `updatedAt` string, date-time, required — ISO 8601 timestamp.
    - `preparedTransaction` object, required — Unsigned Solana subscriptions transaction payload for client-side signing.
      - `serialized` string, required — Base64-encoded unsigned transaction.
      - `blockhash` string, required — Blockhash for the transaction.
      - `lastValidBlockHeight` string, required — Last valid block height.
      - `requiredSigners` string[], required — Addresses that must sign the prepared transaction. This includes the sponsored fee payer when the transaction uses one.
    - `collectionAttempt` object — Recurring payment collection attempt record.
      - `id` string, required — Collection attempt ID.
      - `organizationId` string, required — Organization identifier.
      - `projectId` string, required — Project identifier.
      - `subscriptionId` string, required — Subscription ID.
      - `transferId` string, nullable, required — Payment transfer record ID when linked.
      - `token` string, required — Token mint or normalized token identifier.
      - `amount` string, required — Token amount in UI units (decimal string).
      - `dueAt` string, date-time, required — ISO 8601 timestamp.
      - `attemptedAt` string, date-time, nullable, required — ISO 8601 timestamp.
      - `status` 'pending' | 'processing' | 'confirmed' | 'failed' | 'skipped', required — Collection attempt status.
      - `signature` string, nullable, required — Solana transaction signature.
      - `error` string, nullable, required — Collection error, if any.
      - `metadata` object, required — Provider/job metadata for the attempt.
      - `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
- `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)
