PAYMENT_TRANSACTION_RECORD
This event is fired when an externally-processed payment is received.
When and what fires this event?
If this event is defined on a product, and it has actions that are enabled:
- Fired externally via API on-demand.
Request payload
POST: https://api.{ENV}.dais.com/ioi/v3/event/fire
curl --location --request POST 'https://api.{ENV}.dais.com/ioi/v3/event/fire' \
--header 'Authorization: Basic <yourAuthHere>' \
--header 'Content-Type: application/json' \
--data-raw '{
"type": "PAYMENT_TRANSACTION_RECORD",
"payload": {
"policyId": "8e05b460-f692-4919-924b-0e71468910bb",
"amount": "5.00",
"receivedDate": "2023-07-21T14:25:29-05:00",
"paymentType": "MANUAL_RECORD",
"paymentSpec": {
"label": "Payment Label",
"description": "Payment Description"
}
}
}'
{
"type": "PAYMENT_TRANSACTION_RECORD",
"payload": {
"policyId": "8e05b460-f692-4919-924b-0e71468910bb",
"amount": "5.00",
"receivedDate": "2023-07-21T14:25:29-05:00",
"paymentType": "MANUAL_RECORD",
"paymentSpec": {
"label": "Payment Label",
"description": "Payment Description"
}
}
}
Event fields:
| Property | Required | Description |
|---|---|---|
type | true | Must be set to PAYMENT_TRANSACTION_RECORD |
payload | true | Explained below |
Payload fields
| Property | Required | Description |
|---|---|---|
policyId | true | UUID of the policy |
amount | true | Dollar amount of payment |
receivedDate | true | ISO timestamp with timezone offset representing when the payment was received |
paymentType | true | Must be MANUAL_RECORD or CREDIT_CARD, see below for details |
paymentSpec | false | Explained below |
The DAIS platform supports two forms of external payment: credit card and manual record (for all other payments).
In the event of a credit card payment, paymentType must be set to CREDIT_CARD and paymentSpec may optionally contain the last four digits of the credit card and the provider.
{
...
"paymentSpec": {
"cardType": "VISA",
"lastFourDigit": 1234
}
}
For all other payments, paymentType must be set to MANUAL_RECORD and paymentSpec may optionally contain a label and description for the payment.
{
...
"paymentSpec": {
"label": "Manual Payment",
"description": "Additional Details"
}
}
Response payload
{
"triggerRequestId": "fc55a520-5194-4b6f-b84d-3457f189c5cf",
"executedActionCount": 0,
"expectedResponseCount": 0,
"metadata": {}
}