Codat · Schema

Commerce: Payment

Payments contain details of all payments made by customers to a company, including: amounts, currency used, payment method, payment provider, and payment status. Refunds are recorded as separate, negative payments. Note that a refund can only occur in relation to a payment that has been completed (i.e. has a status of `Paid`). When a customer cancels an order _before_ a payment has been completed, the payment shows as `Cancelled`. You can use data from the Payments endpoints to calculate key metrics, such as gross sales and monthly recurring revenue (MRR).

Unified APIAccountingIntegration

Properties

Name Type Description
amount number Payment Amount (including gratuity)
currency object Currency in which the payment was made
paymentMethodRef object
status object
paymentProvider string Service provider of the payment, if applicable.
dueDate object Date by which payment must be made
supplementalData object
View JSON Schema on GitHub

JSON Schema

codat-commercepayment-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/CommercePayment",
  "title": "Commerce: Payment",
  "description": "Payments contain details of all payments made by customers to a company, including: amounts, currency used, payment method, payment provider, and payment status.\n\nRefunds are recorded as separate, negative payments. Note that a refund can only occur in relation to a payment that has been completed (i.e. has a status of `Paid`). When a customer cancels an order _before_ a payment has been completed, the payment shows as `Cancelled`.\n\nYou can use data from the Payments endpoints to calculate key metrics, such as gross sales and monthly recurring revenue (MRR).",
  "type": "object",
  "allOf": [
    {
      "$ref": "#/components/schemas/CommerceOrder/allOf/0"
    },
    {
      "type": "object",
      "properties": {
        "amount": {
          "type": "number",
          "format": "decimal",
          "description": "Payment Amount (including gratuity)",
          "examples": [
            194.12,
            -283.56,
            0
          ]
        },
        "currency": {
          "$ref": "#/components/schemas/SourceAccount/properties/currency",
          "description": "Currency in which the payment was made"
        },
        "paymentMethodRef": {
          "$ref": "#/components/schemas/PaymentMethodRef"
        },
        "status": {
          "$ref": "#/components/schemas/CommercePayment/definitions/paymentStatus"
        },
        "paymentProvider": {
          "type": "string",
          "description": "Service provider of the payment, if applicable.",
          "examples": [
            "Amazon Pay",
            "Checkout.com",
            "SagePay"
          ]
        },
        "dueDate": {
          "description": "Date by which payment must be made",
          "$ref": "#/components/schemas/DateTime"
        },
        "supplementalData": {
          "$ref": "#/components/schemas/SupplementalData"
        }
      }
    },
    {
      "$ref": "#/components/schemas/CommerceOrder/allOf/2"
    },
    {
      "$ref": "#/components/schemas/CommerceOrder/allOf/3"
    }
  ],
  "definitions": {
    "paymentStatus": {
      "type": "string",
      "x-internal": true,
      "description": "Status of the payment.",
      "enum": [
        "Pending",
        "Authorized",
        "Paid",
        "Failed",
        "Cancelled",
        "Unknown"
      ]
    },
    "paymentType": {
      "type": "string",
      "x-internal": true,
      "nullable": true,
      "description": "Type of payment.",
      "enum": [
        "Cash",
        "Card",
        "Invoice",
        "OnlineCard",
        "Swish",
        "Vipps",
        "Mobile",
        "StoreCredit",
        "Paypal",
        "Custom",
        "Prepaid",
        "Unknown"
      ],
      "example": "Cash"
    },
    "paymentRef": {
      "x-internal": true,
      "allOf": [
        {
          "$ref": "#/components/schemas/CommerceOrder/allOf/0"
        },
        {
          "type": "object",
          "properties": {
            "amount": {
              "type": "number",
              "format": "decimal",
              "nullable": true,
              "description": "Payment Amount (including gratuity).",
              "examples": [
                194.12,
                -283.56,
                0
              ]
            },
            "currency": {
              "$ref": "#/components/schemas/SourceAccount/properties/currency",
              "description": "Currency in which the payment was made."
            },
            "type": {
              "$ref": "#/components/schemas/CommercePayment/definitions/paymentType"
            },
            "status": {
              "$ref": "#/components/schemas/CommercePayment/definitions/paymentStatus"
            },
            "paymentProvider": {
              "type": "string",
              "description": "Service provider of the payment, if applicable.",
              "examples": [
                "Amazon Pay",
                "Checkout.com",
                "SagePay"
              ]
            },
            "dueDate": {
              "description": "Date by which payment must be made",
              "$ref": "#/components/schemas/DateTime"
            }
          }
        },
        {
          "$ref": "#/components/schemas/CommerceOrder/allOf/2"
        },
        {
          "$ref": "#/components/schemas/CommerceOrder/allOf/3"
        }
      ]
    }
  }
}

Work with this as data

Every JSON Schema here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for schemas

4 MCP tools reach this
  • find_json_schemasBrowse and filter every JSON Schema in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This JSON Schema
curl "https://apis.io/api/v1/json-schemas/codat-commercepayment"
All schemas
curl "https://apis.io/api/v1/json-schemas?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.