# Payment status Set to completed

**URL:** <https://forum.litium.com/t/payment-status-set-to-completed/2749>\
**Category:** Questions\
**Tags:** litium-8\
**Created:** [November 2, 2022, 4:12pm UTC](https://forum.litium.com/t/payment-status-set-to-completed/2749 "2022-11-02T16:12:32Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gokul](https://avatars.discourse-cdn.com/v4/letter/g/22d042/32.png) [@Gokul](https://forum.litium.com/u/Gokul)\
**Post date:** [November 2, 2022, 4:12pm UTC](https://forum.litium.com/t/payment-status-set-to-completed/2749/1 "2022-11-02T16:12:32Z")

</div>

payment seems to be set to Slutförd when delivery is created and set to status Behandlas. what are the conditions for the payment status to be set to completed?

 ![tempsnip](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/01746b7bf7930b778b75a1cc4e57ba6f1a23b9f7.png)

Litium version: 8.5

---

<div class="post-metadata">

**Author:** ![steve.redstorm](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/steve.redstorm/32/14_2.png) [@steve.redstorm](https://forum.litium.com/u/steve.redstorm)\
**Post date:** [November 2, 2022, 4:16pm UTC](https://forum.litium.com/t/payment-status-set-to-completed/2749/2 "2022-11-02T16:16:31Z")

</div>

Delivery must be set to Delivered.

---

<div class="post-metadata">

**Author:** ![Gokul](https://avatars.discourse-cdn.com/v4/letter/g/22d042/32.png) [@Gokul](https://forum.litium.com/u/Gokul)\
**Post date:** [November 3, 2022, 6:47am UTC](https://forum.litium.com/t/payment-status-set-to-completed/2749/3 "2022-11-03T06:47:44Z")

</div>

but as you can see in the image, delivery status is not delivered.

---

<div class="post-metadata">

**Author:** ![Gokul](https://avatars.discourse-cdn.com/v4/letter/g/22d042/32.png) [@Gokul](https://forum.litium.com/u/Gokul)\
**Post date:** [November 4, 2022, 6:56am UTC](https://forum.litium.com/t/payment-status-set-to-completed/2749/4 "2022-11-04T06:56:27Z")

</div>

is there something we can check?

---

<div class="post-metadata">

**Author:** ![patric.forsgard](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/patric.forsgard/32/10_2.png) [@patric.forsgard](https://forum.litium.com/u/patric.forsgard)\
**Post date:** [November 4, 2022, 7:35am UTC](https://forum.litium.com/t/payment-status-set-to-completed/2749/5 "2022-11-04T07:35:21Z")

</div>

The _Completed_ label for the payment is visible if the full authorization amount is the same as the capture + cancel amount.

In this case the payment is probably a sales payment, i.e., a payment that transfer the money directly like Swish or Trustly, that have the capture created together when the payment is confirmed.

---

<div class="post-metadata">

**Author:** ![Gokul](https://avatars.discourse-cdn.com/v4/letter/g/22d042/32.png) [@Gokul](https://forum.litium.com/u/Gokul)\
**Post date:** [November 4, 2022, 7:46am UTC](https://forum.litium.com/t/payment-status-set-to-completed/2749/6 "2022-11-04T07:46:57Z")

</div>

we have used card payment here in svea.

---

<div class="post-metadata">

**Author:** ![steve.redstorm](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/steve.redstorm/32/14_2.png) [@steve.redstorm](https://forum.litium.com/u/steve.redstorm)\
**Post date:** [November 4, 2022, 8:39am UTC](https://forum.litium.com/t/payment-status-set-to-completed/2749/7 "2022-11-04T08:39:55Z")

</div>

Payment will be set to completed when the capture amount = the authorization amount.  
When shipment created then we also perform an capture, here it has been successful so the payment changed to completed.

---

<div class="post-metadata">

**Author:** ![michaela.skeppstedt](https://avatars.discourse-cdn.com/v4/letter/m/67e7ee/32.png) [@michaela.skeppstedt](https://forum.litium.com/u/michaela.skeppstedt)\
**Post date:** [November 8, 2022, 3:00pm UTC](https://forum.litium.com/t/payment-status-set-to-completed/2749/8 "2022-11-08T15:00:44Z")

</div>

I have now written a few tests and tested this, and it’s not when the order is set to processing that the money is being captured but when a shipment is created using Litium Connect.

So our order flow is like this:

1. User creates an order
2. We have a microservice located on our customers own network that fetches the orders that is set to Confirmed (We set the order to confirmed from Init if a certain condition is met, or a manual step has to be performed by our customer)
3. The microservice does it’s magic towards the customers ERP system
4. The microservice sets the order to Processing, which prevents the order to be exported again (At this point, the money isn’t captured in Svea yet.)
5. The microservice creates the delivery using Litium Connect. It’s at this point that the money is captured in Svea and the order is finished, even if the shipment isn’t delivered yet. (Still in processing…)

We expected the money in Svea to be captured first when we notify that a delivery is delivered using Litium Connect, but that does not seem to be the case.

Is this really expected behaviour ?

---

<div class="post-metadata">

**Author:** ![anusha.ganegoda](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/anusha.ganegoda/32/58_2.png) [@anusha.ganegoda](https://forum.litium.com/u/anusha.ganegoda)\
**Post date:** [November 8, 2022, 3:53pm UTC](https://forum.litium.com/t/payment-status-set-to-completed/2749/9 "2022-11-08T15:53:33Z")

</div>

> [@michaela.skeppstedt](#):
>
> The microservice creates the delivery using Litium Connect. It’s at this point that the money is captured in Svea and the order is finished, even if the shipment isn’t delivered yet.

When you notify Litium that a shipment need to be created, it actually means the shipment is ready to be shipped, and Litium is supposed to capture the money. See the steps here:  
[https://docs.litium.com/documentation/litium-connect/domain-areas/erp-domain/business-processes/order-fulfilment-process-main-flow](https://docs.litium.com/documentation/litium-connect/domain-areas/erp-domain/business-processes/order-fulfilment-process-main-flow)

---

<div class="post-metadata">

**Author:** ![anusha.ganegoda](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.litium.com/anusha.ganegoda/32/58_2.png) [@anusha.ganegoda](https://forum.litium.com/u/anusha.ganegoda)\
**Post date:** [November 8, 2022, 3:56pm UTC](https://forum.litium.com/t/payment-status-set-to-completed/2749/10 "2022-11-08T15:56:20Z")

</div>

Also note that, “Shipment” object in Litium is not the “shipment” in your ERP system. Litium “Shipment” is for the order fulfilment process inside Litium, its lifecycle is based on payment processing for the shipment in your ERP system. So, to the ERP system, shipment is the actual physical shipment. In Litium the corresponding “Shipment” is used for processing the payments and making sure that the payments are collected with correct amounts corresponding to the actual shipment in ERP system.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex030/uploads/litium/original/1X/12eddac3b8b661de1db86af10ac8151b571e6fb9.png) [@system](https://forum.litium.com/u/system)\
**Post date:** [December 6, 2022, 3:57pm UTC](https://forum.litium.com/t/payment-status-set-to-completed/2749/11 "2022-12-06T15:57:08Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
