kintsugi-tax / tax-platform-sdk
Package info
github.com/kintsugi-tax/kintsugi-tax-php-sdk
pkg:composer/kintsugi-tax/tax-platform-sdk
Requires
- php: >=8.2
- brick/date-time: >=0.7.0
- brick/math: >=0.12.1
- galbar/jsonpath: >=3.0
- guzzlehttp/guzzle: ^7.15.2
- phpdocumentor/type-resolver: >=1.8
- speakeasy/serializer: ^4.0.3
Requires (Dev)
- laravel/pint: 1.29.0
- phpstan/phpstan: 2.1.44
- phpunit/phpunit: ^11.5.50 || ^12.5.8 || >=13.0.0
- roave/security-advisories: dev-latest
Suggests
None
Provides
None
Conflicts
None
Replaces
None
- dev-main
- v0.7.0
- v0.6.2
- v0.6.1
- v0.6.0
- v0.5.0
- v0.4.7
- v0.4.6
- v0.4.5
- v0.4.4
- v0.4.3
- v0.4.2
- v0.4.1
- v0.3.0
- v0.2.0
- v0.1.10
- v0.1.9
- v0.1.8
- v0.1.7
- v0.1.6
- v0.1.5
- v0.1.4
- v0.1.1
- dev-speakeasy-sdk-regen-1787962212
- dev-speakeasy-sdk-regen-1783438798
- dev-speakeasy-sdk-regen-1773274217
- dev-speakeasy-sdk-regen-1772492726
- dev-speakeasy-sdk-regen-1771891903
- dev-speakeasy-sdk-regen-1761350811
- dev-speakeasy-sdk-regen-1758758936
- dev-speakeasy-sdk-regen-1758067610
- dev-speakeasy-sdk-regen-1756512405
- dev-speakeasy-sdk-regen-1756253234
- dev-speakeasy-sdk-regen-1756166827
- dev-speakeasy-sdk-regen-1754611668
- dev-speakeasy-sdk-regen-1754093269
- dev-speakeasy-sdk-regen-1753997350
- dev-speakeasy-sdk-regen-1753995450
- dev-speakeasy-sdk-regen-1753995026
- dev-speakeasy-sdk-regen-1753920460
- dev-speakeasy-sdk-regen-1753747700
- dev-speakeasy-sdk-regen-1753315672
- dev-speakeasy-sdk-regen-1753201937
- dev-speakeasy-sdk-regen-1752883664
- dev-speakeasy-sdk-regen-1752859328
- dev-speakeasy-sdk-regen-1752538074
- dev-speakeasy-sdk-regen-1752274373
- dev-speakeasy-sdk-regen-1752272918
- dev-speakeasy-sdk-regen-1752272156
This package is auto-updated.
Last update: 2026-09-15 00:41:35 UTC
README
Developer-friendly & type-safe Php SDK specifically catered to leverage kintsugi-tax/tax-platform-sdk API.
Summary
Kintsugi Customer API: Publicly documented Kintsugi Customer API endpoints. The source (openapi/_source/openapi-master.json) is the platform spec filtered to the documented customer surface (openapi/customer-endpoints.json); scripts/build-specs.mjs re-applies that filter here. Do not edit by hand.
Table of Contents
SDK Installation
The SDK relies on Composer to manage its dependencies.
To install the SDK and add it as a dependency to an existing composer.json file:
composer require "kintsugi-tax/tax-platform-sdk"
SDK Example Usage
Example
declare(strict_types=1); require 'vendor/autoload.php'; use KintsugiTax\SDK; use KintsugiTax\SDK\Models\Components; $sdk = SDK\SDK::builder() ->setSecurity( '<YOUR_API_KEY_HERE>' ) ->build(); $request = new Components\AddressBase( phone: '555-123-4567', street1: '1600 Amphitheatre Parkway', street2: 'Building 40', city: 'Mountain View', county: 'Santa Clara', state: 'CA', postalCode: '94043', country: Components\CountryCodeEnum::Us, fullAddress: '1600 Amphitheatre Parkway, Mountain View, CA 94043', ); $response = $sdk->addressValidation->search( request: $request ); if ($response->response200SearchV1AddressValidationSearchPost !== null) { // handle response }
Authentication
Per-Client Security Schemes
This SDK supports the following security scheme globally:
| Name | Type | Scheme |
|---|---|---|
apiKeyHeader |
apiKey | API key |
To authenticate with the API the apiKeyHeader parameter must be set when initializing the SDK. For example:
declare(strict_types=1); require 'vendor/autoload.php'; use KintsugiTax\SDK; use KintsugiTax\SDK\Models\Components; $sdk = SDK\SDK::builder() ->setSecurity( '<YOUR_API_KEY_HERE>' ) ->build(); $request = new Components\AddressBase( phone: '555-123-4567', street1: '1600 Amphitheatre Parkway', street2: 'Building 40', city: 'Mountain View', county: 'Santa Clara', state: 'CA', postalCode: '94043', country: Components\CountryCodeEnum::Us, fullAddress: '1600 Amphitheatre Parkway, Mountain View, CA 94043', ); $response = $sdk->addressValidation->search( request: $request ); if ($response->response200SearchV1AddressValidationSearchPost !== null) { // handle response }
Available Resources and Operations
Available methods
AddressValidation
- search - Search
- suggestions - Suggestions
CustomerTaxRegistration
- upsertCustomerTaxRegistrationV1CustomersCustomerIdTaxRegistrationsPost - Upsert customer tax registration
Customers
- list - Get customers
- create - Create customer
- getByExternalId - Get customer by external id
- getById - Get customer by id
- update - Update customer
- getTransactions - Get transactions by customer id
- createTransaction - Create transaction by customer id
Exemptions
- list - Get exemptions
- create - Create exemption
- getById - Get exemption by id
- uploadCertificate - Upload exemption certificate
Exemptions.Attachments
- get - Get attachments for exemption
Filings
- get - Get filings
- getByRegistrationId - Get filings by registration id
- getById - Get filing by id
- approveFilingV1FilingsFilingIdApprovePut - Approve filing
Nexus
- list - Get nexus for org
- listPhysical - Get physical nexus
- createPhysical - Create physical nexus
- getPhysicalNexusCategoriesV1NexusPhysicalNexusCategoriesGet - Get physical nexus categories
- delete - Delete physical nexus
- updatePhysical - Update physical nexus
- getNexusDetailsForIdV1NexusNexusIdGet - Get nexus details for id
Products
- getProductsV1ProductsGet - Get products
- createProductV1ProductsPost - Create product
- getProductCategoriesV1ProductsCategoriesGet - Get product categories
- get - Get product by id
- update - Update product
Registrations
- list - Get registrations
- create - Create registration
- getJurisdictionSpecificFieldsV1RegistrationsJurisdictionSpecificFieldsGet - Get jurisdiction specific fields
- listRegistrationJurisdictionsV1RegistrationsJurisdictionsGet - List registration jurisdictions
- getById - Get registration by id
- update - Update registration
- uploadRegistrationAttachmentV1RegistrationsRegistrationIdAttachmentsPost - Upload registration attachment
- deregister - Deregister registration
- getOssCountriesForRegistrationV1RegistrationsRegistrationIdOssCountriesGet - Get oss countries for registration
TaxEstimation
- estimate - Estimate tax
Transactions
- list - Get transactions
- create - Create transaction
- archiveTransactionByIdV1TransactionsArchivePost - Archive transaction by id
- getByExternalId - Get transaction by external id
- getByFilingId - Get transactions by filing id
- createCreditNote - Create credit note by transaction id
- updateCreditNote - Update credit note by transaction id
- get - Get transaction by id
- update - Update transaction
- setTransactionTaxOnlyV1TransactionsTransactionIdTaxOnlyPost - Set transaction tax only
Error Handling
Handling errors in this SDK should largely match your expectations. All operations return a response object or throw an exception.
By default an API error will raise a Errors\APIException exception, which has the following properties:
| Property | Type | Description |
|---|---|---|
$message |
string | The error message |
$statusCode |
int | The HTTP status code |
$rawResponse |
?\Psr\Http\Message\ResponseInterface | The raw HTTP response |
$body |
string | The response content |
When custom error responses are specified for an operation, the SDK may also throw their associated exception. You can refer to respective Errors tables in SDK docs for more details on possible exception types for each operation. For example, the search method throws the following exceptions:
| Error Type | Status Code | Content Type |
|---|---|---|
| Errors\ErrorResponse | 401 | application/json |
| Errors\BackendSrcAddressValidationResponsesValidationErrorResponse | 422 | application/json |
| Errors\ErrorResponse | 500 | application/json |
| Errors\APIException | 4XX, 5XX | */* |
Example
declare(strict_types=1); require 'vendor/autoload.php'; use KintsugiTax\SDK; use KintsugiTax\SDK\Models\Components; use KintsugiTax\SDK\Models\Errors; $sdk = SDK\SDK::builder() ->setSecurity( '<YOUR_API_KEY_HERE>' ) ->build(); try { $request = new Components\AddressBase( phone: '555-123-4567', street1: '1600 Amphitheatre Parkway', street2: 'Building 40', city: 'Mountain View', county: 'Santa Clara', state: 'CA', postalCode: '94043', country: Components\CountryCodeEnum::Us, fullAddress: '1600 Amphitheatre Parkway, Mountain View, CA 94043', ); $response = $sdk->addressValidation->search( request: $request ); if ($response->response200SearchV1AddressValidationSearchPost !== null) { // handle response } } catch (Errors\ErrorResponseThrowable $e) { // handle $e->$container data throw $e; } catch (Errors\BackendSrcAddressValidationResponsesValidationErrorResponseThrowable $e) { // handle $e->$container data throw $e; } catch (Errors\ErrorResponseThrowable $e) { // handle $e->$container data throw $e; } catch (Errors\APIException $e) { // handle default exception throw $e; }
Server Selection
Override Server URL Per-Client
The default server can be overridden globally using the setServerUrl(string $serverUrl) builder method when initializing the SDK client instance. For example:
declare(strict_types=1); require 'vendor/autoload.php'; use KintsugiTax\SDK; use KintsugiTax\SDK\Models\Components; $sdk = SDK\SDK::builder() ->setServerURL('https://api.trykintsugi.com') ->setSecurity( '<YOUR_API_KEY_HERE>' ) ->build(); $request = new Components\AddressBase( phone: '555-123-4567', street1: '1600 Amphitheatre Parkway', street2: 'Building 40', city: 'Mountain View', county: 'Santa Clara', state: 'CA', postalCode: '94043', country: Components\CountryCodeEnum::Us, fullAddress: '1600 Amphitheatre Parkway, Mountain View, CA 94043', ); $response = $sdk->addressValidation->search( request: $request ); if ($response->response200SearchV1AddressValidationSearchPost !== null) { // handle response }
Development
Maturity
This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally looking for the latest version.
Contributions
While we value open-source contributions to this SDK, this library is generated programmatically. Any manual changes added to internal files will be overwritten on the next generation. We look forward to hearing your feedback. Feel free to open a PR or an issue with a proof of concept and we'll do our best to include it in a future release.