My Products
Help

/api/v1/paymentmethod only returns creditor payment methods, not debtor payment methods

by ReinderReinders

/api/v1/paymentmethod only returns the creditor payment methods, but not the debtor payment methods. This means I have no "get all" API call to retrieve all debtor payment methods all at once.

 

Demo:

paymentmenthod GET:

ReinderReinders_0-1684329590216.png

returns 1, 2, 3:

ReinderReinders_1-1684329612360.png

as well as 9:

ReinderReinders_2-1684329668287.png

but with the api/v1/paymentmethod/{id} I can prove that there is more data, for instance a paymentmethod 5:

ReinderReinders_3-1684329721111.png

 

There are 2 ways to interpret this issue:

1) it is a bug that the API call only returns creditor payment methods, but not debtor payment records.

2) it is intended that the API call only returns creditor payment methods. In this scenario there is no way to retrieve all debtor payment methods all at once.

 

Suggested resolution:

 

Add boolean properties to select which data to return (returnCreditorPaymentMethods, returnDebtorPaymentMethods). The default could be set to true and false, so that the API keeps on behaving the same as before (backwards compatibility). 

10 REPLIES 10
Yıldırım
VISMA

by Yıldırım

That's correct, when the "UseInAP=False aka "Use for suppliers" not checked in the UI, 

Payment methods.jpg

GET All > PaymentMethod doesn't return those paymentMethods. 

 

We'll check it out whether this is working as planned or there is a bug. 

 

Thank you. I would suggest that probably the 2 labels (use for suppliers and use for customers) have been swapped accidentally, but it could also be that I'm interpreting it incorrectly.

Yıldırım
VISMA

by Yıldırım (Updated ‎25-05-2023 14:41 by Yıldırım VISMA )

As far as I remember from the old cases like 3–4 years ago, PaymentMethod endpoint has initially been only for Supplier Payment Methods so that the new CustomerPaymentMethod endpoint has been introduced. However, we'll check the current flow of it, and I'll let you know. 

by ReinderReinders

Note that this issue seems to be related to the issue I reported here:

 

https://community.visma.com/t5/Forum-in-Developers-Visma-net/API-controller-api-v1-customer-is-unabl...

 

the GET on the payment methods API only returns creditor payment methods, not debtor payment methods.

the POST on the customer API only accepts debtor payment methods, not creditor payment methods.

Yıldırım
VISMA

Hi, for the customerPayment methods you can use, 

Visma.net Integrations Documentation.jpg

 

Sadly, this is not the correct endpoint. When calling the GET (all), it only returns one payment method:

ReinderReinders_0-1685014936048.png

It should return 1, 2, 3, 9 (creditor payment methods) and 5, 6, (debtor payment methods)

Yıldırım
VISMA

I see, could you please send us a print screen from the ERP UI highlighting the list of the paymentMethods ? <ScreenId=CA2040PL>

 

I'll copy paste the output, because the output is larger than my screen:

[
  {
    "paymentMethodID": "1",
    "active": true,
    "meansOfPayment": "CashOrCheck",
    "description": "Handmatig",
    "useInAP": true,
    "details": []
  },
  {
    "paymentMethodID": "2",
    "active": true,
    "meansOfPayment": "CashOrCheck",
    "description": "Automatisch betalen (Autopay)",
    "useInAP": true,
    "details": [
      {
        "detailID": "01",
        "description": "IBAN",
        "bankingDetailType": "IBAN"
      }
    ]
  },
  {
    "paymentMethodID": "3",
    "active": true,
    "meansOfPayment": "CashOrCheck",
    "description": "BTL91 (Autopay)",
    "useInAP": true,
    "details": [
      {
        "detailID": "01",
        "description": "BIC",
        "bankingDetailType": "BIC"
      },
      {
        "detailID": "02",
        "description": "Bankrekening",
        "bankingDetailType": "BBAN"
      }
    ]
  },
  {
    "paymentMethodID": "9",
    "active": true,
    "meansOfPayment": "CashOrCheck",
    "description": "Vereffening",
    "useInAP": true,
    "details": []
  }
]

 

Using the GET single ('https://integration.visma.net/API/controller/api/v1/paymentmethod/{paymentMethodNumber}') I can prove that 2 records are missing from the response:

{
  "paymentMethodID": "5",
  "active": true,
  "meansOfPayment": "CashOrCheck",
  "description": "Incasso (CORE)",
  "useInAP": false,
  "details": []
}

 

{
  "paymentMethodID": "6",
  "active": true,
  "meansOfPayment": "CashOrCheck",
  "description": "Incasso (B2B)",
  "useInAP": false,
  "details": []
}

by ReinderReinders (Updated ‎25-05-2023 14:26 by ReinderReinders VISMA )

Let me guess, the useInAP (useInAPI?) flag is set incorrectly.

Sorry, I could have seen that myself if I had analysed the results a little more carefully.

This could be me or our business analysts misunderstanding the business rules in Visma.net ERP, but could it be that the column names of these 2 columns have been swapped? 

ReinderReinders_0-1685017463957.png

I would assume that "use for costumers" (i.e. debtors) makes something a debtor payment method. But maybe I am misunderstanding "use for suppliers".