» Credit Note Module SDK Documentation
» Credit Note Module SDK Documentation

Getting Credit Note List

Function : credit_note_list()

Purpose

This API retrieves a paginated list of credit notes associated with the authenticated account. It is commonly used for financial reconciliation, displaying all credit notes in an account’s billing history, validating outstanding credits, and enabling downstream processes such as refunds, available balance checks, or allocations toward invoices. The SDK provides a simplified wrapper for calling this endpoint and receiving normalized response objects.

Parameters

parameter type description
limit integer Optional. Number of records to return per page.
offset integer Optional. Number of records to skip before starting to return results.

Use Case

A finance dashboard requires showing all available credit notes for a customer account. When the user opens the billing section, the backend service triggers the SDK call to fetch all credit notes, which are then displayed with status, remaining balance, amount, and invoice reference. This allows the system to determine whether the customer has refundable balances, verify past payments, link credits to invoices, and enable business workflows that depend on outstanding credit values. The credit note listing is especially useful for reconciliation, reporting, and applying available credits to future transactions. Below is a Python and PHP example demonstrating how the backend service retrieves the list of credit notes using SDK wrapper functions, with all real values replaced by placeholders.

def credit_note_list():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "{{TOKEN_FILE_PATH}}"
    file_token_mgr = FileTokenManager(token_file_path)

    exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(
        request_token_dto=CommonData.get_request_token_dto(),
        file_token_mgr=file_token_mgr
    )

    try:
        response = exsited_sdk.credit_note.list(
            limit={{LIMIT_PLACEHOLDER}},
            offset={{OFFSET_PLACEHOLDER}}
        )
        print(response)
        return response
    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

A successful response returns a structured list of credit notes along with pagination information. Each credit note includes fields such as id, status, amount, remaining balance, invoice reference, payment reference, timestamps, and version. Pagination metadata indicates how many records exist, which page is being viewed, and whether more pages are available.

CreditNoteListDTO(
    creditNotes=[
        CreditNoteDTO(
            status="{{STATUS_PLACEHOLDER}}",
            id="{{CREDIT_NOTE_ID_PLACEHOLDER}}",
            date="{{DATE_PLACEHOLDER}}",
            amount="{{AMOUNT_PLACEHOLDER}}",
            invoiceId="{{INVOICE_ID_PLACEHOLDER}}",
            remainingBalance="{{REMAINING_BALANCE_PLACEHOLDER}}",
            refundable="{{REFUNDABLE_PLACEHOLDER}}",
            paymentId="{{PAYMENT_ID_PLACEHOLDER}}",
            customAttributes=[],
            customObjects=[],
            version="{{VERSION_PLACEHOLDER}}",
            createdBy="{{CREATED_BY_PLACEHOLDER}}",
            createdOn="{{CREATED_ON_PLACEHOLDER}}",
            updatedBy="{{UPDATED_BY_PLACEHOLDER}}",
            updatedOn="{{UPDATED_ON_PLACEHOLDER}}",
            uuid="{{UUID_PLACEHOLDER}}",
            accountId="{{ACCOUNT_ID_PLACEHOLDER}}"
        )
    ],
    pagination=PaginationDTO(
        records={{RECORD_COUNT_PLACEHOLDER}},
        limit={{LIMIT_PLACEHOLDER}},
        offset={{OFFSET_PLACEHOLDER}},
        previousPage="{{PREVIOUS_PAGE_PLACEHOLDER}}",
        nextPage="{{NEXT_PAGE_PLACEHOLDER}}"
    )
)

Getting Credit Note by ID

Functioncredit_note_details()

Purpose

This function retrieves the detailed information of a specific credit note using its unique credit note ID.

Parameters

ParameterTypeDescription
credit-note_idStringUnique identifier of the credit note .

Use Case

The function is used to fetch comprehensive details of a particular credit note, including status, amount, related invoice, payment information, remaining balance, and metadata. Credit note in the system are generated when excess payment is made through any payment processor for an order, and the extra payment is recorded as a credit note for future adjustments or refunds. It is helpful when businesses need to review or validate the full record of a credit note for reconciliation or auditing purposes.

def credit_note_details():
    SDKConfig.PRINT_REQUEST_DATA = False
    SDKConfig.PRINT_RAW_RESPONSE = False

    exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())

    try:
        response = exsited_sdk.credit_note.details(id='CREDIT-NOTE_DETAILS')
        print(response)
        return response

    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The SDK function returns the complete details of the specified credit note, including general information such as status, credit note ID, date, amount, associated invoice and payment IDs, remaining balance, refund eligibility, custom attributes, and audit metadata. 

CreditNoteDetailsDTO(
    creditNote=CreditNoteDTO(
        status='STATUS',
        id='CREDIT_NOTE_ID',
        date='TIMESTAMP',
        amount='NUMBER',
        invoiceId='INVOICE_ID',
        remainingBalance='NUMBER',
        refundable='BOOLEAN',
        paymentId='PAYMENT_ID',
        customAttributes=[
            CustomAttributesDetailsDTO(
                name='ATTRIBUTE_NAME',
                value='EMPTY'
            )
        ],
        customObjects=[],
        version='VERSION',
        createdBy='CREATED_BY',
        createdOn='TIMESTAMP',
        updatedBy='EMPTY',
        updatedOn='EMPTY',
        uuid='UUID',
        accountId='ACCOUNT_ID'
    )
)

Getting Credit Note Applications 

Functioncredit_note_application_list()

Purpose

This function retrieves a list of credit note application records with details on usage, remaining balance, and related transactions.

Parameters

This function does not have any parameters.

Use Case

The function is used to to monitor the usage of credit notes in transactions. For example, when a customer makes a new order and chooses to pay using an existing credit note, the application of that credit note is recorded here. This helps finance teams understand how credit balances are reduced and track any remaining amounts available.

def credit_note_application_list():
    SDKConfig.PRINT_REQUEST_DATA = False
    SDKConfig.PRINT_RAW_RESPONSE = False

    exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())

    try:
        response = exsited_sdk.credit_note.credit_note_application_list()
        print(response)
        return response

    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The SDK function returns a list of credit note application details and pagination information. Each record includes the date, amount applied, credit note ID, associated payment or refund ID, remaining balance, creator details, and version information.

CreditNoteApplicationListDTO(
    creditNoteApplications=[
        CreditNoteApplicationDTO(
            date='TIMESTAMP',
            amount='NUMBER',
            creditNoteId='CREDIT_NOTE_ID',
            paymentId='PAYMENT_ID',
            refundId='EMPTY',
            remainingBalance='NUMBER',
            createdBy='CREATED_BY',
            createdOn='TIMESTAMP',
            uuid='UUID',
            version='VERSION'
        ),
        CreditNoteApplicationDTO(
            date='TIMESTAMP',
            amount='NUMBER',
            creditNoteId='CREDIT_NOTE_ID',
            paymentId='PAYMENT_ID',
            refundId='EMPTY',
            remainingBalance='NUMBER',
            createdBy='CREATED_BY',
            createdOn='TIMESTAMP',
            uuid='UUID',
            version='VERSION'
        )
    ],
    pagination=PaginationDTO(
        records='NUMBER',
        limit='NUMBER',
        offset='NUMBER',
        previousPage='EMPTY',
        nextPage='EMPTY'
    )
)

Getting Credit Note Application by UUID 

Functioncredit_note_application_details()

Purpose

This function retrieves detailed information about a specific credit note application using its unique UUID. It provides key details such as application date, amount, associated credit note ID, payment ID, refund information, remaining balance, creator details, and version.

Parameters

ParameterTypeDescription
credit-note-applications_uuidStringUnique identifier of the credit note application to retrieve details for.

Use Case

The function is used to fetch and review the full details of a specific credit note application for auditing, reconciliation, or customer account verification purposes. It helps businesses verify payment adjustments and ensure accurate credit allocations.

def credit_note_application_details():
    SDKConfig.PRINT_REQUEST_DATA = False
    SDKConfig.PRINT_RAW_RESPONSE = False

    exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())

    try:
        response = exsited_sdk.credit_note.credit_note_application_details(uuid=''CREDIT_NOTE_APPLICATION_UUID")
        print(response)
        return response

    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The SDK  function returns the complete details of the requested credit note application, including the transaction date, credited amount, related credit note and payment IDs, remaining balance, and metadata about its creation and version history.

CreditNoteApplicationDetailDTO(
    creditNoteApplication=CreditNoteApplicationDTO(
        date='TIMESTAMP',
        amount='NUMBER',
        creditNoteId='CREDIT_NOTE_ID',
        paymentId='PAYMENT_ID',
        refundId='EMPTY',
        remainingBalance='NUMBER',
        createdBy='CREATED_BY',
        createdOn='TIMESTAMP',
        uuid='UUID',
        version='VERSION'
    )
)

Getting an Invoice Credit Note Application List

Functioninvoice_credit_note_application_list()

Purpose

This function retrieves a list of credit note applications that have been applied to a specific invoice. It provides details about the applied amounts, linked payments, remaining balance, and audit information, along with pagination support for handling multiple records.

Parameters

ParamterTypeDescription
invoice_idStringUnique identifier of the invoice for which credit note applications are being retrieved.

Use Case

The function is used to check how credit notes have been applied against a given invoice. It is particularly useful for finance teams or billing systems to reconcile invoice balances, verify applied credit note amounts, and track payment associations to maintain accurate financial records.

def invoice_credit_note_application_list():
    SDKConfig.PRINT_REQUEST_DATA = False
    SDKConfig.PRINT_RAW_RESPONSE = False

    exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(request_token_dto=CommonData.get_request_token_dto())

    try:
        response = exsited_sdk.credit_note.invoice_credit_note_application_list(id='INVOICE_ID')
        print(response)
        return response

    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The SDK function response returns the invoice object containing a list of credit note applications and pagination details. Each credit note application includes the date of application, amount applied, credit note identifier, payment identifier, refund reference if any, remaining balance on the invoice, and metadata such as created_by, created_on, uuid, and version. Pagination provides record count, page size, offset, and navigation links to manage large sets of applications efficiently.

InvoiceCreditNoteApplicationListDTO(
    invoice=CreditNoteApplicationListDTO(
        creditNoteApplications=[
            CreditNoteApplicationDTO(
                date='TIMESTAMP',
                amount='NUMBER',
                creditNoteId='CREDIT_NOTE_ID',
                paymentId='PAYMENT_ID',
                refundId='EMPTY',
                remainingBalance='NUMBER',
                createdBy='CREATED_BY',
                createdOn='TIMESTAMP',
                uuid='UUID',
                version='VERSION'
            ),
            CreditNoteApplicationDTO(
                date='TIMESTAMP',
                amount='NUMBER',
                creditNoteId='CREDIT_NOTE_ID',
                paymentId='PAYMENT_ID',
                refundId='EMPTY',
                remainingBalance='NUMBER',
                createdBy='CREATED_BY',
                createdOn='TIMESTAMP',
                uuid='UUID',
                version='VERSION'
            ),
            CreditNoteApplicationDTO(
                date='TIMESTAMP',
                amount='NUMBER',
                creditNoteId='CREDIT_NOTE_ID',
                paymentId='PAYMENT_ID',
                refundId='EMPTY',
                remainingBalance='NUMBER',
                createdBy='CREATED_BY',
                createdOn='TIMESTAMP',
                uuid='UUID',
                version='VERSION'
            )
        ],
        pagination=PaginationDTO(
            records=NUMBER,
            limit=NUMBER,
            offset=NUMBER,
            previousPage='EMPTY',
            nextPage='NULL'
        )
    )
)

Updating a Credit Note 

Function: credit_note_update()

Purpose

This function is update an existing credit note by sending updated fields such as date or custom attributes to the Exsited platform using the SDK. It ensures that credit note information remains accurate for financial adjustments, refunds, or future invoice applications.

Parameter

Parameter
Type
Description
credit_note_id
string
The credit note ID to update .

Use Case

The function is used when a developer needs to modify an existing credit note through the SDK. For example, if the credit note’s date needs correction or if additional metadata must be applied, this function constructs the appropriate DTO request and sends it to the API. It returns the updated credit note details so the calling application can reflect the latest financial state.

def credit_note_update():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = False

    token_file_path = "shared_token.json"
    file_token_mgr = FileTokenManager(token_file_path)

    exsited_sdk: ExsitedSDK = ExsitedSDK().init_sdk(
        request_token_dto=CommonData.get_request_token_dto(),
        file_token_mgr=file_token_mgr
    )

    try:
        request_data=CreditNoteDetailsDTO(
            creditNote = CreditNoteDTO(
                date="APPLIED_DATE"
            )
        )
        response = exsited_sdk.credit_note.credit_note_update(id='CREDIT_NOTE_ID',request_data=request_data)
        print(response)
        return response

    except ABException as ab:
        print(ab)
        print(ab.get_errors())
        print(ab.raw_response)

Response

The function returns an updated containing the entire credit note object after the update. This includes the modified fields such as the updated date, as well as untouched fields like amount, associated invoice, refundable status, timestamps, and versioning. The response confirms the update operation was successful and provides the latest state of the credit note.

CreditNoteDetailsDTO(
    creditNote=CreditNoteDTO(
        status="CREDIT_NOTE_STATUS",
        id="CREDIT_NOTE_ID",
        date="CREDIT_NOTE_DATE",
        amount="CREDIT_NOTE_AMOUNT",
        invoiceId="INVOICE_ID",
        remainingBalance="REMAINING_BALANCE",
        refundable="BOOLEAN",
        paymentId="PAYMENT_ID",
        customAttributes="CUSTOM_ATTRIBUTES",
        customObjects="CUSTOM_OBJECTS",
        version="CREDIT_NOTE_VERSION",
        createdBy="CREATED_BY",
        createdOn="CREATED_TIMESTAMP",
        updatedBy="UPDATED_BY",
        updatedOn="UPDATED_TIMESTAMP",
        uuid="CREDIT_NOTE_UUID",
        accountId="ACCOUNT_ID"
    )
)