# 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](/ccpayment-v1.0-api/to-get-started/signature.md). |
| 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
}
```

{% 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 %}

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

<table><thead><tr><th width="193">Name</th><th width="173">Value</th><th data-type="checkbox">Required </th><th>Type</th><th width="153">Description</th></tr></thead><tbody><tr><td>code</td><td>10000</td><td>true</td><td>Integer</td><td></td></tr><tr><td>msg</td><td>success</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><tr><td>data.resend_count</td><td>0</td><td>true</td><td>Int</td><td>Quantity of webhook notifications that were resent during the requested timeframe.</td></tr></tbody></table>

<table><thead><tr><th width="134">Name</th><th width="188">Value</th><th width="118">Required</th><th width="82">Type</th><th width="299">Description</th></tr></thead><tbody><tr><td>Appid</td><td>202302010636261620672405236006912</td><td>Y</td><td>String</td><td>Merchant's unique credential. Find it on the <a href="https://admin.ccpayment.com/developer/config">Developer page</a></td></tr><tr><td>Timestamp</td><td>1677152490</td><td>Y</td><td>String</td><td>Timestamp in seconds (10-digit). The request is valid for two minutes.</td></tr><tr><td>Sign</td><td>871f0223c66ea72435208d03603a0cb00b90f6ac4a4ba725d00164d967e291f6</td><td>Y</td><td>String</td><td>SHA-256(appId + appSecret + timestamp+<mark style="color:red;"><strong>body(json string)</strong></mark>)</td></tr></tbody></table>

{% 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.ccpayment.com/ccpayment-v1.0-api/webhook-notification/resend-webhook-notification.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
