Skip to content

Create payment

Request

Creates a new Payment record. Payment resource in the Animal Health Data Store

Security
bearer
Path
siteIdnumberrequired

Site identifier

Bodyapplication/jsonrequired
allocatedAmountstring

Total amount of the payment that has been allocated to invoices.

Example:"100.00"
amountstringrequired

Total payment amount as a decimal string.

Example:"100.00"
availableAmountstring

Unallocated portion of the payment that is still available.

Example:"100.00"
cashAmountstring

Portion of the payment that was paid in cash, if applicable.

Example:"100.00"
cashChangestring

Change returned to the client for cash payments, if applicable.

Example:"100.00"
clientIdstring

Identifier of the client associated with this payment.

Example:"123e4567-e89b-12d3-a456-426614174000"
commentsstring

Internal comments or notes about the payment.

Example:"Example description"
currencystring

ISO 4217 currency code for the payment amount.

Example:"CODE-001"
extensionsobject

Vendor- or practice-specific extensions.

isActivebooleanrequired

Indicates whether the payment record is active.

Example:true
linkedInvoicesArray of objects(LinkedInvoiceDto)

Invoices to which this payment has been allocated.

ownershipIdstring

Identifier for the owning organization or practice.

Example:"123e4567-e89b-12d3-a456-426614174000"
paymentDatestringrequired

Calendar date the payment was received or processed.

Example:"2025-01-01"
paymentDetailsstring

Free-text or structured details about the payment method (e.g., last 4 digits, reference number).

Example:"example"
paymentIdstring

Canonical unique identifier for the payment.

Example:"123e4567-e89b-12d3-a456-426614174000"
paymentMethodstringrequired

Method used to make the payment.

Enum:"cash""card""check""bank_transfer""online""other"
Example:"cash"
roundingFactorstring

Rounding adjustment applied to the payment, if any.

Example:"100.00"
statusstringrequired

Lifecycle status of the payment.

Enum:"pending""completed""cancelled""refunded""failed"
Example:"pending"
curl -i -X POST \
  'https://docs.axiomera.com/_mock/apis/animal-health/openapi/site/{siteId}/ahds/v1/payment' \
  -H 'Authorization: Bearer <YOUR_JWT_HERE>' \
  -H 'Content-Type: application/json' \
  -d '{
    "allocatedAmount": "100.00",
    "amount": "100.00",
    "availableAmount": "100.00",
    "cashAmount": "100.00",
    "cashChange": "100.00",
    "clientId": "123e4567-e89b-12d3-a456-426614174000",
    "comments": "Example description",
    "currency": "CODE-001",
    "extensions": {},
    "isActive": true,
    "linkedInvoices": [
      {
        "allocatedAmount": "100.00",
        "invoiceId": "123e4567-e89b-12d3-a456-426614174000"
      }
    ],
    "ownershipId": "123e4567-e89b-12d3-a456-426614174000",
    "paymentDate": "2025-01-01",
    "paymentDetails": "example",
    "paymentId": "123e4567-e89b-12d3-a456-426614174000",
    "paymentMethod": "cash",
    "roundingFactor": "100.00",
    "status": "pending"
  }'

Responses

Payment created successfully

Bodyapplication/json
allocatedAmountstringrequired

Total amount of the payment that has been allocated to invoices.

Example:"100.00"
amountstringrequired

Total payment amount as a decimal string.

Example:"100.00"
availableAmountstringrequired

Unallocated portion of the payment that is still available.

Example:"100.00"
cashAmountstringrequired

Portion of the payment that was paid in cash, if applicable.

Example:"100.00"
cashChangestringrequired

Change returned to the client for cash payments, if applicable.

Example:"100.00"
clientIdstringrequired

Identifier of the client associated with this payment.

Example:"123e4567-e89b-12d3-a456-426614174000"
commentsstringrequired

Internal comments or notes about the payment.

Example:"Example description"
createdAtstring, (date-time)required

Timestamp when the payment record was created.

Example:"2025-01-01T00:00:00.000Z"
currencystringrequired

ISO 4217 currency code for the payment amount.

Example:"CODE-001"
extensionsobjectrequired

Vendor- or practice-specific extensions.

isActivebooleanrequired

Indicates whether the payment record is active.

Example:true
linkedInvoicesArray of objects(LinkedInvoiceDto)required

Invoices to which this payment has been allocated.

ownershipIdstringrequired

Identifier for the owning organization or practice.

Example:"123e4567-e89b-12d3-a456-426614174000"
paymentDatestring, (date-time)required

Calendar date the payment was received or processed.

Example:"2025-01-01T00:00:00Z"
paymentDetailsstringrequired

Free-text or structured details about the payment method (e.g., last 4 digits, reference number).

Example:"example"
paymentIdstringrequired

Canonical unique identifier for the payment.

Example:"123e4567-e89b-12d3-a456-426614174000"
paymentMethodstringrequired

Method used to make the payment.

Enum:"cash""card""check""bank_transfer""online""other"
Example:"cash"
roundingFactorstringrequired

Rounding adjustment applied to the payment, if any.

Example:"100.00"
statusstringrequired

Lifecycle status of the payment.

Enum:"pending""completed""cancelled""refunded""failed"
Example:"pending"
updatedAtstring, (date-time)required

Timestamp when the payment record was last updated.

Example:"2025-01-01T00:00:00.000Z"
Response
{ "allocatedAmount": "100.00", "amount": "100.00", "availableAmount": "100.00", "cashAmount": "100.00", "cashChange": "100.00", "clientId": "123e4567-e89b-12d3-a456-426614174000", "comments": "Example description", "createdAt": "2025-01-01T00:00:00.000Z", "currency": "CODE-001", "extensions": {}, "isActive": true, "linkedInvoices": [ { … } ], "ownershipId": "123e4567-e89b-12d3-a456-426614174000", "paymentDate": "2025-01-01T00:00:00Z", "paymentDetails": "example", "paymentId": "123e4567-e89b-12d3-a456-426614174000", "paymentMethod": "cash", "roundingFactor": "100.00", "status": "pending", "updatedAt": "2025-01-01T00:00:00.000Z" }