# Purchase Data Object

For every purchase, certain properties are usually available as part of the data object.

for example, the <mark style="color:purple;">**transaction\_status**</mark> property is what determines whether the value was given or not. A description of each of the data property is described in the table below.

{% hint style="success" %} <mark style="color:green;">**SUCCESSFUL TRANSACTION**</mark>\
&#x20;<mark style="color:green;"></mark><mark style="color:green;">transaction\_status -  "SUCCESS" is what determines a successful transaction.</mark>
{% endhint %}

{% hint style="info" %} <mark style="color:purple;">**PENDING TRANSACTION**</mark>\ <mark style="color:purple;">transaction\_status -  "PENDING" means we are not aware of the final status, do not take any action unless advised otherwise.</mark>
{% endhint %}

{% hint style="danger" %} <mark style="color:red;">**FAILED TRANSACTION**</mark>\
transaction\_status -  "FAILED" means an outright failure as the processor was unable to <mark style="color:red;">successfully</mark> process the request and you can refund your customers.
{% endhint %}

#### The Data property

```json
{
    
    "data": {
        "client_reference": "000000006704",
        "debited": true,
        "transaction_status": "SUCCESS",
        "payment_status": "PAID",
        "currency": "NGN",
        "amount": 4,
        "action": "PURCHASE",
        "provider": "Bulksmsnigeria",
        "value_number": "07035361770",
        "narration": "SMS Purchase/000000006704/07035361770",
        "category": "Notifications::SMS",
        "adapter_reference": "OYS_NOT_SMS_1713463674_IMIQ8",
        "provider_reference": "bb1db189-1257-4dcb-bf0a-b0394234aa57",
        "created_at": "2024-04-18T18:07:54.000000Z",
        "service_data": {
            "name": "SUCCESSFUL"
        },
        "provider_response": {
            "data": {
                "status": "success",
                "message": "Message Sent",
                "message_id": "bb1db189-1257-4dcb-bf0a-b0394234aa57",
                "cost": 2.49,
                "currency": "NGN",
                "gateway_used": "direct-refund"
            }
        }
    }
```

<table><thead><tr><th width="198">Property</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td>client_reference</td><td>string</td><td>This is your own unique request identifier</td></tr><tr><td>debited</td><td>boolean</td><td>This determines if you were debited for the request or not</td></tr><tr><td>transaction_status</td><td>string</td><td>This is what determines the final status of the real transaction. Can be "SUCCESS", "PENDING" or "FAILED"</td></tr><tr><td>payment_status</td><td>string</td><td>To determine if you have paid for the service or not.</td></tr><tr><td>currency</td><td>string</td><td>This is the currency in which you were debited for the request.</td></tr><tr><td>amount</td><td>numeric</td><td>The cost of your request.</td></tr><tr><td>action</td><td>string</td><td>This describes your request for action. Can be "VALIDATE", "PURCHASE", "GET_STATUS", "BALANCE", "FETCH_PRODUCTS"</td></tr><tr><td>provider</td><td>string</td><td>This is a short code to describe the transaction processor.</td></tr><tr><td>value_number</td><td>string</td><td>This is the account that receives the value of purchase.</td></tr><tr><td>narration</td><td>string</td><td>Transaction description</td></tr><tr><td>category</td><td>string</td><td>describes the category and subcategory.</td></tr><tr><td>adapter_reference</td><td>string </td><td>This is our own reference use to push your request to providers.</td></tr><tr><td>provider_reference</td><td>string</td><td>This is the reference we got from the service provider to identify your request.</td></tr><tr><td>created_at</td><td>string</td><td>This is the time we received your request.</td></tr><tr><td>service_data</td><td>object (optional)</td><td>This is a dynamic object containing additional properties depending on your request.</td></tr><tr><td>provider_response</td><td>object (optional)</td><td>This contains the raw response we got from the service provider, should you want more data. </td></tr></tbody></table>
