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 this event after a new policy has been created;
- Fired externally via API 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"
}
}
}
Event fields:
| Property | Required | Description |
|---|---|---|
type | true | Must be set to PAYMENT_SETUP |
payload | true | Explained below |
Payload fields
| Property | Required | Description |
|---|---|---|
clientId | true | UUID for the client |
quoteIds | true | Array of quote UUIDs to charge for. This value is returned as requestId when retrieving quotes, learn more here. |
selectedPaymentPlans | true | Map of quote UUID to desired payment plan |
Response payload
{
"triggerRequestId": "f48ffec9-0228-4d5f-b1ec-cee2f6519aa3",
"executedActionCount": 0,
"expectedResponseCount": 0,
"metadata": {
"paymentOptions": {
"ee7f2f91-75e6-4dd2-b872-a605c2664a24": {
"FULL_PAYMENT": {
"paymentPlan": "FULL_PAYMENT",
"totalPremium": 15600.0
}
}
},
"PAYMENT_SETUP": {
"clientId": "2b03c21b-3ce9-4d0b-9c99-85f2898f31b4",
"quoteIds": [
"ee7f2f91-75e6-4dd2-b872-a605c2664a24"
],
"selectedPaymentPlans": {
"ee7f2f91-75e6-4dd2-b872-a605c2664a24": "FULL_PAYMENT"
},
"clientSecret": "pi_3KX1gbCbDuWSbVzI042CeQ9R_secret_JNusB9mvQkdn9pe3XthKPrRuV",
"amountTotal": 1560000,
"metadata": {
"ee7f2f91-75e6-4dd2-b872-a605c2664a24": "Line Owner | 1560000",
"clientId": "2b03c21b-3ce9-4d0b-9c99-85f2898f31b4",
"sellingOrganization": "Insurance Co",
"requestId": "7670e80c-5ac9-4d98-a953-bd26d543ff1e",
"triggerRequestId": "f48ffec9-0228-4d5f-b1ec-cee2f6519aa3"
}
}
}
}