Skip to content

PAYMENT_COLLECT_SETUP

Prepares payment processing for existing policy

Submit this event using Firing an Event. Product configuration and enabled actions determine the workflow behavior. Use identifiers and snapshots from the same environment.

Request payload#

HTTPPOST
POST https://api.{ENV}.dais.com/ioi/v3/event/fire
cURL
curl --location --request POST 'https://api.{ENV}.dais.com/ioi/v3/event/fire' \
--header 'Authorization: Basic <Base64-encoded API key and secret>' \
--header 'Content-Type: application/json' \
--data-raw '{
  "lineId": "<UUID of the product ID>",
  "type": "PAYMENT_COLLECT_SETUP",
  "payload": {
    "policyId": "<UUID of the policy ID>",
    "clientId": "<UUID of the client ID>",
    "quoteId": "<UUID of the quote request ID>",
    "documents": [],
    "totalAmount": 525000
  }
}'
JSON
{
  "lineId": "<UUID of the product ID>",
  "type": "PAYMENT_COLLECT_SETUP",
  "payload": {
    "policyId": "<UUID of the policy ID>",
    "clientId": "<UUID of the client ID>",
    "quoteId": "<UUID of the quote request ID>",
    "documents": [],
    "totalAmount": 525000
  }
}

Request Fields#

See the shared event envelope. Set type to PAYMENT_COLLECT_SETUP and provide the payload below.

Payload Fields#

Required fields include the inputs used by this event's built-in action. Configured actions can require additional data.

PropertyRequiredDescription
policyIdYesTarget policy to collect a payment for.
clientIdNoUUID of the client who owns the policy identified by policyId.
quoteIdNoUUID of the original quote associated with the policy identified by policyId.
documentsNoList of documents related to the event.
totalAmountYesDecimal payment amount; units depend on the payment integration.

Response#

This example illustrates the common trigger response structure. Action counts and metadata depend on the actions that run; action-specific result fields are described where applicable.

JSON
{
  "triggerRequestId": "<UUID of the trigger request ID>",
  "executedActionCount": 0,
  "expectedResponseCount": 0,
  "metadata": {}
}

The built-in action creates a payment session and stores the updated payload under metadata.PAYMENT_COLLECT_SETUP. It fills clientSecret, paymentSessionId, totalAmount, session metadata, and publishKey when the provider supplies one. Use those returned values for the payment flow; the request does not need to supply them in advance.

Response Fields#

PropertyDescription
triggerRequestIdUUID identifying this trigger execution.
executedActionCountNumber of actions reported as executed.
expectedResponseCountNumber of expected action responses.
metadataAction-specific results; may be empty.

See Firing an Event for execution modes and response handling.