On-us authorization migration started

Event generated when the migration of an on-us authorization starts. Contains the payload with the data to be migrated.

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

|
data

Description: This field represents on-us authorization data.
Type: object

account_id required

Description: This field identifies the external account the authorization belongs to.
Type: integer
Example:
1

authorization_response_code required

Description: This field identifies the response code of authorization.
Type: string
Example:
00

authorization_status_id required

Description: This field identifies the authorization status. It can be one of the following: 1 (TO BE PROCESSED), 2 (PROCESSED), 3 (DENIED), 4 (CANCELED), 6 (CANCEL AUTHORIZATION), 7 (PRE-AUTHORIZATION).
Type: integer
Must be one of the following:
1
2
3
4
6
7
Example:
1
2
3
4
6
7

contract_amount required

Description: This field identifies the contract amount of authorization.
Type: number
Example:
15.0

currency required

Description: This field identifies the currency code of authorization.
Type: string
Example:
BRL
USD

datetime_utc required

Description: This field identifies the date and hour of the authorization.
Type: string
Format: date-time
Example:
2022-04-08T17:07:03Z
2022-04-08T17:07:03.500599Z

destination_currency required

Description: This field identifies the destination currency code for authorization.
Type: string
Example:
BRL
USD

entry_mode required

Description: This field identifies the entry mode of authorization.
Type: string
Must be one of the following:
00
01
05
07
10
81
90
null
Example:
00
01

local_amount required

Description: This field identifies the local amount of authorization.
Type: number
Example:
15.0

migration_id required

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

number_of_installments required

Description: This field identifies the number of installments for authorization.
Type: integer
Example:
null

payment_datetime required

Description: This field identifies the date and hour of the authorized payment.
Type: string
Format: date-time
Example:
2022-04-08T17:07:03Z
2022-04-08T17:07:03.500599Z

principal_amount required

Description: This field identifies the principal amount of authorization.
Type: number
Example:
15.0

processing_code required

Description: This field identifies the processing code of authorization.
Type: string
Example:
00
01

tracking_id required

Description: Unique identifier of the authorization.
Type: string
Example:
123

type required

Description: This field indicates the on-us authorization is of type migration. Value should be fixed: MIGRATION.
Type: string
Example:
MIGRATION

version_date required

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

anti_fraud_metadata

Description: This field indicates the anti-fraud metadata of the on-us authorization. For migration purposes this field should be empty.
Type: object

authorization_code

Description: This field identifies the authorization code for the authorization.
Type: string
Example:
020340

authorization_denial_code

Description: This optional field is used when the authorization is denied.
Type: string
Example:
AU001

beneficiary_id

Description: This field indicates the beneficiary of the on-us authorization. For migration purposes, this field should be empty.
Type: object

calculated_fees

Description: This field indicates the calculated fees of the on-us authorization. For migration purposes, this field should be empty.
Type: array

card_id

Description: This field identifies the external card the authorization belongs to.
Type: integer
Example:
1

description

Description: This field gives a brief description of the on-us authorization.
Type: string
Example:
Description

installment_amount

Description: This field identifies the installment amount of the authorization. It should be the same value as the contract amount.
Type: number
Example:
15.0

installments_details

Description: This field indicates the installment details of the on-us authorization. For migration purposes, this field should be empty.
Type: array

installments_plan

Description: This field identifies the installment plan that should be used to calculate the purchase.
Type: string
Example:
uuid

marketplace_id

Description: This field identifies the marketplace linked to the merchant.
Type: integer
Example:
1

merchant_id

Description: This field identifies the external merchant the authorization belongs to.
Type: integer
Example:
1

metadata

Description: This field contains other authorization details.
Type: object
Additional properties: true
Example:

{
    "RESPONSE_CODE": "62",
    "TERMINAL_CAPABILITY": "0"
}
network

Description: This field identifies the card network of authorization.
Type: string
Example:
MASTERCARD
VISA
PERNAMBUCANAS

nsu

Description: This field identifies the Network Settlement Utility (NSU) of the authorization.
Type: string
Example:
6423667

origin

Description: This field indicates the origin of the on-us authorization. Value should be fixed: MIGRATION.
Type: string
Example:
MIGRATION

original_authorization_id

Description: Used for cancellation, this field identifies the original authorization.
Type: integer
Example:
1

org_id

Description: Internal identifier of the client organization registered into the platform.
Type: string
Example:
TN_c642ca23-4ea8-4218-a00d-8331a496253c

postings

Description: This field indicates the postings of the on-us authorization. For migration purposes, this field should be empty.
Type: object

rates

Description: This field indicates the rates of the on-us authorization. For migration purposes, this field should be empty.
Type: object

terminal_id

Description: Point Of Sale (POS) Terminal ID associated with the merchant. Terminal ID identifies where an authorization is processed.
Type: string
Example:
ceec1236-e702-4d04-89fd-4310c4bde35e

tid

Description: This field identifies the transaction ID of authorization.
Type: string
Example:
transaction_id
1ab8h11

validation_results

Description: This field indicates the validation results of the on-us authorization. For migration purposes, this field should be empty.
Type: array

{
    "$schema": "https://json-schema.org/draft-07/schema",
    "$id": "https://pismo.io/events/migration/on_us_authorization_incoming-1.json",
    "type": "object",
    "title": "On-us authorization migration started",
    "description": "Event generated when the migration of an on-us authorization starts. Contains the payload with the data to be migrated.",
    "additionalProperties": true,
    "examples": [
        {
            "timestamp": "2023-07-20T11:25:43.56752-03:00",
            "cid": "cid",
            "data": {
                "account_id": 1,
                "anti_fraud_metadata": {},
                "authorization_code": "961597",
                "authorization_denial_code": "AU001",
                "authorization_response_code": "00",
                "authorization_status_id": 1,
                "beneficiary_id": "1",
                "calculated_fees": [],
                "card_id": 1,
                "contract_amount": 25,
                "currency": "BRL",
                "datetime_utc": "2023-07-12T16:00:00Z",
                "description": "Brief description",
                "destination_currency": "BRL",
                "entry_mode": "01",
                "installment_amount": 25,
                "installments_details": [],
                "installments_plan": "91403ceb",
                "local_amount": 25,
                "marketplace_id": 123,
                "merchant_id": 1,
                "metadata": {
                    "key1": "value1",
                    "key2": "value2"
                },
                "migration_id": "migration_id",
                "network": "VISA",
                "nsu": "6862227",
                "number_of_installments": 1,
                "org_id": "org_id",
                "origin": "MIGRATION",
                "original_authorization_id": 1,
                "payment_datetime": "2022-08-12T16:00:00Z",
                "postings": {},
                "principal_amount": 25,
                "processing_code": "00",
                "rates": {},
                "terminal_id": "1",
                "tid": "tid",
                "tracking_id": "001",
                "type": "MIGRATION",
                "validation_results": [],
                "version_date": "2023-07-20T16:00:00Z"
            },
            "org_id": "org_id"
        }
    ],
    "required": [
        "data"
    ],
    "properties": {
        "data": {
            "$id": "#/properties/data/properties/data",
            "type": "object",
            "description": "This field represents on-us authorization data.",
            "required": [
                "account_id",
                "authorization_response_code",
                "authorization_status_id",
                "contract_amount",
                "currency",
                "datetime_utc",
                "destination_currency",
                "entry_mode",
                "local_amount",
                "migration_id",
                "number_of_installments",
                "payment_datetime",
                "principal_amount",
                "processing_code",
                "tracking_id",
                "type",
                "version_date"
            ],
            "properties": {
                "account_id": {
                    "$id": "#/properties/data/properties/account_id",
                    "type": "integer",
                    "description": "This field identifies the external account the authorization belongs to.",
                    "examples": [
                        1
                    ]
                },
                "authorization_response_code": {
                    "$id": "#/properties/data/properties/authorization_response_code",
                    "type": "string",
                    "description": "This field identifies the response code of authorization.",
                    "examples": [
                        "00"
                    ]
                },
                "authorization_status_id": {
                    "$id": "#/properties/data/properties/authorization_status_id",
                    "type": "integer",
                    "description": "This field identifies the authorization status. It can be one of the following: 1 (TO BE PROCESSED), 2 (PROCESSED), 3 (DENIED), 4 (CANCELED), 6 (CANCEL AUTHORIZATION), 7 (PRE-AUTHORIZATION).",
                    "enum": [
                        1,
                        2,
                        3,
                        4,
                        6,
                        7
                    ],
                    "examples": [
                        1,
                        2,
                        3,
                        4,
                        6,
                        7
                    ]
                },
                "contract_amount": {
                    "$id": "#/properties/data/properties/contract_amount",
                    "type": "number",
                    "description": "This field identifies the contract amount of authorization.",
                    "examples": [
                        15.0
                    ]
                },
                "currency": {
                    "$id": "#/properties/data/properties/currency",
                    "type": "string",
                    "description": "This field identifies the currency code of authorization.",
                    "examples": [
                        "BRL",
                        "USD"
                    ]
                },
                "datetime_utc": {
                    "$id": "#/properties/data/properties/datetime_utc",
                    "type": "string",
                    "format": "date-time",
                    "description": "This field identifies the date and hour of the authorization.",
                    "examples": [
                        "2022-04-08T17:07:03Z",
                        "2022-04-08T17:07:03.500599Z"
                    ]
                },
                "destination_currency": {
                    "$id": "#/properties/data/properties/destination_currency",
                    "type": "string",
                    "description": "This field identifies the destination currency code for authorization.",
                    "examples": [
                        "BRL",
                        "USD"
                    ]
                },
                "entry_mode": {
                    "$id": "#/properties/data/properties/entry_mode",
                    "type": "string",
                    "description": "This field identifies the entry mode of authorization.",
                    "enum": [
                        "00",
                        "01",
                        "05",
                        "07",
                        "10",
                        "81",
                        "90",
                        ""
                    ],
                    "examples": [
                        "00",
                        "01"
                    ]
                },
                "local_amount": {
                    "$id": "#/properties/data/properties/local_amount",
                    "type": "number",
                    "description": "This field identifies the local amount of authorization.",
                    "examples": [
                        15.0
                    ]
                },
                "migration_id": {
                    "$id": "#/properties/data/properties/migration_id",
                    "type": "string",
                    "description": "This field is the unique identifier of migration.",
                    "examples": [
                        "123"
                    ]
                },
                "number_of_installments": {
                    "$id": "#/properties/data/properties/number_of_installments",
                    "type": "integer",
                    "default": 0,
                    "description": "This field identifies the number of installments for authorization.",
                    "examples": [
                        0
                    ]
                },
                "payment_datetime": {
                    "$id": "#/properties/data/properties/payment_datetime",
                    "type": "string",
                    "format": "date-time",
                    "description": "This field identifies the date and hour of the authorized payment.",
                    "examples": [
                        "2022-04-08T17:07:03Z",
                        "2022-04-08T17:07:03.500599Z"
                    ]
                },
                "principal_amount": {
                    "$id": "#/properties/data/properties/principal_amount",
                    "type": "number",
                    "description": "This field identifies the principal amount of authorization.",
                    "examples": [
                        15.0
                    ]
                },
                "processing_code": {
                    "$id": "#/properties/data/properties/processing_code",
                    "type": "string",
                    "description": "This field identifies the processing code of authorization.",
                    "examples": [
                        "00",
                        "01"
                    ]
                },
                "tracking_id": {
                    "$id": "#/properties/data/properties/tracking_id",
                    "type": "string",
                    "description": "Unique identifier of the authorization.",
                    "examples": [
                        "123"
                    ]
                },
                "type": {
                    "$id": "#/properties/data/properties/type",
                    "type": "string",
                    "description": "This field indicates the on-us authorization is of type migration. Value should be fixed: MIGRATION.",
                    "default": "MIGRATION",
                    "examples": [
                        "MIGRATION"
                    ]
                },
                "version_date": {
                    "$id": "#/properties/data/properties/version_date",
                    "type": "string",
                    "format": "date-time",
                    "description": "This field is the version date of migration.",
                    "examples": [
                        "2022-05-02T16:47:06Z",
                        "2022-05-02T16:47:06.555222Z"
                    ]
                },
                "anti_fraud_metadata": {
                    "$id": "#/properties/data/properties/anti_fraud_metadata",
                    "type": "object",
                    "description": "This field indicates the anti-fraud metadata of the on-us authorization. For migration purposes this field should be empty.",
                    "default": {}
                },
                "authorization_code": {
                    "$id": "#/properties/data/properties/authorization_code",
                    "type": "string",
                    "description": "This field identifies the authorization code for the authorization.",
                    "examples": [
                        "020340"
                    ]
                },
                "authorization_denial_code": {
                    "$id": "#/properties/data/properties/authorization_denial_code",
                    "type": "string",
                    "description": "This optional field is used when the authorization is denied.",
                    "examples": [
                        "AU001"
                    ]
                },
                "beneficiary_id": {
                    "$id": "#/properties/data/properties/beneficiary_id",
                    "type": "object",
                    "description": "This field indicates the beneficiary of the on-us authorization. For migration purposes, this field should be empty.",
                    "default": {}
                },
                "calculated_fees": {
                    "$id": "#/properties/data/properties/calculated_fees",
                    "type": "array",
                    "description": "This field indicates the calculated fees of the on-us authorization. For migration purposes, this field should be empty.",
                    "default": []
                },
                "card_id": {
                    "$id": "#/properties/data/properties/card_id",
                    "type": "integer",
                    "description": "This field identifies the external card the authorization belongs to.",
                    "examples": [
                        1
                    ]
                },
                "description": {
                    "$id": "#/properties/data/properties/description",
                    "type": "string",
                    "description": "This field gives a brief description of the on-us authorization.",
                    "examples": [
                        "Description"
                    ]
                },
                "installment_amount": {
                    "$id": "#/properties/data/properties/installment_amount",
                    "type": "number",
                    "description": "This field identifies the installment amount of the authorization. It should be the same value as the contract amount.",
                    "examples": [
                        15.0
                    ]
                },
                "installments_details": {
                    "$id": "#/properties/data/properties/installments_details",
                    "type": "array",
                    "description": "This field indicates the installment details of the on-us authorization. For migration purposes, this field should be empty.",
                    "default": []
                },
                "installments_plan": {
                    "$id": "#/properties/data/properties/installments_plan",
                    "type": "string",
                    "description": "This field identifies the installment plan that should be used to calculate the purchase.",
                    "examples": [
                        "uuid"
                    ]
                },
                "marketplace_id": {
                    "$id": "#/properties/data/properties/marketplace_id",
                    "type": "integer",
                    "description": "This field identifies the marketplace linked to the merchant.",
                    "examples": [
                        1
                    ]
                },
                "merchant_id": {
                    "$id": "#/properties/data/properties/merchant_id",
                    "type": "integer",
                    "description": "This field identifies the external merchant the authorization belongs to.",
                    "examples": [
                        1
                    ]
                },
                "metadata": {
                    "$id": "#/properties/data/properties/metadata",
                    "type": "object",
                    "description": "This field contains other authorization details.",
                    "default": {},
                    "additionalProperties": true,
                    "examples": [
                        {
                            "RESPONSE_CODE": "62",
                            "TERMINAL_CAPABILITY": "0"
                        }
                    ]
                },
                "network": {
                    "$id": "#/properties/data/properties/network",
                    "type": "string",
                    "description": "This field identifies the card network of authorization.",
                    "examples": [
                        "MASTERCARD",
                        "VISA",
                        "PERNAMBUCANAS"
                    ]
                },
                "nsu": {
                    "$id": "#/properties/data/properties/nsu",
                    "type": "string",
                    "description": "This field identifies the Network Settlement Utility (NSU) of the authorization.",
                    "examples": [
                        "6423667"
                    ]
                },
                "origin": {
                    "$id": "#/properties/data/properties/origin",
                    "type": "string",
                    "description": "This field indicates the origin of the on-us authorization. Value should be fixed: MIGRATION.",
                    "default": "MIGRATION",
                    "examples": [
                        "MIGRATION"
                    ]
                },
                "original_authorization_id": {
                    "$id": "#/properties/data/properties/original_authorization_id",
                    "type": "integer",
                    "description": "Used for cancellation, this field identifies the original authorization.",
                    "examples": [
                        1
                    ]
                },
                "org_id": {
                    "$id": "#/properties/data/properties/org_id",
                    "type": "string",
                    "description": "Internal identifier of the client organization registered into the platform.",
                    "examples": [
                        "TN_c642ca23-4ea8-4218-a00d-8331a496253c"
                    ]
                },
                "postings": {
                    "$id": "#/properties/data/properties/postings",
                    "type": "object",
                    "description": "This field indicates the postings of the on-us authorization. For migration purposes, this field should be empty.",
                    "default": {}
                },
                "rates": {
                    "$id": "#/properties/data/properties/rates",
                    "type": "object",
                    "description": "This field indicates the rates of the on-us authorization. For migration purposes, this field should be empty.",
                    "default": {}
                },
                "terminal_id": {
                    "$id": "#/properties/data/properties/terminal_id",
                    "type": "string",
                    "description": "Point Of Sale (POS) Terminal ID associated with the merchant. Terminal ID identifies where an authorization is processed.",
                    "examples": [
                        "ceec1236-e702-4d04-89fd-4310c4bde35e"
                    ]
                },
                "tid": {
                    "$id": "#/properties/data/properties/tid",
                    "type": "string",
                    "description": "This field identifies the transaction ID of authorization.",
                    "examples": [
                        "transaction_id",
                        "1ab8h11"
                    ]
                },
                "validation_results": {
                    "$id": "#/properties/data/properties/validation_results",
                    "type": "array",
                    "description": "This field indicates the validation results of the on-us authorization. For migration purposes, this field should be empty.",
                    "default": []
                }
            }
        }
    }
}