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 | Status of transaction | 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>2B4A048B-EBBE-472F-A766-2DEACBFDC89A</TransactionToken> <TransactionCreatedDate>2019-12-25 12:45:49</TransactionCreatedDate> <TransactionPartPayment>0</TransactionPartPayment> <TransactionStatus>Authorised</TransactionStatus> <TransactionBookRef>dess</TransactionBookRef> <TransactionAmount>1.00</TransactionAmount> <TransactionCurrency>USD</TransactionCurrency> <TransactionFinalAmount>1.00</TransactionFinalAmount> <TransactionFinalCurrency>USD</TransactionFinalCurrency> <TransactionCreditCard>8367</TransactionCreditCard> <TransactionCityId>0</TransactionCityId> <TransactionPhone></TransactionPhone> <TransactionPhonePrefix></TransactionPhonePrefix> <TransactionRef>8412B4A0</TransactionRef> <TransactionPaymentDate>2019-12-25 12:47:30</TransactionPaymentDate> <TransactionCardType>Mastercard</TransactionCardType> <TransactionUserName>nathan841</TransactionUserName> <TransactionApprovalNumber>4444444447</TransactionApprovalNumber> <TransactionServiceDescription> <ServiceDescription>this is it</ServiceDescription> </TransactionServiceDescription> <TransactionCustomerPhone></TransactionCustomerPhone> <TransactionCustomerEmail>nathan@aerocrs.com</TransactionCustomerEmail> <TransactionCustomerName>nathan nathan</TransactionCustomerName> <TransactionFraudAlert>004</TransactionFraudAlert> <TransactionFraudExplanation>Very high risk</TransactionFraudExplanation> <TransactionExpiryDate>2020-02-03 12:00:00</TransactionExpiryDate> {"TravTransTypeCd":"Type1","DocTypeCd":"DocType","IATACarrierCd":"1234","IATAAgcyNbr":"465657","TktCarrierNm":"CarrierNm","TktIssCityNm":"Nairobi","PassCnt":"3","ConjTktInd":"12233","ElecTktInd":"1A848F","ExchTktNbr":"1A848E5","SegIATACarrierCd":"Some data","FareBasisTxt":"BasisTxt","FlgtNbr":"1A848EF","ServClassCd":"1A"}</TransactionAdditionalFields> </Transaction> </Transactions> </API3G>