Credit Note Details API

Credit Note Details

  1. A product is purchased and returned back , how to get details of amount credited specific to item returned?

  2. API: @POST(“/service/platform/finance/v1.0/company/{company_id}/customer-credit-balance”) And i trying to get UserCredit information using above API but it giving error showing
    “Credit balance not available for requested mobile number”

    FinancePlatformModels.GetCustomerCreditBalanceResponse response = platformClient.finance.getCustomerCreditBalance(request);
    request has AffiliateId, SellerID and CustomerMobileNumber

  3. Same issue with CreditNoteDetails
    @POST(“/service/platform/finance/v1.0/company/{company_id}/credit-note-details”)
    its taking cin as input , confirm credit_note_id is cin if not where to find cin?

To get details of the amount credited specific to an item returned, you will need to use the API endpoint for retrieving credit note details. Here is how you can do it:

Endpoint

POST /service/platform/finance/v1.0/company/{company_id}/credit-note-details

Request Code Snippet

cURL

curl -X POST "https://api.fynd.com/service/platform/finance/v1.0/company/{company_id}/credit-note-details" \
-H 'Authorization: Bearer {authorization_token}' \
-H 'Content-Type: application/json' \
-d '{
  "credit_note_number": "CN12345"
}'

Sample Response Payload

{
  "success": true,
  "data": {
    "credit_note_number": "CN12345",
    "amount": 1000,
    "item_details": {
      "item_id": "ITEM123",
      "quantity": 1,
      "price": 1000
    },
    "status": "credited"
  }
}

If you encountering the error “Credit balance not available,” it means that the customer does not have any credited balance. Ensure that the customer_mobile_number you are using is correct and that the customer has a credited balance in the system.

FYI : A successful response will look like this:

{
  "success": true,
  "data": {
    "customer_mobile_number": "1234567890",
    "total_credited_balance": 500
  }
}

And yeah :white_check_mark:, you are sending all the required details which needs to fetch details

In the context of the CreditNoteDetails API, the cin (Credit Note Reference Number) is used as the input parameter to retrieve detailed information about a credit note. This is not the same as credit_note_id.

How to Find the cin

The cin or Credit Note Reference Number is typically provided when the credit note is issued. It is a unique identifier for the credit note and should be available in the documentation or records related to the credit note issuance.

Not able to find this API , the API(“/service/platform/finance/v1.0/company/{company_id}/credit-note-details”) which is available is taking “cin” as request body

@JsonInclude(Include.NON_NULL)
public static class CreditNoteDetailsRequest {
@JsonProperty(“data”)
private CnReferenceNumber data;
}

Ref Swagger link:
https://partners.fynd.com/help/docs/sdk/latest/platform/company/finance#creditNoteDetails

If balance credited for return and total balance is “zero” , it will zero as balance or not ??

Using CIN Ref number for the credit note pdf provieded by fynd but still getting below respone : com.sdk.common.model.FDKServerResponseError: HTTP responseCode: 400 responseBody :{“success”:false,“reason”:“Requested credit note do not exist.”}

This endpoint requires cn_reference_number as part of the request body. Previously, I mentioned cin to explain it in the context you were familiar with, but please use cn_reference_number moving forward.

Attached link to the API.

https://partners.fynd.com/help/docs/sdk/1.9.0/platform/company/finance#creditNoteDetails

You would get credit note details from the platform.
Attached link, refer the cn number from here.

Enter your company id here and see the your cn number.

https://platform.fynd.com/company/{your-company-id}/billing/bills?activeTab=cn_dn

Can you elaborate it more, like from whom context you are talking about, customer or seller ?

Using CIN Ref number for the credit note pdf provieded by fynd but still getting below respone : com.sdk.common.model.FDKServerResponseError: HTTP responseCode: 400 responseBody :{“success”:false,“reason”:“Requested credit note do not exist.”}

To get the details of the amount credited specific to an item returned, you can use the getOrderById API from Fynd’s SDK. This API provides comprehensive order details, including the refund_amount. Here is a sample response structure:

{
  "success": true,
  "order": {
    "fynd_order_id": "FY637CFCC00177713D47",
    "prices": {
      "refund_amount": 948.5
    },
    "shipments": [
      {
        "bags": [
          {
            "financial_breakup": {
              "refund_amount": 474.25,
              "item_name": "L'Oreal Paris Rouge Signature Matte Liquid Lipstick"
            }
          }
        ]
      }
    ]
  }
}

Steps to get the refund amount for a returned item:

  1. Get Order Details: Use the getOrderById API to fetch the order details by providing the order_id.
  2. Locate Refund Amount: Look for the refund_amount within the prices object at the order level for the total refund.
  3. Item-Specific Refund: If you need to find the refund amount for a specific item, look inside the shipments array, then within each bags array, you will find financial_breakup objects. Each financial_breakup object contains the refund_amount and item_name.

Here is a link to the getOrderById API documentation for more details.