AEGVEN Docs

API reference

Explore the public API, including request fields, response schemas, and the authentication required for each endpoint.

Base URLhttps://app.aegven.com/api/v2
Download OpenAPI JSON

Send API requests from your server. Use the API base URL and organization credential provided for your environment.

POST/obligations

Register an obligation and atomically create its secure hosted payment request

Authentication

Organization API credential (Bearer token) or Customer user session.

HTTP
Authorization: Bearer <your-server-side-api-key>

Parameters

Idempotency-Keyheader · stringrequired
string

Min length: 8

Max length: 200

Request body required

application/json

obligation_typestringrequired

Allowed: "invoice""payment_condition""contractual""credit_note""adjustment""write_off"

organization_rolestring

The current organization's role. Omit for the backward-compatible creditor default.

Allowed: "creditor""debtor"

external_referenceobjectrequired
Show external_reference schema
namespacestringrequired
idstringrequired

Additional properties are not accepted.

debtorobject
Show debtor schema
namestringrequired
emailstring

Additional properties are not accepted.

creditorobject
Show creditor schema
namestringrequired
emailstring

Additional properties are not accepted.

amount_minorstringrequired

Positive integer minor units; never a floating-point number.

Pattern: ^[1-9][0-9]*$

currencystringrequired

Allowed: "CAD""USD""EUR""GBP""JPY""AUD""CHF"

deadlinestring · daterequired
business_contextobjectrequired
Show business_context schema
source_referencestringrequired

The source system's namespaced document or workflow reference, independent of customer terminology.

descriptionstring

Additional properties are not accepted.

labelstring
conditionobject
Show condition schema
summarystring
statusstring

Allowed: "pending""satisfied""waived"

satisfied_onstring

Additional properties are not accepted.

conditionsobject[]
Show conditions schema

Array of object

idstring · uuid
keystringrequired

Max length: 120

subject_refstring

What the condition is about, for example order:408869. Obligations gated on the same event share one condition by using the same key and subject; omitting it makes the condition private to this obligation.

Max length: 250

labelstringrequired

Max length: 250

external_referenceobject
Show external_reference schema
namespacestringrequired
idstringrequired

Additional properties are not accepted.

statusstring

Allowed: "waiting""satisfied""waived"

satisfied_onstring · date
sourcestring
evidence_referencestring

Additional properties are not accepted.

payment_termsobject[]
Show payment_terms schema

Array of object

idstring · uuid
sequenceintegerrequired

Minimum: 1

labelstring

Max length: 250

amount_typestringrequired

Allowed: "fixed""percentage""balance"

fixed_amount_minorstring

Pattern: ^[1-9][0-9]*$

percentage_basis_pointsinteger

Minimum: 1

Maximum: 10000

amount_minorstring

Pattern: ^[1-9][0-9]*$

allocated_minorstring

Cash amount independently accepted for this stage.

credited_minorstring

Amount discharged by accepted credit applications for this stage.

trigger_typestringrequired

Allowed: "immediately""specific_date""condition_satisfied"

trigger_datestring · date
condition_idstring · uuid
condition_keystring

References a condition key during registration.

due_rulestringrequired

Allowed: "immediately""specific_date""days_after_trigger"

due_datestring · date
due_daysinteger

Minimum: 1

Maximum: 36500

triggered_onstring · date
payable_onstring · date
invoiced_onstring · date

When this stage was invoiced. Recorded, not derived: only the system that raised the invoice knows it happened.

invoice_external_refstring

Max length: 250

billing_statestring

The authoritative lifecycle projected by the Rust core for an explicit effective date and persisted with the stage.

Allowed: "waiting""billable""invoiced""partially_satisfied""satisfied"

reported_minorstring
pending_minorstring
remaining_minorstring
reportable_majorstring
status_labelstring
percentage_labelstring
condition_labelstring
condition_statusstring
activeboolean
can_reportboolean
recently_payableboolean

Became payable in the last 14 days after a date or condition.

line_item_idstring

The line item this stage bills. Absent when the stage bills the line items that have no stages of their own, or the whole obligation when it has none. A percentage stage is a percentage of what it bills.

completeboolean

Backend coverage projection.

progress_labelstring

Backend presentation of the payment stage state.

kindstring

An ordinary stage, or retention held back until its release trigger.

Allowed: "stage""retention"

reportable_minorstring

What a payer can still report for this stage after other unconfirmed reports.

paid_minorstring

Confirmed payments and accepted credits already applied to this stage.

remaining_majorstring
has_pendingboolean

Whether payer reports awaiting confirmation already claim part of this stage.

Additional properties are not accepted.

context_idsstring · uuid[]
Show context_ids schema

Array of string · uuid

string · uuid
schedule_template_keystring

Register against a named reusable schedule instead of spelling out payment_terms. Providing both is refused.

Max length: 120

condition_subject_refstring

What the template's conditions are about. Obligations naming the same subject share one event.

Max length: 250

tax_treatmentstring

Structural, not jurisdictional. not_recorded means the source stated no tax.

Allowed: "taxable""exempt""zero_rated""reverse_charge""not_recorded"

net_amount_minorstring

Amount excluding tax. Empty when tax_treatment is not_recorded. amount_minor stays tax-inclusive.

taxesobject[]
Show taxes schema

Array of object

codestringrequired

The source system's own tax code.

Min length: 1

Max length: 60

labelstringrequired

What the organization calls it: GST, PST, VAT, State Tax.

Min length: 1

Max length: 120

jurisdictionstring

Max length: 60

rate_basis_pointsinteger

Minimum: 0

Maximum: 1000000

basis_minorstringrequired

The amount this component was charged on.

amount_minorstringrequired

Exact minor units. May be "0" for a listed zero-rated component.

applies_tostring

What this tax was charged on: the whole obligation, or only the line items or payment stages listed in parts. Empty when the source did not say.

Allowed: """obligation""line_items""payment_terms"

partsobject[]

How this tax divides over the line items or payment stages it was charged on. Omitted when it was recorded against the whole amount only. The parts must add up to basis_minor and amount_minor.

Show parts schema

Array of object

line_item_idstring

The id of a line item on this obligation.

payment_term_idstring

The id of a payment stage on this obligation.

basis_minorstringrequired

This part's amount before tax, in exact minor units.

Pattern: ^[1-9][0-9]*$

amount_minorstringrequired

The tax charged on this part, in exact minor units.

Pattern: ^(0|[1-9][0-9]*)$

Additional properties are not accepted.

line_itemsobject[]

Deliverable parts of what was ordered. Omit for an undivided obligation.

Show line_items schema

Array of object

idstring

Stable identifier for this part. AEGVEN assigns one when omitted.

sequenceinteger

Minimum: 1

amount_minorstringrequired

Exact minor-unit value of this part.

labelstring

Max length: 250

descriptionstring

Max length: 2000

expected_onstring · date

Optional planned delivery date, no later than the obligation's final deadline.

quantitystring

Optional quantity as an exact decimal, such as "12" or "2.5".

Pattern: ^[0-9]{1,15}(\.[0-9]{1,6})?$

unitstring

Optional unit of the quantity, such as "pcs", "t" or "m". Requires quantity.

Max length: 20

unit_pricestring

Optional price per unit in major units as an exact decimal, such as "850.00" or "0.125". Requires quantity. Informational: amount_minor is what is owed.

Pattern: ^[0-9]{1,15}(\.[0-9]{1,6})?$

external_namespacestring
external_idstring

Additional properties are not accepted.

Additional properties are not accepted.

Example request

Replace the sample source record. Reuse the same body and idempotency key when retrying this registration.

cURL
curl "https://app.aegven.com/api/v2/obligations" \
  --header "Authorization: Bearer $AEGVEN_API_KEY" \
  --header "Content-Type: application/json" \
  --header "Idempotency-Key: register-source-1042" \
  --data '{
  "obligation_type": "invoice",
  "external_reference": {
    "namespace": "your-system",
    "id": "source-1042"
  },
  "debtor": {
    "name": "Recipient company",
    "email": "accounts@example.com"
  },
  "amount_minor": "125000",
  "currency": "CAD",
  "deadline": "2027-12-31",
  "business_context": {
    "invoice_number": "INV-1042",
    "description": "Services"
  }
}'

Responses

201Success

application/json

operation_idstringrequired
event_typestringrequired
tracking_urlstring
document_idstring
observation_idstring
obligationobjectrequired

The obligation as accepted, including its resolved display terminology.

Show obligation schema
idstringrequired
organization_idstringrequired
amount_minorstringrequired
allocated_minorstringrequired
credited_minorstringrequired

Amount discharged by accepted credit applications; cash allocations remain separate.

payable_minorstringrequired

Gross obligation amount activated by payment terms. Rust financial-core projection.

due_minorstringrequired

Gross payable amount whose calculated due date has arrived. Rust financial-core projection.

currencystringrequired
expected_payment_datestringrequired
reported_payment_datestringrequired
created_atstringrequired
updated_atstringrequired
statusstringrequired

Allowed: "OBLIGATION_CAPTURED""PAYMENT_REQUESTED""PAYMENT_CLAIMED""PARTIALLY_RECONCILED""RECONCILED"

versionintegerrequired

Minimum: 1

acknowledgedbooleanrequired
obligation_typestringrequired

Allowed: "invoice""payment_condition""contractual""credit_note""adjustment""write_off"

organization_rolestringrequired

Allowed: "creditor""debtor"

external_referenceobjectrequired
Show external_reference schema
namespacestringrequired
idstringrequired

Additional properties are not accepted.

debtorobjectrequired
Show debtor schema
namestringrequired
emailstring

Additional properties are not accepted.

deadlinestring · daterequired
business_contextobjectrequired
Show business_context schema
source_referencestringrequired

The source system's namespaced document or workflow reference, independent of customer terminology.

descriptionstring

Additional properties are not accepted.

creditorobjectrequired
Show creditor schema
namestringrequired
emailstring

Additional properties are not accepted.

referencestringrequired

Unique obligation correlation reference. Optional only for historical idempotent registration responses.

payment_referencestringrequired

Short code the payer includes in the bank transfer. The last character is a check character.

Pattern: ^PAY-[2-9A-HJ-NP-Z]{7}$

labelstringrequired
conditionobjectrequired
Show condition schema
summarystring
statusstring

Allowed: "pending""satisfied""waived"

satisfied_onstring

Additional properties are not accepted.

conditionsobject[]required
Show conditions schema

Array of object

idstring · uuid
keystringrequired

Max length: 120

subject_refstring

What the condition is about, for example order:408869. Obligations gated on the same event share one condition by using the same key and subject; omitting it makes the condition private to this obligation.

Max length: 250

labelstringrequired

Max length: 250

external_referenceobject
Show external_reference schema
namespacestringrequired
idstringrequired

Additional properties are not accepted.

statusstring

Allowed: "waiting""satisfied""waived"

satisfied_onstring · date
sourcestring
evidence_referencestring

Additional properties are not accepted.

payment_termsobject[]required
Show payment_terms schema

Array of object

idstring · uuid
sequenceintegerrequired

Minimum: 1

labelstring

Max length: 250

amount_typestringrequired

Allowed: "fixed""percentage""balance"

fixed_amount_minorstring

Pattern: ^[1-9][0-9]*$

percentage_basis_pointsinteger

Minimum: 1

Maximum: 10000

amount_minorstring

Pattern: ^[1-9][0-9]*$

allocated_minorstring

Cash amount independently accepted for this stage.

credited_minorstring

Amount discharged by accepted credit applications for this stage.

trigger_typestringrequired

Allowed: "immediately""specific_date""condition_satisfied"

trigger_datestring · date
condition_idstring · uuid
condition_keystring

References a condition key during registration.

due_rulestringrequired

Allowed: "immediately""specific_date""days_after_trigger"

due_datestring · date
due_daysinteger

Minimum: 1

Maximum: 36500

triggered_onstring · date
payable_onstring · date
invoiced_onstring · date

When this stage was invoiced. Recorded, not derived: only the system that raised the invoice knows it happened.

invoice_external_refstring

Max length: 250

billing_statestring

The authoritative lifecycle projected by the Rust core for an explicit effective date and persisted with the stage.

Allowed: "waiting""billable""invoiced""partially_satisfied""satisfied"

reported_minorstring
pending_minorstring
remaining_minorstring
reportable_majorstring
status_labelstring
percentage_labelstring
condition_labelstring
condition_statusstring
activeboolean
can_reportboolean
recently_payableboolean

Became payable in the last 14 days after a date or condition.

line_item_idstring

The line item this stage bills. Absent when the stage bills the line items that have no stages of their own, or the whole obligation when it has none. A percentage stage is a percentage of what it bills.

completeboolean

Backend coverage projection.

progress_labelstring

Backend presentation of the payment stage state.

kindstring

An ordinary stage, or retention held back until its release trigger.

Allowed: "stage""retention"

reportable_minorstring

What a payer can still report for this stage after other unconfirmed reports.

paid_minorstring

Confirmed payments and accepted credits already applied to this stage.

remaining_majorstring
has_pendingboolean

Whether payer reports awaiting confirmation already claim part of this stage.

Additional properties are not accepted.

contextsobject[]required
Show contexts schema

Array of object

idstring · uuidrequired
typestringrequired

Allowed: "company""project""order""invoice""external_object"

kindstringrequired

Allowed: "company""group""reference"

type_labelstringrequired
namestringrequired
referencestringrequired
relationship_typestringrequired
attributed_minorstring

Pattern: ^[1-9][0-9]*$

currencystring

Additional properties are not accepted.

type_labelstringrequired

What this organization calls this obligation type, for example Invoice, Bill or Contract.

type_label_pluralstringrequired
tax_treatmentstringrequired

Structural, not jurisdictional. not_recorded means the source stated no tax.

Allowed: "taxable""exempt""zero_rated""reverse_charge""not_recorded"

net_amount_minorstring

Amount excluding tax. Empty when tax_treatment is not_recorded. amount_minor stays tax-inclusive.

taxesobject[]required
Show taxes schema

Array of object

codestringrequired

The source system's own tax code.

Min length: 1

Max length: 60

labelstringrequired

What the organization calls it: GST, PST, VAT, State Tax.

Min length: 1

Max length: 120

jurisdictionstring

Max length: 60

rate_basis_pointsinteger

Minimum: 0

Maximum: 1000000

basis_minorstringrequired

The amount this component was charged on.

amount_minorstringrequired

Exact minor units. May be "0" for a listed zero-rated component.

applies_tostring

What this tax was charged on: the whole obligation, or only the line items or payment stages listed in parts. Empty when the source did not say.

Allowed: """obligation""line_items""payment_terms"

partsobject[]

How this tax divides over the line items or payment stages it was charged on. Omitted when it was recorded against the whole amount only. The parts must add up to basis_minor and amount_minor.

Show parts schema

Array of object

line_item_idstring

The id of a line item on this obligation.

payment_term_idstring

The id of a payment stage on this obligation.

basis_minorstringrequired

This part's amount before tax, in exact minor units.

Pattern: ^[1-9][0-9]*$

amount_minorstringrequired

The tax charged on this part, in exact minor units.

Pattern: ^(0|[1-9][0-9]*)$

Additional properties are not accepted.

line_itemsobject[]
Show line_items schema

Array of object

idstring

Stable identifier for this part. AEGVEN assigns one when omitted.

sequenceinteger

Minimum: 1

amount_minorstringrequired

Exact minor-unit value of this part.

labelstring

Max length: 250

descriptionstring

Max length: 2000

expected_onstring · date

Optional planned delivery date, no later than the obligation's final deadline.

quantitystring

Optional quantity as an exact decimal, such as "12" or "2.5".

Pattern: ^[0-9]{1,15}(\.[0-9]{1,6})?$

unitstring

Optional unit of the quantity, such as "pcs", "t" or "m". Requires quantity.

Max length: 20

unit_pricestring

Optional price per unit in major units as an exact decimal, such as "850.00" or "0.125". Requires quantity. Informational: amount_minor is what is owed.

Pattern: ^[0-9]{1,15}(\.[0-9]{1,6})?$

external_namespacestring
external_idstring

Additional properties are not accepted.

amendmentsobject[]
Show amendments schema

Array of object

idstringrequired
sequenceintegerrequired

Minimum: 1

effective_onstring · daterequired
previous_amount_minorstringrequired
amount_minorstringrequired
effectstringrequired

Derived by AEGVEN from the two amounts.

Allowed: "increase""decrease"

labelstring

Max length: 250

reasonstring

Max length: 2000

external_namespacestring
external_idstring

Additional properties are not accepted.

original_amount_minorstring

The value this obligation was accepted at, before any amendment.

condition_statusstring

Mirror of condition.status, kept for older integrations. Prefer condition.status.

condition_satisfied_onstring

Mirror of condition.satisfied_on (a date, or empty), kept for older integrations. Prefer condition.satisfied_on.

issuer_namestring

The issuing organization's display name.

link_expires_atstring · date-time

When the current secure payer link expires.

link_revokedboolean

Whether the issuer revoked the secure payer link.

Additional properties are not accepted.

payment_requestobject
Show payment_request schema
idstringrequired
obligation_idstringrequired
hosted_urlstringrequired

Bearer capability URL for an unregistered recipient; insert into your outgoing message. Do not log.

expires_atstring · date-timerequired

Additional properties are not accepted.

Additional properties are not accepted.

defaultStable API error

application/json

errorobjectrequired
Show error schema
codestringrequired

Stable error code. 403 insufficient_permission means the signed-in role lacks the endpoint permission. 403 insufficient_scope means the API key lacks the endpoint scope.

messagestringrequired

Additional properties are not accepted.

Additional properties are not accepted.

Understand retries and errors