Skip to content
MD Live logoMD Live logoMD Live Developer API

Payments

Returns the appointment cost.

To retrieve the appointment cost, make a request to:

GET {server_url}/api/v2/payments/costs/check

Parameter Default
Authorization Bearer {jwt_token}
Accept application/json
Content-type application/json

This request must include a valid User JWT token, please see our documentation.

The following parameters need to be included in the URL of the request:

Attribute Required Description
patient_id true MD Live ID for patient
provider_type_id true Provider Type ID, from the provider types list
promo_code false Promo code to apply to the cost of the appointment
state_abbrev false 2-Letter state abbreviated, from the states list
authorize_insurance false boolean to return cost with insurance (true) or without insurance (false)
Terminal window
curl -X GET '{server_url}/api/v2/payments/costs/check?patient_id={patient_id}&provider_type_id={provider_type_id}&promo_code={promo_code}&state_abbrev={state_abbrev}&authorize_insurance={authorize_insurance}' \
-H 'Authorization: Bearer {jwt_token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
{
"cost_with_no_promocode": 49,
"final_amount": 49,
"cost": 49,
"consultation_charge": 49,
"payment_breakup": null
}
Attribute Description
cost The cost is the attribute holds the final consultation charge for the patient.

To retrieve the patient’s default card, make a request to:

GET {server_url}/api/v1/patients/{patient_id}/credit_card

Parameter Default
Authorization Bearer {jwt_token}
Accept application/json
Content-type application/json

This request must include a valid User JWT token, please see our documentation.

The following parameters need to be included in the URL of the request:

Attribute Required Description
patient_id true MD Live ID for patient
Terminal window
curl -X GET {server_url}/api/v1/patients/{patient_id}/credit_card \
-H 'Authorization: Bearer {jwt_token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
{
"credit_card": {
"subscriber_id": 950,
"subscriber_card_id": 486,
"billing_data": {
"address1": "2900 NW 130th Ave #106",
"address2": "",
"city": "Sunrise",
"state": "FL",
"zip": "33323",
"name": "John Doe",
"country": "US"
},
"card_data": {
"last_four": "4242",
"active": true,
"type": "VISA",
"expiration_month": 1,
"expiration_year": 2020
}
}
}

To create or update a credit card as the default card for a patient, make a request to:

POST {server_url}/api/v2/patients/{patient_id}/credit_card

Parameter Default
Authorization Bearer {jwt_token}
Accept application/json
Content-type application/json

This request must include a valid User JWT token, please see our documentation.

The following parameters need to be included in the URL of the request:

Attribute Required Description
patient_id true MD Live ID for patient

The following parameters need to be included in the body of the request:

Attribute Required Description
credit_card true Parent attribute for the credit card
↳ billing_data true Parent attribute for billing information
    ↳ name true Cardholder’s name
    ↳ address1 true Cardholder’s address 1
    ↳ address2 false Cardholder’s address 2
    ↳ state_abbrev true Cardholder’s state abbreviation
    ↳ city true Cardholder’s city
    ↳ zip true Cardholder’s ZIP Code
↳ card_data true Parent attribute for credit card information
    ↳ card_number true The card number, as a string without any separators
    ↳ cvv true Cardholder’s name
    ↳ expiration_month true Two digit number representing the card’s expiration month
    ↳ expiration_year true Four digit number representing the card’s expiration year
Terminal window
curl -X POST {server_url}/api/v2/patients/{patient_id}/credit_card \
-H 'Authorization: Bearer {jwt_token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"credit_card": {
"billing_data": {
"name": "John Doe",
"address1": "2900 NW 130th Ave #106",
"address2": "",
"state_abbrev": "FL",
"city": "Sunrise",
"zip": "33323"
},
"card_data": {
"card_number": "4242424242424242",
"cvv": "200",
"expiration_month": 1,
"expiration_year": 2020
}
}
}'
{
"credit_card": {
"subscriber_id": 950,
"subscriber_card_id": 486,
"billing_data": {
"address1": "2900 NW 130th Ave #106",
"address2": "",
"city": "Sunrise",
"state": "FL",
"zip": "33323",
"name": "John Doe",
"country": "US"
},
"card_data": {
"last_four": "4242",
"active": true,
"type": "VISA",
"expiration_month": 1,
"expiration_year": 2020
}
}
}

To delete the patient’s default credit card, make a request to:

DELETE {server_url}/api/v1/patients/{patient_id}/credit_card

Parameter Default
Authorization Bearer {jwt_token}
Accept application/json
Content-type application/json

This request must include a valid User JWT token, please see our documentation.

The following parameters need to be included in the URL of the request:

Attribute Required Description
patient_id true MD Live ID for patient
Terminal window
curl -X DELETE {server_url}/api/v1/patients/{patient_id}/credit_card \
-H 'Authorization: Bearer {jwt_token}' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json'
{
"success":true
}