Skip to main content

Create credit record with customer invoice (top-up or part payment)

POST 

/credit-record-invoices

Creates a credit record on a total balance (shared wallet) and, in the same operation, creates a linked customer invoice in the finance layer. The balance’s billing type decides whether you get a prepaid top-up or a postpaid part payment credit row, and how the invoice is submitted (including optional payment data).

Privileges (one of the following based on the deployment type):

  • bulk-billing-cust-topup.manage
  • bulk-billing-supplier-topup.manage
  • bulk-billing-cust-mnp-topup.manage
  • bulk-billing-supplier-mnp-topup.manage

Audit event:

  • credit.record.invoice.add

Errors:

  • 30 - Total Balance with given id not found
  • JSON_DECODING_ERROR - Unable to decode request body
  • NOT_AUTHENTICATED - Not authenticated
  • NOT_AUTHORIZED - Not authorized
  • INT_APP_ERROR - Unexpected internal error
  • NOT_PLATFORM_OWNER - Not authorized - not platform owner
  • INVALID-DATA - Input data validation failed

Error items:

  • invalid value - Total Balance with given id not found
  • invalid total balance - Cannot add credit to total balance with 'draft', 'inactive' or 'deleted' status
  • invalid value - Float value greater than 0 is expected
  • invalid value - Comment cannot be longer than 200 characters
  • invalid value - Payment type can not be 0
  • invalid value - Payment type must be in (1,2,3,4)
  • invalid value - Bank account with given id not found
  • invalid value - Bank account currency and total balance currency do not match

Request

Responses

Created — one object that contains credit record fields and nested invoice object when the finance service returns invoice data.