List subscription collection attempts

Lists collection attempts for a recurring-payment subscription.

GET/v1/payments/subscriptions/{subscriptionId}/collection-attemptsRun 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.

Query parameters

  • status · string · one of pending, processing, confirmed, failed, skipped · example pending

    Collection attempt status.

  • page · integer · greater than 0 · default 1

  • pageSize · integer · min 1 · max 100 · default 20

Headers

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

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

Responses

  • 200 Collection attempt list

    • data · object · required

      Collection attempt list response payload.

      • collectionAttempts · object[] · required

        • id · string · required · example psca_example

          Collection attempt ID.

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

          Organization identifier.

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

          Project identifier.

        • subscriptionId · string · required

          Subscription ID.

        • transferId · string | null · required · min length 1 · example xfr_example

          Payment transfer record ID when linked.

        • token · string · required

          Token mint or normalized token identifier.

        • amount · string · required · example 100.00

          Token amount in UI units (decimal string).

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

          ISO 8601 timestamp.

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

          ISO 8601 timestamp.

        • status · string · required · one of pending, processing, confirmed, failed, skipped · example pending

          Collection attempt status.

        • signature · string | null · required

          Solana transaction signature.

        • error · string | null · required

          Collection error, if any.

        • metadata · object · required

          Provider/job metadata for the attempt.

          One of:

          • source: "manual"

            • recurringPaymentId · string · required

            • initiatedByKeyId · string | null · required

            • source · string · required · always manual

          • source: "automated"

            • recurringPaymentId · string · required

            • initiatedByKeyId · string | null · required

            • source · string · required · always automated

          • source: "retry"

            • recurringPaymentId · string · required

            • initiatedByKeyId · string | null · required

            • source · string · required · always retry

            • initialSource · string · required · one of manual, automated

            • transferId · string | null · required

            • error · string · required

            • retryAfterAt · string · required

          • source: "linked_transfer"

            • recurringPaymentId · string · required

            • initiatedByKeyId · string | null · required

            • source · string · required · always linked_transfer

            • initialSource · string · required · one of manual, automated

            • transferId · string · 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.

      • total · integer · required

      • page · integer · required

      • pageSize · integer · required

    • 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.

  • 400 Bad Request

    • 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.

  • 401 Unauthorized

    Same fields as 400.

  • 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 400.

  • 404 Not Found

    Same fields as 400.

  • 500 Internal Server Error

    Same fields as 400.

Example request

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

Example responses

{
  "data": {
    "collectionAttempts": [
      {
        "id": "psca_example",
        "organizationId": "org_example",
        "projectId": "prj_example",
        "subscriptionId": "subscription_example",
        "transferId": "xfr_example",
        "token": "example",
        "amount": "100.00",
        "dueAt": "2025-01-01T00:00:00.000Z",
        "attemptedAt": "2025-01-01T00:00:00.000Z",
        "status": "pending",
        "signature": "example",
        "error": "example",
        "metadata": {
          "recurringPaymentId": "recurringpayment_example",
          "initiatedByKeyId": "initiatedbykey_example",
          "source": "manual"
        },
        "createdAt": "2025-01-01T00:00:00.000Z",
        "updatedAt": "2025-01-01T00:00:00.000Z"
      }
    ],
    "total": 1,
    "page": 1,
    "pageSize": 1
  },
  "meta": {
    "requestId": "req_example",
    "timestamp": "2025-01-01T00:00:00.000Z"
  }
}

Error responses use the standard error shape.

Is this page helpful?