#blueish
1 messages · Page 1 of 1 (latest)
Hi there! Can you share more details? What does the object you receive look like?
ok , give me a sec
<com.stripe.model.CreditNote@1252875785 id=cn_1MqlwVBtY8EQL3wKRnXLSQDF> JSON: {
"amount": 300,
"created": 1680046123,
"currency": "aud",
"customer": "cus_NCDEWo0WDk1lXn",
"customer_balance_transaction": null,
"id": "cn_1MqlwVBtY8EQL3wKRnXLSQDF",
"invoice": "in_1MqXi7BtY8EQL3wKuVQKqvjZ",
"livemode": false,
"memo": null,
"metadata": {},
"number": "INV-0013-CN-07",
"object": "credit_note",
"pdf": "https://pay.stripe.com/credit_notes/acct_1MCxZyBtY8EQL3wK/test_YWNjdF8xTUN4WnlCdFk4RVFMM3dLLF9OYnp3UGpndHhGbGhBVE1iSm9wMTVkYW4yWVpaNGFuLDcwNTg3Njgw0200kj90KaS1/pdf?s\u003dap",
"reason": "duplicate",
"refund": null,
"status": "issued",
"type": "pre_payment",
"voided_at": null
}
My code looks like this
RequestOptions requestOptions = RequestOptions.builder().setStripeAccount(stripeAccountId).build();
CreditNote stripeCreditNote = CreditNote.retrieve(creditNoteId, requestOptions);
got it, taking a look
take note that on the event I received from the webhook I saw the lines.
yeah, I see that on my end too
out of curiosity, are you able to retrieve a list of line items for that specific CreditNote (vs. retrieving the CreditNote object): https://stripe.com/docs/api/credit_notes/lines?lang=java
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
👋 taking over here
13.3 is pretty old SDK. Any reason you can't upgrade? It's 22.14 now
Afraid im going to break something.
Will there be some breaking changes if i'm gonna update it to the new version?
It could be yes, and you would need to test thoroughly via Test mode but you would need to catch up in the end of the day
Here is when Line Items is supported in CreditNote
Ok , but for now can you think of another way doing it in 13.3?
It was introduced in 16.x.x so I would recommend 17.0.0
any workarounds that I can try?
Well the property is not inside CreditNote object in 13.3.0. Here is it in 17.0.0 https://github.com/stripe/stripe-java/blob/v17.0.0/src/main/java/com/stripe/model/CreditNote.java#L70
ok thanks