Payout
This workflow enables to pay the invoices from Mirakl using Hyperwallet, marking the invoices as paid in Mirakl after they are succesfully paid.
The steps for making the payments are as follows:
-
Buyers buy products from sellers in Mirakl generating Mirakl orders.
-
The billing cycle runs in Mirakl and generates invoices for the sellers from the orders.
-
The connector runs the invoice extraction job and creates the payments in Hyperwallet.
-
If payment commission is enabled, the connector creates a payment for the operator of the marketplace.
-
Hyperwallet sends a notification to the connector about the status of the payments, and the connector updates the status of the invoices in Mirakl.
The connector can run the extraction jobs automatically through a configurable schedule, or the user can run the jobs manually using the job API.
Invoice extraction
The invoice extraction job retrieves pending invoices from Mirakl and creates payments for them in Hyperwallet.
This job can handle credit notes for testing purpose. This job is a composite batch job that runs sequentially:
-
Invoices extraction
-
Credit notes extraction
Enabling manual credit notes processing on production
Mirakl includes the amount of the manual credit notes into the next automatic invoice. This means that if the connector is processing manual credit notes, the amount of the credit notes will be paid two times, one in the credit note and one in the next invoice. For this reason, it’s strongly urged to use manual credit notes only in test environments while testing. |
Since the behavior of the invoice extraction is the same as the credit notes extraction, the following documentation will only refer to invoices. |
Characteristics
-
The connector creates payments for the marketplace operator when the commission fees are enabled in the connector configuration.
-
The connector extracts invoices only with a
COMPLETE`status. It ignores invoices with `DRAFT
,GENERATED
orPAID
status. -
The connector can retry the invoice extraction without generating duplicated payments.
Payment status processing
After the connector creates a payment in Hyperwallet, Hyperwallet starts processing it. The payment goes through some intermediate states until it reaches a final success or failure state.
Payment status processing isn’t started by the connector using jobs. Hyperwallet servers are the ones notifying the progress of the payment to the connector. The connector then sets the invoice to paid if the payment was successful or sends an error mail if there was a problem.