ServiceAdapter
ServiceAdapter
  • Service Adapter Developer Hub
  • Getting Started
  • Authentication
  • Standard Request
  • Standard Response
    • Purchase Data Object
    • Response Codes
  • Adapter Transformers
  • Account Balance
  • NOTIFICATIONS API
    • SMS
    • Voice
Powered by GitBook
On this page
  1. Standard Response

Purchase Data Object

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

for example, the transaction_status 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.

SUCCESSFUL TRANSACTION transaction_status - "SUCCESS" is what determines a successful transaction.

PENDING TRANSACTION transaction_status - "PENDING" means we are not aware of the final status, do not take any action unless advised otherwise.

FAILED TRANSACTION transaction_status - "FAILED" means an outright failure as the processor was unable to successfully process the request and you can refund your customers.

The Data property

{
    
    "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"
            }
        }
    }
Property
Type
Description

client_reference

string

This is your own unique request identifier

debited

boolean

This determines if you were debited for the request or not

transaction_status

string

This is what determines the final status of the real transaction. Can be "SUCCESS", "PENDING" or "FAILED"

payment_status

string

To determine if you have paid for the service or not.

currency

string

This is the currency in which you were debited for the request.

amount

numeric

The cost of your request.

action

string

This describes your request for action. Can be "VALIDATE", "PURCHASE", "GET_STATUS", "BALANCE", "FETCH_PRODUCTS"

provider

string

This is a short code to describe the transaction processor.

value_number

string

This is the account that receives the value of purchase.

narration

string

Transaction description

category

string

describes the category and subcategory.

adapter_reference

string

This is our own reference use to push your request to providers.

provider_reference

string

This is the reference we got from the service provider to identify your request.

created_at

string

This is the time we received your request.

service_data

object (optional)

This is a dynamic object containing additional properties depending on your request.

provider_response

object (optional)

This contains the raw response we got from the service provider, should you want more data.

PreviousStandard ResponseNextResponse Codes

Last updated 1 year ago