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

# Cash Receipt Webhooks

> Describes the event types, payloads, and delivery timing for cash receipt issuance and cancellation results.

For delivery method, firewall settings, and logs, see [Webhook Events](/en/api-introduction/webhook-events).

## Event Types

Cash receipt issuance and cancellation are asynchronous. The API sends the final result in one of the following events.

| Event Type                         | Description            |
| ---------------------------------- | ---------------------- |
| `CASH_RECEIPT_ISSUED`              | Issuance succeeded     |
| `CASH_RECEIPT_ISSUE_FAILED`        | Issuance failed        |
| `CASH_RECEIPT_CANCELED`            | Cancellation succeeded |
| `CASH_RECEIPT_CANCEL_FAILED`       | Cancellation failed    |
| `CASH_RECEIPT_EXTERNALLY_CANCELED` | Canceled outside Bolta |

## Payload

### Issuance Success

```json theme={"dark"}
{
  "eventType": "CASH_RECEIPT_ISSUED",
  "data": {
    "issuanceKey": "MRK98JGC5KOAEIPGK8U6UO05I3EAQPLI8OE78A3I",
    "cashReceiptApprovalNumber": "123456789012"
  }
}
```

| Field                            | Type   | Description                  |
| -------------------------------- | ------ | ---------------------------- |
| `eventType`                      | string | Event type                   |
| `data.issuanceKey`               | string | Issuance key                 |
| `data.cashReceiptApprovalNumber` | string | Cash receipt approval number |

### Issuance Failure

```json theme={"dark"}
{
  "eventType": "CASH_RECEIPT_ISSUE_FAILED",
  "data": {
    "issuanceKey": "MRK98JGC5KOAEIPGK8U6UO05I3EAQPLI8OE78A3I",
    "cause": {
      "code": "INVALID_RECIPIENT_IDENTIFIER",
      "message": "Check the cash receipt payment method information."
    }
  }
}
```

| Field                | Type   | Description                |
| -------------------- | ------ | -------------------------- |
| `eventType`          | string | Event type                 |
| `data.issuanceKey`   | string | Issuance key               |
| `data.cause.code`    | string | Failure code               |
| `data.cause.message` | string | Failure reason description |

### Cancellation Success

```json theme={"dark"}
{
  "eventType": "CASH_RECEIPT_CANCELED",
  "data": {
    "issuanceKey": "9XK21ABC5KOAEIPGK8U6UO05I3EAQPLI8OE78Z1Q",
    "originalIssuanceKey": "MRK98JGC5KOAEIPGK8U6UO05I3EAQPLI8OE78A3I"
  }
}
```

| Field                      | Type   | Description                                   |
| -------------------------- | ------ | --------------------------------------------- |
| `eventType`                | string | Event type                                    |
| `data.issuanceKey`         | string | Issuance key for the cancellation request     |
| `data.originalIssuanceKey` | string | Original issuance key of the canceled receipt |

### Cancellation Failure

```json theme={"dark"}
{
  "eventType": "CASH_RECEIPT_CANCEL_FAILED",
  "data": {
    "issuanceKey": "9XK21ABC5KOAEIPGK8U6UO05I3EAQPLI8OE78Z1Q",
    "originalIssuanceKey": "MRK98JGC5KOAEIPGK8U6UO05I3EAQPLI8OE78A3I",
    "cause": {
      "code": "ORIGINAL_ISSUANCE_FAILED",
      "message": "The original cash receipt issuance failed, so the cancellation request cannot be processed."
    }
  }
}
```

| Field                      | Type   | Description                                         |
| -------------------------- | ------ | --------------------------------------------------- |
| `eventType`                | string | Event type                                          |
| `data.issuanceKey`         | string | Issuance key for the cancellation request           |
| `data.originalIssuanceKey` | string | Original issuance key of the receipt being canceled |
| `data.cause.code`          | string | Failure code                                        |
| `data.cause.message`       | string | Failure reason description                          |

### Canceled Outside Bolta

Bolta sends this event when an issued cash receipt is canceled outside Bolta (for example, on Hometax).

```json theme={"dark"}
{
  "eventType": "CASH_RECEIPT_EXTERNALLY_CANCELED",
  "data": {
    "issuanceKey": "MRK98JGC5KOAEIPGK8U6UO05I3EAQPLI8OE78A3I"
  }
}
```

| Field              | Type   | Description                                             |
| ------------------ | ------ | ------------------------------------------------------- |
| `eventType`        | string | Event type                                              |
| `data.issuanceKey` | string | Issuance key of the cash receipt canceled outside Bolta |

## Webhook Delivery Time

Delivery timing depends on the event. Hometax reflects a cash receipt on the following day, so Bolta sends the issuance success webhook the next day.

| Event                                                 | Delivery time                                                                                                        |
| ----------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| `CASH_RECEIPT_ISSUED`                                 | After 17:00 KST on the day following the issuance request                                                            |
| `CASH_RECEIPT_ISSUE_FAILED`                           | As soon as the failure is confirmed                                                                                  |
| `CASH_RECEIPT_CANCELED`, `CASH_RECEIPT_CANCEL_FAILED` | As soon as the cancellation result is confirmed. If the cancellation stays in progress, after 17:00 KST the next day |
| `CASH_RECEIPT_EXTERNALLY_CANCELED`                    | When Bolta detects the external cancellation. Bolta checks for up to 7 days after issuance                           |

A test key (`test_`) simulates issuance and sends the final webhook 10 seconds after Bolta accepts the request.

<Warning>
  `202 Accepted` only means Bolta accepted the request. Treat a cash receipt as unconfirmed until you receive `CASH_RECEIPT_ISSUED`.
</Warning>

## When a Webhook Does Not Arrive

Check with [Retrieve Cash Receipt Status](/api-reference/cash-receipt/retrieve-cash-receipt-status). A status of `PENDING` or `REQUEST_SUCCESS` means the result is not yet final. `REQUEST_SUCCESS` means Bolta delivered the request, not that issuance succeeded.
