Add a split to a payment

Send the split object when you create an invoice or a card charge through the AgentSnap card API (see Card charge status and refunds). To add, change, or remove the split on an unpaid invoice, use the endpoint at the end.

Split object

NameTypeDescriptionRequired
payoutModestringmanaged (we pay each leg) or instructions (you pay each payee). Defaults to managedno
releaseModestringautomatic (we release each leg when the payment settles) or manual (each leg waits until you release it). Ignored in instructions mode. Defaults to automaticno
partsarrayThe amounts to split, each with its own rule set (see Part object)yes

Part object

NameTypeDescriptionRequired
ruleSetIdnumberID of the rule set that splits this partyes
amountCentsintegerAmount in cents. Omit to split the whole payment. Required with more than one partno
referencestringYour label for the part, such as a policy number (max 255 characters)no
payoutMethodstringdirect or pending. Overrides every share's payoutMethod for this paymentno

Parts can total less than the split amount. We pay the rest to your Trust Account.

Amount

Split amounts are in cents. Invoice amounts are in dollars, so a $1,000.00 invoice is 100000 cents.

For an invoice, the split amount is grossPremium + taxes + serviceFee. commission is already in grossPremium. A card fee the policyholder pays on top is not split. For a premium finance invoice, only the downPayment is split.

For a card charge, the split amount is the charge before any surcharge.

Example

Split the whole payment with one rule set:

{
  "split": {
    "releaseMode": "automatic",
    "parts": [
      { "ruleSetId": 12 }
    ]
  }
}

Split a $100,000.00 payment across two policies:

{
  "split": {
    "releaseMode": "manual",
    "parts": [
      { "reference": "POL-1001", "amountCents": 4000000, "ruleSetId": 12 },
      { "reference": "POL-1002", "amountCents": 6000000, "ruleSetId": 14 }
    ]
  }
}

Split $850.00 of a $1,000.00 invoice. We pay the other $150.00 to your Trust Account:

{
  "split": {
    "parts": [
      { "ruleSetId": 12, "amountCents": 85000 }
    ]
  }
}

Update the split on an unpaid invoice

PUT /api/public/invoices/{invoiceId}/split

URI Parameters

NameTypeDescriptionRequired
invoiceIdnumberID of the unpaid invoiceyes

Request body

Send { "split": { ... } }. To remove the split, send { "split": null }.

Response

A successful request returns a 200 OK status code with no response body.

Error Responses

  • 400 Bad Request: No Trust Account on file, parts exceed the split amount, fixed shares exceed their part, a part lacks amountCents with several parts, or the invoice is already paid
  • 404 Not Found: A rule set or the invoice does not exist, or it belongs to another account
📘

Note

After you add a split, Remit premium and Remit commission return an error for that invoice.


Did this page help you?