Create collection request for policy

Path Params
string
required

The unique identifier of the policy.

Body Params
uuid
required

The payment method associated with this policy.

integer
required

The amount in cents.

string
required

A description for this payment

date-time
required

The date on which the collection request should strike the policyholder's bank account. Must be greater than today's date.

uuid

Optional. Links the collection request to an open invoice so that the payment succeeding settles the invoice to paid. The invoice must belong to this policy, be in status open, share the policy's currency, and amount must equal the invoice total (partial payments are not supported). The invoice may not already have a linked payment that is pending, submitted, processing or successful. Any of these rules failing returns 400 and no payment is created; an invoice id that does not exist in this organization returns 404; an organization without invoicing enabled, or a caller without the invoices:create permission, returns 403.

Responses

400

The payment date is invalid, the payment method type is not supported, or invoice_id was supplied and the invoice cannot be collected against (wrong policy or currency, not open, amount differs from the invoice total, or a pending, submitted, processing or successful payment is already linked). No payment is created.

403

invoice_id was supplied but invoicing is not enabled for the organization or for the policy's product module.

404

No such policy, or invoice_id does not match an invoice in this organization.

Language
Credentials
Basic
base64
:
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json