payload, initialise the component and capture callbacks of the process.
At Web Checkout Flex, the payment method is chosen within the form. That’s why
payload reuses the structure of API from authorization sending payment_method: {} at the root object.Overview
1. Construction of payload
It arms information about the operation, buyer, billing and sending using the same basic contract PayIn.
2. Initiate component
It creates an instance of
FlexPaymentFormssend nonce, payload and defines how to display the form.3. Capture callbacks
Process
responseCallback, trackingCallback and onErrorCallback by the result of the flow.Recommended sequence
1
Building the payload
Prepare the operation with the same request for authorisation ecommerce, including
payment_method: {} because Flex It will solve the actual method on screen.2
It creates an instance
Initiates
FlexPaymentForms with nonce and payload already validated from backend.3
Mount form
Use
paymentForm.init(...) to render the component within the component DOM where you want to show the check out.4
Processes the response
Take the result from
responseCallback(response) and use that JSON as a main reference of the front.5
Confirm from backend
To close the order or mark payment as an end, complete with API Consultation and if applicable with Notifications.
What answer to take
The object
response received at responseCallback reuses the contract of API of Authorisation - ecommerce. The exact reference depends on how the client chose within Flex.Flow guides
Construction of payload
Check the complete structure of the request that Flex He needs to start an operation.
Initiate component
Learn how to create an instance, define visible methods and give up the form.
Capture callback functions
He understands how to read
responseCallback and how to relate with each PayIn.API Consultation
Use as second backend validation before confirming final result to business.

