Collecting Payment Information

The property PaymentMethod is required whether you’re starting a Virtual Visit, a Retail Visit, or a Provider Visit.

N.B. Not all payment methods are supported for each service, and some payment methods require setup from your DexCare contact.

Retail Virtual Provider
Credit Card - Stripe Token :o: Coming soon… :heavy_check_mark: :x:
Insurance - By Insurance Provider :heavy_check_mark: :heavy_check_mark: :heavy_check_mark:
Insurance - Card Upload :question: Supported by some clinics :x: :x:
Self Pay (Pay on arrival) :heavy_check_mark: :x: :heavy_check_mark:
Coupon Code :x: :heavy_check_mark: :x:
  • Upon failure to collect valid payment information, a standard medical bill will be mailed to the patient.
  • Your app is not required to use all of these - it can use a subset if desired.

Credit Card

DexCare supports credit card payments with Stripe. Please contact your DexCareSDK contact for more information on how to provide this for your clients.

  • let paymentMethod = PaymentMethod.creditCard(stripeToken: "TokenFromStripe")
    
  • val paymentMethod = CreditCard("TokenFromStripe")
    

Insurance - By Provider

A list of Insurance providers can be set up by your DexCareSDK contact. These providers can be retrieved by calling PaymentService.getInsurancePayers and the providerId is required from the former call.

Use InsuranceSelf when using your insurance for the main logged in user.

  • let paymentMethod = PaymentMethod.insuranceSelf(memberId: "NumberOrStringOfMemberIdOfProvider", payorId: "payorIdFromGetInsurancePayers")
    
  • val paymentMethod = InsuranceSelf( "insurance-holder-memberId", "insuranceGroupNumber", "payorId-from-getInsurancePayers", "payorName-from-getInsurancePayers")
    

Use InsuranceOther when the insurance is owned by someone other than the app user. Additional demographic information needs to be collected about said insurance owner to use this payment method.

  • let paymentMethod = PaymentMethod.insuranceOther(
        firstName: "InsuranceOwnerFirstName",
        lastName: "InsuranceOwnerLastName",
        gender: .male,
        dateOfBirth: Date.birthdate,
        memberId:"MemberIdOnInsurance",
        payorId: "payorIdFromGetInsurancePayers"
    )
    
  • val paymentMethod = InsuranceOther(
                "insurance-owner-firstName",
                "insurance-owner-lastName",
                <insurance-owner-gender>,
                <insurance-owner-dateofBirth>,
                "insurance-owner-memberId",
                "insuranceGroupNumber",
                "payorId-from-getInsurancePayers",
                "payorName-from-getInsurancePayers",
                "subscriberId"
            )
    

Self pay

Pay on arrival at a clinic or department. No extra information is required to use this payment method.

  • let paymentMethod = PaymentMethod.self
    
  • val paymentMethod = SelfPayment()
    

Coupon Code/Service Key

A Service key is a payment method that can be used to apply a discount to the standard virtual visit price.

The discount amount can be anything up to 100% off the visit price. When the discount amount is less than 100%, the remaining cost is expected to be paid at the time of visit.

Verifying a user-input string as a service key

In order to check if a string is a valid service key, the DexCare SDK provides a method DexCareSDK.paymentService.verifyCouponCode(couponCode: String).

If the string is a valid service key, then a double representing the discount amount is returned.

If the string is an invalid service key, then an InvalidCouponCodeError error is returned.

  • let dexcareSDK = DexcareSDK(configuration: ...)
    dexcareSDK.paymentService.verifyCouponCode(
        couponCode: "user's input string",
        success: { discountAmount in
            // discountAmount is a decimal - ie 24.00 for $24
        },
        failure: { error in
            // an error is returned when the user's input string is not a valid coupon code
        }
    )
    
    
  • DexCareSDK.paymentService.verifyCouponCode("user's input string")
        .subscribe({ discountAmount ->
            // discountAmount is a Double
        }, {
            // an error is returned when the user's input string is not a valid coupon code
        })
    

Note that sending an invalid key will not prevent scheduling the visit, but it will show an error on the Provider’s side.

  • let paymentMethod = PaymentMethod.couponCode("aSecretServiceKey")
    
  • val paymentMethod = CouponCode("aSecretServiceKey")