payload of Flex reuses the structure of API of Authorisation - ecommercewith an important difference: payment_method at the root object but as an empty object {}, because the client will choose the method within the form.
Think about this step as preparing the request for
POST /charges for Flex. What you build here will be the basis of the operation that you will end up reading at responseCallback(response).What’s preserved and what’s changing
Same base PayIn
Keep
action, channel, merchant_code, merchant_operation_number, payment_method and payment_details.Change Flex
In Flex,
payment_method travels as {} empty because the actual method resolves in the front as the user select.Payload structure
Expand each block to check which fields belong to each level of the object that you will send to Flex.Retirement
Retirement
Contains general information about the operation and links with
payment_detailswhere she travels the details of the collection.Item payment_details
Item payment_details
Gather the buyer’s amount, currency and operating subobjects, billing and sending.
Item payment_details
Item payment_details
Define the optional data of the client that makes the purchase useful for identification and risk context.
Item payment_details
Item payment_details
Contains required billing data that Flex necessary to process the operation.
Item payment_details
Item payment_details
It includes sending information as soon as your business flow needs to complement the operation.
For S /. 10.50 you should send
1050 and currency Value 604 for Soles.In Flexand the root matter should be explicitly included
payment_method: {} but the final method has not been selected by the user.Full example
Next step
Initiate component
Use this
payload with you nonce to create an instance FlexPaymentForms.API of Authorisation - ecommerce
Take this reference as a basic contract of the request that you are re-using at Flex.

