Get subscription

Retrieves a recurring-payment subscription record.

GET/v1/payments/subscriptions/{subscriptionId}Run in dashboard

Requires an API key with the recurring.read action.

Path parameters

  • subscriptionId · string · required · min length 1 · example psub_example

    SDP subscription record ID.

Headers

  • x-project-id · string · min length 1 · example prj_example

    Required for dashboard sessions. API keys use their assigned project.

Responses

  • 200 Subscription

    • data · object · required

      Subscription response payload.

      • subscription · object · required

        Recurring payment subscription record.

        • id · string · required · example psub_example

          SDP subscription ID.

        • organizationId · string · required · min length 1 · example org_example

          Organization identifier.

        • projectId · string · required · min length 1 · example prj_example

          Project identifier.

        • planId · string · required

          SDP subscription plan ID.

        • counterpartyId · string · required

          Counterparty ID.

        • subscriberAddress · string · required · min length 32 · max length 44 · example So11111111111111111111111111111111111111112

          Base58-encoded Solana address.

        • subscriberTokenAccount · string | null · required · min length 32 · max length 44 · example So11111111111111111111111111111111111111112

          Subscriber token account address.

        • subscriptionPda · string | null · required · min length 32 · max length 44 · example So11111111111111111111111111111111111111112

          On-chain subscription PDA.

        • subscriptionAuthorityAddress · string | null · required · min length 32 · max length 44 · example So11111111111111111111111111111111111111112

          On-chain subscription authority address.

        • authorizationSignature · string | null · required

          Customer authorization transaction signature.

        • status · string · required · one of pending_authorization, active, paused, canceling, canceled, expired · example active

          Subscription status.

        • currentPeriodStartAt · string | null · required · format date-time · example 2025-01-01T00:00:00.000Z

          ISO 8601 timestamp.

        • nextCollectionDueAt · string | null · required · format date-time · example 2025-01-01T00:00:00.000Z

          ISO 8601 timestamp.

        • cancelAt · string | null · required · format date-time · example 2025-01-01T00:00:00.000Z

          ISO 8601 timestamp.

        • canceledAt · string | null · required · format date-time · example 2025-01-01T00:00:00.000Z

          ISO 8601 timestamp.

        • createdBy · string | null · required

        • createdAt · string · required · format date-time · example 2025-01-01T00:00:00.000Z

          ISO 8601 timestamp.

        • updatedAt · string · required · format date-time · example 2025-01-01T00:00:00.000Z

          ISO 8601 timestamp.

    • meta · object · required

      Response metadata.

      • requestId · string · required · min length 1 · example req_example

        Request identifier for tracing.

      • timestamp · string · required · format date-time · example 2025-01-01T00:00:00.000Z

        ISO 8601 timestamp.

  • 401 Unauthorized

    • error · object · required

      Standard error payload.

      • code · string · required

        Machine-readable error code.

      • message · string · required

        Human-readable error message.

      • details · object

        Optional error details for debugging.

        • * · any
    • meta · object

      • requestId · string · min length 1 · example req_example

        Request identifier for tracing.

  • 403 Forbidden. Requires the recurring.read action: an API key must hold it (a module's manage or execute also covers its read), and a signed-in member's organization role must include it. Without it the error is INSUFFICIENT_PERMISSIONS and error.details.action names the action. Any other 403 names its own reason.

    Same fields as 401.

  • 404 Not Found

    Same fields as 401.

  • 500 Internal Server Error

    Same fields as 401.

Example request

curl 'https://api.solana.com/v1/payments/subscriptions/psub_example' \
  -H "Authorization: Bearer $SDP_API_KEY"

Example responses

{
  "data": {
    "subscription": {
      "id": "psub_example",
      "organizationId": "org_example",
      "projectId": "prj_example",
      "planId": "plan_example",
      "counterpartyId": "counterparty_example",
      "subscriberAddress": "So11111111111111111111111111111111111111112",
      "subscriberTokenAccount": "So11111111111111111111111111111111111111112",
      "subscriptionPda": "So11111111111111111111111111111111111111112",
      "subscriptionAuthorityAddress": "So11111111111111111111111111111111111111112",
      "authorizationSignature": "example",
      "status": "active",
      "currentPeriodStartAt": "2025-01-01T00:00:00.000Z",
      "nextCollectionDueAt": "2025-01-01T00:00:00.000Z",
      "cancelAt": "2025-01-01T00:00:00.000Z",
      "canceledAt": "2025-01-01T00:00:00.000Z",
      "createdBy": "example",
      "createdAt": "2025-01-01T00:00:00.000Z",
      "updatedAt": "2025-01-01T00:00:00.000Z"
    }
  },
  "meta": {
    "requestId": "req_example",
    "timestamp": "2025-01-01T00:00:00.000Z"
  }
}

Error responses use the standard error shape.

Is this page helpful?