Get payment request link

Returns the token behind a payment request's hosted payment link, /pay/{publicToken}.

GET/v1/payments/requests/{paymentRequestId}/linkRun in dashboard

Anyone holding it can build the request's fee-sponsored payment transaction, so this route requires payment_requests.manage, not payment_requests.read. Another project's request returns 404. The token is returned whatever the request's status.

Requires an API key with the payment_requests.manage action.

Path parameters

  • paymentRequestId · string · required · min length 1 · example preq_example

    SDP payment request ID.

Headers

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

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

Responses

  • 200 Payment request link token

    • data · object · required

      A payment request's link token.

      • id · string · required · example preq_example

        SDP payment request ID.

      • publicToken · string · required · example example-public-token

        Token behind the request's hosted payment link, /pay/{publicToken}. Anyone holding it can build the request's fee-sponsored payment transaction, so share it only with the payer. Reads never return it; get it again with GET /v1/payments/requests/{paymentRequestId}/link.

    • 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 payment_requests.manage 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/requests/preq_example/link' \
  -H "Authorization: Bearer $SDP_API_KEY"

Example responses

{
  "data": {
    "id": "preq_example",
    "publicToken": "example-public-token"
  },
  "meta": {
    "requestId": "req_example",
    "timestamp": "2025-01-01T00:00:00.000Z"
  }
}

Error responses use the standard error shape.