Stripe recommends implementing separate charges and transfers for marketplaces powered by Mirakl to allow multiple sellers to get paid with one transaction and according to the schedule set by the Operator within Mirakl.
Here is the workflow for accepting payments:
Create a Mirakl Order via
Collect the customer’s payment method and create a payment.
- Update the Mirakl Order via
We recommend that you set the Mirakl
order.transaction_number attribute to the Stripe
- You or the connector create a Transfer for each Mirakl sub-Order.
See below for more information regarding the built-in Transfers feature.
By default, the connector doesn’t create the Transfers.
To enable Transfers, set the
ENABLES_AUTOMATIC_TRANSFER_CREATION option to
- The transfers job fetches newly created Mirakl Orders.
- For every new order, the connector creates a StripeTransfer record with
status=TRANSFER_PENDINGand a new ProcessTransfer message is added to the queuing system.
- ProcessTransfer messages are consumed. The connector attempts to create the Transfer on Stripe.
The amount is calculated based on the Mirakl Order attributes:
100 * (order.total_price - order.total_commission).
order.transaction_number is set to the
charge.id as recommended, the
transfer.source_transaction is also set to that value.
miraklId (order ID) and
miraklShopId are added to the Transfer metadata so you can track each money movement.
- The StripeTransfer record is updated to either a successful or failed status. Failed Transfers are attempted again three times.
Once a day, the alerting job sends an email with all failed Transfers along with the reason.
Was this page helpful?