{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/divvy/json-schema/divvy-record-payment-response-dto-schema.json",
  "title": "RecordPaymentResponseDto",
  "description": "Record offline payment response dto.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/divvy-bills-api-openapi.yml#/components/schemas/RecordPaymentResponseDto",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "BILL-generated ID of the payment. The value begins with `stp`."
    },
    "vendorId": {
      "type": "string",
      "description": "BILL-generated ID of the vendor. The value begins with `009`."
    },
    "billId": {
      "type": "string",
      "description": "BILL-generated ID of the bill. The value begins with `00n`."
    },
    "billPayments": {
      "type": "array",
      "description": "List of bill payments",
      "items": {
        "$ref": "#/$defs/RecordBillPayResponseDto"
      }
    },
    "description": {
      "type": "string",
      "description": "Payment description"
    },
    "processDate": {
      "type": "string",
      "description": "Payment process date. The value is in the `yyyy-MM-dd` format.",
      "format": "date"
    },
    "amount": {
      "type": "number",
      "description": "Payment amount. For a payment in an international currency (not USD), this value is in the local currency."
    },
    "transactionNumber": {
      "type": "string",
      "description": "BILL-generated alphanumeric payment identification value"
    },
    "confirmationNumber": {
      "type": "string",
      "description": "BILL-generated bill payment confirmation value"
    },
    "status": {
      "allOf": [
        {
          "$ref": "#/$defs/PaymentStatus"
        },
        {
          "description": "Payment status."
        }
      ]
    },
    "exchangeRate": {
      "type": "number",
      "description": "Exchange rate for the payment in an international currency (not USD)"
    },
    "fundingAmount": {
      "type": "number",
      "description": "Payment amount in USD"
    },
    "onlinePayment": {
      "type": "boolean",
      "description": "Payment source.\n* `true`: Payment is made with BILL (online)\n* `false`: Payment is made outside BILL and then recorded in BILL (offline)\n\nThis field is set as `false` for the Record AP payment operation."
    },
    "disbursementType": {
      "allOf": [
        {
          "$ref": "#/$defs/DisbursementType"
        },
        {
          "description": "Disbursement type. This field is set as `OFFLINE` for the Record AP payment operation."
        }
      ]
    },
    "remittanceEmail": {
      "type": "string",
      "description": "Remittance email address set for the vendor"
    },
    "createdTime": {
      "type": "string",
      "description": "Payment created date and time",
      "format": "date-time"
    },
    "updatedTime": {
      "type": "string",
      "description": "Payment updated date and time",
      "format": "date-time"
    },
    "createdBy": {
      "type": "string",
      "description": "BILL-generated ID of the user that created the payment. The value begins with `006`."
    },
    "disbursementStatus": {
      "allOf": [
        {
          "$ref": "#/$defs/DisbursementStatus"
        },
        {
          "description": "Payment disbursement status. This field is set as `DONE` for the Record AP payment operation.\n"
        }
      ]
    },
    "singleStatus": {
      "allOf": [
        {
          "$ref": "#/$defs/PaymentSingleStatus"
        },
        {
          "description": "Unified payment status. This field provides BILL payment lifecycle updates based on the `status` and `disbursementStatus` values in the response.\n\nThis field is set as `PAID_OFFLINE` for the Record AP payment operation."
        }
      ]
    },
    "toPrintCheck": {
      "type": "boolean",
      "description": "Set as `true` to set the payment check as printable in your accounting system. Use this field only for check payments.\n"
    },
    "classifications": {
      "allOf": [
        {
          "$ref": "#/$defs/PaymentClassificationsDto"
        },
        {
          "description": "General ledger classifications information for the payment"
        }
      ]
    },
    "syncReference": {
      "type": "string",
      "description": "Payment reference ID in your accounting system. Set this field with payment information, such as check number.\n"
    },
    "allowExport": {
      "type": "boolean",
      "description": "Set as `true` to sync the bill payment with your accounting system\n"
    }
  },
  "$defs": {
    "DisbursementStatus": {
      "type": "string",
      "description": "The enum type for disbursement status.",
      "enum": [
        "SCHEDULE",
        "DONE",
        "FAILED",
        "VOID",
        "HOLD",
        "FXHOLD",
        "ESCHEATED",
        "UNDEFINED"
      ]
    },
    "DisbursementType": {
      "type": "string",
      "description": "Enum for Disbursement type.",
      "enum": [
        "CHECK",
        "ACH",
        "RPPS",
        "PAYPAL",
        "OFFLINE",
        "INTERNATIONAL_E_PAYMENT",
        "AMEX",
        "VIRTUAL_CARD",
        "WALLET",
        "CREDIT_CARD",
        "UNDEFINED"
      ]
    },
    "PaymentClassificationsDto": {
      "type": "object",
      "properties": {
        "chartOfAccountId": {
          "type": "string",
          "description": "BILL-generated ID of the chart of accounts. The value begins with `0ca`."
        }
      },
      "description": "Payment classifications dto."
    },
    "PaymentSingleStatus": {
      "type": "string",
      "enum": [
        "DISBURSEMENT_FAILED_ACTION_NEEDED",
        "DISBURSEMENT_FAILED_VENDOR_BANK_REJECTED",
        "FUNDING_FAILED_ACTION_NEEDED",
        "EXPIRING",
        "FUNDS_ESCHEATED",
        "CANCELED",
        "FUNDING_FAILED_VOIDED",
        "VOIDED",
        "CLEARED",
        "DELIVERED",
        "DISBURSEMENT_ON_HOLD",
        "VOID_PENDING",
        "SENT",
        "DISBURSEMENT_ON_HOLD_PAYER_IN_REVIEW",
        "PROCESSED",
        "FUNDING_STARTED",
        "FUNDING_ON_HOLD",
        "WAITING_ON_APPROVAL",
        "SCHEDULED",
        "READY_TO_FUND",
        "CANCELLATION_IN_PROGRESS",
        "UNDEFINED",
        "PARTIALLY_CLAIMED",
        "PAID_OFFLINE"
      ]
    },
    "PaymentStatus": {
      "type": "string",
      "description": "The enum Payment status dto.",
      "enum": [
        "APPROVING",
        "SCHEDULED",
        "PAID",
        "CANCELLED",
        "VOID",
        "ESCHEATED",
        "UNDEFINED"
      ]
    },
    "PaymentVendorCreditResponseDto": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "BILL-generated ID of the vendor credit applied to the bill payment. The value begins with `vcr`."
        },
        "amount": {
          "type": "number",
          "description": "Credit amount"
        }
      },
      "description": "Payment vendor credit response DTO."
    },
    "RecordBillPayResponseDto": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "BILL-generated ID of the bill payment. The value begins with `blp`."
        },
        "billId": {
          "type": "string",
          "description": "BILL-generated ID of the bill. The value begins with `00n`."
        },
        "amount": {
          "type": "number",
          "description": "Payment amount"
        },
        "vendorCredits": {
          "type": "array",
          "description": "Vendor credits applied to the bill payment",
          "items": {
            "$ref": "#/$defs/PaymentVendorCreditResponseDto"
          }
        }
      },
      "description": "Record bill pay response dto."
    }
  }
}