Payments Mutations

CreatePayment

Creates a new payment and associates it with one or multiple invoices.

Parameters:

ParameterTypeDescription
inputPaymentInput!Payment data.

Example Query:

mutation CreatePayment($input: PaymentInput!) {
  CreatePayment(input: $input) {
    id
    amount
    paid_at
  }
}

UpdatePayment

Updates an existing payment.

Parameters:

ParameterTypeDescription
idID!ID of the payment.
inputPaymentInput!Updated data.

DeletePayment

Deletes a payment record.

Parameters:

ParameterTypeDescription
idID!ID of the payment to delete.

Example Query:

mutation DeletePayment($id: ID!) {
  DeletePayment(id: $id)
}

Input Data Types

PaymentInput

FieldTypeDescription
idIntID for updates.
notesStringDescription or internal notes.
payment_methodPaymentMethodInputMethod used (e.g., Credit Card, Transfer).
customerCustomerInput!Associated customer.
paid_atDateDate of payment.
amountFloatTotal amount of payment.
invoice_payments[InvoicePaymentInput]!Allocation of the total amount to specific invoices.
custom_fields[EntityCustomFieldInput]Custom fields for this entity.

InvoicePaymentInput

FieldTypeDescription
idIDID of the invoice being paid.
amountFloatAmount allocated to the specific invoice.