Create a payment link.
Create a payment link.
https://staging.softsolz.uk/api/v1/services/payments/payment-linksRecent Requests
Log in to see full request historyHeaders
AuthorizationstringrequiredBearer token: `Bearer sk_live_...` (or `sk_test_...` for sandbox). A login token will not work here.
Idempotency-KeystringOptional idempotency key for safe retries.
Body Params
titlestringLink title / Stripe line-item name.
currencystringISO 4217 3-letter currency code. Stored upper-cased.
kindstringSurface type. Any value other than "link" is treated as "button".
amount_centsinteger | nullFixed charge in MINOR units (cents/pence). When set, the link is fixed-amount and the minimum is ignored.
min_amount_centsinteger | nullMinimum allowed amount in MINOR units for a custom-amount link (used only when amount_cents is omitted).
descriptionstring | nullOptional longer description (max 2000 chars).
show_business_namebooleanShow the tenant business name on the hosted page.
button_colorstring | nullHex button background colour.
button_text_colorstring | nullHex button text colour.
Response
Response Body
idintegerPayment link id.tokenstringOpaque public token used in hosted-pay links and checkout-session creation.kindstringSurface type. "button" embeds on a page; "link" is a shareable hosted link.titlestringDisplay title / Stripe line-item name.descriptionstring | nullOptional longer description.amount_centsinteger | nullFixed charge amount in minor units, or null when the customer chooses the amount.min_amount_centsinteger | nullMinimum allowed amount in minor units for custom-amount links; null when a fixed amount is set.currencystringISO 4217 currency code, upper-cased.activebooleanWhether the link can currently take payments.show_business_namebooleanWhether the tenant business name is shown on the hosted page.button_colorstring | nullHex button background colour, or null.button_text_colorstring | nullHex button text colour, or null.paid_countintegerNumber of successful payments recorded against this link.created_atstringCreation timestamp.updated_atstringLast-update timestamp; round-trip as expected_updated_at for optimistic concurrency on PATCH.Request
import { SoftSolz } from '@softsolz/sdk';
const client = new SoftSolz({ apiKey: process.env.SOFTSOLZ_API_KEY });
const result = await client.payments.createPaymentLink({});console.log(result);Credentials
Sent as a Bearer token. Stored only in your browser.
Response · 201
{ "data": { "id": 0, "token": "string", "kind": "string", "title": "string", "description": "string", "amount_cents": 0, "min_amount_cents": 0, "currency": "string", "active": true, "show_business_name": true, "button_color": "string", "button_text_color": "string", "paid_count": 0, "created_at": "string", "updated_at": "string" }}