Payment Links & Subscriptions

Create hosted payment links and recurring subscriptions

💳 Payment Links & Subscriptions

Create hosted payment links for one-time charges and subscriptions for recurring installments.


Payment Links

Create a Payment Link

POST /api/v1/payment-links
FieldTypeRequiredDescription
employer_idstringYesEmployer ObjectId
carrier_idstringYesCarrier ObjectId
policy_idstringYesPolicy ObjectId
amount_centsintegerYesAmount in cents ($1,500.00 = 150000)
payment_typestringYesdown_payment, late_payment, extra_payment, installment
customer.namestringNoInsured business name
customer.emailstringNoEmail to receive the payment link
customer.phonestringNoPhone number
installment_plan.countintegerNoAuto-create subscription after down payment
installment_plan.intervalstringNomonthly (default)
installment_plan.per_installment_centsintegerNoAmount per installment
metadataobjectNoCustom key-value pairs
curl -X POST /api/v1/payment-links \
  -H "X-Client-ID: $CLIENT_ID" \
  -H "X-Client-Secret: $CLIENT_SECRET" \
  -d '{
    "employer_id": "681xyz789abc123456789012",
    "carrier_id": "680abc456def789012345678",
    "policy_id": "682def789ghi012345678901",
    "amount_cents": 250000,
    "payment_type": "down_payment",
    "customer": {
      "name": "Smith Industries",
      "email": "[email protected]"
    },
    "installment_plan": {
      "count": 10,
      "per_installment_cents": 75000
    }
  }'

This creates a payment link for a $2,500 down payment. After the insured pays, a monthly subscription is automatically created for 10 installments of $750.

List Payment Links

GET /api/v1/payment-links?carrier_id=...&employer_id=...&status=active&page=1&limit=50

Get a Payment Link

GET /api/v1/payment-links/{id}

Cancel a Payment Link

DELETE /api/v1/payment-links/{id}

Deactivates the link so it can no longer be used for payment.

Refund a Payment

POST /api/v1/payment-links/{id}/refund
FieldTypeRequiredDescription
amount_centsintegerNoPartial refund amount (omit for full refund)
reasonstringNoRefund reason

Subscriptions

Create a Subscription

POST /api/v1/subscriptions
FieldTypeRequiredDescription
employer_idstringYesEmployer ObjectId
carrier_idstringYesCarrier ObjectId
policy_idstringYesPolicy ObjectId
amount_centsintegerYesAmount per billing period
intervalstringNomonthly (default) or quarterly
customer.namestringNoInsured business name
customer.emailstringYesEmail for invoice delivery

List Subscriptions

GET /api/v1/subscriptions?carrier_id=...&status=active&page=1&limit=50

Get a Subscription

GET /api/v1/subscriptions/{id}

Cancel a Subscription

DELETE /api/v1/subscriptions/{id}

Payment Statuses

StatusDescription
activePayment link is live, awaiting payment
completedPayment received
expiredLink expired without payment
cancelledManually cancelled
refundedFull refund issued
partially_refundedPartial refund issued

Subscription Statuses

StatusDescription
activeBilling on schedule
past_duePayment failed, retrying
cancelledManually cancelled
completedAll installments paid

💡

All monetary values are in cents. $1,500.00 = 150000. This avoids floating-point precision issues.