{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://raw.githubusercontent.com/api-evangelist/currencycloud/main/json-schema/currencycloud-payment-schema.json",
  "title": "Payment",
  "description": "Payment",
  "x-generated": "2026-10-12",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/currencycloud-payments-api-openapi.yml#/components/schemas/Payment",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "description": "Payment UUID"
    },
    "amount": {
      "type": "string",
      "description": "Payment amount"
    },
    "beneficiary_id": {
      "type": "string",
      "description": "Beneficiary UUID"
    },
    "currency": {
      "type": "string",
      "description": "Payment currency"
    },
    "reference": {
      "type": "string",
      "description": "Payment reference"
    },
    "reason": {
      "type": "string",
      "description": "Reason for payment."
    },
    "status": {
      "type": "string",
      "description": "Payment status"
    },
    "creator_contact_id": {
      "type": "string",
      "description": "Contact UUID of payment creator."
    },
    "payment_type": {
      "type": "string",
      "description": "Type of payment - priority(Swift) or regular(local)."
    },
    "transferred_at": {
      "type": "string",
      "description": "Date of payment processing."
    },
    "authorisation_steps_required": {
      "type": "string",
      "description": "Number of approvals required for the payment."
    },
    "estimated_arrival": {
      "type": "string",
      "description": "Estimated date of payment."
    },
    "payment_date": {
      "type": "string",
      "description": "Payment date."
    },
    "last_updater_contact_id": {
      "type": "string",
      "description": "Contact UUID of user who last updated the record."
    },
    "short_reference": {
      "type": "string",
      "description": "Short reference code."
    },
    "conversion_id": {
      "type": "string",
      "description": "Conversion UUID"
    },
    "failure_reason": {
      "type": "string",
      "description": "A reason for why the payment failed."
    },
    "payer_id": {
      "type": "string",
      "description": "Payer UUID"
    },
    "payer_details_source": {
      "type": "string",
      "description": "If the payment is a 3rd party one, the value will be \"account\". If  it is a 4th party payment, the value will be \"payer\"."
    },
    "created_at": {
      "type": "string",
      "description": "Date and time of when the payment was created."
    },
    "updated_at": {
      "type": "string",
      "description": "Date and time of when the payment was last updated."
    },
    "payment_group_id": {
      "type": "string",
      "description": "Payment group ID."
    },
    "unique_request_id": {
      "type": "string",
      "description": "The user-generated idempotency key provided for the payment."
    },
    "failure_returned_amount": {
      "type": "string",
      "description": "The amount returned on failure."
    },
    "ultimate_beneficiary_name": {
      "type": "string",
      "description": "The name of the ultimate beneficiary."
    },
    "purpose_code": {
      "type": "string",
      "description": "Payment purpose code."
    },
    "fee_amount": {
      "type": "string",
      "description": "Fee amount"
    },
    "fee_currency": {
      "type": "string",
      "description": "Currency code for fee."
    },
    "review_status": {
      "type": "string",
      "description": "Compliance review status - 'passed', 'in_review' or 'rejected'.",
      "enum": [
        "in_review",
        "passed",
        "rejected"
      ]
    },
    "invoice_number": {
      "type": "string",
      "description": "The invoice number related to the payment. Can be up to 30 characters."
    },
    "invoice_date": {
      "type": "string",
      "description": "The date of the invoice related to the payment. ISO 8601 format YYYY-MM-DD."
    }
  }
}