Scheduled payment created or modified [beta]

This event occurs when the platform creates or modifies a scheduled payment. For a new scheduled payment, the value in the status field is CREATED. For changes on the existing scheduled payment, the status field reflects the corresponding status.

Note: This beta release supports only pre-schedules (schedule_kind is PRE) which are executed at the end of the closing cycle. When the payment scheduler is fully released, two additional schedule types - SINGLE and MULTIPLE - will be supported.

Generated by: Create pre-schedule.
More information: Payment scheduler.

Type: object
Domain: scheduler-payments
Event: scheduled_payments
Version: 1

|
account_id required

Title: Account ID
Description: Pismo account ID.
Type: integer
Example:
100602614

schedule_id required

Title: Schedule ID
Description: Schedule ID.
Type: string
Example:
9cd6485a-5680-4df0-a1f1-507e21d3428c

schedule_kind required

Title: Schedule kind
Description: Schedule kind: SINGLE (for one account), MULTIPLE (for two or more accounts, with one main parent account and one or more children accounts), or PRE (for pre-scheduling that requires an external execution trigger).
Type: string
Must be one of the following:
SINGLE
MULTIPLE
PRE
Example:
SINGLE

status required

Title: Status
Description: Schedule status. For a new scheduled payment, the value in the status field is CREATED. For changes on the existing scheduled payment, the status field reflects the corresponding status.
Type: string
Must be one of the following:
CREATED
UPDATED
IN_PROGRESS
CANCELED
SUSPENDED
COMPLETED
Example:
CREATED

created_at

Title: Created date
Description: Created date of the schedule in UTC-0 (RFC3339) format, which includes milliseconds (yyyy-MM-ddThh:mm:ss.SSSZ).
Type: string
Format: date-time
Example:
2024-01-01T00:00:00.000Z

description

Title: Schedule description
Description: Schedule description.
Type: string
Example:
Monthly purchase
Daily purchase

metadata

Title: Metadata
Description: Additional information relevant to the customer. No business rule validation is performed on it.
Type: object
Example:

{
    "metadata": {
        "customer-data": {
            "any": "fields"
        }
    }
}
{
    "$schema": "http://json-schema.org/draft-07/schema",
    "type": "object",
    "title": "Scheduled payment created or modified [beta]",
    "description": "This event occurs when the platform creates or modifies a scheduled payment. For a new scheduled payment, the value in the `status` field is `CREATED`. For changes on the existing scheduled payment, the `status` field reflects the corresponding status. <br><br>**Note**: This beta release supports only pre-schedules (`schedule_kind` is `PRE`) which are executed at the end of the closing cycle. When the payment scheduler is fully released, two additional schedule types - SINGLE and MULTIPLE - will be supported.<br><br>Generated by: <a href='https://developers.pismo.io/pismo-docs/reference/post-pre-schedules' target='_blank'>Create pre-schedule</a>. <br>More information: <a href='https://developers.pismo.io/pismo-docs/docs/payment-scheduler' target='_blank'>Payment scheduler</a>.",
    "required": [
        "account_id",
        "schedule_id",
        "schedule_kind",
        "status"
    ],
    "allOf": [
        {
            "if": {
                "properties": {
                    "schedule_kind": {
                        "const": "SINGLE"
                    }
                }
            },
            "then": {
                "required": [
                    "amount",
                    "processing_code",
                    "currency",
                    "schedule_details"
                ],
                "properties": {
                    "amount": {
                        "$ref": "#/definitions/amount"
                    },
                    "processing_code": {
                        "$ref": "#/definitions/processing_code"
                    },
                    "currency": {
                        "$ref": "#/definitions/currency"
                    },
                    "schedule_details": {
                        "$ref": "#/definitions/schedule_details"
                    },
                    "restrictions": {
                        "$ref": "#/definitions/restrictions"
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "schedule_kind": {
                        "const": "MULTIPLE"
                    }
                }
            },
            "then": {
                "required": [
                    "transfers",
                    "strategy",
                    "schedule_details"
                ],
                "properties": {
                    "transfers": {
                        "$ref": "#/definitions/transfers"
                    },
                    "strategy": {
                        "$ref": "#/definitions/strategy"
                    },
                    "schedule_details": {
                        "$ref": "#/definitions/schedule_details"
                    }
                }
            }
        },
        {
            "if": {
                "properties": {
                    "schedule_kind": {
                        "const": "PRE"
                    }
                }
            },
            "then": {
                "required": [
                    "amount",
                    "processing_code",
                    "currency",
                    "schedule_details"
                ],
                "properties": {
                    "amount": {
                        "$ref": "#/definitions/amount"
                    },
                    "processing_code": {
                        "$ref": "#/definitions/processing_code"
                    },
                    "currency": {
                        "$ref": "#/definitions/currency"
                    },
                    "schedule_details": {
                        "$ref": "#/definitions/pre_schedule_details"
                    }
                }
            }
        }
    ],
    "properties": {
        "account_id": {
            "type": "integer",
            "title": "Account ID",
            "description": "Pismo account ID.",
            "examples": [
                100602614
            ]
        },
        "schedule_id": {
            "type": "string",
            "title": "Schedule ID",
            "description": "Schedule ID.",
            "examples": [
                "9cd6485a-5680-4df0-a1f1-507e21d3428c"
            ]
        },
        "schedule_kind": {
            "type": "string",
            "title": "Schedule kind",
            "description": "Schedule kind: SINGLE (for one account), MULTIPLE (for two or more accounts, with one main parent account and one or more children accounts), or PRE (for pre-scheduling that requires an external execution trigger).",
            "enum": [
                "SINGLE",
                "MULTIPLE",
                "PRE"
            ],
            "examples": [
                "SINGLE"
            ]
        },
        "status": {
            "type": "string",
            "title": "Status",
            "description": "Schedule status. For a new scheduled payment, the value in the `status` field is `CREATED`. For changes on the existing scheduled payment, the `status` field reflects the corresponding status.",
            "enum": [
                "CREATED",
                "UPDATED",
                "IN_PROGRESS",
                "CANCELED",
                "SUSPENDED",
                "COMPLETED"
            ],
            "examples": [
                "CREATED"
            ]
        },
        "created_at": {
            "type": "string",
            "format": "date-time",
            "title": "Created date",
            "description": "Created date of the schedule in UTC-0 (RFC3339) format, which includes milliseconds (yyyy-MM-ddThh:mm:ss.SSSZ).",
            "examples": [
                "2024-01-01T00:00:00.000Z"
            ]
        },
        "description": {
            "type": "string",
            "title": "Schedule description",
            "description": "Schedule description.",
            "examples": [
                "Monthly purchase",
                "Daily purchase"
            ]
        },
        "metadata": {
            "type": "object",
            "title": "Metadata",
            "description": "Additional information relevant to the customer. No business rule validation is performed on it.",
            "examples": [
                {
                    "metadata": {
                        "customer-data": {
                            "any": "fields"
                        }
                    }
                }
            ]
        }
    },
    "definitions": {
        "restrictions": {
            "type": "object",
            "title": "Restrictions object",
            "description": "Object with information about schedule restrictions.",
            "properties": {
                "minimum_daily_available": {
                    "type": "number",
                    "title": "Minimum daily available amount.",
                    "description": "Execute the schedule if the available account limit is less than this configured value.",
                    "examples": [
                        25.75,
                        125.0,
                        57.25
                    ]
                },
                "minimum_monthly_average_available": {
                    "type": "number",
                    "title": "Minimum monthly average available amount.",
                    "description": "Execute the schedule if the average of monthly account limits is less than this configured value. The platform calculates the average from the current month until one day before the schedule execution date (d-1).",
                    "examples": [
                        25.75,
                        125.0,
                        57.25
                    ]
                },
                "minimum_days_account_inactivity": {
                    "type": "integer",
                    "title": "Minimum days account inactivity.",
                    "description": "Execute the schedule if the account doesn't have any financial activity within the number of configured days.",
                    "examples": [
                        1,
                        2,
                        3
                    ]
                }
            }
        },
        "retries": {
            "type": "object",
            "title": "Retries object",
            "description": "Object with information about schedule retries.",
            "required": [
                "number_of_attempts",
                "interval_recurrence"
            ],
            "properties": {
                "number_of_attempts": {
                    "type": "integer",
                    "title": "Number of attempts",
                    "description": "Number of times to attempt executing this scheduled payment if it doesn't execute successfully.",
                    "examples": [
                        1,
                        2,
                        3
                    ]
                },
                "interval_recurrence": {
                    "type": "integer",
                    "title": "Interval recurrence.",
                    "description": "Time in minutes to perform the next attempt.",
                    "examples": [
                        1,
                        2,
                        3
                    ]
                }
            }
        },
        "schedule_details": {
            "type": "object",
            "title": "Details object",
            "description": "Object with schedule details.",
            "if": {
                "properties": {
                    "type": {
                        "const": "RECURRING"
                    }
                }
            },
            "then": {
                "required": [
                    "interval",
                    "end_date"
                ]
            },
            "properties": {
                "type": {
                    "type": "string",
                    "title": "Type",
                    "description": "Schedule type.",
                    "enum": [
                        "ONCE",
                        "RECURRING"
                    ],
                    "examples": [
                        "RECURRING"
                    ]
                },
                "interval": {
                    "type": "string",
                    "title": "Interval",
                    "description": "Schedule interval.",
                    "enum": [
                        "DAILY",
                        "WEEKLY",
                        "MONTHLY",
                        "YEARLY"
                    ],
                    "examples": [
                        "DAILY"
                    ]
                },
                "start_date": {
                    "type": "string",
                    "format": "date-time",
                    "title": "Star date",
                    "description": "Start date of the schedule in UTC-0 (RFC3339) format, which includes milliseconds (yyyy-MM-ddThh:mm:ss.SSSZ).",
                    "examples": [
                        "2024-01-01T00:00:00.000Z"
                    ]
                },
                "end_date": {
                    "type": "string",
                    "format": "date-time",
                    "title": "End date",
                    "description": "End date of the schedule in UTC-0 (RFC3339) format, which includes milliseconds (yyyy-MM-ddThh:mm:ss.SSSZ).",
                    "examples": [
                        "2024-01-01T00:00:00.000Z"
                    ]
                },
                "day_type": {
                    "type": "string",
                    "title": "Day type",
                    "description": "Schedule day type.",
                    "enum": [
                        "CALENDAR_DAY",
                        "BUSINESS_DAY"
                    ],
                    "examples": [
                        "BUSINESS_DAY"
                    ]
                },
                "retries": {
                    "$ref": "#/definitions/retries"
                }
            }
        },
        "pre_schedule_details": {
            "type": "object",
            "title": "Details object",
            "description": "Object with schedule details.",
            "required": [
                "statement"
            ],
            "properties": {
                "statement": {
                    "$ref": "#/definitions/statement"
                }
            }
        },
        "processing_code": {
            "type": "string",
            "title": "Processing code",
            "description": "Processing code used for authorization.",
            "examples": [
                "007700",
                "009900",
                "007200"
            ]
        },
        "amount": {
            "type": "number",
            "title": "Amount",
            "description": "Authorization amount.",
            "minimum": 1,
            "examples": [
                20.1,
                100.0,
                50
            ]
        },
        "currency": {
            "type": "string",
            "title": "Currency code",
            "description": "Three-letter currency code (ISO 4217).",
            "examples": [
                "CLP",
                "USD",
                "BRL"
            ]
        },
        "transfers": {
            "type": "array",
            "title": "List of transfers",
            "items": {
                "$ref": "#/definitions/transfer"
            }
        },
        "transfer": {
            "type": "object",
            "title": "Transfer",
            "description": "Information about the transfer.",
            "required": [
                "main",
                "child"
            ],
            "properties": {
                "main": {
                    "type": "object",
                    "title": "Main",
                    "description": "Information about the main parent account",
                    "required": [
                        "processing_code"
                    ],
                    "properties": {
                        "processing_code": {
                            "type": "string",
                            "title": "Processing code",
                            "description": "Processing code used for authorization.",
                            "examples": [
                                "007700",
                                "009900",
                                "007200"
                            ]
                        }
                    }
                },
                "child": {
                    "type": "object",
                    "title": "Child",
                    "description": "Information about the child account.",
                    "required": [
                        "account_id",
                        "processing_code"
                    ],
                    "properties": {
                        "account_id": {
                            "type": "integer",
                            "title": "Account ID",
                            "description": "Pismo account ID.",
                            "examples": [
                                100602614
                            ]
                        },
                        "processing_code": {
                            "type": "string",
                            "title": "Processing code",
                            "description": "Processing code used for authorization.",
                            "examples": [
                                "007700",
                                "009900",
                                "007200"
                            ]
                        }
                    }
                }
            }
        },
        "strategy": {
            "type": "string",
            "title": "Strategy",
            "description": "Schedule strategy: SWEEP (where the amount available in the child accounts moves to the main parent account, thus scraping the child accounts) or OVERDRAFT_SWEEP (where, if the child account has a negative balance, the amount that equals this negative balance moves from the main parent account to the child account, thus zeroing the child account balance).",
            "enum": [
                "SWEEP",
                "OVERDRAFT_SWEEP"
            ],
            "examples": [
                "SWEEP"
            ]
        },
        "statement": {
            "type": "object",
            "title": "Details object",
            "description": "Object with statement.",
            "required": [
                "id"
            ],
            "properties": {
                "id": {
                    "type": "integer",
                    "title": "Statement ID",
                    "description": "Statement ID.",
                    "examples": [
                        100602614
                    ]
                }
            }
        }
    }
}
{
    "account_id": 100602614,
    "schedule_id": "9cd6485a-5680-4df0-a1f1-507e21d3428c",
    "schedule_kind": "SINGLE",
    "status": "CREATED",
    "created_at": "2024-01-01T00:00:00.000Z",
    "description": "Monthly purchase",
    "metadata": {
        "metadata": {
            "customer-data": {
                "any": "fields"
            }
        }
    }
}