Commit your Batch

Commit batch is used to commit a batch with optionally submitted settlement details.

Table - Commit batch

Resource Template
/customers/{id}/batches/{id}/orders
Http Method POST
Description

Used to commit a batch with optionally submitted settlement details.

If specific settlement details are not submitted, WUBS will try to use default settlements

as specified for a customer to cover the payments in the batch.

If submitted or default settlements won't cover all the settlement currencies used by a batch,

an error will be returned and batch won't be committed.

Valid quote is required to commit a batch.

If quote was not created or has expired, an error will be returned and batch won't be committed.

Result of successful request would be creation of orders - one per settlement currency used by batch's payments.

Those orders could be later requested either as sub-resource of batch or as separate resources.

Input
{
"settlements":
[
{ "settlementCurrency":
"<currencyCode> - currency in which 
order will be settled with a customer",
"settlementMethod":"<settlementMethod>
- payment method to be used to settle with a customer",}
]
}
Output
200 OK
{
 "orders":
[
{ "id":"<orderConfirmationNo>","createdOn":"<timestamp>",
"lastUpdatedOn":"<timestamp>","status":"<orderStatus>",
"settlementCurrency":"<currencyCode>"}
]
}
Output (errors)
400 Bad Request 
- if specified resource location is not found 
(invalid customer or batch) or if batch is already committed
or does not have an active quote