> ## 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

> Register an issuer certificate externally and check the result after the redirect.

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

Register the certificate owner with the [Register Issuer API](/en/api-reference/issuer/register-issuer), then register the certificate. The supplier is the issuer for regular and delegated issuance. The trustee is the issuer for [brokered issuance](/en/docs/api-introduction/usecase-brokered).

The issuer selects a certificate and enters its password directly on the web. Send the issuer to the registration URL and return them to your platform when registration finishes. The return location 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, Bolta uses the default `https://bolta.io/openapi-certificate-redirect`. You can change it to the address you want on the API key edit screen in the Developer Center. Set the redirect URL to an HTTPS address that you operate.

For 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">
    Pass `issuerId` in the [Retrieve Issuer Certificate Registration URL API](/en/api-reference/certificate/retrieve-issuer-certificate-registration-url) path. The issued URL is valid for 5 minutes. When it expires, issue a new one.
  </Step>

  <Step title="Issuer registers the certificate" icon="user-check">
    The issuer visits the URL, selects their certificate, and enters its password.
  </Step>

  <Step title="Redirect return" icon="arrow-right-to-line">
    Once registration is complete, the issuer'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 Issuer Certificate Registration Status API](/en/api-reference/certificate/retrieve-issuer-certificate-registration-status) and use `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>

Do not treat the redirect alone as a successful registration. Check the result code. 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 |

## Related documents

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