addMobile
Description
The addMobile request will add new mobile to existing account
URL:Â https://secure1.sandbox.directpay.online/API/v7/index.php
Variables to send:
Parameter | Data type | Description | |
---|---|---|---|
 Request |  Text |  addMobile | Mandatory |
CompanyToken | Token | Token you got from 3G to operate this API | Mandatory |
customerToken | Token | Customer token, retrieved from 'createAccount' API | Mandatory |
customerMno | Text | MNO | Mandatory |
customerMnoCountry | Text | MNO country | Mandatory |
customerMnoPhone | Phone | Customer Phone Number for payment options | Mandatory |
customerMnoLogo | Text | created Logo for MNO | Optional |
Â
Request example:
Request example
<?xml version="1.0" encoding="utf-8"?>
<API3G>
<CompanyToken>90EC1DA4-A7C5-432C-930C-098715D3130E</CompanyToken>
<Request>addMobile</Request>
<customerToken>5B8443FA-8559-4DBD-AF61-7AFF87C35661</customerToken>
<customerMno>SafaricomC2B</customerMno>
<customerMnoCountry>Kenya</customerMnoCountry>
<customerMnoPhone>478585859895</customerMnoPhone>
<customerMnoLogo>payv2/assets/img/mpesa.png</customerMnoLogo>
</API3G> |
Respond:
The server will respond for the addMobile request according to the following results:
Parameter | Data type | Description |
---|---|---|
Code | Number | Result code |
Explanation | Text | Free text of the response |
subscriptionToken | Token | Unique subscription Token to operate payments |
| Phone | Mobile brand |
| Text | MNO Country Name |
| Text | MNO Name |
Respond example:
response example
<?xml version="1.0" encoding="UTF-8"?>
<API3G>
<Code>000</Code>
<Explanation>Successfully added mobile</Explanation>
<subscriptionToken>977E056D-3AD2-4DC5-AE8A-3B8CFF00741A</subscriptionToken>
<MnoPhone>478585859895</MnoPhone>
<MnoCountry>Kenya</MnoCountry>
<Mno>SafaricomC2B</Mno>
</API3G> |
Â
Response Codes
Code | Message |
---|---|
000 | Successfully added mobile |
999, 903 | Dynamic error based XML sent |
901 |
|
Â