Skip to main content
Solved

Voiding Prepayment via API returns 204 status code but does not void the prepayment

  • April 7, 2025
  • 4 replies
  • 144 views

Making a POST request to the endpoint /entity/Default/22.200.001/Payment/VoidPayment with the body like 

"Entity": {

"id": payment_id,

"Hold": false,

"Branch": “branch_name”,

}

returns a 204.  We expect that this will actually void the prepayment, but the prepayment is still active.  Is there any changes that should be made to this request to make it succeed or at least return an error

Best answer by Cesar Betances

Hi ​@bvoelsch ,

Please find below the current process when voiding a payment via REST API.

-Record to void:

 

-Send your REST API POST Request:

/entity/Default/22.200.001/Payment/VoidPayment

{
    "Entity": {
        "Type": {
            "value": "PPM"
        },
        "ReferenceNbr": {
            "value": "005311"
        },
        "Hold": {
            "value": false
        }
    }
}

-REST API POST creates the following record below (and the record above remains the same because the newly created voided check type of record has not been released yet):

-If and only if I then release that newly created Voided Check record, then the original record(prepayments updates to:

 

Hope this helps.

4 replies

jinin
Pro I
Forum|alt.badge.img+11
  • Pro I
  • April 9, 2025

Hi ​@bvoelsch ,

I tried the following approach to create a void payment, and it’s working.

Url:/entity/Default/24.200.001/Payment/

Method:PUT

Request:

{

    "Type": {

        "value": "RPM"

    },

    "ReferenceNbr": {

        "value": "005358"

    }

}

 To void a credit card payment, use the following method:

Url: entity/Default/24.200.001/Payment/VoidCardPayment
method: POST
Request:
{
    "entity": {
        "Type": {
            "value": "PPM"
        },
        "ReferenceNbr": {
            "value": "005357"
        }
    },
    "parameters": {
        "TranType": {
            "value": "VDG"
        },
        "TranNbr": {
            "value": "11f015345a7ffba8bbef378a"
        },
        "TranDate": {
            "value": "09-04-2025"
        }
        
    }
}


  • Author
  • Jr Varsity II
  • April 9, 2025

Using the call that you provided does create a new payment of type void payment.  It is not voiding the existing payment, and the ReferenceNbr returned is 

"ReferenceNbr": {
    "value": "<SELECT>"
  },

 

I am going to test filling out a complete payment of type void payment to see if it will void the original payment


  • Author
  • Jr Varsity II
  • April 9, 2025

Populating the additional fields to create the payment did not work.  The response is returning an empty payment of type voided payment that is not linked to the original payment.  

 

Any additional ideas are welcome.  Most importantly I want to know why the voidPayment method does not work and returns a 204


Forum|alt.badge.img+2
  • Acumatica Moderator
  • Answer
  • April 18, 2025

Hi ​@bvoelsch ,

Please find below the current process when voiding a payment via REST API.

-Record to void:

 

-Send your REST API POST Request:

/entity/Default/22.200.001/Payment/VoidPayment

{
    "Entity": {
        "Type": {
            "value": "PPM"
        },
        "ReferenceNbr": {
            "value": "005311"
        },
        "Hold": {
            "value": false
        }
    }
}

-REST API POST creates the following record below (and the record above remains the same because the newly created voided check type of record has not been released yet):

-If and only if I then release that newly created Voided Check record, then the original record(prepayments updates to:

 

Hope this helps.