# Get transaction (transaction banking)
Gets transaction using transaction ID.
# OpenAPI definition
```json
{
"openapi": "3.0.0",
"info": {
"title": "Banking - Transaction banking",
"version": "0.9.0",
"description": "Transaction banking API",
"contact": {
"name": "API Support",
"url": "https://developers.pismo.io/support/"
},
"license": {
"name": "Copyright Pismo"
}
},
"servers": [
{
"url": "https://sandbox.pismolabs.io",
"description": "Sandbox API server for testing"
}
],
"security": [
{
"BearerAuth": []
}
],
"tags": [
{
"name": "Transactions",
"description": "Transaction endpoints"
}
],
"components": {
"parameters": {
"TransacationIDPath": {
"name": "transactionId",
"in": "path",
"description": "Transaction ID",
"example": 313123,
"schema": {
"type": "integer"
},
"required": true
}
},
"schemas": {
"AccountID": {
"type": "integer",
"format": "int64",
"description": "Account ID",
"example": 1234
},
"Amount": {
"type": "object",
"description": "Amount",
"properties": {
"value": {
"$ref": "#/components/schemas/AmountValue"
},
"currency": {
"$ref": "#/components/schemas/Currency"
}
},
"required": [
"value"
]
},
"AmountValue": {
"type": "number",
"format": "float",
"description": "Amount value",
"exclusiveMinimum": false,
"minimum": 0,
"maximum": 100000000000000000,
"example": 1000.52
},
"Authorization": {
"type": "object",
"description": "Authorization",
"properties": {
"id": {
"$ref": "#/components/schemas/AuthorizationID"
},
"type": {
"$ref": "#/components/schemas/AuthorizationType"
},
"code": {
"$ref": "#/components/schemas/AuthorizationCode"
},
"payment_method_id": {
"$ref": "#/components/schemas/PaymentMethod"
},
"tracking_id": {
"$ref": "#/components/schemas/TrackingID"
}
}
},
"AuthorizationCode": {
"type": "string",
"description": "Authorization code or network approval code",
"example": "1234"
},
"AuthorizationID": {
"type": "integer",
"format": "int64",
"description": "Authorization ID",
"example": 5678
},
"AuthorizationType": {
"type": "string",
"enum": [
"PLATFORM",
"NETWORK"
],
"description": "Authorization type",
"example": "PLATFORM"
},
"Currency": {
"type": "string",
"description": "3-letter code in ISO 4217-compliant format for the currency used in the transaction.",
"maxLength": 3,
"minLength": 3,
"example": "USD"
},
"ErrorCode": {
"description": "Error code\n`minLength: 1`\n`maxLength: 12`\n",
"type": "string",
"minLength": 1,
"maxLength": 12,
"example": "WPMT0017"
},
"ErrorMessage": {
"description": "Error message\n`minLength: 1`\n`maxLength: 1000`\n",
"type": "string",
"minLength": 1,
"maxLength": 1000,
"example": "Invalid JSON payload received: Error unmarshalling request"
},
"ErrorResponse": {
"type": "object",
"properties": {
"code": {
"$ref": "#/components/schemas/ErrorCode"
},
"message": {
"$ref": "#/components/schemas/ErrorMessage"
}
}
},
"EventDate": {
"type": "string",
"format": "date-time",
"description": "Event date in format ISO 8601.",
"example": "2023-04-27T12:01:24Z"
},
"ExternalAccountID": {
"maxLength": 60,
"type": "string",
"pattern": "^[a-zA-Z0-9-]+$",
"description": "Custom account ID. Used as the key for all operations (manage accounts, transactions, etc.) on the corporate layer.\n\nThis field is:\n- Unique within the Organization\n- Immutable: The field cannot be updated.\n- Not recyclable: You can't reuse an external account ID, even if the account that was using it has been canceled.\n",
"example": "b993ba96-b3e8-4ef7-9cf7-7eee5ddafdab"
},
"IsCredit": {
"type": "boolean",
"description": "Is the transaction a credit (`true`) or debit (`false`)?",
"example": true
},
"Metadata": {
"type": "object",
"description": "Key-value pairs containing data intended for storage in the Pismo system.
\nNOTES:\n- The `metadata` field includes a `corporate_metadata` object with the following fields:\n - `credit_external_account_id`: Included in the `corporate_metadata` field when it's provided in the credit leg.\n - `debit_external_account_id`: Included in the `corporate_metadata` field when it's provided in the debit leg.\n - `earmark_id`: Included in the `corporate_metadata` field when it's provided in the debit leg.\n- The `corporate_metadata` attribute must be an object. A type mismatch results in an error as mapped in the responses section.\n",
"example": {
"my-id": 2932
}
},
"PaymentDatetime": {
"type": "string",
"format": "date-time",
"description": "Date and time of the payment. Specifying a `payment_datetime` value impacts the account balance history.
\nNotes:\n - The payment datetime is in ISO 8601 format.\n - You can backdate payments a maximum of 390 calendar days. You can postdate payments a maximum of 10 calendar days.\n",
"example": "2023-03-10T19:05:56.743Z"
},
"PaymentMethod": {
"type": "string",
"description": "Payment method",
"example": "MASTERCARD"
},
"PostedTransaction": {
"type": "boolean",
"description": "Are transactions posted on statements?",
"example": false
},
"ProcessingCodeDescription": {
"type": "string",
"description": "Processing code description",
"example": "Hold Funds"
},
"ProgramID3": {
"type": "integer",
"format": "int64",
"description": "Program ID. This is a client-provided ID.",
"example": 2222
},
"ProcessingCode": {
"type": "string",
"description": "Processing code used to create the underlying transaction. Each internal operation type uses a default processing code.
\n`minLength: 1`\n`maxLength: 6`\n",
"minLength": 1,
"maxLength": 6,
"example": "219248"
},
"SoftDescriptor": {
"type": "string",
"description": "Brief description that helps to identify a particular transaction on the bank statement.",
"example": "ACME Inc. - Invoice 2938",
"maxLength": 100,
"minLength": 0
},
"TrackingID": {
"type": "string",
"description": "A unique payment tracking number provided by the client. If an existing `tracking_id` already exists in the system, the API returns a `409` error.\n\nThis field is:\n - Unique within the Organization.\n - Immutable — It can't be updated.\n - Not recyclable — You can't reuse a `tracking_id`.\n",
"minLength": 1,
"maxLength": 43,
"example": "0a50c88a-ade8-4bcc-a639-9a0b0f11e244"
},
"TransactionCreatedAt": {
"type": "string",
"format": "date-time",
"description": "Transaction creation date in format ISO 8601",
"example": "2023-04-27T12:01:24Z"
},
"TransactionID": {
"type": "integer",
"format": "int64",
"description": "Transaction ID",
"example": 1111
},
"TransactionResponse": {
"type": "object",
"properties": {
"id": {
"$ref": "#/components/schemas/TransactionID"
},
"program_id": {
"$ref": "#/components/schemas/ProgramID3"
},
"account_id": {
"$ref": "#/components/schemas/AccountID"
},
"external_account_id": {
"$ref": "#/components/schemas/ExternalAccountID"
},
"soft_descriptor": {
"$ref": "#/components/schemas/SoftDescriptor"
},
"processing_code": {
"$ref": "#/components/schemas/ProcessingCode"
},
"processing_description": {
"$ref": "#/components/schemas/ProcessingCodeDescription"
},
"amount": {
"$ref": "#/components/schemas/Amount"
},
"event_date": {
"$ref": "#/components/schemas/EventDate"
},
"payment_date": {
"$ref": "#/components/schemas/PaymentDatetime"
},
"created_at": {
"$ref": "#/components/schemas/TransactionCreatedAt"
},
"transaction_type": {
"$ref": "#/components/schemas/TransactionType"
},
"authorization": {
"$ref": "#/components/schemas/Authorization"
},
"metadata": {
"$ref": "#/components/schemas/Metadata"
}
}
},
"TransactionType": {
"type": "object",
"description": "Transaction type",
"properties": {
"id": {
"$ref": "#/components/schemas/TransactionTypeID"
},
"description": {
"$ref": "#/components/schemas/TransactionTypeDescription"
},
"credit": {
"$ref": "#/components/schemas/IsCredit"
},
"posted_transaction": {
"$ref": "#/components/schemas/PostedTransaction"
}
}
},
"TransactionTypeDescription": {
"type": "string",
"description": "Transaction type description",
"maxLength": 30,
"example": "Purchase"
},
"TransactionTypeID": {
"type": "integer",
"format": "int64",
"description": "Transaction type ID",
"example": 2345
}
},
"responses": {
"500InternalServer": {
"description": "Internal Server Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Generic internal error": {
"value": {
"code": "ECMN9999",
"message": "Internal error"
}
}
}
}
}
}
},
"securitySchemes": {
"BearerAuth": {
"type": "http",
"scheme": "bearer",
"bearerFormat": "JWT"
}
}
},
"paths": {
"/corporate/v1/corporate-transactions/{transactionId}": {
"get": {
"summary": "Get transaction (transaction banking)",
"description": "Gets transaction using transaction ID.",
"operationId": "get-corporate-transaction",
"tags": [
"Transactions"
],
"parameters": [
{
"$ref": "#/components/parameters/TransacationIDPath"
}
],
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TransactionResponse"
},
"examples": {
"Example transaction": {
"value": {
"id": 1111,
"program_id": 2222,
"account_id": 1234,
"external_account_id": "b993ba96-b3e8-4ef7-9cf7-7eee5ddafdab",
"soft_descriptor": "Purchase",
"processing_code": "219248",
"processing_description": "Hold Funds",
"amount": {
"currency": "USD",
"value": 1000.52
},
"event_date": "2023-04-27T12:01:24Z",
"payment_date": "2023-04-27T12:01:24Z",
"created_at": "2023-04-27T12:01:24Z",
"transaction_type": {
"id": 2345,
"description": "Purchase",
"credit": false,
"posted_transaction": true
},
"authorization": {
"id": 5678,
"type": "PLATFORM",
"code": "1234"
},
"metadata": {
"invoice": 2938
}
}
}
}
}
}
},
"400": {
"description": "A Bad Request validation error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"transactionId is invalid": {
"value": {
"code": "WCTR0005",
"message": "transactionId is invalid"
}
}
}
}
}
},
"401": {
"description": "Unauthorized.",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Account not authorized": {
"value": {
"code": "WCAC0001",
"message": "Account not authorized"
}
}
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Forbidden request": {
"value": {
"message": "access denied"
}
}
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ErrorResponse"
},
"examples": {
"Transaction not found": {
"value": {
"code": "WCTR0006",
"message": "Transaction not found"
}
}
}
}
}
},
"500": {
"$ref": "#/components/responses/500InternalServer"
}
}
}
}
}
}
```