# Manage tax certificates

Upload exemption and resale certificates and attach them to customer tax exemptions through the API.

Use the Tax Certificates API to store an exemption or resale certificate with a customer’s [tax exemption](https://docs.stripe.com/tax/exemptions.md). Each certificate links an uploaded file to an exemption. Each exemption can have at most one active certificate (`deleted=false`).

The exemption controls how Stripe Tax calculates tax. Attaching a certificate doesn’t change tax calculations or validate the certificate’s contents. You remain responsible for checking that the certificate supports the exemption.

[Contact Stripe support](https://support.stripe.com/contact) to sign up for tax certificates. Sign in to the account you want to use to check its access status on this page.

## Before you begin

Before you start:

- Confirm that Stripe has enabled the tax certificates private preview for your account.
- [Set up Stripe Tax](https://docs.stripe.com/tax/set-up.md) and a [customer tax exemption](https://docs.stripe.com/tax/exemptions.md#add-an-exemption). Save the exemption’s ID to use as `{{TAX_EXEMPTION_ID}}` in these examples.
- Use API version `2026-11-18.preview`. Store your API key in an environment variable or a secrets manager, following [best practices for managing secret keys](https://docs.stripe.com/keys-best-practices.md). If you use a restricted API key, grant `customer_write` for creating and deleting certificates, `customer_read` for retrieving and listing them, and `file_write` for uploading files. See the [permissions reference](https://docs.stripe.com/keys/permissions-reference.md).

## Upload the certificate file

Upload a PDF using the [File Upload API](https://docs.stripe.com/api/files/create.md) with `purpose=tax_certificate`. The maximum file size is 10 MiB (10,485,760 bytes). Use the same Stripe account and mode for the file and the exemption.

Set `STRIPE_SECRET_KEY` in your server environment before running this example. Replace the file path with the location of your certificate.

```curl
curl https://files.stripe.com/v1/files \
  -u "$STRIPE_SECRET_KEY:" \
  -H "Stripe-Version: 2026-11-18.preview" \
  -F purpose=tax_certificate \
  -F file=@/path/to/certificate.pdf
```

Save the returned file ID for the next request. Uploading the file doesn’t attach it to an exemption.

## Attach the file to an exemption

Create a tax certificate with the file ID and the exemption ID.

```curl
curl https://api.stripe.com/v1/tax/certificates \
  -u "<<YOUR_SECRET_KEY>>:" \
  -H "Stripe-Version: 2026-11-18.preview" \
  -d "file={{FILE_ID}}" \
  -d tax_exemption={{TAX_EXEMPTION_ID}}
```

Stripe returns a `tax.certificate` object containing its own ID, the file ID, and the exemption ID. Save the certificate ID as `{{TAX_CERTIFICATE_ID}}` for later requests. You can’t attach a file that’s already attached to another certificate.

Creating another certificate for the same exemption returns a `tax_exemption_already_has_certificate` error. Delete the existing certificate before creating its replacement.

## View certificates

List an exemption’s certificates by passing its ID. The list excludes deleted certificates and contains zero or one certificate.

```curl
curl -G https://api.stripe.com/v1/tax/certificates \
  -u "<<YOUR_SECRET_KEY>>:" \
  -H "Stripe-Version: 2026-11-18.preview" \
  -d tax_exemption={{TAX_EXEMPTION_ID}}
```

You can also retrieve a certificate by its ID. To download its file, follow the [file download instructions](https://docs.stripe.com/file-upload.md#download-file-contents). Certificate downloads require authentication, and you can’t create public file links for them.

## Delete or replace a certificate

Delete a certificate using its ID.

```curl
curl -X DELETE https://api.stripe.com/v1/tax/certificates/{{TAX_CERTIFICATE_ID}} \
  -u "<<YOUR_SECRET_KEY>>:" \
  -H "Stripe-Version: 2026-11-18.preview"
```

Deleting a certificate leaves the exemption and uploaded file in place. The certificate remains retrievable with `deleted=true`, but no longer appears in lists.

To replace a certificate, upload the replacement file, delete the existing certificate, and create a certificate with the replacement file. If creation fails after deletion, the exemption has no certificate until creation succeeds. Its tax treatment stays the same.

Deleting an exemption also deletes its associated certificates and retains the uploaded files. To stop applying an exemption, [delete the exemption](https://docs.stripe.com/tax/exemptions.md#delete-an-exemption).
