Expenses

Analyze an expense receipt

Extracts merchant, amount, currency, date, category, and line-item details from a receipt.

post/v1/expenses/ocr

Request

  • Base URL
    https://api.paymongo.com
  • URL
    https://api.paymongo.com/v1/expenses/ocr
  • Auth
    HTTP basic

Request body multipart/form-data

filestring binary required

Receipt file

expirationinteger

Temporary file expiration in minutes

Example request

{
  "expiration": 360
}

Response

Receipt analyzed

approved_countinteger
approved_total_amountinteger
has_moreboolean
pending_countinteger
rejected_countinteger
total_amountinteger

Example response

{
  "approved_count": 1,
  "approved_total_amount": 125000,
  "data": {
    "amount": 125000,
    "category": "meals",
    "created": "2026-07-15",
    "currency": "PHP",
    "id": "file_abc123",
    "items": [
      {
        "amount": 125000,
        "category": "meals",
        "currency": "PHP",
        "id": "exi_abc123",
        "line_no": 1,
        "name": "Team lunch",
        "quantity": 1,
        "tax_amount": 13393
      }
    ],
    "merchant": "Sample Restaurant",
    "tax": 13393,
    "type": "expense_ocr"
  },
  "has_more": true,
  "pending_count": 1,
  "total_amount": 250000
}

Changes

No recorded changes to this operation across all 1 revision of this API.