Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .agents/references/content-style.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ The recipes provide page structures and self-review checklists. Their editorial

Repository instructions and the implemented schema and components take precedence over generic recipe examples.

- Write plain English for external integrators. Lead with the reader's outcome or the confirmed behavior. Use active voice, sentence-case headings, descriptive links, and consistent SumUp terminology. Explain technical terms when needed.
- Write plain US English for external integrators. Lead with the reader's outcome or the confirmed behavior. Use active voice, sentence-case headings, descriptive links, and consistent SumUp terminology. Explain technical terms when needed.
- Use US spellings such as "authorization", "initialize", "behavior", "installments", and "tokenization" in authored prose, headings, and metadata. Preserve published URLs and heading fragments, code, API and SDK identifiers, HTTP headers, exact UI labels, quotations, official names, and localized legal terms. For example, keep the SDK parameter `instalments` and the API response field `artefacts`.
- Verify product claims against implementation, API schemas, SDKs, tests, or current public documentation. The recipes use the fictional product Hookline; replace its commands, values, and behavior with verified SumUp examples. Ask for missing facts only when available sources cannot resolve them.
- Use `.mdx` for website content. Documentation belongs in `src/content/docs/`, changelog entries in `src/content/changelog/`, and help entries in `src/content/help/`. Match nearby file naming and sidebar conventions.
- Check `src/content.config.ts` and the installed Nimbus docs schema before adding frontmatter. Do not copy recipe metadata such as `type` or `lastVerified` automatically, or change the schema just to match a recipe. Changelog entries use `title`, `tags`, and `publishedDate`; adapt the changelog recipe to the existing per-entry collection and routes.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ prefixes, frontmatter, images, and internal links. `npm run linkcheck` also chec
rendered link targets and fragments, rejects empty links, and requires image alt
attributes; explicitly decorative images can use `alt=""`.

Every build runs the OG, redirect, rendered-link, and agent-output checks through
Every build runs the redirect, rendered-link, and agent-output checks through
`check:site`, sharing one parsed HTML cache. The individual check commands remain
available for focused diagnosis. Website source files must use `.mdx`; the build
rejects stray `.md` files under `src/content/`.
Expand Down
2 changes: 1 addition & 1 deletion astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const head = defineNimbusConfig({
title: "SumUp Developer",
description:
"Developer documentation, guides, and APIs for building with SumUp.",
locale: "en",
locale: "en-US",
homeLabel: "Home",
github: "https://github.com/sumup/sumup-developer",
editPattern: "https://github.com/sumup/sumup-developer/edit/main/{path}",
Expand Down
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
"check:agent-docs": "node scripts/check-agent-docs.mjs",
"sync:agent-skills": "node scripts/sync-agent-skills.mjs",
"postbuild": "node scripts/publish-agent-discovery.mjs && npm run check:site",
"check:og-images": "node scripts/check-og-images.mjs",
"check:site": "node scripts/check-site.mjs",
"test:worker": "node --test tests/worker.test.mjs",
"lint:spelling": "typos src/content --config _typos.toml"
Expand Down
54 changes: 0 additions & 54 deletions scripts/check-og-images.mjs

This file was deleted.

8 changes: 1 addition & 7 deletions scripts/check-site.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,8 @@ import { renderedSite } from "./lib/rendered-site.mjs";
import { checkRedirects } from "./check-redirects.mjs";
import { checkRenderedLinks } from "./check-rendered-links.mjs";
import { checkAgentDocs } from "./check-agent-docs.mjs";
import { checkOgImages } from "./check-og-images.mjs";

const site = await renderedSite(resolve(process.argv[2] ?? "dist/client"));
for (const check of [
checkOgImages,
checkRedirects,
checkRenderedLinks,
checkAgentDocs,
]) {
for (const check of [checkRedirects, checkRenderedLinks, checkAgentDocs]) {
await check(site);
}
3 changes: 0 additions & 3 deletions scripts/lib/rendered-site.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,6 @@ export async function renderedSite(outputRoot) {
llmsUrl: document
.querySelector('link[rel="alternate"][title="LLM index"]')
?.getAttribute("href"),
ogImageUrl: document
.querySelector('meta[property="og:image"]')
?.getAttribute("content"),
canonical: document
.querySelector('link[rel="canonical"]')
?.getAttribute("href"),
Expand Down
10 changes: 10 additions & 0 deletions src/components/OpenGraphLocale.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
// Nimbus uses the HTML language tag verbatim for OG, which needs underscores.
const head = (await Astro.slots.render("default")).replace(
/(<meta\b[^>]*\bproperty="og:locale"[^>]*\bcontent=")([^"]+)(")/g,
(_match, before: string, locale: string, after: string) =>
`${before}${locale.replaceAll("-", "_")}${after}`,
);
---

<Fragment set:html={head} />
16 changes: 8 additions & 8 deletions src/content/docs/online-payments/checkouts/swift-checkout.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,9 @@ const paymentRequest = swiftCheckoutClient.paymentRequest({
});
```

This object is an analogue to the [PaymentRequest - Web APIs](https://developer.mozilla.org/en-US/docs/Web/API/PaymentRequest/PaymentRequest).
This object is an analog to the [PaymentRequest - Web APIs](https://developer.mozilla.org/en-US/docs/Web/API/PaymentRequest/PaymentRequest).

The payment request instance contains the logic related to **checking payment method availability and showing** the payment method dialogue once the user interacts with a **payment element**.
The payment request instance contains the logic related to **checking payment method availability and showing** the payment method dialog once the user interacts with a **payment element**.

### Payment Request Interface

Expand All @@ -124,7 +124,7 @@ Returns the available payment methods for a merchant. Returns a promise that res

#### `show`

Shows the payment authorization dialogue for a given payment method. It requires an object containing a `paymentMethod`, which defines the selected payment method. This method is usually used along with the `PaymentElement`'s `onSubmit` event.
Shows the payment authorization dialog for a given payment method. It requires an object containing a `paymentMethod`, which defines the selected payment method. This method is usually used along with the `PaymentElement`'s `onSubmit` event.

The `show` method resolves with a `AuthorizedPayment`, which contains the `details` shared by the user once they authorize the payment request. The property `details` contains `paymentMethod`, `contactInformation`, `shippingAddress` and may contain `shippingOptions`.

Expand All @@ -148,7 +148,7 @@ paymentRequest

#### `abort`

Terminates a payment request before it is processed. Once a payment request has been terminated using this method, the payment request will not be processed and the payment dialogue will be closed.
Terminates a payment request before it is processed. Once a payment request has been terminated using this method, the payment request will not be processed and the payment dialog will be closed.

```js
if (someCustomCheck()) {
Expand Down Expand Up @@ -292,9 +292,9 @@ paymentRequest.canMakePayment().then((isAvailable) => {

### Requesting Payment Authorization

The authorization dialogue is where the user will review the payment requested, select a payment card and a shipping address. Finally, they can authorize the payment request to be **processed**.
The authorization dialog is where the user will review the payment requested, select a payment card and a shipping address. Finally, they can authorize the payment request to be **processed**.

Using the payment element builder, configure it to `show` the payment authorization dialogue from the Payment Request instance upon the `onSubmit` event. Once the user authorizes the payment the `show` method will resolve a `PaymentResponse` containing details about the payment authorization.
Using the payment element builder, configure it to `show` the payment authorization dialog from the Payment Request instance upon the `onSubmit` event. Once the user authorizes the payment the `show` method will resolve a `PaymentResponse` containing details about the payment authorization.

```js
buttons.onSubmit((paymentMethodEvent) => {
Expand Down Expand Up @@ -401,11 +401,11 @@ paymentRequest.canMakePayment().then((isAvailable) => {

## Error Handling

The Swift Checkout SDK returns a series of Errors depending on the event that has taken place. You can use the errors to customise the user experience and communicate error causes as you see fit.
The Swift Checkout SDK returns a series of Errors depending on the event that has taken place. You can use the errors to customize the user experience and communicate error causes as you see fit.

- `PaymentRequestCancelledError` is thrown when the end user closes the open payment dialog or presses the button `esc`.

- `PaymentRequestInvalidActionError` is thrown when the end user has submitted the payment dialog and then attempted to cancel the payment. Once the payment form is submitted the payment can no longer be cancelled.
- `PaymentRequestInvalidActionError` is thrown when the end user has submitted the payment dialog and then attempted to cancel the payment. Once the payment form is submitted the payment can no longer be canceled.

- `PaymentRequestInternalError` is thrown when attempting to handle the payment request in a forbidden manner. Reasons that you may receive include the following codes, available in the `code` field of the Error object:
- `SHIPPING_CONTACT_SELECTION`
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/problem/not-authorised-token.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: Not Authorized Token
id: not-authorised-token
description: Understand the SumUp API Not Authorised Token response, common causes, and example payload for invalid token authorization.
description: Understand the SumUp API Not Authorized Token response, common causes, and example payload for invalid token authorization.
---

Indicates that the request has not been applied because it lacks valid authentication credentials for the target resource.
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/terminal-payments/readers/pin-plus.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,4 @@ PIN+ is an older paired SumUp reader that connected to mobile devices for card-p

- PIN+ is not part of the current Cloud API path.
- It was designed around phone- or tablet-connected checkout flows rather than standalone operation.
- If you are choosing new hardware today, compare it against Solo or Solo Lite before standardising on it.
- If you are choosing new hardware today, compare it against Solo or Solo Lite before standardizing on it.
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ The list of possible events:
```

- `TransactionFailed(val paymentOutput: PaymentOutput?, val tapToPayException: TapToPayException?)` - transaction failed. It might happen due to many reasons, like attestation error, backend error, card reader error, and so on. The full list of errors is described in the [Exceptions](/terminal-payments/sdks/android/reference/#exceptions) section. `PaymentOutput` param might be null if the transaction failed before reaching the backend.
- `TransactionCanceled(val paymentOutput: PaymentOutput?)` - transaction was cancelled by the user.
- `TransactionCanceled(val paymentOutput: PaymentOutput?)` - transaction was canceled by the user.
- `TransactionResultUnknown(val paymentOutput: PaymentOutput?)` - transaction result is unknown. This might happen on remote calls, when there is no response due to timeout.
- `PaymentFlowClosedSuccessfully(val paymentOutput: PaymentOutput, val shouldDisplayReceipt: Boolean = false)` - after a successful transaction, once the user dismisses the success screen (or when it is skipped via `skipSuccessScreen`), the flow closes and fires this event. The **Send receipt** button has been removed from the SDK success screen (SDK 1.1.6+); receipts must be handled by the host app if required. `shouldDisplayReceipt` is deprecated, always emitted as `false`, and will be removed in **1.1.7**.

Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/terminal-payments/testing.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ The examples above use EUR, which has two decimal places. Use the amount format

### What to Verify

- A declined payment leaves the order unpaid and does not trigger fulfilment.
- A declined payment leaves the order unpaid and does not trigger fulfillment.
- Your app shows a clear failure message and lets the customer retry or choose another payment method.
- Each retry uses a new transaction reference, and each result is matched to the correct payment attempt.
- With Cloud API, your integration waits for the final transaction result before updating the order.
Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/tools/glossary/merchant.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ Legal types are of the pattern `{country_code}.{identifier_type}`. The prefix in
| Canada (CA) | Listed public company | `ca.lpc` |
| Canada (CA) | Governmental organization | `ca.gorg` |
| Canada (CA) | Association incorporated | `ca.asinc` |
| Canada (CA) | Nonprofit or charitable organisation | `ca.npro` |
| Canada (CA) | Nonprofit or charitable organization | `ca.npro` |
| Canada (CA) | Unincorporated partnership | `ca.unincpar` |
| Canada (CA) | Incorporated partnership | `ca.pship` |
| Chile (CL) | Persona Natural | `cl.sole_trader` |
Expand Down Expand Up @@ -526,7 +526,7 @@ Legal types are of the pattern `{country_code}.{identifier_type}`. The prefix in
| United States (US) | Single Member Limited Liability Company | `us.smllc` |
| United States (US) | Corporation Incorporated | `us.corp_inc` |
| United States (US) | Professional Corporation | `us.pc` |
| United States (US) | Non-profit Organisation | `us.uba_org` |
| United States (US) | Non-profit Organization | `us.uba_org` |
| United States (US) | Sole proprietorship | `us.sole_trader` |

</SearchableTable>
Expand Down
2 changes: 1 addition & 1 deletion src/content/docs/tools/sdks/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ Prefer working from a terminal? The [SumUp CLI](/tools/cli/) provides commands f
- **[Rust](/tools/sdks/rust/)** – `sumup` crate published to crates.io with comprehensive docs at docs.rs.
- **[.NET](/tools/sdks/dotnet/)** – NuGet package `SumUp` targeting supported .NET releases.

All SDKs require valid [authorisation credentials](/tools/authorization/) and work against both sandbox and production environments. Cloud API requests also require an [Affiliate Key](/tools/authorization/affiliate-keys/). After choosing an SDK, follow its guide for installation, environment variables, and example calls.
All SDKs require valid [authorization credentials](/tools/authorization/) and work against both sandbox and production environments. Cloud API requests also require an [Affiliate Key](/tools/authorization/affiliate-keys/). After choosing an SDK, follow its guide for installation, environment variables, and example calls.

<Callout type="tip">
**Client-side options.** Looking for client-side or checkout experiences? See
Expand Down
2 changes: 1 addition & 1 deletion src/content/help/integrate-websites-with-sumup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ For **PrestaShop** users we recommend [this plugin](https://addons.prestashop.co

For **WIX** users we recommend following their [native solution](https://support.wix.com/en/article/connecting-sumup-as-a-payment-provider).

The direct integration option uses the SumUp Checkout API, intended for developer utilisation. All information can be found in our [Online Payments](/online-payments) section.
The direct integration option uses the SumUp Checkout API, intended for developer utilization. All information can be found in our [Online Payments](/online-payments) section.

:::note
For all webshop plugins and direct integration, make sure your merchant
Expand Down
31 changes: 17 additions & 14 deletions src/layouts/BaseLayout.astro
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import type { BasePageProps } from "@cloudflare/nimbus-docs/types";
import { config } from "virtual:nimbus/config";

import AgentDirective from "@components/nimbus/AgentDirective.astro";
import OpenGraphLocale from "@components/OpenGraphLocale.astro";
import SearchDialog from "@components/nimbus/SearchDialog.astro";
import WebMCP from "@components/nimbus/WebMCP.astro";

Expand Down Expand Up @@ -92,20 +93,22 @@ const llmsUrl = Astro.site ? new URL(llmsPath, Astro.site).href : llmsPath;
window.__applyPortalTheme = applyTheme;
})();
</script>
<NimbusHead
title={title}
description={description}
noindex={noindex}
markdownUrl={markdownUrl}
socialImage={socialImage}
socialImageSize={socialImageSize}
lastUpdated={lastUpdated}
head={head}
collection={collection}
entryId={entryId}
apiVersion={apiVersion}
coordinate={coordinate}
/>
<OpenGraphLocale>
<NimbusHead
title={title}
description={description}
noindex={noindex}
markdownUrl={markdownUrl}
socialImage={socialImage}
socialImageSize={socialImageSize}
lastUpdated={lastUpdated}
head={head}
collection={collection}
entryId={entryId}
apiVersion={apiVersion}
coordinate={coordinate}
/>
</OpenGraphLocale>
<WebMCP />
</head>
<body>
Expand Down
Loading
Loading