Payments
Returns the appointment cost.
HTTP Request
Section titled “HTTP Request”To retrieve the appointment cost, make a request to:
GET {server_url}/api/v2/payments/costs/check
Headers
Section titled “Headers”| 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.
URL Parameters
Section titled “URL Parameters”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) |
Example Request
Section titled “Example Request”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'RestClient::Request.new( :method => :get, :url => '{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}', :headers => { 'Authorization' => 'Bearer {jwt_token}', 'Content-type' => 'application/json', 'Accept' => 'application/json' }).executeExample Response
Section titled “Example Response”{ "cost_with_no_promocode": 49, "final_amount": 49, "cost": 49, "consultation_charge": 49, "payment_breakup": null}HTTP Response
Section titled “HTTP Response”| Attribute | Description |
|---|---|
| cost | The cost is the attribute holds the final consultation charge for the patient. |
Get Patient Default Credit Card
Section titled “Get Patient Default Credit Card”HTTP Request
Section titled “HTTP Request”To retrieve the patient’s default card, make a request to:
GET {server_url}/api/v1/patients/{patient_id}/credit_card
Headers
Section titled “Headers”| 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.
URL Parameters
Section titled “URL Parameters”The following parameters need to be included in the URL of the request:
| Attribute | Required | Description |
|---|---|---|
| patient_id | true | MD Live ID for patient |
Example Request
Section titled “Example Request”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'RestClient::Request.new( :method => :get, :url => '{server_url}/api/v1/patients/{patient_id}/credit_card', :headers => { 'Authorization' => 'Bearer {jwt_token}', 'Content-type' => 'application/json', 'Accept' => 'application/json' }).executeExample Response
Section titled “Example Response”{ "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 } }}Create/Update Credit Card
Section titled “Create/Update Credit Card”HTTP Request
Section titled “HTTP Request”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
Headers
Section titled “Headers”| 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.
URL Parameters
Section titled “URL Parameters”The following parameters need to be included in the URL of the request:
| Attribute | Required | Description |
|---|---|---|
| patient_id | true | MD Live ID for patient |
Request Body Parameters
Section titled “Request Body Parameters”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 |
Example Request
Section titled “Example Request”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 } } }'RestClient::Request.new( :method => :post, :url => '{server_url}/api/v2/patients/{patient_id}/credit_card', :headers => { 'Authorization' => 'Bearer {jwt_token}', 'Content-type' => 'application/json', 'Accept' => 'application/json' }, :payload => { :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 } } }).executeExample Response
Section titled “Example Response”{ "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 } }}Delete Credit Card
Section titled “Delete Credit Card”HTTP Request
Section titled “HTTP Request”To delete the patient’s default credit card, make a request to:
DELETE {server_url}/api/v1/patients/{patient_id}/credit_card
Headers
Section titled “Headers”| 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.
URL Parameters
Section titled “URL Parameters”The following parameters need to be included in the URL of the request:
| Attribute | Required | Description |
|---|---|---|
| patient_id | true | MD Live ID for patient |
Example Request
Section titled “Example Request”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'RestClient::Request.new( :method => :delete, :url => '{server_url}/api/v1/patients/{patient_id}/credit_card', :headers => { 'Authorization' => 'Bearer {jwt_token}', 'Content-type' => 'application/json', 'Accept' => 'application/json' }).executeExample Response
Section titled “Example Response”{ "success":true}