Skip to main content

InvoicePayment.paymentSource — normalised codes for custom payment types

Summary

When a practice creates a custom payment type, Semble now stores a stable paymentSource code derived from the type label, instead of always using UNKNOWN.

Normalisation rules:

  • Uppercase
  • Spaces and special characters become _

Example: "Type test""TYPE_TEST"

Built-in payment methods are unchanged (CASH, DEBIT_CARD, BANK_TRANSFER, etc.).

When you read paymentSource on an invoice payment that used a custom payment type, use this normalised code for reporting and analytics rather than matching on the free-text payment type name.

Query example

query InvoicePaymentSources($id: ID!) {
invoice(id: $id) {
id
payments {
id
paymentSource
paymentAmount
paymentDate
}
}
}

Compatibility

  • Existing clients that treat paymentSource as an opaque string continue to work.
  • Historical payments may still show UNKNOWN for custom methods recorded before this change (payment source is captured at payment time).
  • API reference: InvoicePayment