CancelPurchase

This XMLAPI is used to cancel the plan or topup which are currently available on the subscribers accounts whether it is active on the account or in the queue.

End Point https://www.vcareapi.com/vcareOssApi/CancelPurchase/
Field (Short Description) Value/Tag Name Format Field Example Type Notes Validation rules
VENDOR ID string Vcarecorporation Required A unique Vendor ID is associated with the MVNO/OSS partner. This is used for authorization purpose and can be obtained by contacting your account manager.
USER NAME string Vcarecorporation Required A unique User name is associated with the MVNO/OSS partner. This is used for authorization purpose and can be obtained by contacting your account manager.
PASSWORD string Vcarecorporation Required This is a random string which is generated by Vcare and is tied to the MVNO/OSS user name. This is specifically used for authentication purpose and can be obtained by contacting your account manager.
PIN string 123456789 Required This is generated by Vcare to provide an additional layer of security in the Interim API. This is used for authentication purpose and can be obtained by contacting your account manager.
REFERENCE NUMBER string 123456789 Required Auto generated unique reference number is required to be passed with each transaction.
MDN Numeric 1234567890 Required Telephone Number of the subscriber. This is returned in GetCustomerInfo
PURCHASEID Numeric 1315 Conditional A unique id generated every time user purchases a plan. User can get it through Line inquiry API. Priority frist.

Purchase ID and Plan code are conditional user can provide either Purchase ID or Plan code.

PLAN CODE string 125 Conditional Unique carrier code assigned to every plan while creating. User can get it through Line inquiry API. Priority Second.

1) Purchase ID and Plan code are conditional user can provide either Purchase ID or Plan code.

2) When user have multiple pan with same plan code then on cancelling the plan with plan code API will cancel the currently active plan.

3) When user have multiple top-up with same plan code then use Purchase ID to cancel the top-up as multiple top-up's will be active at the same time.

SOURCE string API Optional Source of the order/application Expected Value:API, TABLET, IVR, WEBSITE
AGENTID string John Doe Required This is the Telgoo5 user id.For the Agent/Employee who is sending the API request.
AGENTPASSWORD string John Doe Conditional This is the password for the Agent Id mentioned above. This is configuration level field. If you have set the permissions for the Agent Id for the requirement of the password in API transactions then you will need to pass the Agent Password in all the XML API transaction, else if you have set the permissions to password not required then you don't need to pass the Agent Password in the XML API.
Sample Request XML
<?xml version="1.0" encoding="utf-8"?>
<VCAREOSSAPI xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"  xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CREDENTIALS>
	<VENDORID></VENDORID>
	<USERNAME></USERNAME>
	<PASSWORD></PASSWORD>
	<PIN></PIN>
	<REFERENCENUMBER></REFERENCENUMBER>
</CREDENTIALS>
<VCAREOSS>
	<CANCELPURCHASE>
		<MDN></MDN>
		<PURCHASEID></PURCHASEID>
		<PLANCODE></PLANCODE>
		<AGENTID></AGENTID>
		<AGENTPASSWORD></AGENTPASSWORD>
		<SOURCE></SOURCE>
	</CANCELPURCHASE>
</VCAREOSS>
</VCAREOSSAPI>
List of status code and description.
Status Code Description
00 SUCCESS
01 Error Received from Carrier.
13 Password is invalid.
16 Vendor not found. Wrong credentials.
125 MDN should not be blank.
126 Invalid MDN.
129 Plan Code is incorrect.
257 MDN details not found in database.
367 MDN should be 10 digits.
806 Please Enter Either Purchase ID OR Plan Code for cancel purchase API
Sample Response
<?xml version="1.0" encoding="utf-8"?>
<VcareOssApi xmlns="http://www.oss.vcarecorporation.com/oss" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <credentials>
        <vendorId>Vcarecorporation</vendorId>
        <referenceNumber>11111</referenceNumber>
    </credentials>
    <CancelPurchase>
        <statusCode>00</statusCode>
        <description>SUCCESS</description>
        <errorDescription>SUCCESS</errorDescription>
		<purchaseid></purchaseid>
		<massage></massage>
     <CancelPurchase>
</VcareOssApi>

SUCCESS
Sample Fail Response: 1
<?xml version="1.0" encoding="utf-8"?>
<VcareOssApi xmlns="http://www.oss.vcarecorporation.com/oss" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<credentials>
	<vendorId>Vcarecorporation</vendorId>
	<referenceNumber>11111</referenceNumber>
</credentials>
<CancelPurchase>
	<statusCode>01</statusCode>
	<description>FAIL</description>
	<errorDescription>Error Received from Carrier.</errorDescription>
</CancelPurchase>
</VcareOssApi>
Error Received from Carrier.
Sample Fail Response: 2
<?xml version="1.0" encoding="utf-8"?>
<VcareOssApi xmlns="http://www.oss.vcarecorporation.com/oss" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<credentials>
	<vendorId>Vcarecorporation</vendorId>
	<referenceNumber>11111</referenceNumber>
</credentials>
<CancelPurchase>
	<statusCode>13</statusCode>
	<description>FAIL</description>
	<errorDescription>Password is invalid.</errorDescription>
</CancelPurchase>
</VcareOssApi>
Password is invalid.
Sample Fail Response: 3
<?xml version="1.0" encoding="utf-8"?>
<VcareOssApi xmlns="http://www.oss.vcarecorporation.com/oss" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<credentials>
	<vendorId>Vcarecorporation</vendorId>
	<referenceNumber>11111</referenceNumber>
</credentials>
<CancelPurchase>
	<statusCode>16</statusCode>
	<description>FAIL</description>
	<errorDescription>Vendor not found. Wrong credentials.</errorDescription>
</CancelPurchase>
</VcareOssApi>
Vendor not found. Wrong credentials.
Sample Fail Response: 4
<?xml version="1.0" encoding="utf-8"?>
<VcareOssApi xmlns="http://www.oss.vcarecorporation.com/oss" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<credentials>
	<vendorId>Vcarecorporation</vendorId>
	<referenceNumber>11111</referenceNumber>
</credentials>
<CancelPurchase>
	<statusCode>125</statusCode>
	<description>FAIL</description>
	<errorDescription>MDN should not be blank.</errorDescription>
</CancelPurchase>
</VcareOssApi>
MDN should not be blank.
Sample Fail Response: 5
<?xml version="1.0" encoding="utf-8"?>
<VcareOssApi xmlns="http://www.oss.vcarecorporation.com/oss" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<credentials>
	<vendorId>Vcarecorporation</vendorId>
	<referenceNumber>11111</referenceNumber>
</credentials>
<CancelPurchase>
	<statusCode>126</statusCode>
	<description>FAIL</description>
	<errorDescription>Invalid MDN.</errorDescription>
</CancelPurchase>
</VcareOssApi>
Invalid MDN.
Sample Fail Response: 6
<?xml version="1.0" encoding="utf-8"?>
<VcareOssApi xmlns="http://www.oss.vcarecorporation.com/oss" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<credentials>
	<vendorId>Vcarecorporation</vendorId>
	<referenceNumber>11111</referenceNumber>
</credentials>
<CancelPurchase>
	<statusCode>129</statusCode>
	<description>FAIL</description>
	<errorDescription>Plan Code is incorrect.</errorDescription>
</CancelPurchase>
</VcareOssApi>
Plan Code is incorrect.
Sample Fail Response: 7
<?xml version="1.0" encoding="utf-8"?>
<VcareOssApi xmlns="http://www.oss.vcarecorporation.com/oss" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<credentials>
	<vendorId>Vcarecorporation</vendorId>
	<referenceNumber>11111</referenceNumber>
</credentials>
<CancelPurchase>
	<statusCode>257</statusCode>
	<description>FAIL</description>
	<errorDescription>MDN details not found in database.</errorDescription>
</CancelPurchase>
</VcareOssApi>
MDN details not found in database.
Sample Fail Response: 8
<?xml version="1.0" encoding="utf-8"?>
<VcareOssApi xmlns="http://www.oss.vcarecorporation.com/oss" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<credentials>
	<vendorId>Vcarecorporation</vendorId>
	<referenceNumber>11111</referenceNumber>
</credentials>
<CancelPurchase>
	<statusCode>367</statusCode>
	<description>FAIL</description>
	<errorDescription>MDN should be 10 digits.</errorDescription>
</CancelPurchase>
</VcareOssApi>
MDN should be 10 digits.
Sample Fail Response: 9
<?xml version="1.0" encoding="utf-8"?>
<VcareOssApi xmlns="http://www.oss.vcarecorporation.com/oss" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<credentials>
	<vendorId>Vcarecorporation</vendorId>
	<referenceNumber>11111</referenceNumber>
</credentials>
<CancelPurchase>
	<statusCode>806</statusCode>
	<description>FAIL</description>
	<errorDescription>Please Enter Either Purchase ID OR Plan Code
for cancel purchase API</errorDescription>
</CancelPurchase>
</VcareOssApi>
Please Enter Either Purchase ID OR Plan Code for cancel purchase API