The Establish Data object consolidates the merchant credentials, transaction details, and customer data needed to authorize transactions securely and reliably.
With a correctly configured Establish Data object, you’ll be able to launch the Trustly UI (Lightbox or Select Bank Widget), and allow your customers to authorize payments or share bank data. Once the workflow is complete, you’re ready to handle payments or retrieve data with the Trustly APIs.
To integrate the JavaScript SDK (Web) or Mobile SDK required to launch the Trustly UI, see Integrate the client-side SDK.
The establishData object is passed to the selectBankWidget or establish functions and is used to initialize the Bank Authorization for further processing.
The primary method for initiating an authorization transaction is through the built-in methods of the Trustly UI libraries: establish and selectBankWidget. These methods both require the Establish Data as a parameter.
The Establish Data object includes all required and optional parameters, grouped for clarity. Optional parameters may be required based on the paymentType and merchant conditions.
Note: Most payment properties (
amount,currency,description,customer) are required ifpaymentTypeis set toDeferred,Disbursement,Instant, orRecurring.
The following objects define the nested data structures required for submitting customer details, verification data, and recurrence rules.
See Capture Transaction for more information on Recurring Payments.
Additional data used for less common scenarios can be provided in the Metadata object.
The universalLink and deepLinkStrategy parameters are optional if you have already configured default values in the Admin Console. Any values provided here will override the defaults.
If configured for Trustly In-Person, the CLC object is required.