#Eerik Kivistik
1 messages · Page 1 of 1 (latest)
Hello 👋
Typically we see users utilize the custom fields on the invoice to add this information
https://stripe.com/docs/invoicing/customize#custom-fields
Thinking if there's an alternative way here
Ah we call this limitation out in our docs
https://stripe.com/docs/invoicing/connect#:~:text=Invoices created on behalf of a connected account ​​don’t support%3A
Invoices created on behalf of a connected account ​​don’t support:
- Account tax IDs.
- Bank transfers payment methods, such as ACH Credit Transfer and paper checks.
Is there any control over how the custom fields and where they are rendered?
As far as I know, it renders in the invoice header. I don't think there's a way to move it around on the invoice.
When I try to submit the custom fields I get an error: com.stripe.exception.InvalidRequestException: Received unknown parameter: custom_fields[0][Vat Number]; code: parameter_unknown; request-id: req_wDZhEdNivdoQuV
This happens when creating the invoice
And adding a custom field named "Vat Number"
Can you try custom_fields[0]["Vat Number"]
Ah my bad, I'm not super versed in Java as such.
Let me see if there are any examples
Can you share snippet of the code you're using to set these key/values?
InvoiceCreateParams invoiceParams = InvoiceCreateParams.builder()
.setCustomer(customerId)
.setCurrency("EUR")
.setCollectionMethod(CollectionMethod.CHARGE_AUTOMATICALLY)
.addDefaultTaxRate("--")
.setOnBehalfOf(providerAccountId)
.setApplicationFeeAmount(feeAmountInCents)
.setTransferData(InvoiceCreateParams.TransferData.builder().setDestination(providerAccountId).build())
.setAutoAdvance(true)
.setDefaultPaymentMethod(paymentMethodId)
.setCustomFields(Arrays.asList(InvoiceCreateParams.CustomField.builder().putExtraParam("Vat Number", "TEST").build()))
.build();
Removed the tax rate id, since public chat...
Thanks, let me ask a colleague
I got it working. Cant use "putExtraParam" method. Had to separately setName and setValue
Thanks, it shows up in the header now
Ah nice!