Skip to main content

PaymentFormProps

SolvaPay SDK v1.0.0


SolvaPay SDK / react/src / PaymentFormProps

Interface: PaymentFormProps

Defined in: packages/react/src/types/index.ts:337

Payment form props - simplified and minimal

Properties

buttonClassName?

optional buttonClassName: string

Defined in: packages/react/src/types/index.ts:370

Optional className for the submit button


className?

optional className: string

Defined in: packages/react/src/types/index.ts:366

Optional className for the form container


onError()?

optional onError: (error) => void

Defined in: packages/react/src/types/index.ts:354

Callback when payment fails

Parameters

error

Error

Returns

void


onSuccess()?

optional onSuccess: (paymentIntent) => void

Defined in: packages/react/src/types/index.ts:350

Callback when payment succeeds

Parameters

paymentIntent

PaymentIntent

Returns

void


planRef

planRef: string

Defined in: packages/react/src/types/index.ts:342

Plan reference to checkout. PaymentForm handles the entire checkout flow internally including Stripe initialization and payment intent creation.


productRef?

optional productRef: string

Defined in: packages/react/src/types/index.ts:346

Product reference. Required for processing payment after confirmation.


returnUrl?

optional returnUrl: string

Defined in: packages/react/src/types/index.ts:358

Return URL after payment completion. Defaults to current page URL if not provided.


submitButtonText?

optional submitButtonText: string

Defined in: packages/react/src/types/index.ts:362

Text for the submit button. Defaults to "Pay Now"