> For the complete documentation index, see [llms.txt](https://developer.firmhouse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.firmhouse.com/sdks/firmhouse-sdk/reference/functions/build-adyen-checkout-options.md).

# Function: buildAdyenCheckoutOptions()

```ts
function buildAdyenCheckoutOptions(session, entry?): AdyenCheckoutOptions;
```

Builds the options to pass to `AdyenCheckout` for a Firmhouse payment session.

## Parameters

### session

[`FirmhouseAdyenPaymentSession`](/sdks/firmhouse-sdk/reference/interfaces/firmhouse-adyen-payment-session.md)

Session returned by `client.payments.createAdyenSession`

### entry?

[`AdyenCheckoutEntry`](/sdks/firmhouse-sdk/reference/typealiases/adyen-checkout-entry.md) = `...`

How the checkout page was entered. Defaults to a fresh mount

## Returns

[`AdyenCheckoutOptions`](/sdks/firmhouse-sdk/reference/interfaces/adyen-checkout-options.md)

Options for `AdyenCheckout`

## Remarks

Leave `entry` out to mount Drop-in, including when re-mounting it after the customer came back from a refused payment, because that needs the session that was just created.

Pass the redirect entry only to hand the result back to Adyen with `checkout.submitDetails`, which reports the outcome to the browser sooner than the webhook does. The session id then comes from the query parameters and the session data is left out, which is what Adyen expects for a redirect result. Only do this while the payment is still open; Firmhouse confirms the payment either way.
