Skip to main content

Close Payment Batch Insertion

After inserting all desired settlements into the batch, use this endpoint to signal that insertion is complete and processing can begin. You can also discard the entire batch.

Available on
ProfileHostRequired permission
Managermanager-apiWrite
Consultantconsultant-apiCreate Batches
Assignorassignor-apiWrite

Base URL for each host: Environments (Hosts).

Where am I in the flow?

This is the 3rd step of the settlement flow. Before this step, you must have:

  1. Created the payment batch
  2. Inserted the settlements

Request​

ENDPOINT
/settlement/fund_class/{fund_class_key}/payment_batch/{external_id}
METHOD
PUT

Path params​

ParameterTypeDescription
external_idstringThe external_id provided when creating the batch.
Request Body
{
"batch_status": "pending_payment"
}

Body attributes​

FieldTypeRequiredDescription
batch_statusstringrequiredStatus to which the batch will be updated. See the enumerators below.

batch_status enumerators​

ValueDescription
pending_paymentCloses insertion and starts batch processing. Accepted only with the batch in pending_settlements_insertion and at least one settlement in validated or pending_validation.
discardedDiscards the entire batch. No settlement will be processed. Accepted with the batch in pending_settlements_insertion, pending_validation or pending_payment.

Response​

STATUS
200
Response Body
{
"external_id": "41d6ff41-1dac-4df7-9e50-d15210ec57f3",
"status": "pending_payment"
}

Response attributes​

FieldTypeDescription
external_idstringExternal batch key provided by the partner.
statusstringNew batch status. See below.

Returned status:

You sentReturned statusWhat it means
pending_paymentpending_paymentBatch closed; awaiting payment confirmation.
pending_paymentpending_validationThere are settlements under review by QI Tech. When the review ends, the batch moves on to pending_payment by itself.
discardedpending_discard or pending_discard_on_cash_accountDiscard in progress. The final status discarded arrives through the batch webhook.

Next steps​

After closing the batch, processing starts automatically. Track the result through webhooks or the batch retrieval:

  1. Payment batch webhooks — notification when the batch is paid, completed or discarded.
  2. Settlement webhooks — individual notification for each processed settlement.

Errors​

StatusCodeWhen it happens
404SET000005The fund_class_key does not exist.
403SET000028The fund does not belong to your profile (the fund's manager, a linked consultant or an associated assignor).
404SET000010The batch given in the URL does not exist in this fund.
400SET000026batch_status other than pending_payment or discarded.
400SET000049Closure request for a batch already in pending_payment, paid or completed.
400SET000016Closure request for a batch outside pending_settlements_insertion (for example, in pending_validation or being discarded).
400SET000017The batch has no settlement in validated or pending_validation.
400SET000069Discard request for a batch already in a final status (paid, completed or discarded).

Authentication, permission and host errors: see API errors.