Solution Recipe

Medpaid Reimburse for Checkout Champ

After a customer completes a normal CC checkout, show them a one-click path to get their purchase reimbursed via HSA/FSA. No changes to the core checkout flow — just an add-on on the order confirmation page.

Overview

What it is

Medpaid Reimburse lets customers who already paid with a regular card apply for HSA/FSA reimbursement after purchase. They complete a short health assessment, a licensed provider reviews and may issue a Letter of Medical Necessity, and the customer submits it to their HSA/FSA plan.

When to use it

Use Medpaid Reimburse when you want to offer HSA/FSA eligibility without modifying the core checkout. It is also a good fallback for customers whose HSA/FSA card was declined at checkout.

How it works

1
Customer completes checkout

Customer pays normally via CC — credit card, PayPal, or any standard method. Nothing changes in the existing checkout flow.

2
Order confirmation page fires a script

A lightweight script on the CC order confirmation page calls POST /plugin/cart/checkout-champ/push with Action: "reimburse" and the order data.

3
Medpaid returns CartReference

The API immediately returns a CartReference string. The page redirects the customer to the Medpaid portal with this reference.

4
Customer completes assessment

At the Medpaid portal, the customer answers a short health questionnaire specific to the products in their order.

5
Provider review and LMN

A licensed provider reviews the assessment — typically within hours. If approved, they issue a Letter of Medical Necessity.

6
Customer submits for reimbursement

The customer receives the LMN via email and submits it along with their receipt to their HSA/FSA plan administrator for reimbursement.

Prerequisites: You must have a Checkout Champ integration already set up with Medpaid — including configure-platform and product sync. If you have not done this yet, complete the Checkout Champ Setup guide first.

Add the Reimburse script to your CC order confirmation page

Paste this script into your Checkout Champ order confirmation page. It pushes the order to Medpaid and redirects the customer when they click the CTA button.

CC template variables: Replace {{order_id}}, {{customer_email}}, etc. with your Checkout Champ order confirmation page's actual variable syntax. Replace YOUR_ONBOARDING_KEY, YOUR_EXTERNAL_KEY, and YOUR_PLATFORM_ID with your Medpaid credentials.
CC order-confirmation.html html
<!-- Medpaid Reimburse — CC Order Confirmation Page -->
<button id="medpaid-reimburse-btn" type="button">
  Get reimbursed with HSA/FSA →
</button>

<script>
  document.getElementById('medpaid-reimburse-btn')
    .addEventListener('click', async () => {
      // Replace with CC's order variables for your page
      const order = {
        id: '{{order_id}}',
        date: '{{order_date}}',
        customer: { email: '{{customer_email}}' },
        items: [
          {
            medpaidProductId: '{{medpaid_product_id}}',
            qty: {{item_quantity}},
            subtotal: {{item_subtotal}},
            total: {{item_total}},
          },
        ],
        total: {{order_total}},
      };

      const res = await fetch(
        'https://api.medpaid.com/plugin/cart/checkout-champ/push',
        {
          method: 'POST',
          headers: { 'Content-Type': 'application/json' },
          body: JSON.stringify({
            Action: 'reimburse',
            Source: 'checkout-champ',
            PlatformId: 'YOUR_PLATFORM_ID',
            OnboardingKey: 'YOUR_ONBOARDING_KEY',
            ExternalKey: 'YOUR_EXTERNAL_KEY',
            OrderData: {
              OrderId: order.id,
              OrderDate: order.date,
              Email: order.customer.email,
              CurrencyCode: 'USD',
              LineItems: order.items.map(i => ({
                ProductId: i.medpaidProductId,
                Quantity: i.qty,
                Subtotal: i.subtotal,
                Total: i.total,
              })),
              Total: order.total,
            },
            PaymentSuccessRedirect:
              'https://yourstore.com/reimburse-success',
            PaymentFailureRedirect:
              'https://yourstore.com/order-confirmation',
            IsSubscription: false,
          }),
        }
      );

      const { CartReference } = await res.json();
      window.location.href =
        `https://portal.medpaid.com/checkout/${CartReference}`;
    });
</script>

Optional: Hide CTA for customers who already have a valid LMN

Call has-valid-lmn before rendering the Reimburse button. If the customer already has a valid LMN for this product, skip the assessment step and send them directly to the portal.

javascript
// Check LMN status before showing the CTA
const lmnRes = await fetch(
  'https://api.medpaid.com/plugin/endusers/has-valid-lmn',
  {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify({
      Xa: 'YOUR_XA_TOKEN',
      Email: '{{customer_email}}',
      ExternalKey: 'YOUR_EXTERNAL_KEY',
    }),
  }
);
const { HasValidLmn, ExpiresOn } = await lmnRes.json();

if (HasValidLmn) {
  // Customer already has a valid LMN — show "Submit for reimbursement"
  // link directly to their Medpaid portal instead
  document.getElementById('medpaid-reimburse-btn').textContent =
    'Submit your existing LMN for reimbursement →';
}

API endpoints used in this solution

Testing checklist

  • Use your Medpaid sandbox credentials (prefixed with sk_ instead of ek_) for test pushes.
  • Verify the CartReference is returned in the API response before redirecting.
  • In the Medpaid dashboard, confirm the cart appears under Pending Reimburse orders.
  • Complete a test assessment in the portal to confirm the full flow end to end.
  • Check that PaymentSuccessRedirect and PaymentFailureRedirect both load correctly after assessment completion.

Ready to implement Medpaid Reimburse?

The Medpaid team can help you set up, test, and launch the Reimburse flow on your Checkout Champ pages.