# Resend Webhook Notification

The webhook notification resend API is intended for specific and necessary use cases, such as retrieving missed notifications or ensuring data integrity. \
Misusing this API by excessively requesting resends may result in disruptions to your merchant account and impact our services.

If you need to resend a webhook notification for development and debugging purposes, it is recommended to use the webhook resend functionality on [webhook page](https://console.ccpayment.com/webhook/index).

### Webhook notification resend API

{% hint style="info" %}
**The maximum request frequency for this API is set at once per minute, with a daily limit of 25 calls.**
{% endhint %}

## Resend webhook notifications for a specified time period

<mark style="color:green;">`POST`</mark> `https://admin.ccpayment.com/ccpayment/v1/webhook/resend`

#### Headers

| Name                                           | Type   | Description                                                                                                                                                                                |
| ---------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| Sign<mark style="color:red;">\*</mark>         | String | SHA-256 (APPID + APP Secret +timestamp+<mark style="color:red;">**body (json string)**</mark>). [Signature guide](https://docs.ccpayment.com/ccpayment-v1.0-api/to-get-started/signature). |
| Timestamp<mark style="color:red;">\*</mark>    | String | Timestamp in seconds (10-digit). The request is valid for two minutes.                                                                                                                     |
| Appid<mark style="color:red;">\*</mark>        | String | Merchant's unique credential. Find it on the [Developer page](https://admin.ccpayment.com/developer/config)                                                                                |
| Content-Type<mark style="color:red;">\*</mark> | String | application/json; charset=utf-8                                                                                                                                                            |

#### Request Body

| Name                                               | Type   | Description                                                                                                                                                                                                                                                                                                                        |
| -------------------------------------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| start\_timestamp<mark style="color:red;">\*</mark> | Int    | <p>Specifies the start time for webhook notification sending.<br>Timestamp in seconds (10-digit)</p>                                                                                                                                                                                                                               |
| end\_timestamp                                     | Int    | <p>Specifies the end time for webhook notification sending.<br>Timestamp in seconds (10-digit)<br><br>If "endTimestamp" is empty CCPayment will resend webhook notifications within a one-hour window based on the start time.<br><br>The duration between the end timestamp and the start timestamp must not exceed one hour.</p> |
| webhook\_result                                    | String | <p>Pass “Failed”. (default if not provided) If you want to resend all the failed webhook notification of transactions in a specific time frame<br>Pass “All Result”. If you want to resend webhook notification of all transactions in a specific time frame</p>                                                                   |
| transaction\_type                                  | String | <p>Specifies the type of transactions for which webhook notifications should be sent.<br>- All Type (default if not provided) <br>- Direct Deposit <br>- API Deposit <br>- Invoice<br>- API Withdrawal <br>- Refund</p>                                                                                                            |

{% tabs %}
{% tab title="200: OK Success (200)/Fail (200)" %}
{% tabs %}
{% tab title="Success (200)" %}

#### **Response (Success 200)**

**Header**

**Body**

```json
{
	"code": 10000,
	"msg": "success",
	"data": {
		"resend_count": "12345",
	}
}
```

**Parameters**
{% endtab %}

{% tab title="Fail (200)" %}

#### **Response (Fail 200)**

```json
{
	"code": 224066,
	"msg": "Service error, pleaser try again",
	"data": null
}
```

<table><thead><tr><th>Name</th><th>Value</th><th width="108" data-type="checkbox">Required</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>code</td><td>224066</td><td>true</td><td>Number</td><td></td></tr><tr><td>msg</td><td>Service error, please try again</td><td>true</td><td>String</td><td></td></tr><tr><td>data</td><td></td><td>true</td><td>Object</td><td></td></tr></tbody></table>
{% endtab %}

{% tab title="Remarks" %}
As a security measure, we will sign the returned data (and according to this only { code: 10000 } should be signed, but it's signing all the returned body.). Additionally, it will return Appid, Sign, Timestamp  in the header of the response.  The signature method SHA-256 (appid+appSecret+Timestamp+body).

Please use the data with caution if the signature verification fails. It indicates that the data has been tampered with.
{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

{% hint style="warning" %}
Please note that CCPayment closely monitors the usage of the webhook notification resend API.&#x20;

If your system requires a significant number of webhook notification resends, we kindly request you to inform the CCPayment team in order to avoid any mistaken categorization of your merchant account as an abuser.
{% endhint %}
