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
| 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 json
{
"triggerRequestId": "f48ffec9-0228-4d5f-b1ec-cee2f6519aa3",
"executedActionCount": 0,
"expectedResponseCount": 0,
"metadata": { }
}
Response fields
| Property | Required | Description |
|---|---|---|
triggerRequestId | true | UUID that identifies the execution of the trigger. |
executedActionCount | true | Number of workflow actions executed for this trigger. |
expectedResponseCount | true | Number of responses expected from executed actions. |
metadata | true | Contains dynamically generated data from payment setup actions. |