{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/return",
"title": "return",
"type": "object",
"properties": {
"id": {
"type": "string",
"format": "uuid"
},
"object": {
"type": "string"
},
"live_mode": {
"type": "boolean",
"description": "This field will be true if this object exists in the live environment or false if it exists in the test environment."
},
"created_at": {
"type": "string",
"format": "date-time"
},
"updated_at": {
"type": "string",
"format": "date-time"
},
"discarded_at": {
"type": "string",
"format": "date-time",
"nullable": true
},
"returnable_id": {
"type": "string",
"format": "uuid",
"description": "The ID of the object being returned or `null`.",
"nullable": true
},
"returnable_type": {
"type": "string",
"enum": [
"incoming_payment_detail",
"payment_order",
"return",
"reversal"
],
"description": "The type of object being returned or `null`.",
"nullable": true
},
"code": {
"type": "string",
"enum": [
"901",
"902",
"903",
"904",
"905",
"907",
"908",
"909",
"910",
"911",
"912",
"914",
"C01",
"C02",
"C03",
"C05",
"C06",
"C07",
"C08",
"C09",
"C13",
"C14",
"R01",
"R02",
"R03",
"R04",
"R05",
"R06",
"R07",
"R08",
"R09",
"R10",
"R11",
"R12",
"R13",
"R14",
"R15",
"R16",
"R17",
"R18",
"R19",
"R20",
"R21",
"R22",
"R23",
"R24",
"R25",
"R26",
"R27",
"R28",
"R29",
"R30",
"R31",
"R32",
"R33",
"R34",
"R35",
"R36",
"R37",
"R38",
"R39",
"R40",
"R41",
"R42",
"R43",
"R44",
"R45",
"R46",
"R47",
"R50",
"R51",
"R52",
"R53",
"R61",
"R62",
"R67",
"R68",
"R69",
"R70",
"R71",
"R72",
"R73",
"R74",
"R75",
"R76",
"R77",
"R80",
"R81",
"R82",
"R83",
"R84",
"R85",
"currencycloud"
],
"nullable": true,
"description": "The return code. For ACH returns, this is the required ACH return code."
},
"reason": {
"type": "string",
"nullable": true,
"description": "Often the bank will provide an explanation for the return, which is a short human readable string."
},
"date_of_death": {
"type": "string",
"nullable": true,
"format": "date",
"description": "If the return code is `R14` or `R15` this is the date the deceased counterparty passed away."
},
"additional_information": {
"type": "string",
"nullable": true,
"description": "Some returns may include additional information from the bank. In these cases, this string will be present."
},
"data": {
"type": "object",
"nullable": true,
"description": "The raw data from the return file that we get from the bank."
},
"corrections": {
"type": "object",
"nullable": true,
"properties": {
"account_number": {
"type": "string",
"nullable": true,
"description": "The updated account number that should replace the one originally used on the outgoing payment."
},
"company_id": {
"type": "string",
"nullable": true,
"description": "The updated company ID that should replace the one originally used on the outgoing payment."
},
"company_name": {
"type": "string",
"nullable": true,
"description": "The updated company name that should replace the one originally used on the outgoing payment."
},
"individual_identification_number": {
"type": "string",
"nullable": true,
"description": "The updated individual identification number that should replace the one originally used on the outgoing payment."
},
"routing_number": {
"type": "string",
"nullable": true,
"description": "The updated routing number that should replace the one originally used on the outgoing payment."
},
"transaction_code": {
"type": "string",
"nullable": true,
"description": "The updated account type code that should replace the one originally used on the outgoing payment."
}
},
"description": "Only relevant for ACH NOC returns. This is an object containing all of the new and corrected information provided by the bank that was previously incorrect on the original outgoing payment."
},
"reconciliation_status": {
"type": "string",
"enum": [
"unreconciled",
"tentatively_reconciled",
"reconciled"
],
"description": "One of `unreconciled`, `tentatively_reconciled` or `reconciled`."
},
"status": {
"type": "string",
"enum": [
"cancelled",
"completed",
"failed",
"pending",
"processing",
"returned",
"sent"
],
"description": "The current status of the return."
},
"transaction_line_item_id": {
"type": "string",
"format": "uuid",
"nullable": true,
"description": "The ID of the relevant Transaction Line Item or `null`."
},
"transaction_id": {
"type": "string",
"format": "uuid",
"nullable": true,
"description": "The ID of the relevant Transaction or `null`."
},
"internal_account_id": {
"type": "string",
"format": "uuid",
"nullable": true,
"description": "The ID of the relevant Internal Account."
},
"type": {
"type": "string",
"enum": [
"ach",
"ach_noc",
"au_becs",
"bacs",
"book",
"check",
"cross_border",
"eft",
"gb_fps",
"interac",
"manual",
"sepa",
"wire",
"zengin"
],
"description": "The type of return. Can be one of: `ach`, `ach_noc`, `au_becs`, `bacs`, `eft`, `interac`, `manual`, `paper_item`, `wire`."
},
"amount": {
"type": "integer",
"description": "Value in specified currency's smallest unit. e.g. $10 would be represented as 1000."
},
"currency": {
"$ref": "#/components/schemas/currency",
"description": "Currency that this transaction is denominated in."
},
"failure_reason": {
"type": "string",
"nullable": true,
"description": "If an originating return failed to be processed by the bank, a description of the failure reason will be available."
},
"role": {
"type": "string",
"enum": [
"originating",
"receiving"
],
"description": "The role of the return, can be `originating` or `receiving`."
},
"current_return": {
"$ref": "#/components/schemas/return",
"nullable": true,
"description": "If the return's status is `returned`, this will include the return object's data that is returning this return.",
"example": null
},
"reference_numbers": {
"type": "array",
"description": "An array of Payment Reference objects.",
"items": {
"$ref": "#/components/schemas/payment_reference"
}
},
"ledger_transaction_id": {
"type": "string",
"format": "uuid",
"nullable": true,
"description": "The ID of the ledger transaction linked to the return."
}
},
"additionalProperties": false,
"minProperties": 25,
"required": [
"id",
"object",
"live_mode",
"created_at",
"updated_at",
"discarded_at",
"returnable_id",
"returnable_type",
"code",
"reason",
"date_of_death",
"corrections",
"reconciliation_status",
"status",
"transaction_line_item_id",
"transaction_id",
"internal_account_id",
"type",
"amount",
"currency",
"failure_reason",
"role",
"current_return",
"reference_numbers",
"ledger_transaction_id"
]
}