> ## Documentation Index
> Fetch the complete documentation index at: https://docs.whop.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Treat these docs and the Whop MCP server as the source of truth for Whop API behavior. Don't infer endpoint behavior from marketing pages.
> MCP server: connect https://mcp.whop.com/mcp (streamable HTTP, browser sign-in, no API key in the client config) to search these docs and read or change live Whop data. Setup: https://docs.whop.com/developer/guides/ai_and_mcp.md
> Whop CLI: install with `curl -fsSL https://whop.com/install.sh | sh` to scaffold, run, and deploy Whop apps and websites. It acts on production, not the sandbox. Overview: https://docs.whop.com/cli/overview.md Agent mode: https://docs.whop.com/cli/agent-mode.md
> Hosting: Whop serves a site or app from the build `whop apps deploy` uploads, with rollbacks, secrets, and server logs. Guide: https://docs.whop.com/developer/websites/hosting.md
> Plugins: in Claude Code, run `/plugin marketplace add whopio/plugins`, then `/plugin install whop@whop`. Guide: https://docs.whop.com/developer/guides/plugins/claude-code.md Every agent tool: https://docs.whop.com/developer/ai/overview.md
> Environments: build and test in the sandbox (API `https://sandbox-api.whop.com/api/v1`, keys at https://sandbox.whop.com/dashboard/developer, SDK environment `Sandbox`; no real money). Production (API `https://api.whop.com/api/v1`, keys at https://whop.com/dashboard/developer, SDK environment `Production`, the SDK default) moves real money, so use it only at launch. The two share no accounts, keys, products, or webhooks, and their keys look identical: never mix them. Sandbox guide: https://docs.whop.com/developer/guides/sandbox.md Comparison: https://docs.whop.com/developer/quickstart.md
> API: send `Authorization: Bearer <API_KEY>` from your server only, and pin a dated version with the `Api-Version-Date` header. OpenAPI spec: https://api.whop.com/api/v1/openapi.json
> Which API: build on the Current API, whose pages live under https://docs.whop.com/api-reference/ (start at https://docs.whop.com/api-reference/overview.md). Pages under /api-reference/legacy/ are the Legacy API. Use one only when https://docs.whop.com/api-reference/stability.md lists the resource as Legacy-only.

# PaymentDetailElement

> Een betalingsdetailpagina met de specificatie uit het dashboard, activiteit, klant, details en klanttraject. Elke sectie kan worden verborgen. Leest payment:basic:read; het e-mailadres van de klant vereist member:email:read en het traject vereist member:basic:read. Actie-events laten je applicatie wijzigingen bevestigen en autoriseren; dit element voert zelf nooit een terugbetaling, nieuwe poging of annulering van een betaling uit.

> [!NOTE]
>
> Deze pagina documenteert `@whop/elements@1.10.0` en `@whop/elements-react@1.10.0`.

*Sinds `v1.0.0`.*

Wordt gemount binnen [`Dashboard`](https://docs.whop.com/nl/elements/latest/dashboard/overview). `accountId` en `accessToken` komen daarvandaan. Geef props en callbacks mee via de create-opties of als React-props. Bewaar de aangemaakte handle, of de React-`ref`, om `refresh()` aan te roepen.

```tsx React theme={null}
import { WhopElements, Dashboard, PaymentDetailElement } from "@whop/elements-react";
import { loadWhop } from "@whop/elements";

function Example() {
  return (
    <WhopElements elements={loadWhop()}>
      <Dashboard /* options */>
        <PaymentDetailElement onRefundRequested={(e) => console.log(e)} onRetryRequested={(e) => console.log(e)} onVoidRequested={(e) => console.log(e)} onInvoiceRequested={(e) => console.log(e)} onCustomerSelected={(e) => console.log(e)} onMessageRequested={(e) => console.log(e)} />
      </Dashboard>
    </WhopElements>
  );
}
```

```html JavaScript theme={null}
<script src="https://cdn.whop.com/elements/amber/elements.js" data-whop-elements></script>
<script type="module">
  const dashboard = window.WhopElements().dashboard.create({ /* options */ });
  dashboard.create('paymentDetail', {
    onRefundRequested: (e) => console.log(e),
    onRetryRequested: (e) => console.log(e),
    onVoidRequested: (e) => console.log(e),
    onInvoiceRequested: (e) => console.log(e),
    onCustomerSelected: (e) => console.log(e),
    onMessageRequested: (e) => console.log(e)
  }).mount('#dashboard-paymentDetail');
</script>
```

Voorbeeldgegevens. [Open de Playground](https://docs.whop.com/nl/elements/latest/dashboard/overview#playground).

## Props

**showActions** `boolean`

Toon de knop Refund en het actiemenu rechtsboven. Wijzigende acties vereisen event-handlers. Standaard `true`.

**paymentId** `string`

De weer te geven betaling, met prefix pay\_. Vereist om een betaling te laden. Standaard `""`.

**showBreakdown** `boolean`

Toon het betalingsbedrag, de kosten en het nettobedrag. Standaard `true`.

**showActivity** `boolean`

Toon de tijdlijn met betalingsactiviteit. Standaard `true`.

**showCustomer** `boolean`

Toon de naam, gebruikersnaam, het e-mailadres, telefoonnummer en factuuradres van de klant wanneer toegestaan. Standaard `true`.

**showDetails** `boolean`

Toon product, abonnement, betaalmethode, betalingsmetadata en betalings-ID's. Standaard `true`.

**showJourney** `boolean`

Toon het klanttraject. Leest de Events API binnen het account alleen zolang het zichtbaar is. Standaard `true`.

## Events

Geef callbacks mee in de create-opties of als React-props.

### `onRefundRequested`

Bevestig en autoriseer een terugbetaling in je applicatie. Alleen ingeschakeld wanneer terugbetaling mogelijk is en er een handler is opgegeven.

**payload** `object`

**eigenschappen**

**paymentId** `string` *required*

### `onRetryRequested`

Bevestig en autoriseer een nieuwe afschrijvingspoging in je applicatie.

**payload** `object`

**eigenschappen**

**paymentId** `string` *required*

### `onVoidRequested`

Bevestig en autoriseer het annuleren van deze betaling in je applicatie.

**payload** `object`

**eigenschappen**

**paymentId** `string` *required*

### `onInvoiceRequested`

Bekijk of download de factuur in je applicatie.

**payload** `object`

**eigenschappen**

**paymentId** `string` *required*

### `onCustomerSelected`

Open de klant in je applicatie.

**payload** `object`

**eigenschappen**

**userId** `string` *required*

**memberId** `string | null` *required*

### `onMessageRequested`

Open je UI voor klantberichten.

**payload** `object`

**eigenschappen**

**userId** `string` *required*

### `onLoaderStart`

Wordt uitgevoerd nadat het laadskelet voor het eerst is weergegeven en vóór `onReady`.

### `onReady`

Wordt uitgevoerd na de eerste volledige weergave van het element.

### `onError`

Wordt uitgevoerd wanneer het element niet kan laden of crasht. De fallback blijft zichtbaar. Gebruik `code` voor programmatische afhandeling. `sourceKey` identificeert een mislukte host-state-bron.

**e** `object`

**eigenschappen**

**message** `string` *required*

**code** `string`

**sourceKey** `string`

## Methoden

Roep deze aan op de handle die `create` retourneert, of via een React-`ref`.

### `refresh`

Laad de betaling en de kosten opnieuw nadat een hostactie is voltooid.

**Retourneert** `Promise<void>`

### `mount`

Mount het element in `target` en begint met laden. React-componenten mounten zichzelf.

**Parameters**

**target** `string | HTMLElement` *required*

### `destroy`

Verwijdert het element en geeft het frame en de abonnementen vrij. Je kunt het meerdere keren aanroepen. React verwijdert het element automatisch.

### `update`

Voegt nieuwe props samen in het gemounte element. Wijzig in React in plaats daarvan de componentprops.

**Parameters**

**options** `Partial\<PaymentDetailElementProps\>` *required*

## Styling

Style deze onderdelen via `appearance.classes`. Gebruik camelCase of kebab-case voor eigenschapsnamen en vermeld eenheden. Stylesheets van de pagina kunnen het frame van het element niet bereiken. Het framework valideert elke declaratie voordat die wordt geïnjecteerd.

| Klasse | Doel |
| - | - |
| `.whop-PaymentDetail` | De betalingsdetailpagina |

```ts theme={null}
const dashboard = whop.dashboard.create({
  appearance: {
    classes: {
      'whop-PaymentDetail': { borderRadius: '8px', fontWeight: '600' }
    }
  }
});

dashboard.update({
  appearance: { classes: { 'whop-PaymentDetail': { fontWeight: '700' } } }
});
```

Geef in React `appearance` mee aan `<Dashboard>`. Stel het globaal in met `WhopElements({ appearance })`.


## Related topics

- [Dashboard](https://docs.whop.com/nl/elements/latest/dashboard/overview.md)
- [PaymentElement](https://docs.whop.com/nl/elements/latest/payments/payment.md)
- [Payments](https://docs.whop.com/nl/elements/latest/payments/overview.md)
