# Confirmation/Notification/Order Processing API

VoguePay sends a transaction id to the notification URL provided in your account for every transaction on that account.\
If your notification URL i.e notify\_url query parameter value is '<https://mydomain.com/n.php>', then notification will be sent to :

```
mydomain.com/n.php
```

## Confirm Transaction Status

<mark style="color:blue;">`GET`</mark> `https://pay.voguepay.com`

This endpoint returns details of a transaction. See Response sample is 'Response' Tab.

#### Query Parameters

| Name               | Type   | Description                                                  |
| ------------------ | ------ | ------------------------------------------------------------ |
| v\_transaction\_id | string | Transaction ID of transaction to be queried.                 |
| type               | string | Format for the expected data. e.g xml, json. Defaults to xml |
| v\_merchant\_id    | string | Merchant ID                                                  |

{% tabs %}
{% tab title="200 " %}

```javascript
{
    "cur": "NGN",
    "total_paid_by_buyer": "1000",
    "total": "1000",
    "fund_maturity": "1970-01-01",
    "buyer_email": "ajayishegs@gmail.com",
    "status": "Approved",
    "merchant_id": "sandbox_760e43f202878f651659820234cad9",
    "merchant_ref": "ref123",
    "transaction_id": "409a283ede12461aa674d3abb9f9b92e",
    "process_duration": 0.836074
}

// -------------- XML RESPONSE TYPE -------------------

<?xml version="1.0" encoding="UTF-8"?>
<voguepay>
    <cur>NGN</cur>
    <total_paid_by_buyer>1000</total_paid_by_buyer>
    <total>1000</total>
    <fund_maturity>1970-01-01</fund_maturity>
    <buyer_email>ajayishegs@gmail.com</buyer_email>
    <status>Approved</status>
    <merchant_id>sandbox_760e43f202878f651659820234cad9</merchant_id>
    <merchant_ref>ref123</merchant_ref>
    <transaction_id>409a283ede12461aa674d3abb9f9b92e</transaction_id>
    <process_duration>0.566156</process_duration>
</voguepay>
```

{% endtab %}
{% endtabs %}

Response Parameters Description

| Response Key           | Value                                                                                                                               |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------- |
| merchant\_id           | Merchant's ID                                                                                                                       |
| transaction\_id        | Transaction ID of the transaction requested                                                                                         |
| total\_paid\_by\_buyer | Total amount paid by buyer including any other charges.                                                                             |
| total                  | Total price of products paid for.                                                                                                   |
| fund\_maturity         | The date that the merchant will be able to withdraw or spend the amount credited to his/her wallet as a result of this transaction. |
| buyer\_email           | Email address of buyer.                                                                                                             |
| status                 | Status of transaction which can either be Approved, Declined, Partially Refunded or Fully Refunded.                                 |
| merchant\_ref          | merchant\_ref value sent by the merchant.                                                                                           |
| process\_duration      | Time transaction took to complete.                                                                                                  |
| cur                    | Currency in which transaction was executed                                                                                          |

Response for Transaction ID not found:

Response "status" value will be "Declined"

```javascript
{
    "cur": "",
    "total_paid_by_buyer": "0",
    "total": "0",
    "fund_maturity": "1970-01-01",
    "buyer_email": "",
    "status": "Declined",
    "merchant_id": "sandbox_760e43f202878f651659820234cad9",
    "merchant_ref": "",
    "transaction_id": "409a283ede12461aa674d3abb9f9b9",
    "process_duration": 0.448289
}
```
