Verify a transaction by transaction token or company reference, and retrieve the latest payment details from DPO.
You can initiate verifyToken at any time. You must verify the token when the customer returns to your application. If you do not verify the token within 30 minutes after the payment is completed, DPO sends an alert email to the provider indicating that no verification process occurred.
HTTP
POST https://secure.3gdirectpay.com/API/v6/HTTP
POST https://secure.3gdirectpay.com/API/v7/
Send requests using XML in the request body.
HTTP
Content-Type: application/xml; charset=utf-8
Accept: application/xml
Parameter Data type Description Required CompanyTokenToken Token you received from 3G to operate this API. Mandatory RequestText Must be verifyToken. Mandatory TransactionTokenToken Transaction token received from the redirected URL. Mandatory, or optional if CompanyRef is sent. CompanyRefText Company reference number. Mandatory, or optional if TransactionToken is sent. VerifyTransactionBoolean (1/0) By default, the system verifies the transaction and marks it as website verified in 3G systems. Set this to 0 if you only want to confirm that the transaction was made, process the details, and then send verifyToken again with this value set to 1 after you successfully process the client. Default: 1 (true). Optional ACCrefText Internal accounting reference number. Optional customerPhoneText Customer phone number. Can be updated. Optional. Mandatory if customerPhonePrefix is sent. customerPhonePrefixNumber Customer phone prefix without +. Optional. Mandatory if customerPhone is sent. customerEmailText Customer email address. Can be updated. Optional
Parameter Data type Description Required RequestText Must be verifyToken. Mandatory CompanyTokenText (Token - UUID) Token you received from 3G to operate this API. Mandatory TransactionTokenText (Token - UUID) Transaction token received from the redirected URL. Mandatory, or optional if CompanyRef is sent. CompanyRefText Company reference number. Mandatory, or optional if TransactionToken is sent. VerifyTransactionBoolean (1/0) By default, the system verifies the transaction and marks it as website verified in 3G systems. Set this to 0 if you only want to confirm that the transaction was made, process the details, and then send verifyToken again with this value set to 1 after you successfully process the client. Default: 1. Optional ACCrefText Internal accounting reference number. Optional customerPhoneText Customer phone number. Can be updated. Optional. Mandatory if customerPhonePrefix is sent. customerPhonePrefixNumber Customer phone prefix without +. Optional. Mandatory if customerPhone is sent. customerEmailText Customer email address. Can be updated. Optional
XML
<?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>
XML
<?xml version="1.0" encoding="utf-8"?>
<API3G>
<Request>verifyToken</Request>
<CompanyToken>{CompanyToken}</CompanyToken>
<TransactionToken>{transToken}</TransactionToken>
<CompanyRef>{CompanyRef}</CompanyRef>
<VerifyTransaction>{VerifyTransaction}</VerifyTransaction>
<ACCref>{ACCref}</ACCref>
<customerPhone>{customerPhone}</customerPhone>
<customerPhonePrefix>{customerPhonePrefix}</customerPhonePrefix>
<customerEmail>{customerEmail}</customerEmail>
</API3G>
XML
<API3G>
<CompanyToken>90EC1DA4-A7C5-432C-930C-098715D3130E</CompanyToken>
<Request>verifyToken</Request>
<TransactionToken>6253BFCA-848B-4884-A5FA-68E425643BD1</TransactionToken>
</API3G>
The server responds to the verifyToken request with the following fields.
Parameter Data type Description Result3-digit code Code sent with the result of the request. ResultExplanationText Free text result explanation. CustomerNameText Customer name as entered on the 3GDirectpay payment page. Sent if the transaction was paid or failed. CustomerCreditText Last 4 digits of the credit card. Sent if the transaction was paid or failed. CustomerCreditTypeText Credit card type. TransactionApprovalText Transaction approval number. Sent if the transaction was paid or failed. TransactionCurrencyText Final payment currency. The customer can convert the payment. Sent if the transaction was paid or failed. TransactionAmountMoney Paid amount. Sent if the transaction was paid or failed. FraudAlert3-digit code Fraud code according to the fraud codes table. FraudExplnationText Free text fraud analysis. TransactionNetAmountAmount Net transaction amount. TransactionSettlementDateDate Transaction settlement date. TransactionRollingReserveAmountAmount Transaction rolling reserve amount. TransactionRollingReserveDateDate Rolling reserve release date. CustomerPhoneText Customer phone number. CustomerCountryText Customer country. CustomerAddressText Customer address. CustomerCityText Customer city. CustomerZipText Customer ZIP code. MobilePaymentRequestText Mobile payment request status. AccRefText Internal accounting reference number.
XML
<?xml version="1.0" encoding="utf-8"?>
<API3G>
<Result>000</Result>
<ResultExplanation>Transaction Paid</ResultExplanation>
<CustomerName>Cons Connie </CustomerName>
<CustomerCredit></CustomerCredit>
<CustomerCreditType>Mobile</CustomerCreditType>
<TransactionApproval>RHP2ZIGD5U</TransactionApproval>
<TransactionCurrency>KES</TransactionCurrency>
<TransactionAmount>1.00</TransactionAmount>
<FraudAlert>001</FraudAlert>
<FraudExplnation>Low Risk (Not checked)</FraudExplnation>
<TransactionNetAmount>0.99</TransactionNetAmount>
<TransactionSettlementDate>2023/09/04</TransactionSettlementDate>
<TransactionRollingReserveAmount>0.00</TransactionRollingReserveAmount>
<TransactionRollingReserveDate>2023/08/25</TransactionRollingReserveDate>
<CustomerPhone>706527126</CustomerPhone>
<CustomerCountry>Kenya</CustomerCountry>
<CustomerAddress></CustomerAddress>
<CustomerCity>Mbsa</CustomerCity>
<CustomerZip></CustomerZip>
<MobilePaymentRequest>Not sent</MobilePaymentRequest>
<AccRef></AccRef>
<TransactionFinalCurrency>KES</TransactionFinalCurrency>
<TransactionFinalAmount>1.00</TransactionFinalAmount>
</API3G>
XML
<?xml version="1.0" encoding="UTF-8"?>
<API3G>
<Result>000</Result>
<ResultExplanation>Transaction Paid</ResultExplanation>
<TransactionCreatedDate>2024/01/03 09:11:44</TransactionCreatedDate>
<TransactionSettlementDate>2024/01/17</TransactionSettlementDate>
<TransactionRollingReserveAmount>0.00</TransactionRollingReserveAmount>
<TransactionRollingReserveDate>2024/01/03</TransactionRollingReserveDate>
<TransactionExpiryDate>2024/01/04 00:11:44</TransactionExpiryDate>
<TransactionPaymentDate>2024/01/03 09:14:52</TransactionPaymentDate>
<CustomerName>vv vv</CustomerName>
<CustomerPhone>203888888888</CustomerPhone>
<CustomerCountry>Israel</CustomerCountry>
<CustomerAddress>6666</CustomerAddress>
<CustomerCity>ee</CustomerCity>
<CustomerZip>e</CustomerZip>
<CustomerEmail>[email protected] </CustomerEmail>
<PaymentType></PaymentType>
<CardType>MASC</CardType>
<ApprovalNumber>400309113213</ApprovalNumber>
<CardLastFour>0008</CardLastFour>
<CardFirstSix>51234500</CardFirstSix>
<TransactionAmount>44.7947</TransactionAmount>
<TransactionCurrency>AED</TransactionCurrency>
<PartPaymentRef>0</PartPaymentRef>
<AllocationAmount>1.3047</AllocationAmount>
<AllocationCode>demo1</AllocationCode>
<CompanyRef>49FYTA9009</CompanyRef>
<CompanyAccRef>OTC9L5_992404700</CompanyAccRef>
<TransactionRef>R4981192</TransactionRef>
<ServiceDescription>Refill account</ServiceDescription>
<ServiceDate></ServiceDate>
<TransactionFraudAlert>001</TransactionFraudAlert>
<TransactionFraudExplanation>Low Risk (Not checked)</TransactionFraudExplanation>
<TransactionFinalAmount>44.7947</TransactionFinalAmount>
<TransactionFinalCurrency>AED</TransactionFinalCurrency>
</API3G>
XML
<?xml version="1.0" encoding="UTF-8"?>
<API3G>
<Code>950</Code>
<Explanation>Request missing transaction level mandatory fields - fieldName</Explanation>
</API3G>
Code Explanation 000Transaction paid. 001Authorized. 002Transaction overpaid or underpaid. 003Pending bank. 005Queued authorization. 007Pending split payment. Part-payment transactions are not fully paid. 801Request missing company token. 802Company token does not exist. 803No request or error in request type name. 804Error in XML. 900Transaction not paid yet. 901Transaction declined. 902Data mismatch in one of the fields: field explanation. 903The transaction passed the payment time limit. 904Transaction cancelled. 950Request missing transaction-level mandatory fields: field explanation.
Code Explanation 000Transaction paid. 001Authorized. 002Transaction overpaid or underpaid. 007Pending split payment. Part-payment transactions are not fully paid. 801Request missing company token. 802Company token does not exist. 803No request or error in request type name. 804Error in XML. 900Transaction not paid yet. 901Transaction declined. 902Data mismatch in one of the fields: field explanation. 903The transaction passed the payment time limit. 904Transaction cancelled. 950Request missing transaction-level mandatory fields: field explanation.
Code Explanation 000Genuine transaction. 001Low risk. Not checked. 002Suspected fraud alert. 003Fraud alert cleared. Merchant marked as clear. 004Suspect fraud alert. 005Fraud alert cleared. Low risk checked or genuine transaction. 006Black. Fraudulent transaction.
Code Explanation 000Genuine transaction. 002Suspected fraud alert. 003Fraud alert cleared. Merchant marked as clear. 004Suspect fraud alert. 005Fraud alert cleared. Genuine transaction. 006Black. Fraudulent transaction.