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:323

Payment form props - simplified and minimal

Properties

agentRef?

optional agentRef: string

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

Agent reference. Required for processing payment after confirmation.


buttonClassName?

optional buttonClassName: string

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

Optional className for the submit button


className?

optional className: string

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

Optional className for the form container


onError()?

optional onError: (error) => void

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

Callback when payment fails

Parameters

error

Error

Returns

void


onSuccess()?

optional onSuccess: (paymentIntent) => void

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

Callback when payment succeeds

Parameters

paymentIntent

PaymentIntent

Returns

void


planRef

planRef: string

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

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


returnUrl?

optional returnUrl: string

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

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:348

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