The following steps detail the process flow that needs to occur during the processing of a generic payment:
The Assisted Selling app requests the payment properties associated with an order by invoking a new endpoint on the Commerce Cloud server.
The Commerce Cloud server Endpoint parses the information received from Assisted Selling, extracts additional information from the request headers (Price group, site id and locale), generates JSON to transmit to the Webhook. (this JSON is validated against JSON schema), and then invokes Webhook with the payload generated.
The external system receives the payment properties request and responds with JSON.
The Commerce Cloud server receives the response from the Webhook and validates against JSON Schema.
The Commerce Cloud server responds to the request from Assisted Selling with the data received from the Webhook, assuming it passed validation.
Assisted Selling parses this response and interprets it in order to display custom payment fields on its payment screen, and pass along any information to the Commerce Cloud server on the create order call.
The sections that follow detail what you will need to do in order to complete this process flow.