Description
The verifyToken request can be initiated at any time, and it is mandatory to verify the token when the customer will return to the application, not verifying the token within 30 minutes of transaction completed of payment, will generate an alert e-mail to the provider announcing that there was no verification process.
URL: https://secure.3gdirectpay.com/API/v6/
Request
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 | verifyToken | Mandatory |
TransactionToken | Token | Transaction token as accepted from the URL redirected | Mandatory/Optional if CompanyRef is sent |
CompanyRef | Text | Company reference number | Mandatory/Optional if TransactionToken is sent |
VerifyTransaction | Boolean (1/0) | By default, the system will verify the transaction and mark it as “website verified” in 3G systems. Send 1 to verify, 0 if you don't need. | Optional Default: 1 (True) |
ACCref | Text | Internal accounting reference number. | Optional |
customerPhone | Text | Customer phone number can be updated | Optional/Mandatory if customerPhonePrefix sent |
customerPhonePrefix | Number | Customer phone prefix (without +) | Optional/Mandatory if customerPhone sent |
customerEmail | Text | Customer E-mail address can be updated | Optional |
Request example:
<?xml version="1.0" encoding="utf-8"?> <API3G> <CompanyToken>57466282-EBD7-4ED5-B699-8659330A6996</CompanyToken> <Request>verifyToken</Request> <TransactionToken>72983CAC-5DB1-4C7F-BD88-352066B71592</TransactionToken> </API3G>
Response:
The server will respond for the verifyToken request according to the following results:
Parameter | Data type | Description |
Result | 3 digits code | A code will be sent with the result of the request |
ResultExplanation | Text | Free text of the result |
CustomerName | Text | Customer name as filled in the form of 3GDirectpay payment page.Will be sent if transaction paid/failed |
CustomerCredit | Text | 4 digits of credit cardWill be sent if transaction paid/failed |
CustomerCreditType | Text | Credit card type |
TransactionApproval | Text | Transaction approval numberWill be sent if transaction paid/failed |
TransactionCurrency | Text | Currency final payment (the customer can convert the payment)Will be sent if transaction paid/failed |
TransactionAmount | Money | Paid amount Will be sent if transaction paid/failed |
FraudAlert | 3 digits code | According to fraud codes table |
FraudExplnation | Text | Free text of fraud analysis |
TransactionNetAmount | Amount | NET transaction amount |
TransactionSettlementDate | Date | Date of transaction settlement |
TransactionRollingReserveAmount | Amount | Transaction rolling reserve amount |
TransactionRollingReserveDate | Date | Date of rolling reserve release |
CustomerPhone | Text | Customer phone number |
CustomerCountry | Text | Customer country |
CustomerAddress | Text | Customer address |
CustomerCity | Text | Customer city |
CustomerZip | Text | Customer zip code |
TransactionRollingReserveDate | Date | Date of rolling reserve release |
MobilePaymentRequest | Text | Mobile payment request status |
AccRef | Text | Internal accounting reference number |
Codes in response:
Code | Explanation |
000 | Transaction Paid |
001 | Authorized |
002 | Transaction overpaid/underpaid |
003 | Pending Bank |
005 | Queued Authorization |
007 | Pending Split Payment (Part Payment Transactions not fully paid) |
801 | Request missing company token |
802 | Company token does not exist |
803 | No request or error in Request type name |
804 | Error in XML |
900 | Transaction not paid yet |
901 | Transaction declined |
902 | Data mismatch in one of the fields - field (explanation) |
903 | The transaction passed the Payment Time Limit |
904 | Transaction cancelled |
950 | Request missing transaction level mandatory fields – field (explanation) |
Codes in fraud alert:
Code | Explanation |
000 | Genuine transaction |
001 | Low Risk (Not checked) |
002 | Suspected Fraud Alert |
003 | Fraud alert cleared (Merchant marked as clear) |
004 | Suspect Fraud Alert |
005 | Fraud alert cleared (Low Risk (Checked)/ Genuine transaction) |
006 | Black - Fraudulent transaction |
Response example:
<?xml version="1.0" encoding="utf-8"?> <API3G> <Result>000</Result> <ResultExplanation>Transaction Paid</ResultExplanation> <TransactionCreatedDate>2023/08/25 09:27:08</TransactionCreatedDate> <TransactionSettlementDate>2023/09/04</TransactionSettlementDate> <TransactionRollingReserveAmount>0.00</TransactionRollingReserveAmount> <TransactionRollingReserveDate>2023/08/25</TransactionRollingReserveDate> <TransactionExpiryDate>2023/08/25 14:27:08</TransactionExpiryDate> <TransactionPaymentDate>2023/08/25 09:42:33</TransactionPaymentDate> <CustomerName>Cons Connie </CustomerName> <CustomerPhone>706527126</CustomerPhone> <CustomerCountry>Kenya</CustomerCountry> <CustomerAddress></CustomerAddress> <CustomerCity>Mbsa</CustomerCity> <CustomerZip></CustomerZip> <CustomerEmail>koyoreads@gmail.com</CustomerEmail> <PaymentType></PaymentType> <CardType>Mobile</CardType> <ApprovalNumber>RHP2ZIGD5U</ApprovalNumber> <CardLastFour></CardLastFour> <CardFirstSix></CardFirstSix> <TransactionAmount>1.0000</TransactionAmount> <TransactionCurrency>KES</TransactionCurrency> <PartPaymentRef>0</PartPaymentRef> <AllocationAmount></AllocationAmount> <AllocationCode></AllocationCode> <CompanyRef></CompanyRef> <CompanyAccRef></CompanyAccRef> <TransactionRef>R49500190</TransactionRef> <ServiceDescription>Sstream.co.ke Order for Stream tech test</ServiceDescription> <ServiceDate></ServiceDate> <TransactionFraudAlert>001</TransactionFraudAlert> <TransactionFraudExplanation>Low Risk (Not checked)</TransactionFraudExplanation> <TransactionFinalAmount>1.0000</TransactionFinalAmount> <TransactionFinalCurrency>KES</TransactionFinalCurrency> </API3G>