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

Getting Details of a Specific Credit Note

Function: getCreditNoteDetails()

Purpose

The function retrieves detailed information about a specific credit note, including its status, amount, invoice linkage, and custom attributes.

Parameters

ParameterTypeDescription
CREDIT_NOTE_IDstringThe unique identifier for the credit note.

Use Case

This function can be used when a user or system needs to fetch and validate specific credit note details, including its status, amount, and associated invoice. It ensures accurate information for accounting processes, refunds, or audits.

def get_credit_note_details():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = True

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

    try:
        response = exsited_sdk.credit_note.details(id='CREDIT_NOTE_ID')
        print(response)
        return response

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

Response

The response contains detailed information about the credit note, including its status, amount, remaining balance, and other associated metadata. Custom attributes and versioning details are also included for extensibility and traceability.

CreditNoteDetailsDTO(
    creditNote=CreditNoteDTO(
        status='STATUS',
        id='CREDIT_NOTE_ID',
        date='DATE',
        amount='AMOUNT',
        invoiceId='INVOICE_ID',
        remainingBalance='REMAINING_BALANCE',
        refundable='BOOLEAN',
        paymentId='PAYMENT_ID',
        customAttributes=[
            {'name': 'ATTRIBUTE_NAME_1', 'value': 'ATTRIBUTE_VALUE_1'},
            {'name': 'ATTRIBUTE_NAME_2', 'value': 'ATTRIBUTE_VALUE_2'}
        ],
        customObjects=[],
        version='VERSION',
        createdBy='CREATED_BY',
        createdOn='CREATED_ON',
        updatedBy='UPDATED_BY',
        updatedOn='UPDATED_ON',
        uuid='UUID'
    )
)

Getting a List of Credit Note Applications

Function: getAllCreditNoteApplications()

Purpose

The function retrieves a list of all credit note applications, providing details like date, amount, associated payment and refund IDs, and other metadata.

Parameters

This function does not require any input parameters.

Use Case

This function can be used to fetch all credit note applications for reporting, reconciliation, or auditing purposes. It provides complete visibility into applied credit notes, including their payment and refund statuses, along with pagination details to handle large datasets.

def get_all_credit_note_applications():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = True

    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 response contains a list of credit note applications, including details such as the associated credit note ID, payment ID, refund ID, remaining balance, and creation metadata. It also includes pagination details for managing large result sets.

CreditNoteApplicationListDTO(
    creditNoteApplications=[
        CreditNoteApplicationDTO(
            date='DATE',
            amount='AMOUNT',
            creditNoteId='CREDIT_NOTE_ID',
            paymentId='PAYMENT_ID',
            refundId='REFUND_ID',
            remainingBalance='REMAINING_BALANCE',
            createdBy='CREATED_BY',
            createdOn='CREATED_ON',
            uuid='UUID',
            version='VERSION'
        )
    ],
    pagination=PaginationDTO(
        records='RECORD_COUNT',
        limit='LIMIT',
        offset='OFFSET',
        previousPage='PREVIOUS_PAGE',
        nextPage='NEXT_PAGE'
    )
)

Getting Details of a Specifice Credit Note Application

Function: getCreditNoteApplicationDetails()

Purpose

The function retrieves detailed information about a specific credit note application using its unique identifier (UUID).

Parameters

ParameterTypeDescription
CREDIT_NOTE_UUIDstringThe unique identifier for the credit note application is to be retrieved.

Use Case

This function can be used when you need to retrieve detailed information about a specific credit note application, typically for auditing, tracking, or reconciling individual credit note transactions. It provides complete insight into a single application, including associated payment and refund details.

def get_credit_note_application_details():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = True

    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_UUID')
        print(response)
        return response

Response

The response provides detailed information about the credit note application, including the date of application, amount, associated credit note ID, payment ID, refund ID, remaining balance, and metadata such as creation time and version.

CreditNoteApplicationDetailDTO(
    creditNoteApplication=CreditNoteApplicationDTO(
        date='DATE',
        amount='AMOUNT',
        creditNoteId='CREDIT_NOTE_ID',
        paymentId='PAYMENT_ID',
        refundId='REFUND_ID',
        remainingBalance='REMAINING_BALANCE',
        createdBy='CREATED_BY',
        createdOn='CREATED_ON',
        uuid='UUID',
        version='VERSION'
    )
)

Getting Credit Note Applications List of a Specific Invoice

Function: getInvoiceCreditNoteApplications()

Purpose

The function retrieves a list of all credit note applications associated with a specific invoice, providing transaction details such as amounts, credit note IDs, and payment references.

Parameters

ParameterTypeDescription
INVOICE_IDstringThe unique identifier for the invoice to fetch associated credit note applications.

Use Case

This function can be used for retrieving all credit note applications linked to a specific invoice, aiding in detailed transaction analysis, payment reconciliation, or refund processing. It is particularly helpful for tracking how credit notes have been applied to settle an invoice.

def get_invoice_credit_note_applications():
    SDKConfig.PRINT_REQUEST_DATA = True
    SDKConfig.PRINT_RAW_RESPONSE = True

    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 response includes a list of credit note applications linked to the specified invoice, detailing each application’s date, amount, associated credit note and payment IDs, remaining balance, and metadata such as creation time and version. Pagination information is provided to manage large datasets.

InvoiceCreditNoteApplicationListDTO(
    invoice=CreditNoteApplicationListDTO(
        creditNoteApplications=[
            CreditNoteApplicationDTO(
                date='DATE',
                amount='AMOUNT',
                creditNoteId='CREDIT_NOTE_ID',
                paymentId='PAYMENT_ID',
                refundId='REFUND_ID',
                remainingBalance='REMAINING_BALANCE',
                createdBy='CREATED_BY',
                createdOn='CREATED_ON',
                uuid='UUID',
                version='VERSION'
            )
        ],
        pagination=PaginationDTO(
            records='RECORD_COUNT',
            limit='LIMIT',
            offset='OFFSET',
            previousPage='PREVIOUS_PAGE',
            nextPage='NEXT_PAGE'
        )
    )
)