Skip to content

PAYMENT_SETUP

Prepares payment processing.

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 '{
  "type": "PAYMENT_SETUP",
  "payload": {
    "clientId": "<UUID of the client ID>",
    "quoteIds": [
      "<UUID of the quote request ID>"
    ],
    "selectedPaymentPlans": {
      "<UUID of the quote request ID>": "FULL_PAYMENT"
    }
  }
}'
JSON
{
  "type": "PAYMENT_SETUP",
  "payload": {
    "clientId": "<UUID of the client ID>",
    "quoteIds": [
      "<UUID of the quote request ID>"
    ],
    "selectedPaymentPlans": {
      "<UUID of the quote request ID>": "FULL_PAYMENT"
    }
  }
}

Request Fields#

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

Payload Fields#

PropertyRequiredDescription
clientIdNoUUID of the client.
quoteIdsYesArray of quote UUIDs to charge for. This value is returned as requestId when retrieving quotes, learn more here.
selectedPaymentPlansNoMap of quote UUID to desired payment plan. Keys must match the UUIDs in quoteIds.

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 returns metadata.paymentOptions keyed by quote request ID and the updated setup payload under metadata.PAYMENT_SETUP. When selected plans require payment, that payload includes the created session identifiers and provider fields. If no payment is needed, check its paymentRequired flag. Save the trigger request ID for the later policy-creation flow.

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.