object Shipping
{
  "type": "object",
  "title": "Shipping Data",
  "required": [
    "address",
    "amount",
    "details"
  ],
  "properties": {
    "amount": {
      "type": "number",
      "example": 10.99,
      "description": "Total Shipping Amount of the Invoice"
    },
    "address": {
      "$ref": "#/components/schemas/Address"
    },
    "details": {
      "type": "string",
      "example": "Canada Post 1 day shipping",
      "description": "This will show up in the invoice"
    }
  }
}
object SuccessfulAchTransactionResponse
{
  "type": "object",
  "title": "Ach Transaction Response",
  "properties": {
    "type": {
      "type": "string",
      "example": "WITHDRAWAL",
      "description": "The type of the transaction. possible values are WITHDRAWAL | DEPOSIT | SETTLE | REVERSE | REFUND"
    },
    "amount": {
      "type": "number",
      "example": 11.99,
      "description": "The amount of processed transaction"
    },
    "batchId": {
      "type": "number",
      "example": 11,
      "description": "The id of associated card batch"
    },
    "currency": {
      "type": "string",
      "example": "CAD",
      "description": "The abbreviation of the transaction's currency"
    },
    "bankToken": {
      "type": "string",
      "example": "-A1B2C3D4E5F6G7*",
      "description": "Bank Token associated with bankAccount"
    },
    "statusAuth": {
      "type": "string",
      "example": "APPROVED",
      "description": "The status of the transaction. possible values are APPROVED | DECLINED | IN_PROGRESS | CANCELLED | PENDING"
    },
    "dateCreated": {
      "type": "string",
      "example": "2020-01-01 00:00:00",
      "description": "The date(Mountain Time) when the transaction is created."
    },
    "approvalCode": {
      "type": "string",
      "example": "HCMAPPRV",
      "description": "Approval Code"
    },
    "invoiceNumber": {
      "type": "string",
      "example": "INV2022",
      "description": "Invoice number associated to the transaction"
    },
    "transactionId": {
      "type": "number",
      "example": 10,
      "description": "The transaction id"
    },
    "statusClearing": {
      "type": "string",
      "example": "OPENED",
      "description": "The status of the transaction. possible values are OPENED | CLEARED | REJECTED | CONTESTED | RETURNED"
    },
    "bankAccountNumber": {
      "type": "string",
      "example": "A1B2C3D4E5F6G7",
      "description": "Bank account number"
    }
  }
}
object SuccessfulPaymentResponse
{
  "type": "object",
  "title": "Payment Response",
  "properties": {
    "type": {
      "type": "string",
      "example": "purchase",
      "description": "The type of the transaction. possible values are purchase | preauth | verify"
    },
    "user": {
      "type": "string",
      "example": "Helcim System",
      "description": "Full name of the user who processed the transaction. Default value is Helcim System"
    },
    "amount": {
      "type": "number",
      "example": 11.99,
      "description": "The amount of processed transaction"
    },
    "status": {
      "type": "string",
      "example": "APPROVED",
      "description": "The status of the transaction. possible values are APPROVED | DECLINED"
    },
    "warning": {
      "type": "string",
      "example": "Failed to link customer to invoice",
      "description": "Warnings"
    },
    "currency": {
      "type": "string",
      "example": "CAD",
      "description": "The abbreviation of the transaction's currency"
    },
    "cardToken": {
      "type": "string",
      "example": "5454HCMXTEST5454",
      "description": "Card token associated to the transaction"
    },
    "cardNumber": {
      "type": "string",
      "example": "5454545454",
      "description": "First-6 Last-4 numbers of the card number associated to the transaction"
    },
    "avsResponse": {
      "type": "string",
      "example": "M",
      "description": "AVS Response"
    },
    "cardBatchId": {
      "type": "number",
      "example": 11,
      "description": "The id of associated card batch"
    },
    "cvvResponse": {
      "type": "string",
      "example": "Y",
      "description": "CVV Response"
    },
    "dateCreated": {
      "type": "string",
      "example": "2020-01-01 00:00:00",
      "description": "The date(Mountain Time) when the transaction is created."
    },
    "approvalCode": {
      "type": "string",
      "example": "HCMAPPRV",
      "description": "Approval Code"
    },
    "customerCode": {
      "type": "string",
      "example": "CST1010",
      "description": "Customer code associated to the transaction"
    },
    "invoiceNumber": {
      "type": "string",
      "example": "INV2022",
      "description": "Invoice number associated to the transaction"
    },
    "transactionId": {
      "type": "number",
      "example": 10,
      "description": "The transaction id"
    },
    "cardHolderName": {
      "type": "string",
      "example": "John Smith",
      "description": "Cardholdername associated to the transaction"
    }
  }
}
object Tax
{
  "type": "object",
  "title": "Tax Data",
  "required": [
    "amount",
    "details"
  ],
  "properties": {
    "amount": {
      "type": "number",
      "example": 5.99,
      "description": "Total Tax Amount of the Invoice"
    },
    "details": {
      "type": "string",
      "example": "GST 5%",
      "description": "Tax Details"
    }
  }
}
object VerifyRequest
{
  "type": "object",
  "title": "Verify Request",
  "required": [
    "amount",
    "billingAddress",
    "cardData",
    "currency",
    "ipAddress"
  ],
  "properties": {
    "invoice": {
      "$ref": "#/components/schemas/VerifyRequest_invoice"
    },
    "cardData": {
      "$ref": "#/components/schemas/Card"
    },
    "currency": {
      "type": "string",
      "example": "CAD",
      "description": "The currency abbreviation of the transaction."
    },
    "ecommerce": {
      "type": "boolean",
      "example": true,
      "description": "Set to indicate that the transaction is e-commerce. When set, the Helcim Fraud Defender will provide further analysis."
    },
    "ipAddress": {
      "type": "string",
      "example": "192.168.1.1",
      "description": "IP address of the customer making the transaction, used as part of fraud detection."
    },
    "customerCode": {
      "type": "string",
      "example": "",
      "description": "Existing customer code associated with the transaction"
    },
    "invoiceNumber": {
      "type": "string",
      "example": "",
      "description": "To be filled when associating transaction to existing invoice. Invoice should be associated to the same customer linked to the card"
    },
    "billingAddress": {
      "$ref": "#/components/schemas/Address"
    }
  }
}
object VerifyRequest_invoice
{
  "allOf": [
    {
      "$ref": "#/components/schemas/InvoiceBase"
    },
    {
      "$ref": "#/components/schemas/InvoiceCreateAfterProcessing"
    }
  ]
}
object card_terminals_request
{
  "type": "object",
  "properties": {
    "status": {
      "type": "string",
      "example": "ACTIVE",
      "description": "The card terminal's status. possible values are ACTIVE | INACTIVE"
    },
    "currency": {
      "type": "string",
      "example": "CAD",
      "description": "The abbreviation of card terminal's currency. Possible values are CAD | USD"
    }
  }
}
object checkout_init_200_response
{
  "type": "object",
  "properties": {
    "secretToken": {
      "type": "string",
      "description": "The secret token is used to validate the transaction response"
    },
    "checkoutToken": {
      "type": "string",
      "description": "The checkout token is used to initialize Helcim Pay"
    }
  }
}
object checkout_init_default_response
{
  "type": "object",
  "properties": {
    "errors": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "List of errors"
    }
  }
}
object create_invoice_200_response
{
  "allOf": [
    {
      "type": "object"
    },
    {
      "$ref": "#/components/schemas/InvoiceResponseBase"
    },
    {
      "$ref": "#/components/schemas/InvoiceCreate"
    },
    {
      "$ref": "#/components/schemas/InvoiceCreateAfterProcessing"
    },
    {
      "$ref": "#/components/schemas/Invoice"
    }
  ]
}
object create_invoice_request
{
  "allOf": [
    {
      "$ref": "#/components/schemas/InvoiceBase"
    },
    {
      "$ref": "#/components/schemas/InvoiceCreate"
    },
    {
      "$ref": "#/components/schemas/InvoiceCreateAfterProcessing"
    }
  ]
}
object get_invoice_200_response
{
  "allOf": [
    {
      "$ref": "#/components/schemas/InvoiceResponseBase"
    },
    {
      "$ref": "#/components/schemas/InvoiceCreate"
    },
    {
      "$ref": "#/components/schemas/InvoiceCreateAfterProcessing"
    },
    {
      "$ref": "#/components/schemas/Invoice"
    }
  ]
}
object get_invoices_200_response_inner
{
  "allOf": [
    {
      "$ref": "#/components/schemas/InvoiceResponseBase"
    },
    {
      "$ref": "#/components/schemas/Invoice"
    }
  ]
}
object purchase_request
{
  "allOf": [
    {
      "$ref": "#/components/schemas/PaymentRequest"
    },
    {
      "$ref": "#/components/schemas/CardData"
    }
  ]
}
object update_invoice_request
{
  "allOf": [
    {
      "$ref": "#/components/schemas/InvoiceBase"
    },
    {
      "$ref": "#/components/schemas/InvoiceUpdate"
    }
  ]
}
object withdraw_request
{
  "allOf": [
    {
      "$ref": "#/components/schemas/PaymentRequest"
    },
    {
      "$ref": "#/components/schemas/BankData"
    }
  ]
}