Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Description

The GetMobilePaymentOptions CompanyMobilePaymentOptions request will be used to receive the list of available mobile payment options for the transactionper company

URL: https://secure1secure.sandbox3gdirectpay.directpay.onlinecom/API/v6/


Response

The method will response with the result of your request


Variables to send:

Parameter

Data type

Description


 Request

 Text

 GetMobilePaymentOptions  CompanyMobilePaymentOptions

Mandatory

CompanyToken

Token

Token you got from 3G to operate this API

Mandatory

TransactionToken

Token

Transaction token as accepted from the createToken.

Mandatory

Request example:


Code Block
languagexml
titlerequest example
<?xml version="1.0" encoding="utf-8"?>
<API3G>
  <CompanyToken>57466282-EBD7-4ED5-B699-8659330A6996</CompanyToken>
  <Request>GetMobilePaymentOptions<<Request>CompanyMobilePaymentOptions</Request>
  <TransactionToken>72983CAC-5DB1-4C7F-BD88-352066B71592</TransactionToken>
</API3G>


Respond:

The server will respond for the GetMobilePaymentOptions request CompanyMobilePaymentOptions request according to the following results:

Parameter

Data type

Description

country
terminalmnocountry

Text

Country

countryCode

ISO code

Country ISO 2 letter code

http://en.wikipedia.org/wiki/ISO_3166-1

paymentname

terminalmno

Text

Provider name

celluarprefix

Number

Country prefix

amount

Money

Total amount in currency selected.

currency

Text

From table of options as accepted from 3G.

instructions

Text

Payment instructions for mobile money
terminaltype

Text

Terminal Type

terminalredirecturi

bit

If redirect uri is set

Respond codes:


Code

Explanation

0130

New invoice

001

Authorized

801

Request missing company token

802

Company token does not exist

803

No request or error in Request type name

804

Error in XML

904Can’t MobilePay this Transaction

Can't return Mobile Terminals

950

Request missing transaction level mandatory fields


Respond example:


Code Block
languagexml
titleresponse example
<?xml version="1.0" encoding="utf-8"?>
<API3G>
<paymentoptions><paymentoptionsmobile>
  <mobileoption>
    <country>kenya</country>
    <countryCode>KE</countryCode>
    <paymentname>airtel</paymentname>
	<logo>https://s3-eu-west-1.amazonaws.com/directpaystorage/airtel.png</logo>
    <celluarprefix>254</celluarprefix>
    <amount>120</amount>
    <currency>KES</currency>
    <instructions>1.Go to Airtel money Sim tool kit;2. Select Airtel money option;3. Select 'Make payments' option;4. Select 'Pay bill' option;5. Select 'Other' option;6. Enter the 'Business name' - 369369;7. Enter amount you want             to pay - 200;8. Enter your Airtel money PIN;9. Enter your reference 676CC8;10. Press OK to send
   </instructions>
  </mobileoption>
  <mobileoption>
    <country>tanzania</country>
    <countryCode>TZ</countryCode>
    <paymentname>vodacom</paymentname>
	<logo>https://s3-eu-west-1.amazonaws.com/directpaystorage/vodacom.png</logo>
    <celluarprefix>255</celluarprefix>
    <amount>70</amount>
    <currency>TZS</currency>
    <instructions>1.Dial *150*00#;2. Select pay by MPESA;3. Select Enter business number;4. Enter 644644;5. Enter 676CC8;6. Enter amount - 4456.92;7. Enter pin;8. Press 1 to confirm 2 to             decline. Payment of 4456.92 to utility 644644 for account 676CC8.
  </instructions>
  </mobileoption>
</paymentoptions>			<terminalmobile>
			<terminalredirecturi>0</terminalredirecturi>
			<terminaltype>Mobile</terminaltype>
			<terminalmno>SafaricomSTKv2</terminalmno>
			<terminalmnocountry>Kenya</terminalmnocountry>
		</terminalmobile>
		<terminalmobile>
			<terminalredirecturi>0</terminalredirecturi>
			<terminaltype>CL</terminaltype>
			<terminalmnocountry>tanzania</terminalmnocountry>
			<terminalmno>tigo</terminalmno>
		</terminalmobile>
</paymentoptionsmobile>
</API3G>