Skip to main content
POST
/
billing
/
payment-plan
/
payin-config
Create Payin Config
curl --request POST \
  --url https://api.decodahealth.com/billing/payment-plan/payin-config \
  --header 'API-KEY: <api-key>' \
  --header 'Content-Type: application/json' \
  --header 'TENANT: <tenant>' \
  --data '
{
  "paymentMedium": "POS",
  "charges": [
    {
      "patientId": "<string>",
      "totalOutstanding": 123,
      "id": "<string>",
      "patient": {
        "id": "<string>",
        "type": "PROVIDER",
        "createdDate": "2023-11-07T05:31:56Z",
        "firstName": "<string>",
        "lastName": "<string>",
        "phoneNumber": "<string>",
        "email": "<string>",
        "locationId": "<string>",
        "externalId": "<string>",
        "address": "<string>",
        "addressLineTwo": "<string>",
        "city": "<string>",
        "state": "<string>",
        "zipCode": "<string>",
        "country": "<string>",
        "addressValid": true,
        "meta": {},
        "isArchived": true,
        "primaryLocationId": "<string>",
        "gender": "<string>",
        "dateOfBirth": "2023-12-25",
        "patientMedications": [
          "<string>"
        ],
        "onSchedulingBlacklist": true,
        "surchargeDisabled": true,
        "tags": [
          {
            "id": "<string>",
            "name": "<string>",
            "isActive": true,
            "createdDate": "2023-11-07T05:31:56Z",
            "emoji": "<string>",
            "color": "<string>",
            "updatedDate": "2023-11-07T05:31:56Z"
          }
        ],
        "creditBalance": 123,
        "preferredProviderId": "<string>"
      },
      "total": 0,
      "description": "<string>",
      "status": "OUTSTANDING",
      "discountAmount": 0,
      "discountPercentage": 0,
      "externalId": "<string>",
      "externalCreatedDate": "2023-11-07T05:31:56Z",
      "ruleSetId": "<string>",
      "createdDate": "2023-11-07T05:31:56Z",
      "creatorId": "<string>",
      "items": [],
      "tips": [],
      "locationId": "<string>",
      "eventId": "<string>",
      "memberId": "<string>",
      "comment": "<string>",
      "meta": {},
      "merchantAccountId": "<string>"
    }
  ],
  "paymentAmount": 123,
  "savePaymentMethod": false,
  "textReceipt": false,
  "paymentPlan": {
    "initialAmount": 123,
    "chargeIds": [
      "<string>"
    ],
    "frequency": "WEEKLY",
    "installments": 123,
    "installmentAmount": 123,
    "locationId": "<string>",
    "startDate": "2023-12-25"
  },
  "isSurcharged": false,
  "locationId": "<string>",
  "creatorId": "<string>",
  "membershipId": "<string>",
  "membershipStartDate": "2023-11-07T05:31:56Z",
  "soldByProviderId": "<string>",
  "merchantAccountId": "<string>"
}
'
{
  "sessionKey": "<string>",
  "payinConfigId": "<string>",
  "sandbox": true,
  "paymentMethods": []
}

Headers

TENANT
string
required

The tenant you are making this request on behalf of

API-KEY
string
required

Your api key

Body

application/json
paymentMedium
enum<string>
required

Payment medium types supported by the system.

These fall into two categories:

  1. Payment Processor Mediums: Require Rainforest/Stripe payin (card processing)
  2. External Settlement Mediums: Settled outside the system (cash, check, etc.)
Available options:
POS,
VIRTUAL_TERMINAL,
PAYMENT_LINK,
PAYMENT_PLAN,
SUBSCRIPTION,
SAVED_PAYMENT_METHOD,
MEMBERSHIP,
CASH,
CHECK,
CARE_CREDIT,
PATIENT_CREDIT
charges
ChargeSummary · object[]
required
paymentAmount
integer | null
savePaymentMethod
boolean
default:false
textReceipt
boolean
default:false
paymentPlan
PaymentPlanCreateWithoutID · object

Represents the creation of a payment plan without an ID.

This model defines the structure for creating a new payment plan, including details about the initial payment, associated charge, frequency of payments, number of installments, and the amount for each installment.

isSurcharged
boolean
default:false
locationId
string | null
creatorId
string | null
membershipId
string | null
membershipStartDate
string<date-time> | null
soldByProviderId
string | null
merchantAccountId
string | null

Response

Successful Response

sessionKey
string
required
payinConfigId
string
required
sandbox
boolean
required
paymentMethods
PaymentMethodSummary · object[]