Description
The GetMobilePaymentOptions request will be used to receive the list of available mobile payment options for the transaction
URL: https://secure1.sandbox.directpay.online/API/v6/
Response
The method will response with the result of your request
Variables to send:
Parameter | Data type | Description | |
Request | Text | GetMobilePaymentOptions | 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:
<?xml version="1.0" encoding="utf-8"?> <API3G> <CompanyToken>57466282-EBD7-4ED5-B699-8659330A6996</CompanyToken> <Request>GetMobilePaymentOptions</Request> <TransactionToken>72983CAC-5DB1-4C7F-BD88-352066B71592</TransactionToken> </API3G>
Respond:
The server will respond for the GetMobilePaymentOptions request according to the following results:
Parameter | Data type | Description |
country | Text | Country |
countryCode | ISO code | Country ISO 2 letter code |
paymentname | 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 |
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 |
904 | Can’t MobilePay this Transaction |
950 | Request missing transaction level mandatory fields |
Respond example:
<?xml version="1.0" encoding="utf-8"?> <API3G> <paymentoptions> <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> </API3G>