checkout/checkout_types library
Types for CofeeCheckout, mirroring the options and payloads of the
CoFee Checkout web SDK (@cofee/checkout-web-sdk).
Classes
- CheckoutDismissed
-
Checkout was closed without completing payment (web SDK
modal.ondismiss). -
CheckoutEvent<
T extends CheckoutResult> - Events accepted by CofeeCheckout.on and CofeeCheckout.off. The type parameter is the result the listener receives.
- CheckoutFailed
-
A payment attempt failed (web SDK
payment.failed), or checkout could not be opened (CHECKOUT_OPEN_FAILED). - CheckoutFailureError
- Error details inside a CheckoutFailed.
- CheckoutModalOptions
-
Modal behaviour, mirroring the web SDK's
modaloption. - CheckoutResult
- Outcome of a payment. CofeeCheckout.open returns one when checkout closes, and CofeeCheckout.on listeners receive one per event.
- CheckoutSuccess
-
The payment succeeded (web SDK
handler/payment.success). - CheckoutTheme
- Theme for the checkout UI and its loading screen.
- CofeeCheckoutOptions
- Merchant settings for CofeeCheckout, shared by every payment. The order id is passed to CofeeCheckout.open. The amount comes from the order on CoFee's side.
Enums
- CheckoutCtaVariant
-
Fill of the checkout's solid buttons, such as Pay (web SDK
theme.ctaVarient). The v2 UI only. - CheckoutEnvironment
- Which CoFee checkout host the overlay loads.
- CheckoutUiVersion
- Payment gateway UI version. Omit for v1.