# Confirm Payment

## Send a Get Request

<mark style="color:blue;">`GET`</mark> `https://payfric.com/wp-json/payfric/v1/confirm`

This endpoint help you to confirm payment

#### Path Parameters

| Name        | Type   | Description                                      |
| ----------- | ------ | ------------------------------------------------ |
| reference   | string | The payment reference                            |
| secret\_key | string | Your secrete key Payment confirmed successfully. |

{% tabs %}
{% tab title="200 Payment confirmed. Notice the error flag is 0 showing that there was no error  and the amount payed was returned." %}

```javascript
{
    "status": "OK",
    "response": "Response OK",
    "code": 200,
    "data": {
      "amount": 986,
      "error": 0,
      "message": "Payment Confirmed"
    }
  }
```

{% endtab %}

{% tab title="404 Notice that the error data value is 1, which is the flag that no payment was found." %}

```
{
    "status": "OK",
    "response": "Response OK",
    "code": 200,
    "data": {
      "amount": 0,
      "error": 1,
      "message": "Payment not successful"
    }
}
```

{% endtab %}
{% endtabs %}
