Description
Request to this API will return all transactions created by the selected merchants with limitations with timestampts and more specified below
URL: https://secure1.sandbox.directpay.online/API/v7/
Response:
The method will respond with the result of your request
Variables to send:
Parameter | Data type | Description | |
---|---|---|---|
CompanyToken | Token | Token you got from 3G to operate this API | Mandatory |
Request | text | getTransactions | Mandatory |
startTimeStamp | timestamp | Timestamp of the start date | Mandatory |
endTimeStamp | timestamp | Timestamp of the end date | Mandatory |
numOfRecords | number | Number of records that the results set will return at max | Mandatory |
recordOffset | number | The number of the results to omit from the start of the results set | Mandatory |
userToken | Token | Response will send all transactions created by specific user | Optional |
allTrans | Boolean | In case sends false, will return only paid transactions | Optional |
descOrder | Boolean | Will return the result set in the opposite directions | Optional |
filterBy | Number | Change the order by section, 0 - will respond with order by created date of the transaction, 1- will respond with the payment date | Optional |
Request example:
<?xml version="1.0" encoding="utf-8"?> <API3G> <CompanyToken>DC6405AA-A025-4B8B-989B-A8921DD31094</CompanyToken> <Request>getTransactions</Request> <recordOffset>0</recordOffset> <numOfRecords>100</numOfRecords> <startTimeStamp>1579478429</startTimeStamp> <endTimeStamp>1579564769</endTimeStamp> <allTrans>1</allTrans> <userToken>26E692C5-4F6F-46CA-AE86-6007DBDE4DDA</userToken> <descOrder>1</descOrder> <filterBy>1</filterBy> </API3G>
Response example:
The server will respond for the getTransaction request according to the following results:
Parameter | Data type | Description |
---|---|---|
Code | 3 digits code | A code will be sent with the result of the request |
Explanation | Text | Free text of the result |
Codes in response:
Code | Explanation |
---|---|
000 | Request was valid |
997 | Number of records is invalid or exceeded max records 100 |
Success result example:
<?xml version="1.0" encoding="UTF-8"?> <API3G><Code>000</Code> <Explanation>Results Found</Explanation> <Transactions> <Transaction> <TransactionToken>7FDE71F3-2ADE-4B4D-A4C5-ABB0FBD8004B</TransactionToken> <TransactionCreatedDate>2020-01-17 12:01:43</TransactionCreatedDate> <TransactionPartPayment>15260</TransactionPartPayment> <TransactionStatus>Paid</TransactionStatus> <TransactionBookRef>*******</TransactionBookRef> <TransactionAmount>10.00</TransactionAmount> <TransactionCurrency>KES</TransactionCurrency> <TransactionFinalAmount>10.00</TransactionFinalAmount> <TransactionFinalCurrency>KES</TransactionFinalCurrency> <TransactionCreditCard>8367</TransactionCreditCard> <TransactionCityId>0</TransactionCityId> <TransactionPhone>716721021</TransactionPhone> <TransactionPhonePrefix>254</TransactionPhonePrefix> <TransactionRef>12947FDE7</TransactionRef> <TransactionPaymentDate>2020-01-21 17:41:57</TransactionPaymentDate> <TransactionCardType>Mastercard</TransactionCardType> <TransactionUserName>John Doe</TransactionUserName> <TransactionApprovalNumber>4444444441</TransactionApprovalNumber> <TransactionServiceDescription> <ServiceDescription>test</ServiceDescription> </TransactionServiceDescription> <TransactionCustomerPhone>254716721021</TransactionCustomerPhone> <TransactionCustomerEmail>johndoe@gmail.com</TransactionCustomerEmail> <TransactionCustomerName>John Doe</TransactionCustomerName> <TransactionFraudAlert>004</TransactionFraudAlert> <TransactionFraudExplanation>Low risk</TransactionFraudExplanation> </Transaction> </Transactions> </API3G>