Get payment request link
Returns the token behind a payment request's hosted payment link, /pay/{publicToken}.
GET/Run 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 · examplepreq_exampleSDP payment request ID.
Headers
-
x-project-id·string· min length 1 · exampleprj_exampleRequired for dashboard sessions. API keys use their assigned project.
Responses
-
200Payment request link token-
data·object· requiredA payment request's link token.
-
id·string· required · examplepreq_exampleSDP payment request ID.
-
publicToken·string· required · exampleexample-public-tokenToken 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 withGET /v1/payments/requests/{paymentRequestId}/link.
-
-
meta·object· requiredResponse metadata.
-
requestId·string· required · min length 1 · examplereq_exampleRequest identifier for tracing.
-
timestamp·string· required · formatdate-time· example2025-01-01T00:00:00.000ZISO 8601 timestamp.
-
-
-
400Bad Request-
error·object· requiredStandard error payload.
-
code·string· requiredMachine-readable error code.
-
message·string· requiredHuman-readable error message.
-
details·objectOptional error details for debugging.
*·any
-
-
meta·object-
requestId·string· min length 1 · examplereq_exampleRequest identifier for tracing.
-
-
-
401UnauthorizedSame fields as
400. -
403Forbidden. Requires thepayment_requests.manageaction: an API key must hold it (a module'smanageorexecutealso covers itsread), and a signed-in member's organization role must include it. Without it the error is INSUFFICIENT_PERMISSIONS anderror.details.actionnames the action. Any other 403 names its own reason.Same fields as
400. -
404Not FoundSame fields as
400. -
500Internal Server ErrorSame 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.