My Products
Help

paymentRef in V3

by Trygve Storrønningen1

Hi, we are creating an order with his JSON:

{
  "date""2023-04-27T12:04:00.0000Z",
  "type""WO",
  "description""Web order nr. web-10018",
  "shipping": { "shipSeparately"true },
  "paymentSettings": { "paymentRef""11789-web-10018" },
  "customer": { "id""11789""order""web-10018""refNo""Test test" },
  "address": {
    "postalCode""2345",
    "city""\u00c5DALSBRUK",
    "countryId""NO"
  },
  "billing": {
    "address": {
      "postalCode""2345",
      "city""\u00c5DALSBRUK",
      "countryId""NO"
    }
  },
  "orderLines": [
    {
      "inventoryId""200141",
      "quantity"1.0,
      "description""Test sales product",
      "unitPrice"690.0,
      "hasManualDiscount"false
    },
    { "inventoryId""Frakt""unitPrice"295.0"quantity"1 }
  ]
}

I get 201 and the order is created.

But.

We cannot find the paymentRef anywhere on the order in UI.

What are we missing?

 

 

8 REPLIES 8

by Trygve Storrønningen1

Hi, this could be an option, but it does not really fit the use case.

This process is vetted also with other partners as ZData, we agreed on a total good flow for orders and payment for the customers. 
We would not want to change this now; if it is not to something better -- and I think for us to do other partners work is not where we want to go. 

It also seems that in some cases we get an error from V3 when we send paymentRef, 
"Payment Ref is not editable for order type WO"
and sometimes we get 201, but no idea where paymentRef goes as it is not to be found in UI.

 

So; what can be the reason for this variation, and when can we be able to add this info to the salesOrder?

(as we did before, and as we do with Visma Business, Visma Global, Microsoft ERP, SAP, Tripletex and others)

Joni, sorry, seems the validation fix is already out there, and the reason for different answers described in last post is -- time.

 

Still, we need for our use case to be able to write this information in a place on the order where other partners can find and use this later in order and payment process.

Joni Wolff
PARTNER

Hi! Just a follow up on this, have you setup this similar flow also in v1/v2 for POST Sales orders, using the paymentRef?

Joni Wolff
PARTNER

by Joni Wolff

Hi!

This is most likely related to the order type used. The payment ref is available only for certain order types, for examples CS(Cash sales). If I create order in v2 using corresponding JSON, I'll get error: "Payment Ref is not editable for order type".

 

This should also be the case in v3, you should get an error on this. However, there is something in the validation not being correct so we will create case to fix this.

 

Hi. For a webshop use case, we also do payment, cc, Klarna, vipps etc. We need to be able to write the paymentRef to the order for several purposes:

- to identify and to be able to do capture on the order when goods are shipped

- to settle accounts when payment bundles are received to identify which order a sub-payment are connected to.

 

Because of this we need to be able to write paymentRef also on SO-based orders.

Joni Wolff
PARTNER

Hi! I know that some use the v2 CustomerPayment POST endpoint to create the payment, using the ordersToApply section in that endpoint to connect the payment to the order and also setting the payment reference in the paymentRef-field. Maybe this could be an option?

by Yıldırım

Hello, we'll look into this and get back to you. 

by Trygve Storrønningen1

Visma, are you still around? 😉