Affirm · JSON Structure

Transactions Transaction Structure

Represents an Affirm payment transaction, capturing the full lifecycle from authorization through capture, refund, and void operations.

Type: object Properties: 13
FintechBNPLLendingPaymentsConsumer

Transaction is a JSON Structure definition published by Affirm, describing 13 properties. It conforms to the https://json-structure.org/meta/core/v0/# meta-schema.

Properties

id checkout_id order_id status amount amount_refunded currency created authorization_expiration provider_id remove_tax events token

Meta-schema: https://json-structure.org/meta/core/v0/#

JSON Structure

transactions-transaction-structure.json Raw ↑
{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/affirm/refs/heads/main/json-structure/transactions-transaction-structure.json",
  "name": "Transaction",
  "description": "Represents an Affirm payment transaction, capturing the full lifecycle from authorization through capture, refund, and void operations.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "A unique identifier representing the transaction.",
      "example": "500123"
    },
    "checkout_id": {
      "type": "string",
      "description": "A unique identifier referencing the Checkout object that originated this transaction.",
      "example": "500123"
    },
    "order_id": {
      "type": "string",
      "description": "Identifies the order within the merchant's order management system.",
      "example": "500123"
    },
    "status": {
      "type": "string",
      "description": "Current state of the transaction.",
      "enum": [
        "authorized",
        "captured",
        "voided",
        "refunded",
        "partially_refunded"
      ],
      "example": "authorized"
    },
    "amount": {
      "type": "int32",
      "description": "The original amount financed to the customer in this transaction, expressed in the smallest currency unit (e.g., cents for USD).",
      "example": 1
    },
    "amount_refunded": {
      "type": "int32",
      "description": "The cumulative amount refunded back to the customer from this transaction, expressed in the smallest currency unit.",
      "example": 1
    },
    "currency": {
      "type": "string",
      "description": "Local transaction currency following ISO 4217 standards.",
      "example": "USD"
    },
    "created": {
      "type": "datetime",
      "description": "The time when the transaction was created, in RFC 3339 format.",
      "example": "2025-03-15T14:30:00Z"
    },
    "authorization_expiration": {
      "type": "datetime",
      "description": "The time when the transaction authorization expires and can no longer be captured, in RFC 3339 format.",
      "example": "2025-03-15T14:30:00Z"
    },
    "provider_id": {
      "type": "int32",
      "description": "A unique identifier of the provider financing the transaction.",
      "example": 1
    },
    "remove_tax": {
      "type": "boolean",
      "description": "Indicates whether tax was paid by the provider (applicable to Affirm Connect only).",
      "example": true
    },
    "events": {
      "type": "array",
      "description": "Array of TransactionEvent objects documenting the transaction history.",
      "items": {
        "$ref": "#/components/schemas/TransactionEvent"
      },
      "example": [
        "example_value"
      ]
    },
    "token": {
      "type": "string",
      "description": "A JWT signing the JSON response. If PII is included, this token is also encrypted.",
      "example": "abc123def456abc123def456abc123de"
    }
  }
}