acumatica

How to update default customer payment method with API?


I can't find the good method de update Default Customer Payment Method with API : enter image description here

The PUT is : https://localhost/XXXXXXX/entity/Default/20.200.001/Customer/?$expand=PaymentInstructions The body sent :

    {
           
      "id": "d9f39ef9-fc6b-ee11-a81d-6045bd6d244f",
         "PmtMethod": {
        "value": "VCFON"
    },
           "PaymentInstructions": [
        {
            "id": "90871690-87eb-ee11-a822-6045bd6d244f"
          
        }
    ]    
          
    }

The first Id is the CustomerId. The second Id is the specific customer payment method I need to put as default customer payment method. I have a 200 OK but without any modification.


Solution

  • You can extend the Default endpoint and you can add the PaymentMethods entity to it: Entity properties

    Entity fields

    I only added these three fields, but you can add more if you need.

    You can call it something like this: Postman sample