payment form.md

Finix.PaymentForm

Creates a Payment Form instance and renders it into a specified DOM element. Returns a Form Instance you can use to interact with the form programmatically.

Finix.PaymentForm(element, environment, application, options)
Parameter Type Required Description
element `string HTMLElement` Yes
environment string Yes Finix environment (sandbox or prod)
application string Yes Your Finix Application ID
options object No Configuration — see Options

The DOM location where the payment form renders. Pass either:

<div id="payment-form"></div>

The Finix environment to connect to. Must match the environment your Application ID belongs to.

Value Environment
"sandbox" Sandbox
"prod" Production

Your Application ID must belong to the same environment. A sandbox ID used with "prod" (or vice versa) will fail.

Your Finix Application ID, assigned when you create your account. Application IDs can exist in both Sandbox and Prod environments — use the one that matches your chosen environment.

Pass an options object to configure payment methods, address fields, and callbacks. Providing onSubmit automatically renders a submit button inside the form.

See Options for all configuration properties, and Callbacks for the full callback API.