Payment links API and Tax rate group ID

Im trying to create a payment link through the API. Most things work, but setting a Tax Rate Group ID doesnt work.

I’ve tried both mode: FROM_PRODUCT and mode: CUSTOM.

{

 "paymentLinkName": "Scenario payment link 2026-10-03T14:55:16.414Z",
"currencyCode": "SEK",
"isOneTimeUseEnabled": true,
"automatedSalesTaxEnabled": false,
"discountCodeEnabled": false,
"storePaymentMethodAtCheckout": true,
"lineItems": [
    {
"mode": "CUSTOM",
"name": "Test product",
"quantity": 1,
"lineItemCurrencyCode": "SEK",
"pricing": {
"prices": [
          {
"currencyCode": "SEK",
"price": "279600"
          }
        ],
"pricingModel": "FLAT"
      },
"productId": "433630653633",
"taxRateGroupId": "118095891"
    }
  ]
}

This does not work at all, no Tax group is applied. Works in the UI if I manually do it of course. Its documented in the API specification so I would assume it would work.

Hey @KennyEl, I think i can help here…

The first thing i’d suggest you to check is your endpoint version. The taxRateGroupId field is only supported on the newer /commerce/payment-links/2026-09/ endpoint. If your request goes to an older version, HubSpot doesn’t throw an error. It just ignores fields it doesn’t recognise, so the link gets created without any tax. That would explain why everything else works and only the tax is missing.

The second thing is your payload itself. You’re using mode CUSTOM but also passing a productId. CUSTOM is meant for line items that aren’t tied to a product, so having both in the same request can make HubSpot ignore what you’ve set. Try removing the productId and keep everything else the same. For FROM_PRODUCT, the easier option is to assign the tax rate directly on the product in your product library, so the line item inherits it when the link is created.

If it still doesn’t apply after that, you can work around it by creating the payment link first and then updating the line item through the CRM line items API with the tax rate group property. If CUSTOM mode without the productId still ignores the field, I’d post your request and response in the Developer forum, because it may be a bug in the new endpoint.

Hope this helps!

I’d also check the response from the create request before changing anything else. Does it return the tax rate group, or is the value already missing at that point?

If the request succeeds but the field is missing, I’d test the smallest posible payload on the versioned endpoint, then retrieve the created link separately. That should help narrow down whether the field is being ignored during creation or just isn’t showing up where you expect it

I use the correct versioning, yes.
I removed the productId property when sending mode: CUSTOM but no tax rate group is applied.

Both the payment link response and the individual line items are missing the tax rate group id.

I’ve checked that its the correct ID for the tax group as well, and fetched it from the API.

New POST request

"method":"POST",
"url":"``https://api.hubapi.com/commerce/payment-links/2026-09/payment-links",
"body":{"paymentLinkName":"Scenario`` payment link 2026-10-04T07:03:20.109Z","currencyCode":"SEK","isOneTimeUseEnabled":true,"automatedSalesTaxEnabled":false,"discountCodeEnabled":false,"storePaymentMethodAtCheckout":true,"lineItems":[{"mode":"FROM_PRODUCT","quantity":1,"productId":"433630653633","taxRateGroupId":"118095891"},{"mode":"FROM_PRODUCT","quantity":1,"productId":"433476487354","taxRateGroupId":"118095891"}]}}

This will return the following payment link response

{
"paymentLinkName": "Scenario payment link 2026-10-04T07:03:20.109Z",
"currencyCode": "SEK",
"acceptedPaymentMethods": [
"CREDIT_OR_DEBIT_CARD"
],
"state": "ON",
"isOneTimeUseEnabled": true,
"includeEmailInSuccessRedirect": false,
"descriptionHtml": "",
"dealConfigurations": {
"createNewDealOnPurchase": false,
"pipelineStageId": null
},
"businessUnitId": "0",
"additionalFormFields": ,
"discountCodeEnabled": false,
"storePaymentMethodAtCheckout": true,
"collectShippingAddress": false,
"collectFullBillingAddress": false,
"automatedSalesTaxEnabled": false,
"createContractOnPurchase": false,
"id": "1389506878679",
"lineItems": [
{
"id": "490321632497",
"pricing": {
"pricingModel": "FLAT",
"prices": [
{
"currencyCode": "SEK",
"price": "2796.0"
}
]
},
"name": "Effira OPTi",
"quantity": 1,
"lineItemCurrencyCode": "SEK",
"productId": "433630653633"
},
{
"id": "490321632498",
"pricing": {
"pricingModel": "FLAT",
"prices": [
{
"currencyCode": "SEK",
"price": "55.2"
}
]
},
"name": "Bas månadsabonnemang",
"quantity": 1,
"description": "Endast ett abonnemang kan väljas och vara aktivt åt gången",
"richTextDescription": "Endast ett abonnemang kan väljas och vara aktivt åt gången",
"lineItemCurrencyCode": "SEK",
"productId": "433476487354",
"recurringBillingFrequency": "MONTHLY"
}
],
"formGuid": "daa9a3ad-ec99-469c-82c2-8d45e2a9ef5e",
"checkoutFeeIds": ,
"taxes": ,
"fees": ,
"discounts": ,
"paymentLinkUrl": " Checkout ",
"createdAt": "2026-10-04T07:03:20.660Z",
"updatedAt": "2026-10-04T07:03:20.660Z",
"completedPurchaseCount": 0,
"archived": false
}

Its missing information about taxes/VAT.

The line items created looks like this

[
{
"id": "490321632497",
"properties": {
"amount": "2796.00",
"createdate": "2026-10-04T07:03:20.863Z",
"hs_lastmodifieddate": "2026-10-04T07:03:20.863Z",
"hs_object_id": "490321632497",
"hs_product_id": "433630653633",
"hs_sku": "OPTI-HW",
"name": "Effira OPTi",
"price": "2796.0",
"quantity": "1",
"recurringbillingfrequency": null
},
"createdAt": "2026-10-04T07:03:20.863Z",
"updatedAt": "2026-10-04T07:03:20.863Z",
"archived": false,
"url": ""
},
{
"id": "490321632498",
"properties": {
"amount": "55.20",
"createdate": "2026-10-04T07:03:20.863Z",
"hs_lastmodifieddate": "2026-10-04T07:03:20.863Z",
"hs_object_id": "490321632498",
"hs_product_id": "433476487354",
"hs_sku": "OPTI-SUB-BAS-MONTHLY",
"name": "Bas månadsabonnemang",
"price": "55.2",
"quantity": "1",
"recurringbillingfrequency": "monthly"
},
"createdAt": "2026-10-04T07:03:20.863Z",
"updatedAt": "2026-10-04T07:03:20.863Z",
"archived": false,
"url": ""
}
]

Also missing VAT/Tax properties.

I then try and update the underlying line item with the following payload, line-item id from another payment link Ive created.

“method”:“PATCH”,
“url”:“https://api.hubapi.com/crm/objects/2026-09/line_items/490322424048",“body”:{“properties”:{“hs_tax_rate_group_id”:"118095891”}},

That doesnt work either.

You’re mentioning setting the tax directly on the product, how do I manage that?

My hunch is that something is not setup correctly on the account and Hubspot instead of letting me know what it is, is swallowing the validation error.

Please see my response, thanks for the help!

I’ve added a reply, thanks for the help.

That narrows it down quite a bit. Since `taxRateGroupId` is already missing from the create response, this doesn’t look like a read/display issue — the value isn’t being persisted in the first place

And since you’ve verifid the ID and reproduced it with both CUSTOM and FROM_PRODUCT, I’d probably stop changing the payload at this point. This is starting to look like either an account-level prerequisite or the API silently ignoring a field it currently can’t apply. I’d send HubSpot support this exact POST + response pair , it’s a pretty clean repro

Hi @KennyEl ,

You’ve already tested both FROM_PRODUCT and CUSTOM, so I don’t think the issue is simply the tax group ID itself. There are a couple of things I’d check here.

First, make sure you’re calling the current Payment Links API version. The Payment Links API has gone through a beta/current-version transition, and HubSpot can sometimes accept the request while ignoring fields that aren’t supported by the endpoint version you’re actually hitting. The current API is /commerce/payment-links/2026-09/.

I’d also change the CUSTOM payload slightly. In your example you have both:

“mode”: “CUSTOM”,
“productId”: “433630653633”

If you’re using CUSTOM, I’d remove productId and test with the tax group only. For example:

{
“mode”: “CUSTOM”,
“name”: “Test product”,
“quantity”: 1,
“lineItemCurrencyCode”: “SEK”,
“pricing”: {
“prices”: [
{
“currencyCode”: “SEK”,
“price”: “279600”
}
],
“pricingModel”: “FLAT”
},
“taxRateGroupId”: “118095891”
}

Also worth checking that 118095891 is an active tax rate group in that same HubSpot portal. HubSpot’s Tax Rates API can be used to retrieve the tax rate by its group ID, so that’s a quick way to confirm you’re passing a valid ID rather than just assuming the UI ID is usable.

If FROM_PRODUCT is the route you actually want, I’d test it with the product’s tax configuration rather than mixing productId with CUSTOM. That should also help isolate whether the problem is the tax group itself or the Payment Links API handling of the field.

If the request is definitely going through the current /2026-09/ endpoint, the tax group is valid/active, and CUSTOM without productId still creates the link with no tax, then I’d lean toward an API-side issue rather than a problem with your JSON. In that case, I’d include the exact request/response and correlation ID when raising it with HubSpot, since taxRateGroupId is documented but clearly isn’t being honoured in that scenario.

That would be the order I’d troubleshoot it in: endpoint version → valid tax group ID → remove productId from CUSTOM → retest → escalate if the field is still ignored.

Thanks for the response @SBhat3

I’ve verified the tax ratae group by fetching it using the ID from the API.
I’ve also changed to used mode: FROM_PRODUCT and it doesnt work :frowning:

Also the tax rate is set as default, so I assume if I leave it blank it would be applied, but that doesnt work either.

Hi @KennyEl, Happy Monday!

Thanks for reaching out to the HubSpot Community and thanks for all your contributions @SBhat3, @MahdiEqbal and @Alex_Boissonneault!

I can see that your request body matches the documented schema ( Create a payment link - HubSpot docs ) and still doesn’t apply the tax rate.

Could you please confirm if this is a sandbox or a production account?

I’ll be reaching out via DM about this.

Thanks,

Bérangère

Hi @Berangere

I’ve tested both Sandbox and production environment. The examples should be for the sandbox environment, but the same outcome regardless.

was this solved? Want to know the answer.

No, it wasn’t. Im currently in touch with a support as well.

Thanks for looping me in @Berangere!

Hey @KennyEl, your payload looks fine to me, so i think the API is ignoring taxRateGroupId on inline line items. The payment links guide only mentions tax through taxObjectIds and automatedSalesTaxEnabled. It never says taxRateGroupId gets applied on inline items, even though it’s in the schema.

Until HubSpot confirms, try my suggested workaround. Create the line item first with the CRM line items API and set hs_tax_rate_group_id to 118095891. Then create the payment link and pass that ID in lineItemObjectIds instead of building the item inline. Once it’s created, check the line item in the UI to make sure the tax group stuck before you rely on it.

Line items get stamped when the link is created, so you can’t fix tax on a link that already exists. You’ll have to make a new one.

If it still doesn’t apply that way, that’s pretty clear evidence it’s a bug. Worth adding to what she send @Berangere

Hi @KennyEl and all,

Thanks for letting us know that you’re already working with our Support team on this! :blush:

If you’re able to, it would be great if you could share what you find here. Your experience could be really helpful to other Community members who may be running into the same issue.

Thanks for helping others in the Community!

Bérangère