make_payment Navigate to XML API

This API is used to take the payment via credit card or a debit card on the subscriber's account or refund. Payments can be accepted for Add On, Equipment purchase, New signup plan purchase or on Plan Change. Please note: There is another API AddBalanceWithPayment using which you can charge the credit or debit card and apply the Add on with one api call.

End Point https://www.vcareapi.com:8080/payment
Field (Short Description) Value/Tag Name Format Field Example Type Notes Validation rules
action String make_payment Required This needs to be passed as make_payment make_payment
zip_code String 90001 Required This is the state Zipcode. This is required because taxes may vary from state to state Should not allow letters and special characters, only numbers should be exactly 5 digits.
plan_id String 1 Required Plan ID : This is returned in plan_list API
type String auth Required sale, auth
payment_type String CHANGE_PLAN Required This is the payment type on the basis of which tax is calculated. Taxes may vary for different payment types. TOPUP ILDTOPUP DATA UPGRADE CHANGE_PLAN RENEW_PLAN PLAN NEW_SIGNUP EQUIPMENT_PURCHASE
source String API Required Source of the order/application/API call Expected Value:API, TABLET, WEBSITE
agent_id String John Doe Required This is the Telgoo5 user id for the Agent/Employee who is sending the API request.
enrollment_id String AN12345 Optional Auto generated customer enroll id. This is returned in GetCustomerInfo and this is also given in the response of create_customer_prepaid API If enrollment id empty then customer is Required.
esn array ['845742284','1254257845'] Optional ESN Number
model_id array [1,2] Optional Model ID
uiccid String 4545 Optional UICCID
card_type String VISA Optional This is the type of the card. Required if ACTION="sale" or "auth". VISA, MASTERCARD, DISCOVER, AMERICAN EXPRESS, AMEX
card_number String 4111111111111110 Optional This is the credit/debit card number. Required if ACTION="sale" or "auth". Max=16 digits
cvv String 234 Optional This is the CVV number of the card. Required if ACTION="sale" or "auth". Max=4 digits
expiration_month String 11 Optional This is the expiration month of the credit/debit card. Required if ACTION="sale" or "auth".Max. digits=2
expiration_year String 2018 Optional This is the expiration year of the credit/debit. Required if ACTION="sale" or "auth".Exactly 4 digits.
name_on_card String JohnDoe Optional This is the name on the credit/debit. Required if ACTION="sale" or "auth".
billing_state String CA Optional This is the state of the registered billing address in the bank account to which the card is associated. Required if ACTION="sale" or "auth". State should be standard abbreviated form.
billing_city String San Jose Optional Required if ACTION="sale" or "auth". This is the Billing address City for the associated bank account. Should allow only letters, hyphen and space.
billing_zip String 90001 Optional Required if ACTION="sale" or "auth". This is the Billing address Zip Code for the associated bank account. Should not allow letters and special characters, only numbers should be exactly 5 digits.
billing_address1 String 123 Main st Optional This is the Billing address line 1 for the associated bank account.
Required if ACTION="sale" or "auth". Should allow only letters, numbers, space and: hyphen ; forward slash Max length for the fields - 50 symbols. Cannot contain phrases "PO Box" or "P.O. Box".
billing_address2 String Apt 1 Optional Required if ACTION="sale" or "auth". This is the Billing address line 2 for the associated bank account. Should allow only letters, numbers, space and: hyphen ; forward slash Max length for the fields - 50 symbols. Cannot contain phrases "PO Box" or "P.O. Box".
payment_method String CREDIT_CARD Optional This is the payment type on the basis of which Processing fee is calculated. Payment type as below. CREDIT_CARD, PAYPAL_BRAINTREE , OTHER_PAYMENT_OPTION
carrier String SPR Optional it will be passed in case of handover
handover_type String BYOD, SHIPMENT Optional it will be passed in case of handover BYOD, SHIPMENT
device_type String CDMA Optional it will be passed in case of handover
coupon_info String { Optional


model_child_id String 25 Optional
agent_password String JohnDoe Optional 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 REST 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 REST API.
payment_method_option String Optional to save other payment method Required when payment_method is OTHER_PAYMENT_OPTION
payment_nonce String Optional to save extra information Required in payment method is PAYPAL BRAINTREE
email String Optional to save customer email
invoice_generation_date String Optional to set invoice date
overnight_shipping String Y Optional to get payment details Y/N
save_card String Y Optional To save card Y/N
customer_token String Optional To validate card
payment_token String Optional To validate card
shipping_id String Optional to get payment details
transaction_id String Optional
device_benefit_already_reimbursed String Y Optional If Y then get Device Actual and expected amount Y/N
device_id String Optional to get payment details
generate_evad_order_number String Y Optional to get evad order info Y/N
is_free_phone_order String Y or N Optional
is_paid_phone_order String Y or N Optional
zip4 String 1004 Optional
Sample Request REST
{
    "enrollment_id": "A16518",
    "zip_code": "73005",
    "plan_id": "",
    "billing_state": "OK",
    "billing_city": "Anadarko",
    "billing_zip": "73005",
    "billing_address1": "112 E 8TH ST 79",
    "billing_address2": "NOT REQUIRED",
    "type": "sale",
    "payment_method": "CREDIT_CARD",
    "card_number":"4111111111111111",
    "name_on_card":"TEST",
    "cvv":"123",
    "expiration_month":"02",
    "expiration_year":"2023",
    "card_type":"Visa",
    "payment_type": "EQUIPMENT_PURCHASE",
    "action": "make_payment",
    "agent_id": "ewebsiteapi",
    "source": "WEBSITE",
    "esn": "",
    "equipment_id": null,
    "model_id": [
        "4"
    ],
    "is_payment_completed": "N",
    "payment_transaction_id": null,
    "model_child_id": "",
    "carrier": null,
    "handover_type": null,
    "device_type": null,
    "overnight_shipping": null,
    "payment_nonce": null,
    "payment_method_option": "",
    "save_card": null,
    "email": null,
    "shipping_id": null,
    "is_free_phone_order":"Y",
    "is_paid_phone_order":"N",
    "zip4":""
}
List of status code, description and resolution.
Status Code Description How to Resolve?
RESTAPI000 SUCCESS SUCCESS
RESTAPI001 FAIL Multiple errors like Invalid Token, Token already used, Token expire & Invalid Access!!
RESTAPI101 FAIL Module required.
RESTAPI102 FAIL Action required.
RESTAPI103 FAIL Source Not Allowed.
RESTAPI104 FAIL Invalid Agent ID or Password.
RESTAPI105 FAIL Module does not exist.
RESTAPI106 FAIL Action does not exist.
RESTAPI107 FAIL Invalid company.
RESTAPI108 FAIL Invalid method.
RESTAPI109 FAIL Unauthorized Access.
RESTAPI010 FAIL Multiple errors come in an array.
Sample Response
{
    "msg": "Success",
    "msg_code": "RESTAPI000",
    "data": {
        "total_amount": "16.94",
        "total_shipping_amount": 5.99,
        "plan_activation_fee": 0,
        "plan_tax": 0,
        "processingFee": "0.00",
        "overnight_shipping_amount": "0.00",
        "evad_order_number": "",
        "payment_status": "SUCCESS",
        "payment_gateway_response": "SUCCESS::6596269873856434604009::16.94::2::2::326132::Successful transaction.::0186001065751111::0186001065751111",
        "long_message": "",
        "error_code": "",
        "transaction_no": "6596269873856434604009",
        "merrefode": "VCARELFYS96YI0P",
        "error_msg": "",
        "customer_token": "0186001065751111",
        "payment_token": "0186001065751111",
        "invoice_number": "2022-08-107"
    }
}
SUCCESS
Sample Fail Response: 1
{
    
    "msg": "Invalid Token",
    "msg_code": "RESTAPI001",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7InVzZXJuYW1lIjoiRGV2LVR4TW9iaWxlVXNlciIsInBhc3N3b3JkIjoiRGV2LVR4TW9iaWxlUFdEIiwicGluIjoiRGV2LVR4UGluMjAxNyIsInZlbmRvcl9pZCI6IkRldi1UeE1vYmlsZSIsImxvZ19pZCI6ODA0ODMxLCJ1cmwiOiJodHRwczovL2Rldi10eG1vYmlsZS52Y2FyZWNvcnBvcmF0aW9uLmNvbS92Y2FyZU9zc0FwaS8ifSwiZXhwIjoxNTYxNDY4NjI0fQ.9iDehEddu46AKDCVWwl26ZSTTaiKt4GWKn7dUIcIspQ"
}
Error Description: Invalid Token
How to Resolve?: Provide valid token in header
Sample Fail Response: 2
{
    
    "msg": "Invalid Access!!",
    "msg_code": "RESTAPI001",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7InVzZXJuYW1lIjoiRGV2LVR4TW9iaWxlVXNlciIsInBhc3N3b3JkIjoiRGV2LVR4TW9iaWxlUFdEIiwicGluIjoiRGV2LVR4UGluMjAxNyIsInZlbmRvcl9pZCI6IkRldi1UeE1vYmlsZSIsImxvZ19pZCI6ODA0ODMxLCJ1cmwiOiJodHRwczovL2Rldi10eG1vYmlsZS52Y2FyZWNvcnBvcmF0aW9uLmNvbS92Y2FyZU9zc0FwaS8ifSwiZXhwIjoxNTYxNDY4NjI0fQ.9iDehEddu46AKDCVWwl26ZSTTaiKt4GWKn7dUIcIspQ"
}
Error Description: Invalid Access!!
How to Resolve?: Request method will be POST
Sample Fail Response: 3
{
    "errors":["Source Not Allowed"]
    "msg": "Source Not Allowed",
    "msg_code": "RESTAPI103",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7InVzZXJuYW1lIjoiRGV2LVR4TW9iaWxlVXNlciIsInBhc3N3b3JkIjoiRGV2LVR4TW9iaWxlUFdEIiwicGluIjoiRGV2LVR4UGluMjAxNyIsInZlbmRvcl9pZCI6IkRldi1UeE1vYmlsZSIsImxvZ19pZCI6ODA0ODMxLCJ1cmwiOiJodHRwczovL2Rldi10eG1vYmlsZS52Y2FyZWNvcnBvcmF0aW9uLmNvbS92Y2FyZU9zc0FwaS8ifSwiZXhwIjoxNTYxNDY4NjI0fQ.9iDehEddu46AKDCVWwl26ZSTTaiKt4GWKn7dUIcIspQ"
}
Error Description: Source Not Allowed
How to Resolve?: Provide valid Source
Sample Fail Response: 4
{
    "errors":["Agent Id should not be blank"]
    "msg": "Agent Id should not be blank",
    "msg_code": "RESTAPI104",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7InVzZXJuYW1lIjoiRGV2LVR4TW9iaWxlVXNlciIsInBhc3N3b3JkIjoiRGV2LVR4TW9iaWxlUFdEIiwicGluIjoiRGV2LVR4UGluMjAxNyIsInZlbmRvcl9pZCI6IkRldi1UeE1vYmlsZSIsImxvZ19pZCI6ODA0ODMxLCJ1cmwiOiJodHRwczovL2Rldi10eG1vYmlsZS52Y2FyZWNvcnBvcmF0aW9uLmNvbS92Y2FyZU9zc0FwaS8ifSwiZXhwIjoxNTYxNDY4NjI0fQ.9iDehEddu46AKDCVWwl26ZSTTaiKt4GWKn7dUIcIspQ"
}
Error Description: Agent Id should not be blank
How to Resolve?: Provide valid Agent Id
Sample Fail Response: 5
{
    "errors":["Invalid Agent Id"]
    "msg": "Invalid Agent Id",
    "msg_code": "RESTAPI104",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7InVzZXJuYW1lIjoiRGV2LVR4TW9iaWxlVXNlciIsInBhc3N3b3JkIjoiRGV2LVR4TW9iaWxlUFdEIiwicGluIjoiRGV2LVR4UGluMjAxNyIsInZlbmRvcl9pZCI6IkRldi1UeE1vYmlsZSIsImxvZ19pZCI6ODA0ODMxLCJ1cmwiOiJodHRwczovL2Rldi10eG1vYmlsZS52Y2FyZWNvcnBvcmF0aW9uLmNvbS92Y2FyZU9zc0FwaS8ifSwiZXhwIjoxNTYxNDY4NjI0fQ.9iDehEddu46AKDCVWwl26ZSTTaiKt4GWKn7dUIcIspQ"
}
Error Description: Invalid Agent Id
How to Resolve?: Provide valid Agent Id
Sample Fail Response: 6
{
    
    "msg": "Token already used",
    "msg_code": "RESTAPI001",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7InVzZXJuYW1lIjoiRGV2LVR4TW9iaWxlVXNlciIsInBhc3N3b3JkIjoiRGV2LVR4TW9iaWxlUFdEIiwicGluIjoiRGV2LVR4UGluMjAxNyIsInZlbmRvcl9pZCI6IkRldi1UeE1vYmlsZSIsImxvZ19pZCI6ODA0ODMxLCJ1cmwiOiJodHRwczovL2Rldi10eG1vYmlsZS52Y2FyZWNvcnBvcmF0aW9uLmNvbS92Y2FyZU9zc0FwaS8ifSwiZXhwIjoxNTYxNDY4NjI0fQ.9iDehEddu46AKDCVWwl26ZSTTaiKt4GWKn7dUIcIspQ"
}
Error Description: Token already used
How to Resolve?: You can use token once per request
Sample Fail Response: 7
{
    
    "msg": "Token expire",
    "msg_code": "RESTAPI001",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7InVzZXJuYW1lIjoiRGV2LVR4TW9iaWxlVXNlciIsInBhc3N3b3JkIjoiRGV2LVR4TW9iaWxlUFdEIiwicGluIjoiRGV2LVR4UGluMjAxNyIsInZlbmRvcl9pZCI6IkRldi1UeE1vYmlsZSIsImxvZ19pZCI6ODA0ODMxLCJ1cmwiOiJodHRwczovL2Rldi10eG1vYmlsZS52Y2FyZWNvcnBvcmF0aW9uLmNvbS92Y2FyZU9zc0FwaS8ifSwiZXhwIjoxNTYxNDY4NjI0fQ.9iDehEddu46AKDCVWwl26ZSTTaiKt4GWKn7dUIcIspQ"
}
Error Description: Token expire
How to Resolve?: Create token again
Sample Fail Response: 8
{
    "errors":["Please enter Enrollment Id"]
    "msg": "Error occurred",
    "msg_code": "RESTAPI110",
    "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7InVzZXJuYW1lIjoiRGV2LVR4TW9iaWxlVXNlciIsInBhc3N3b3JkIjoiRGV2LVR4TW9iaWxlUFdEIiwicGluIjoiRGV2LVR4UGluMjAxNyIsInZlbmRvcl9pZCI6IkRldi1UeE1vYmlsZSIsImxvZ19pZCI6ODA0ODMxLCJ1cmwiOiJodHRwczovL2Rldi10eG1vYmlsZS52Y2FyZWNvcnBvcmF0aW9uLmNvbS92Y2FyZU9zc0FwaS8ifSwiZXhwIjoxNTYxNDY4NjI0fQ.9iDehEddu46AKDCVWwl26ZSTTaiKt4GWKn7dUIcIspQ"
}
Error Description: Error occurred
How to Resolve?: Provide Enrollment Id