Retrieving Credit Note by ID
Function : credit_note_details()
Purpose
This function retrieves the detailed information of a specific credit note using its unique credit note ID.
Parameters
Parameter | Type | Description |
---|---|---|
credit-note_id | String | Unique 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)
public function testRead()
{
$id = "CREDIT-NOTE_ID";
try {
$response = $this->creditNoteService->read($id,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
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'
)
)
{
"credit_note": {
"status": "STATUS",
"id": "CREDIT_NOTE_ID",
"date": "TIMESTAMP",
"amount": "NUMBER",
"invoice_id": "INVOICE_ID",
"remaining_balance": "NUMBER",
"refundable": "BOOLEAN",
"payment_id": "PAYMENT_ID",
"custom_attributes": [
{
"name": "ATTRIBUTE_NAME",
"value": "EMPTY"
}
],
"custom_objects": [],
"version": "VERSION",
"created_by": "CREATED_BY",
"created_on": "TIMESTAMP",
"updated_by": "EMPTY",
"updated_on": "EMPTY",
"uuid": "UUID",
"account_id": "ACCOUNT_ID"
}
}
Retrieving Credit Note Applications
Function : credit_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)
public function testReadAllCreditNoteApplications()
{
try {
$response = $this->creditNoteService->readAllCreditNoteApplications('v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
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'
)
)
{
"credit_note_applications": [
{
"date": "TIMESTAMP",
"amount": "NUMBER",
"credit_note_id": "CREDIT_NOTE_ID",
"payment_id": "PAYMENT_ID",
"refund_id": "EMPTY",
"remaining_balance": "NUMBER",
"created_by": "CREATED_BY",
"created_on": "TIMESTAMP",
"uuid": "UUID",
"version": "VERSION"
},
{
"date": "TIMESTAMP",
"amount": "NUMBER",
"credit_note_id": "CREDIT_NOTE_ID",
"payment_id": "PAYMENT_ID",
"refund_id": "EMPTY",
"remaining_balance": "NUMBER",
"created_by": "CREATED_BY",
"created_on": "TIMESTAMP",
"uuid": "UUID",
"version": "VERSION"
}
],
"pagination": {
"records": "NUMBER",
"limit": "NUMBER",
"offset": "NUMBER",
"previous_page": "URL",
"next_page": "URL"
}
}
Retrieving Credit Note Application by UUID
Function : credit_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
Parameter | Type | Description |
---|---|---|
credit-note-applications_uuid | String | Unique 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='')
print(response)
return response
except ABException as ab:
print(ab)
print(ab.get_errors())
print(ab.raw_response)
public function testReadCreditNoteApplicationsDetails()
{
$creditNoteApplicationsUUID = "CREDIT_NOTE_APPLICATION_UUID";
try {
$response = $this->creditNoteService->readCreditNoteApplicationsDetails($creditNoteApplicationsUUID,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
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'
)
)
{
"credit_note_application": {
"date": "TIMESTAMP",
"amount": "NUMBER",
"credit_note_id": "CREDIT_NOTE_ID",
"payment_id": "PAYMENT_ID",
"refund_id": "EMPTY",
"remaining_balance": "NUMBER",
"created_by": "CREATED_BY",
"created_on": "TIMESTAMP",
"uuid": "UUID",
"version": "VERSION"
}
}
Retrieving a Invoice Credit Note Application List
Function: invoice_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
Paramter | Type | Description |
---|---|---|
invoice_id | String | Unique 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)
public function testReadInvoiceCreditNoteApplications()
{
$invoiceId = "INVOICE_ID";
try {
$response = $this->creditNoteService->readInvoiceCreditNoteApplications($invoiceId,'v3');
echo '<pre>' . json_encode($response, JSON_PRETTY_PRINT) . '</pre>';
} catch (Exception $e) {
echo 'Error: ' . $e->getMessage();
}
}
}
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'
)
)
)
{
"invoice": {
"credit_note_applications": [
{
"date": "TIMESTAMP",
"amount": "NUMBER",
"credit_note_id": "CREDIT_NOTE_ID",
"payment_id": "PAYMENT_ID",
"refund_id": "EMPTY",
"remaining_balance": "NUMBER",
"created_by": "CREATED_BY",
"created_on": "TIMESTAMP",
"uuid": "UUID",
"version": "VERSION"
},
{
"date": "TIMESTAMP",
"amount": "NUMBER",
"credit_note_id": "CREDIT_NOTE_ID",
"payment_id": "PAYMENT_ID",
"refund_id": "EMPTY",
"remaining_balance": "NUMBER",
"created_by": "CREATED_BY",
"created_on": "TIMESTAMP",
"uuid": "UUID",
"version": "VERSION"
},
{
"date": "TIMESTAMP",
"amount": "NUMBER",
"credit_note_id": "CREDIT_NOTE_ID",
"payment_id": "PAYMENT_ID",
"refund_id": "EMPTY",
"remaining_balance": "NUMBER",
"created_by": "CREATED_BY",
"created_on": "TIMESTAMP",
"uuid": "UUID",
"version": "VERSION"
}
],
"pagination": {
"records": "NUMBER",
"limit": "NUMBER",
"offset": "NUMBER",
"previous_page": "EMPTY",
"next_page": "NULL"
}
}
}