> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bolta.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Certificate Registration Integration

> A workflow for having a supplier register their certificate externally and checking the registration result after the redirect returns.

<Note>
  Some links point to the service guide, which is currently available in Korean only.
</Note>

For a platform to issue tax invoices on a supplier's behalf ([delegated issuance](/en/api-introduction/usecase-delegated), [simple-approval reverse issuance](/en/api-introduction/usecase-reverse-simple)), you must first register the supplier's certificate.

Certificate registration is a process in which the supplier selects a certificate and enters its password directly on the web, so you send the supplier to the issued URL and have them return to the platform once registration is complete. The location they return to is the **certificate registration completion redirect URL**.

## Prerequisite: Set the redirect URL

The redirect URL is configured per API key. If you do not specify one, the default `https://bolta.io/openapi-certificate-redirect` is used, and you can change it to the address you want on the API key edit screen in the Developer Center.

For detailed configuration steps, see [API Keys](/docs/developer-center/api-key) and [Connecting a webhook](/docs/developer-center/webhook-connection).

## Registration flow

<Steps>
  <Step title="Issue a certificate registration URL" icon="code">
    Call the [Retrieve Certificate Registration URL API](/api-reference/certificate/retrieve-certificate-registration-url) to issue the URL where the supplier will register their certificate. The issued URL is valid for **5 minutes**.
  </Step>

  <Step title="Supplier registers the certificate" icon="user-check">
    The supplier visits the issued URL, selects their certificate, and enters its password. This step is performed by the supplier directly.
  </Step>

  <Step title="Redirect return" icon="arrow-right-to-line">
    Once registration is complete, the supplier's browser navigates to the redirect URL set on the API key.
  </Step>

  <Step title="Check the registration result" icon="circle-check">
    Call the [Retrieve Certificate Registration Status API](/api-reference/certificate/retrieve-certificate-registration-status) and use the response's `latestHistory.code` and `latestHistory.message` to determine whether registration succeeded. This record can only be retrieved **within 30 seconds after registration**, so call it right after the redirect returns.
  </Step>
</Steps>

The redirect is only a browser navigation, so whether registration actually succeeded is determined by the result code from the Retrieve Certificate Registration Status API. If the response has a `latestHistory`, use `latestHistory.code` and `latestHistory.message` to check for success; if `latestHistory` is `null`, treat it as a state with no retrievable registration record.

## Registration result codes

These are the `latestHistory.code` and `latestHistory.message` values from the Retrieve Certificate Registration Status API response.

| code   | message                                                                   | Result  |
| ------ | ------------------------------------------------------------------------- | ------- |
| `0000` | The certificate has been registered.                                      | Success |
| `0001` | This certificate was issued for a different business registration number. | Failure |
| `0002` | This certificate cannot issue tax invoices.                               | Failure |
| `0003` | Please register a business certificate.                                   | Failure |
| `9999` | Unknown error                                                             | Failure |
| `-1`   | Canceled by user                                                          | Failure |

## Notes

<Warning>
  * The certificate registration URL expires **5 minutes** after it is issued. Once it expires, you must issue a new one.
  * The certificate registration record can only be retrieved for **30 seconds** after registration. Retrieve it right after the redirect returns.
  * We recommend setting the redirect URL to an HTTPS endpoint that you operate yourself.
</Warning>

## Related documents

* [Delegated issuance](/en/api-introduction/usecase-delegated)
* [Simple-approval reverse issuance](/en/api-introduction/usecase-reverse-simple)
* [API Keys](/docs/developer-center/api-key)
* [Connecting a webhook](/docs/developer-center/webhook-connection)
