Hepsipay
The Hepsipay component integrates the Hepsipay iframe-based payment system into your checkout flow. It handles validation, SDK initialization, payment triggering, and success callbacks.
Installation Method
You can use the following command to install the extension with the latest plugins:
npx @akinon/projectzero@latest --pluginsProps
initOptionsOverrides
Partial<InitOptions>
Optional
Object to override default Hepsipay SDK init() options.
agreementCheckbox
React.ReactElement
Optional
Checkbox component (e.g., for user agreements or KVKK) connected to the form.
translations
Record<string, HepsipayTranslationsProps>
Optional
Object for customizing UI texts like placeholders, warnings, and error messages.
customUIRender
(props: CustomUIRenderProps) => React.ReactNode
Optional
Custom UI render function. If provided, it overrides the default UI.
CustomUIRender Parameters
A function to fully customize the Hepsipay component's appearance. If provided, the default UI will not be shown; instead, the JSX returned by this function will be rendered.
onSubmit
() => void
Callback to trigger payment when form is submitted.
control
any
Control object from react-hook-form, used to bind form inputs.
errors
any
Error object from react-hook-form, used for validation feedback.
frameUrl
string
URL of the Hepsipay iframe, provided from backend context data.
InitOptionsOverrides
initOptionsOverrides is an object used to partially override the default settings passed to the Hepsipay SDK's init function. This allows customization of many options such as iframe behavior and appearance, as well as callback functions.
frameUrl
string
Yes
The URL of the payment iframe
frameDivId
string
No
The ID of the HTML div where the iframe will be embedded.
paymentStatusCallback
(isPaymentAllowed: boolean) => void
No
Called when the payment status changes.
frameFailureCallback
() => void
No
Called if the iframe fails to load or an error occurs.
onPaymentSuccessCallback
(payload: any) => void
No
Callback function called when the payment is successfully completed.
maxHeight
string
No
Maximum height for the iframe (e.g., '800').
disableDynamicHeight
boolean
No
Enables or disables dynamic height adjustment for the iframe.
showFramePaymentButton
boolean
No
Shows or hides the payment button inside the iframe.
useApiCallOnSuccessCallback
boolean
No
Determines whether to perform an API call on payment success.
selectedPaymentInfoCallback
(payload: any) => void
No
Called when the selected payment information changes.
overrideFontFamily
string
No
Custom font family to be used inside the iframe.
hideHeader
boolean
No
Shows or hides the header section of the iframe.
Default Translations
Update Payment Step
File Path:
Usage Examples
Default Usage
File Path:
Custom UI Render Usage
Last updated
Was this helpful?

