My Products
Help
Stefan Hult
PARTNER

Release of refunded payment don't work

by Stefan Hult

Hi

The case is the following:
A customer is buying something in a shop. He pays with credit card and we then generate a customerInvoice from the card transaction, and makes a payment though the API.
A day later he comes back and wants to return what he has bought. We then generate a customerCreditNote, and make a Refound.

Here comes the tricky part. This is what we send, using the customerPayment endpoint.

{
  "referenceNumber": {"value": "10041722"
  },
  "type": {
    "value": "Refund"
  },
   "customer": {"value": "KONTANT"},
    //"applicationDate": {"value": "2021-06-23T14:51:21.138Z"},
     "paymentAmount": {"value": 6277 },
     "paymentMethod": {"value": "03" },
     "cashAccount": {"value": "1933" },
     "branchNumber": {"value": "103"},
     "paymentLines": [
    {
      "operation": "Insert",
      "documentType": {"value": "CreditNote"},
      "refNbr": {"value": "10041722"},
      "amountPaid": {"value": 6277}
    }
  ]
}

This works fine and a payment transaction is generated in Visma.Net.
We now wants to release the payment using 
customerPayment/14000002/action/release endpoint.
{
  "type": {
    "value": "Refund"
  }
}
 
And the answer we get back is:
{ "actionId": "40f2733f-2e5e-4260-81d2-a787959beb6a",
"actionResult": "InProcess" }

It seams to work, but nothing happens in Visma.Net. Checking a couple of hours later, still nothing have happen on the payment.


StefanHult_0-1649922948397.png

 

StefanHult_1-1649923034704.png

 

 

5 REPLIES 5
Stefan Hult
PARTNER

by Stefan Hult

Hi Yildrim

Problem solved. We noticed now that the payment was created on an other branch than the credit note. That's why  the release couldn't be done.
If this is an error or not I don't know, because release can be done in the GUI.

But anyway. We close this case.

 

Accepted solution
Yıldırım
VISMA

by Yıldırım

Hi Stefan, thanks for informing. To be able to determine the exact root cause, this should be investigated on the company, we'll check the mentioned scenario in our test companies and contact you if any further information is needed. 

Stefan Hult
PARTNER

by Stefan Hult

Hi Yildirim

Yes, I have. And it works exactly as supposed.
/Stefan

Yıldırım
VISMA

by Yıldırım

I see, is it only happening with a specific combination of Customer / Invoice / Refund ? Have you had any API release operations succeeded ?

Yıldırım
VISMA

by Yıldırım

Hello, 

have you tried releasing the Customer Payment (Refund) manually in the Financials UI to see whether it highlights any error ?