---
title: "Prepare subscription plan creation"
method: POST
path: "/v1/payments/subscription-plans/{planId}/prepare-create"
tags: ["Payments"]
---

# Prepare subscription plan creation

`POST /v1/payments/subscription-plans/{planId}/prepare-create`

Prepares an unsigned Solana subscriptions program create-plan transaction from an SDP subscription plan. This derives and stores the plan PDA but does not submit the transaction.

## Path parameters

- `planId` string, required — SDP subscription plan 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 — Optional overrides used when preparing the Solana subscriptions create-plan transaction.
  - `destinations` string[] — Allowed destination addresses for the on-chain plan. Defaults to the stored plan destination.
  - `pullers` string[] — Allowed puller addresses for the on-chain plan. Defaults to the stored puller or owner address.
  - `endTs` string — Optional unsigned 64-bit Unix timestamp when the on-chain plan ends.
  - `metadataUri` string, uri — Optional metadata URI to embed in the on-chain plan.

## Response `200`

Subscription plan creation prepared

- object — Standard success response envelope.
  - `data` object, required — Prepared Solana subscriptions create-plan response payload.
    - `subscriptionPlan` object, required — Recurring payment subscription plan record.
      - `id` string, required — SDP subscription plan ID.
      - `organizationId` string, required — Organization identifier.
      - `projectId` string, required — Project identifier.
      - `ownerWalletId` string, required — Provider wallet ID — the `walletId` field returned by GET /v1/wallets.
      - `ownerAddress` string, required — Base58-encoded Solana address.
      - `token` string, required — Token mint or normalized token identifier.
      - `amount` string, required — Token amount in UI units (decimal string).
      - `periodHours` integer, required
      - `programPlanId` string, required — Unsigned 64-bit decimal program plan identifier used in PDA derivation.
      - `planPda` string, nullable, required — On-chain plan PDA.
      - `destinationAddress` string, nullable, required — Allowed destination owner address.
      - `pullerWalletId` string, nullable, required — Collector wallet ID.
      - `pullerAddress` string, nullable, required — Collector wallet address.
      - `metadataUri` string, nullable, required — Optional plan metadata URI.
      - `status` 'draft' | 'active' | 'archived', required — Subscription plan status.
      - `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.
    - `planPda` string, required — Derived Solana subscriptions plan PDA.
    - `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.
  - `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)
