Recurring Charge plan migration started

Event generated when a recurring charge plan migration is started. Contains the payload with the data to be migrated.

Type: object
Additional properties: true
Domain: migration
Event: recurring_charge_plan_incoming
Version: 1

|
entity required

Description: This field represents a recurring charge plan.
Type: object

migration required

Description: This field contains the data that identifies a migration.
Type: object
Additional properties: false
Example:

{
    "id": "00046429504363683042022",
    "version_date": "2022-05-02T16:47:06Z"
}
id required

Description: This field is the unique identifier of migration.
Type: string
Example:
00046429504363683042022

version_date required

Description: This field is the date of version of migration.
Type: string
Format: date-time
Example:
2022-05-02T16:47:06Z
2022-05-02T16:47:06.555222Z

split_transaction

Description: Whether to apply the recurring charge amount in a single transaction or to create separate transactions with the full installment_amount ('primary transaction') and the discount value ('secondary transaction')
Type: boolean
Example:
true

processing_code required

Description: Processing code for the recurring recurring charge transactions. If split_transaction is set to true, this is used as the processing code for the primary transaction.
Type: string
Example:
1234

installment_amount required

Description: The full amount of a recurring charge installment before any discount is applied
Type: number
Example:
10.99

description

Description: A description for the recurring charge transactions. If split_transaction is set to true, this is used as the description for the primary transaction
Type: string
Example:
Recurring Charge

number_of_cycles required

Description: Number of cycles
Type: string
Example:
12

first_cycles_to_discount

Description: The number of cycles the discount (defined by discount_percentage) should be applied to before reverting to the full charge.
Type: string
Example:
3

discount_percentage

Description: Percentage value to be discounted if first_cycles_to_discount is configured. Should be a number from 0 to 100.
Type: number
Example:
99.999

secondary_processing_code

Description: Processing code used to create the secondary transaction when split_transaction is set to true
Type: string
Example:
4321

secondary_description

Description: Used to create a description for the secondary transaction when split_transaction is true
Type: string
Example:
New customer discount

minimum_spend_to_charge

Description: Minimum debit amount on statement to enable cycle charging
Type: number
Example:
100.0

renew_method

Description: Whether to automatically renew the recurring charge plan at the end of the cycle. Should be one of [NO_RENEW, WITHOUT_DISCOUNT, WITH_DISCOUNT]
Type: string
Example:
NO_RENEW
WITH_DISCOUNT
WITHOUT_DISCOUNT

file_name

Description: This field identifies the name file.
Type: string or null
Example:
pismo.csv
null

file_size

Description: This field identifies the size file.
Type: integer or null
Example:
999
null

file_id

Description: This field is the unique identifier of the file that originated the event (can be null when origin is API).
Type: string or null
Example:
5832868-ca4d-475f-888b-02bb44f84d19
null

line_number

Description: This field identifies the line of the file that originated the event (can be 0 when origin is API).
Type: integer
Example:
null
2
11

origin

Description: This field identifies the source of the event: FILE/API
Type: string
Must be one of the following:
FILE
API
Example:
FILE

{
    "$schema": "https://json-schema.org/draft-07/schema",
    "$id": "https://pismo.io/events/migration/recurring_charge_plan_incoming-1.json",
    "type": "object",
    "title": "Recurring Charge plan migration started",
    "description": "Event generated when a recurring charge plan migration is started. Contains the payload with the data to be migrated.",
    "additionalProperties": true,
    "examples": [
        {
            "origin": "FILE",
            "file_name": "pismo.csv",
            "file_size": 999,
            "file_id": "1",
            "line_number": 1,
            "entity": {
                "migration": {
                    "id": "57707e82-cc0e-427f-8423-dff96285ec3d",
                    "version_date": "2022-05-02T16:47:06Z"
                },
                "split_transaction": true,
                "processing_code": "1234",
                "installment_amount": 10,
                "description": "Taxa de rota\u00e7\u00e3o",
                "number_of_cycles": 12,
                "first_cycle_to_discount": 1,
                "discount_percentage": 1,
                "secondary_processing_code": "4321",
                "secondary_description": "Atrito",
                "minimum_spend_to_charge": 12,
                "renew_method": "WITH_DISCOUNT"
            }
        }
    ],
    "required": [
        "entity"
    ],
    "properties": {
        "entity": {
            "$id": "#/properties/entity/properties/entity",
            "type": "object",
            "description": "This field represents a recurring charge plan.",
            "required": [
                "migration",
                "processing_code",
                "installment_amount",
                "number_of_cycles"
            ],
            "properties": {
                "migration": {
                    "$id": "#/properties/entity/properties/migration",
                    "type": "object",
                    "description": "This field contains the data that identifies a migration.",
                    "examples": [
                        {
                            "id": "00046429504363683042022",
                            "version_date": "2022-05-02T16:47:06Z"
                        }
                    ],
                    "required": [
                        "id",
                        "version_date"
                    ],
                    "properties": {
                        "id": {
                            "$id": "#/properties/entity/properties/migration/properties/id",
                            "type": "string",
                            "description": "This field is the unique identifier of migration.",
                            "examples": [
                                "00046429504363683042022"
                            ]
                        },
                        "version_date": {
                            "$id": "#/properties/entity/properties/migration/properties/version_date",
                            "type": "string",
                            "format": "date-time",
                            "description": "This field is the date of version of migration.",
                            "examples": [
                                "2022-05-02T16:47:06Z",
                                "2022-05-02T16:47:06.555222Z"
                            ]
                        }
                    },
                    "additionalProperties": false
                },
                "split_transaction": {
                    "$id": "#/properties/entity/properties/split_transaction",
                    "type": "boolean",
                    "description": "Whether to apply the recurring charge amount in a single transaction or to create separate transactions with the full installment_amount ('primary transaction') and the discount value ('secondary transaction')",
                    "examples": [
                        true
                    ]
                },
                "processing_code": {
                    "$id": "#/properties/entity/properties/processing_code",
                    "type": "string",
                    "description": "Processing code for the recurring recurring charge transactions. If `split_transaction` is set to `true`, this is used as the processing code for the primary transaction.",
                    "examples": [
                        "1234"
                    ]
                },
                "installment_amount": {
                    "$id": "#/properties/entity/properties/installment_amount",
                    "type": "number",
                    "description": "The full amount of a recurring charge installment before any discount is applied",
                    "examples": [
                        10.99
                    ]
                },
                "description": {
                    "$id": "#/properties/entity/properties/description",
                    "type": "string",
                    "description": "A description for the recurring charge transactions. If `split_transaction` is set to `true`, this is used as the description for the primary transaction",
                    "examples": [
                        "Recurring Charge"
                    ]
                },
                "number_of_cycles": {
                    "$id": "#/properties/entity/properties/number_of_cycles",
                    "type": "string",
                    "description": "Number of cycles",
                    "examples": [
                        12
                    ]
                },
                "first_cycles_to_discount": {
                    "$id": "#/properties/entity/properties/first_cycles_to_discount",
                    "type": "string",
                    "description": "The number of cycles the discount (defined by discount_percentage) should be applied to before reverting to the full charge.",
                    "examples": [
                        3
                    ]
                },
                "discount_percentage": {
                    "$id": "#/properties/entity/properties/discount_percentage",
                    "type": "number",
                    "description": "Percentage value to be discounted if first_cycles_to_discount is configured. Should be a number from 0 to 100.",
                    "examples": [
                        99.999
                    ]
                },
                "secondary_processing_code": {
                    "$id": "#/properties/entity/properties/secondary_processing_code",
                    "type": "string",
                    "description": "Processing code used to create the secondary transaction when `split_transaction` is set to `true`",
                    "examples": [
                        "4321"
                    ]
                },
                "secondary_description": {
                    "$id": "#/properties/entity/properties/secondary_description",
                    "type": "string",
                    "description": "Used to create a description for the secondary transaction when `split_transaction` is `true`",
                    "examples": [
                        "New customer discount"
                    ]
                },
                "minimum_spend_to_charge": {
                    "$id": "#/properties/entity/properties/minimum_spend_to_charge",
                    "type": "number",
                    "description": "Minimum debit amount on statement to enable cycle charging",
                    "examples": [
                        100.0
                    ]
                },
                "renew_method": {
                    "$id": "#/properties/entity/properties/renew_method",
                    "type": "string",
                    "description": "Whether to automatically renew the recurring charge plan at the end of the cycle. Should be one of [NO_RENEW, WITHOUT_DISCOUNT, WITH_DISCOUNT]",
                    "examples": [
                        "NO_RENEW",
                        "WITH_DISCOUNT",
                        "WITHOUT_DISCOUNT"
                    ]
                }
            }
        },
        "file_name": {
            "$id": "#/properties/file_name",
            "type": [
                "string",
                "null"
            ],
            "description": "This field identifies the name file.",
            "examples": [
                "pismo.csv",
                null
            ]
        },
        "file_size": {
            "$id": "#/properties/file_size",
            "type": [
                "integer",
                "null"
            ],
            "description": "This field identifies the size file.",
            "examples": [
                999,
                null
            ]
        },
        "file_id": {
            "$id": "#/properties/file_id",
            "type": [
                "string",
                "null"
            ],
            "description": "This field is the unique identifier of the file that originated the event (can be null when origin is API).",
            "examples": [
                "5832868-ca4d-475f-888b-02bb44f84d19",
                null
            ]
        },
        "line_number": {
            "$id": "#/properties/line_number",
            "type": "integer",
            "description": "This field identifies the line of the file that originated the event (can be 0 when origin is API).",
            "examples": [
                0,
                2,
                11
            ]
        },
        "origin": {
            "$id": "#/properties/origin",
            "type": "string",
            "description": "This field identifies the source of the event: FILE/API",
            "enum": [
                "FILE",
                "API"
            ],
            "examples": [
                "FILE"
            ]
        }
    }
}
{
    "origin": "FILE",
    "file_name": "pismo.csv",
    "file_size": 999,
    "file_id": "1",
    "line_number": 1,
    "entity": {
        "migration": {
            "id": "57707e82-cc0e-427f-8423-dff96285ec3d",
            "version_date": "2022-05-02T16:47:06Z"
        },
        "split_transaction": true,
        "processing_code": "1234",
        "installment_amount": 10,
        "description": "Taxa de rota\u00e7\u00e3o",
        "number_of_cycles": 12,
        "first_cycle_to_discount": 1,
        "discount_percentage": 1,
        "secondary_processing_code": "4321",
        "secondary_description": "Atrito",
        "minimum_spend_to_charge": 12,
        "renew_method": "WITH_DISCOUNT"
    }
}