{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/argorant-com/json-schema/argorant-com-credit-purchase-schema.json",
  "title": "CreditPurchase",
  "x-generated": "2026-11-01",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/argorant-com-openapi.json#/components/schemas/CreditPurchase",
  "type": "object",
  "properties": {
    "purchase_id": {
      "type": "string",
      "description": "Purchase id, the same as the quote id.",
      "format": "uuid"
    },
    "status": {
      "type": "string",
      "description": "paid: credits added. awaiting_payment: send checkout_url to the person who pays. processing: wait a minute. not_charged: the card was not charged. expired: the link ran out unpaid.",
      "enum": [
        "paid",
        "awaiting_payment",
        "processing",
        "not_charged",
        "expired"
      ]
    },
    "paid_with": {
      "type": [
        "string",
        "null"
      ],
      "description": "saved_card or payment_link."
    },
    "card": {
      "type": [
        "string",
        "null"
      ],
      "description": "The saved card that was charged, for example card ending 4242."
    },
    "credits": {
      "type": "integer",
      "description": "Credits bought."
    },
    "credits_added": {
      "type": "integer",
      "description": "Credits added to the account."
    },
    "amount_cents": {
      "type": "integer",
      "description": "Amount in cents."
    },
    "currency": {
      "type": "string",
      "description": "Currency."
    },
    "checkout_url": {
      "type": [
        "string",
        "null"
      ],
      "description": "Payment page for the person who pays.",
      "format": "uri"
    },
    "message": {
      "type": "string",
      "description": "What happened, in one or two sentences."
    },
    "saved_card": {
      "type": "object",
      "description": "Present when the saved card was not used, with used (false), code and reason.",
      "additionalProperties": true
    },
    "replayed": {
      "type": "boolean",
      "description": "Present and true when this is the answer of an earlier call with the same quote."
    }
  }
}