Create a Stripe payment link for an invoice

Generate a secure payment link via Stripe for a specific invoice. You need to provide the invoice ID and desired return and cancel URLs.

Billing & Payments Payments

Context

Used in the dashboard

/cart/checkout /cart/en/checkout /billing

Workflow links

Requires

Headers

Accept Example
Content-Type Example

Body

required
application/json
amount number · Example: 1608.75
cancelUrl string required · Example: https://cloud.hostup.se/billing?invoice=51910
invoiceId string · Example: 51910
locale string · enum required · Example: sv
en
sv
mode string · enum required · Example: payment
bank_transfer_payment
payment
setup
requestId string · Example: 2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba
returnUrl string required · Example: https://cloud.hostup.se/billing?paid=1&invoice=51910

Responses

200
data object required
data.paymentType string · enum required · Example: card
bank_transfer
card
data.sessionId string required · Example: cs_live_EXAMPLE_SESSION
data.sessionUrl string required · Example: https://example.com/c/pay/cs_live_EXAMPLE_SESSION
requestId string required · Example: 2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba

Unique request identifier (UUID).

success boolean required · Example: true

True for successful responses.

timestamp string required · Example: 2026-02-10T00:00:00.000Z

ISO 8601 timestamp (UTC).

500
code string required · Example: INTERNAL_ERROR

Machine-readable error code.

error string required · Example: Internal Server Error

HTTP status title (e.g. 'Bad Request').

message string required · Example: An unexpected error occurred

Human-readable message.

requestId string required · Example: 2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba

Unique request identifier (UUID).

timestamp string required · Example: 2026-02-10T00:00:00.000Z

ISO 8601 timestamp (UTC).

POST https://cloud.hostup.se/api/billing/stripe-checkout
For AI assistants
cURL
curl -X POST "https://cloud.hostup.se/api/billing/stripe-checkout" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "payment",
    "invoiceId": "51910",
    "returnUrl": "https://cloud.hostup.se/billing?paid=1&invoice=51910",
    "cancelUrl": "https://cloud.hostup.se/billing?invoice=51910",
    "locale": "sv"
  }'
Response
{
  "success": true,
  "timestamp": "2026-02-10T00:00:00.000Z",
  "requestId": "2121ae20-bd9d-41e9-aeeb-5dd1dd1a24ba",
  "data": {
    "sessionId": "cs_live_EXAMPLE_SESSION",
    "sessionUrl": "https://example.com/c/pay/cs_live_EXAMPLE_SESSION",
    "paymentType": "card"
  }
}
Request Body Example 1
{
  "mode": "payment",
  "invoiceId": "51910",
  "returnUrl": "https://cloud.hostup.se/billing?paid=1&invoice=51910",
  "cancelUrl": "https://cloud.hostup.se/billing?invoice=51910",
  "locale": "sv"
}