> ## Documentation Index
> Fetch the complete documentation index at: https://docs.archefusion.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Verify payments

> Learn how to verify Archefusion webhook signatures

To verify a transaction, make a `POST` request to the [`verify payments`](https://docs.archefusion.com/pages/api-reference/verify-payment) endpoint from your server using the transaction `paymentId`. This `paymentId` is returned as a response in the initiate payment endpoint. Archefusion also appends it to your redirect URL as a query parameter when the customer is redirected back to your platform after payment.
For example:

```
https://merchant.com/payment/callback?paymentId=43e26c04-0871-448c-8286-f998ec066664
```

Here is a code sample for verifying transactions:

<CodeGroup>
  ```bash cURL theme={null}
  curl https://dev.api-gateway.archefusion.com/v1/payments/:paymentId/verify \
  -H "Authorization: Bearer YOUR_SECRET_KEY" \
  -X POST
  ```

  ```javascript Node theme={null}
  import axios from 'axios'

  const verify = async (req, res) => {
    const { paymentId } = req.params

    const secret = process.env.SECRETKEY
    const url = `https://dev.api-gateway.archefusion.com/v1/payments/${paymentId}/verify`

    const config = {
      headers: {
        'Authorization': `Bearer ${secret}`,
        'Content-Type': 'application/json'
      }
    }

    try {
      const response = await axios.post(url, {}, config)
      return res.status(200).json({ data: response.data })
    } catch (error) {
      return res.status(500).json({ msg: "An error occurred!" })
    }
  }

  export default verify
  ```
</CodeGroup>

<Accordion title="View response">
  ```json theme={null}
  {
    "status": true,
    "statusCode": 200,
    "message": "Payment already succeeded",
    "data": {
      "id": "9ead7f67-7392-454c-ba15-e112a318a96c",
      "type": "payment.succeeded",
      "createdAt": "2026-06-25T09:07:29.318Z",
      "merchantNumber": "ARC-2026-000006",
      "data": {
        "paymentId": "14b9dfda-c366-4386-988e-8ce3719d27c9",
        "merchantOrderId": "order-1782121386",
        "status": "SUCCESS",
        "executionStatus": "succeeded",
        "currency": "NGN",
        "amount": 1000,
        "gatewayReference": "14b9dfda-c366-4386-988e-8ce3719d27c9"
      }
    }
  }

  ```
</Accordion>

## Transaction statuses

| Status      | Meaning                                                                                                                                 |
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------- |
| `FAILED`    | The transaction failed.                                                                                                                 |
| `INITIATED` | The transaction was initiated.                                                                                                          |
| `PENDING`   | The transaction is currently in progress. For example, the customer has opened the checkout page but has not completed the payment yet. |
| `REFUNDED`  | The transaction was refunded.                                                                                                           |
| `SUCCESS`   | The transaction was successfully processed.                                                                                             |
