# Status and Webhook Data

### Webhooks

There are several types of webhook datas. Here is the list of webhook data we can send to your backend.

```javascript
const axios = require("axios");

// after this status, you have to send transaction hash for TRP.
await axios.post("YOUR_WEBHOOK_URL", {
          transaction_ref: "YOUR_TRANSACTION_REFERENCE",
          status: "OTHER_VASP_APPROVED",
});

// this is sent only to inform you and to enable you to take action on your own end.
await axios.post("YOUR_WEBHOOK_URL", {
          transaction_ref: "YOUR_TRANSACTION_REFERENCE",
          status: "OTHER_VASP_REJECTED",
});

// you need to send the wallet address of the person in the persons object we sent you.
await axios.post("YOUR_WEBHOOK_URL", {
          transaction_ref: "YOUR_TRANSACTION_REFERENCE",
          status: "WAITING_ADDRESS_DATA",
          persons: persons,
          accountNumber: ["0xTest"]
});

// the transaction hash information of the transaction sent to you by the other party
await axios.post("YOUR_WEBHOOK_URL", {
          transaction_ref: "YOUR_TRANSACTION_REFERENCE",
          status: "TRANSACTION_CONFIRMED",
          txid: txid
});
```

### Statuses

Here is the status list for TRP transactions.

* **CREATED:** The transaction or request has been initiated or generated.
* **REJECTED:** The transaction or request has been denied or disapproved.
* **APPROVED:** The transaction or request has been authorized or accepted.
* **COMPLETED:** The transaction or request has been finalized or concluded successfully.
* **SCORE:** This could represent a rating, evaluation, or priority assigned to the transaction or request.
* **PENDING:** The transaction or request is awaiting further processing or confirmation.
* **WAITING\_TX\_HASH:** The system is expecting a transaction hash, a unique identifier for a transaction on a blockchain.
* **OTHER\_VASP\_PENDING, OTHER\_VASP\_APPROVED, OTHER\_VASP\_REJECTED:** These states likely indicate that the transaction is being processed by a different Verified Service Provider (VASP) and its current status there.
* **WAITING\_ADDRESS\_DATA:** The system is waiting for the necessary address information to proceed with the transaction.
* **WAITING\_FOR\_CONFIRMATION:** The transaction is awaiting confirmation on the blockchain network.
* **TRANSACTION\_CONFIRMED:** The transaction has been confirmed on the blockchain network.
