Transparent Price RX API

Complete API Documentation

Overview

The Transparent Price RX API provides endpoints for creating client records and initiating payment checkout sessions. All requests require API key authentication.

Base URL: api.transparentpricerx.com

Authentication

All API requests require authentication using an API key in the request header. Each client receives two API keys: one for staging and one for production environments.

Required Header:

x-api-key: prod_your_api_key_here

Key Format: Production keys start with prod_, staging keys start with test_

Endpoints

POST/client/create

Creates a new client record in the system. The endpoint validates all input data and processes the client information. Upon successful creation, backend processing is initiated automatically.

Request

Headers:

Content-Type: application/json
x-api-key: prod_your_api_key_here

Request Body Schema:

{
"uniqueId": "string (required, min 1 char)",
"patient": {
  "timestamp": "string (optional)",
  "fname": "string (required, min 1 char)",
  "lname": "string (required, min 1 char)",
  "mname": "string (optional)",
  "dob": "string (required, format: MM/DD/YYYY)",
  "ssn": "string (required, format: XXX-XX-XXXX)",
  "address": "string (required, min 1 char)",
  "apt": "string (optional)",
  "city": "string (required, min 1 char)",
  "state": "string (required, min 1 char)",
  "zip": "string (required, min 1 char)",
  "phone": "string (required, format: (xxx) xxx - xxxx)",
  "email": "string (required, valid email)",
  "marital": "enum: Single | Married | Divorced | Widowed | Legally Separated | Civil Union",
  "employed": "enum: Full time | Part time | Self-Employed | On Unemployment Checks | No Income in Household | Contract | Seasonal | Retired | Retired + Part-time",
  "sex": "enum: Male | Female",
  "disabled": "boolean (default: false)",
  "numinhouse": "string (required, min 1 char)",
  "emerContactName": "string (required, min 1 char)",
  "emerContactPhone": "string (required, format: (xxx) xxx - xxxx)",
  "income": "number (required, min 1)",
  "socialSecurityIncome": "number (optional)",
  "partTimeIncome": "number (optional)",
  "agentInfo": {
    "agentName": "string (required, min 1 char)",
    "agentNPN": "string (optional)",
    "agentPhone": "string (required, format: (xxx) xxx - xxxx)",
    "agentEmail": "string (required, valid email)",
    "agentId": "string (required)",
    "agentFYMAgency": "string"
  },
  "medicare": {
    "partD": "string (required)",
    "partC": "string (required)",
    "partCAdvantage": "string (required)",
    "supplement": "string (required)",
    "year": "string (optional)",
    "mbi": "string (required, format: A2DA-2DA-2DA2)",
    "bothSSC": "string (optional)",
    "spouceRecieveSSC": "string (optional)",
    "medicareInfo": {
      "medicareDate": "string (optional)",
      "insuranceName": "string (optional)",
      "planName": "string (optional)",
      "planPhone": "string (optional, format: (xxx) xxx - xxxx)",
      "memberId": "string (optional)",
      "groupId": "string (optional)",
      "planStartDate": "string (optional)",
      "planEndDate": "string (optional)"
    },
    "pharmacyInfo": {
      "rxInsuranceName": "string (optional)",
      "rxPlanPhone": "string (optional, format: (xxx) xxx - xxxx)",
      "rxPlanName": "string (optional)",
      "pcn": "string (optional)",
      "bin": "string (optional)",
      "rxMemberId": "string (optional)",
      "rxGroupId": "string (optional)",
      "rxPlanStartDate": "string (optional)",
      "rxPlanEndDate": "string (optional)",
      "rxAddress": "string (optional)",
      "rxCity": "string (optional)",
      "rxState": "string (optional)",
      "rxZip": "string (optional)"
    }
  },
  "medicareExtraDetails": {
    "pharmacyExceeds3": "boolean (optional)",
    "pharmacyExceeds4": "boolean (optional)",
    "spend600": "boolean (optional)",
    "spent7_5": "boolean (optional)",
    "donutHole": "boolean (optional)"
  },
  "source": "string (default: 'fym')",
  "reEnrollment": "boolean (default: false)"
},
"doctors": [
  {
    "fname": "string (required, min 1 char)",
    "mname": "string (optional)",
    "lname": "string (required, min 1 char)",
    "phone": "string (required, format: (xxx) xxx - xxxx)",
    "ext": "number (optional)",
    "fax": "string (required, format: (xxx) xxx - xxxx)",
    "address": "string (required, min 1 char)",
    "city": "string (required, min 1 char)",
    "state": "string (required, min 1 char)",
    "zip": "string (required, min 1 char)",
    "facility": "string (required, min 1 char)",
    "suite": "string (optional)"
  }
],
"orders": [
  {
    "doctorName": "string (required, min 1 char)",
    "medicationName": "string (required, min 1 char)",
    "medicationStrength": "string (required, min 1 char)"
  }
],
"agreements": {
  "incomeStatement": "boolean (required, must be true)",
  "policiesStatement": "boolean (required, must be true)",
  "informationStatement": "boolean (required, must be true)",
  "effectiveStatement": "boolean (required, must be true)"
}
}

Response

Success Response (200):

{
"success": true,
"message": "Client data stored successfully. Processing initiated."
}

Error Responses:

401 Unauthorized
{
"error": "Unauthorized: Invalid API key"
}
400 Bad Request
{
"error": "Validation failed",
"details": [
  {
    "path": ["patient", "fname"],
    "message": "First name is required"
  }
]
}
405 Method Not Allowed
{
"error": "Method not allowed. Use POST."
}
500 Internal Server Error
{
"error": "Internal server error",
"message": "Error details"
}

Validation Rules

Phone Numbers: Must match format (xxx) xxx - xxxx
Date of Birth: Must match format MM/DD/YYYY (e.g., 05/22/1934)
SSN: Must match format XXX-XX-XXXX
MBI (Medicare Beneficiary Identifier): Must match format A2DA-2DA-2DA2
Email Addresses: Must be valid email format
Agreements: All four agreement fields must be set to true
Required Arrays: doctors and orders must be arrays (can be empty)
POST/checkout/session

Creates a Stripe Checkout session for payment processing. Returns a Stripe checkout URL that you can redirect your users to complete their payment.

Request

Headers:

Content-Type: application/json
x-api-key: prod_your_api_key_here
Origin: https://your-partner-portal.com (for CORS)

Request Body Schema:

{
"uniqueId": "string (required, min 1 char)"
}

Response

Success Response (200):

{
"id": "cs_live_...",
"object": "checkout.session",
"url": "https://checkout.stripe.com/c/pay/cs_live_...",
...
}

The response contains the full Stripe Checkout Session object. The url field should be used to redirect the user to the Stripe checkout page.

Error Responses:

401 Unauthorized
{
"error": "Unauthorized: API key is required"
}
400 Bad Request
{
"error": "Validation failed",
"details": [
  {
    "path": ["uniqueId"],
    "message": "Unique ID is required"
  }
]
}
500 Internal Server Error
{
"error": "Checkout initialization failed"
}

Example Request

curl -X POST https://api.transparentpricerx.com/checkout/session \
-H "Content-Type: application/json" \
-H "x-api-key: prod_your_api_key_here" \
-H "Origin: https://your-partner-portal.com" \
-d '{
  "uniqueId": "1234567890"
}'

Example Request

curl -X POST https://api.transparentpricerx.com/client/create \
-H "Content-Type: application/json" \
-H "x-api-key: prod_your_api_key_here" \
-d '{
  "uniqueId": "1234567890",
  "patient": {
    "fname": "John",
    "lname": "Doe",
    "dob": "05/22/1934",
    "ssn": "123-45-6789",
    "address": "123 Main St",
    "city": "New York",
    "state": "NY",
    "zip": "10001",
    "phone": "(555) 123 - 4567",
    "email": "john.doe@example.com",
    "marital": "Married",
    "employed": "Retired",
    "sex": "Male",
    "disabled": false,
    "numinhouse": "2",
    "emerContactName": "Jane Doe",
    "emerContactPhone": "(555) 987 - 6543",
    "income": 50000,
    "socialSecurityIncome": 25000,
    "partTimeIncome": 10000,
    "agentInfo": {
      "agentName": "Agent Smith",
      "agentNPN": "AG001",
      "agentPhone": "(555) 111 - 2222",
      "agentEmail": "agent@example.com",
      "agentId": "FYM001",
      "agentAgency": "FYMAgency001"
    },
    "medicare": {
      "partD": "Yes",
      "partC": "No",
      "partCAdvantage": "No",
      "supplement": "Yes",
      "mbi": "1AB2-CD3-EF45"
    },
    "source": "fym",
    "reEnrollment": false
  },
  "doctors": [
    {
      "fname": "Jane",
      "lname": "Smith",
      "phone": "(555) 333 - 4444",
      "fax": "(555) 333 - 4445",
      "address": "456 Medical Blvd",
      "city": "New York",
      "state": "NY",
      "zip": "10002",
      "facility": "City Hospital"
    }
  ],
  "orders": [
    {
      "doctorName": "Jane Smith",
      "medicationName": "Lisinopril",
      "medicationStrength": "10mg"
    }
  ],
  "agreements": {
    "incomeStatement": true,
    "policiesStatement": true,
    "informationStatement": true,
    "effectiveStatement": true
  }
}'