Invoice transactions

Represents a list of transactions created for the invoice.

URI
/api/v9/invoices/ID/transactions

GET List transactions

Get a list of transactions for a given invoice. A transaction may be recorded by an administrator manually in the UI (for example, an accountant), it may be recorded via the API, or it may be recorded as part of a payment flow.

If a transaction was made using a payment gateway (a credit card payment, for instance), the payment element is also populated. The payment status can be new,canceled,failed,captured. From these statuses captured designates a successful payment, while others indicate various stages of the process (or failure). The message element may contain a description of the failure/error.

Notice that each transaction has an ID (regardless of type), while transactions that have a “payment”, also have two more identifiers: payment and external_id. The payment identifier is local to DreamApply, while the external_id may contain any identifier assigned by the payment gateway in use (such as Pago Atenei, Stripe, PayPal etc.). This external_id can be used to look up and correlate payment records within the external payment system.

Syntax
GET /api/v9/invoices/123/transactions
Host: apply.example.edu
Authorization: DREAM apikey="..."

Example request

Request
curl
curl \
  -X GET \
  -H "Authorization: DREAM apikey=\"YOUR-API-KEY\"" \
  "https://apply.example.edu/api/v9/invoices/123/transactions"

Response headers

HeaderValueDescription
Content-Typeapplication/jsonMedia type of the resource
Content-Length1234Size of the response body in bytes
X-Count3Number of created transactions

Response codes

Response codeDescription
200 OKThe list of invoice transactions was successfully returned

Example response

Response
{
  "43": {
    "id": 43,
    "amount": "5.00",
    "invoice": "/api/v9/invoices/532",
    "inserted": "2025-12-16T09:54:25+00:00",
    "collected": "2025-12-16",
    "administrator": "/api/v9/administrators/10006",
    "payment": null
  },
  "44": {
    "id": 44,
    "amount": "15.00",
    "invoice": "/api/v9/invoices/532",
    "inserted": "2025-12-16T09:57:11+00:00",
    "collected": "2025-12-16",
    "administrator": null,
    "payment": {
      "payment": "01KCK9DZXPE8C82F5AE0AV955F",
      "external_id": "pi_3Sev0C3BsCbItDpn0rx0zvsW",
      "status": "captured",
      "message": null,
      "inserted": "2025-12-16T09:56:28+00:00",
      "updated": "2025-12-16T09:57:11+00:00",
      "gateway": {
        "id": 39,
        "name": "Stripe",
        "adapter": "Stripe"
      }
    }
  }
}

POST Create a transaction

Create a new transaction for the invoice.

The URI for the new transaction that was created is returned in the Location header.

Syntax
POST /api/v9/invoices/123/transactions
Host: apply.example.edu
Authorization: DREAM apikey="..."

Parameters

NameRequired/OptionalDescription
amountRequiredValid decimal amount of the transaction
currencyRequiredCurrency code, must be the same as the currency of the invoice

Example request

Request
curl
curl \
  -X POST \
  -H "Authorization: DREAM apikey=\"YOUR-API-KEY\"" \
  "https://apply.example.edu/api/v9/invoices/123/transactions?amount=100&currency=EUR"

Response headers

HeaderValueDescription
Content-Typeapplication/jsonMedia type of the resource
Content-Length0Size of the response body in bytes
Location/api/invoices/123/transactions/12345URI of the created transaction

Response codes

Response codeDescription
201 CreatedA new transaction was successfully created
422 Unprocessable EntityThere were some validation errors, see the returned text