# PremInvoice Apply Payments by Subscriber

PremInvoice Apply Payments by Subscriber

Endpoint: POST /premium-invoice-apply-payment-sub
Version: v1
Security: apiKeyAuth, bearerAuth

## Security:

  - `apiKeyAuth` (unknown)
    apiKey in header x-api-key

  - `bearerAuth` (unknown)
    http bearer JWT

## Header parameters:

  - `vbasoftware-database` (string, required)
    Target database

## Request fields (application/json):

  - `invoice_Key` (integer, required)

  - `subscriber_ID` (string)
    Required for:
    ApplyPaymentSubscriber
    ApplyPaymentSubscriberPayorID
    ApplyPaymentSubscriberPlanType
    ApplyPaymentSelfAdmin
Not used for:
    ApplyPaymentHeaderAdjustment

  - `plan_Type` (string)
    Required for:
    ApplyPaymentSubscriberPlanType
Not used for:
    ApplyPaymentSubscriber
    ApplyPaymentSubscriberPayorID
    ApplyPaymentHeaderAdjustment

  - `payor_ID` (string)
    Required for:
    ApplyPaymentSubscriberPayorID
Not used for:
    ApplyPaymentSubscriber
    ApplyPaymentSubscriberPlanType
    ApplyPaymentHeaderAdjustment

  - `premPayment_Key` (integer, required)

  - `adjustment_Reason` (integer)
    Required for:
    ApplyPaymentHeaderAdjustment
Not used for:
    ApplyPaymentSubscriber
    ApplyPaymentSubscriberPayorID
    ApplyPaymentSubscriberPlanType

  - `payment_Posted` (number, required)

  - `payment_Posted_Date` (string, required)

  - `user_ID` (string, required)

  - `premInvoiceSelfAdmins` (array)
    If using the ApplyPaymentSelfAdmin process, you pass in the PremInvoiceSelfAdmins to apply the payment to.  For non-self-admin invoices leave this empty

  - `premInvoiceSelfAdmins.premInvoiceSelfAdmin_Key` (integer, required)

  - `premInvoiceSelfAdmins.age` (integer)

  - `premInvoiceSelfAdmins.benefit_Code` (string)

  - `premInvoiceSelfAdmins.dependents` (integer)

  - `premInvoiceSelfAdmins.dist_Volume` (number)

  - `premInvoiceSelfAdmins.division_ID` (string)

  - `premInvoiceSelfAdmins.entry_Date` (string)

  - `premInvoiceSelfAdmins.entry_User` (string)

  - `premInvoiceSelfAdmins.groupSelfAdmin_Age` (integer)

  - `premInvoiceSelfAdmins.groupSelfAdmin_Dependents` (integer)

  - `premInvoiceSelfAdmins.groupSelfAdmin_Dist_Volume` (number)

  - `premInvoiceSelfAdmins.groupSelfAdmin_Key` (integer)

  - `premInvoiceSelfAdmins.groupSelfAdmin_Members` (integer)

  - `premInvoiceSelfAdmins.groupSelfAdmin_Premium` (number)

  - `premInvoiceSelfAdmins.groupSelfAdmin_Sex` (string)

  - `premInvoiceSelfAdmins.groupSelfAdmin_Subscribers` (integer)

  - `premInvoiceSelfAdmins.groupSelfAdmin_Volume` (number)

  - `premInvoiceSelfAdmins.group_ID` (string)

  - `premInvoiceSelfAdmins.invoice_Key` (integer, required)

  - `premInvoiceSelfAdmins.members` (integer)

  - `premInvoiceSelfAdmins.plan_ID` (string)

  - `premInvoiceSelfAdmins.premRate_Key` (integer)

  - `premInvoiceSelfAdmins.premium` (number)

  - `premInvoiceSelfAdmins.premium_Received` (number)

  - `premInvoiceSelfAdmins.sex` (string)

  - `premInvoiceSelfAdmins.subscribers` (integer)

  - `premInvoiceSelfAdmins.update_Date` (string)

  - `premInvoiceSelfAdmins.update_User` (string)

  - `premInvoiceSelfAdmins.volume` (number)

## Response 202:

  - `202` (unknown)
    Accepted for processing

## Response 401:

  - `401` (unknown)
    Unauthorized

## Response 403:

  - `403` (unknown)
    Forbidden. The x-api-key header is missing or not valid. The API gateway sends this response, not VBAPI, so the body is not the VBAPI envelope; see Errors and troubleshooting.

## Response 429:

  - `429` (unknown)
    Too many requests. The limit is 25 requests per second sustained, with bursts up to 50, per API key. Wait and retry with exponential backoff and jitter.

