SpawnCustomerLevelUIChildCUWOOperation
SpawnCustomerLevelUIChildCUWOOperation
is an operation of the "parent/child CUWOs" API and allows a CUWO to spawn a customer-level UI CUWO.
This operation can only be used from a limited set of CUWOs:
- ConfigureLineItem
- AuthorizeOrCapturePayment
- GrantPayout
The device the CUWO is spawned on is either configured for the current device or must be selected by the merchant (a platform UI will be shown with a list of suitable devices at the current service location).
The message is defined as follows:
/**
* Operation of the "parent/child CUWOs" API that spawns a customer-level UI CUWO
* on another device.
*/
class SpawnCustomerLevelUIChildCUWOOperation extends AbstractMessage {
readonly "@type" : string = "n4.cuwo.messages.parentchild.SpawnCustomerLevelUIChildCUWOOperation";
/**
* The ID of the operation message.
*/
public id : string;
/**
* The start URL of the CUWO to spawn.
*/
public cuwoStartURL : string;
/**
* Optional data to be passed to the spawned CUWO.
*/
public parameterData? : string;
}
Here's an example NFON:
{
"@type": "n4.cuwo.messages.parentchild.SpawnCustomerLevelUIChildCUWOOperation",
"id": "0e5e526c-35a2-11ec-8d3d-0242ac130003",
"cuwoStartURL": "https://cuwo.example.com/mycuwo",
"parameterData": "S6TLybt2e/BUlV6dqVwuWA=="
}
Success result
On success, the OperationFinished
message will contain a SpawnChildCUWOSuccess
result holding the handle of the spawned CUWO. That handle can then be used for other operations (e.g., PassMessageToCUWOOperation
) to address the spawned CUWO.
The structure is defined as follows:
/**
* Data structure returned by a "spawn ... cuwo" operation of the
* "parent/child CUWOs" API on success.
*
* Holds the handle of the spawned CUWO.
*/
class SpawnChildCUWOSuccess {
readonly "@type" : string = "n4.cuwo.messages.parentchild.results.SpawnChildCUWOSuccess";
/**
* The handle of the spawned CUWO.
*/
public childCUWOHandle : string;
}
Failure result
On failure, the OperationFinished
message will contain a SpawnChildCUWOFailure
result holding an error code and a debug message.
The structure is defined as follows:
/**
* Data structure returned by a "spawn ... CUWO" operation of the
* "parent/child CUWOs" API on failure.
*
* Holds the failure code and an optional debug message.
*/
class SpawnChildCUWOFailure {
readonly "@type" : string = "n4.cuwo.messages.parentchild.results.SpawnChildCUWOFailure";
/**
* A code indicating the reason for the failure.
*/
public failureCode : FailureCode;
/**
* A debug message providing more information about the failure.
*/
public debugMessage? : string;
}