Skip to content

PAYMENT_SETUP

This event is fired after policy creation.

When and what fires this event?

If this event is defined on a product, and it has actions that are enabled:

  • Storefront: fires after a new policy has been created;
  • API: can fire this event externally on demand.

Request payload

POST: https://api.{ENV}.dais.com/ioi/v3/event/fire

curl --location --request POST 'https://api.{EMV}.dais.com/ioi/v3/event/fire' \
--header 'Authorization: Basic <yourAuthHere>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": "PAYMENT_SETUP",
    "payload": {
        "clientId": "<clientId>",
        "quoteIds": [
            "<quoteId>"
        ],
        "selectedPaymentPlans": {
            "<quoteId>": "<paymentPlan>"
        }
    }
}'
{
    "type": "PAYMENT_SETUP",
    "payload": {
        "clientId": "2b03c21b-3ce9-4d0b-9c99-85f2898f31b4",
        "quoteIds": [
            "ee7f2f91-75e6-4dd2-b872-a605c2664a24"
        ],
        "selectedPaymentPlans": {
            "ee7f2f91-75e6-4dd2-b872-a605c2664a24": "FULL_PAYMENT"
        }
    }
}

Request fields

PropertyRequiredDescription
typetrueMust be set to PAYMENT_SETUP
payloadtrueExplained below

Payload fields

PropertyRequiredDescription
clientIdtrueUUID for the client
quoteIdstrueArray of quote UUIDs to charge for. This value is returned as requestId when retrieving quotes, learn more here.
selectedPaymentPlanstrueMap of quote UUID to desired payment plan

Response json

{
    "triggerRequestId": "f48ffec9-0228-4d5f-b1ec-cee2f6519aa3",
    "executedActionCount": 0,
    "expectedResponseCount": 0,
    "metadata": { }
}

Response fields

PropertyRequiredDescription
triggerRequestIdtrueUUID that identifies the execution of the trigger.
executedActionCounttrueNumber of workflow actions executed for this trigger.
expectedResponseCounttrueNumber of responses expected from executed actions.
metadatatrueContains dynamically generated data from payment setup actions.