Release a Payment

If you are using the contract-based REST API to integrate MYOB Acumatica with an external system, this external system can release an accounts receivable payment in MYOB Acumatica.

System Preparation

Before you test the code below, you need to do the following:

  1. Deploy a new MYOB Acumatica instance with the U100 dataset. For details on deploying an instance, see Instance Deployment: To Deploy an Instance with Demo Data.
  2. To sign in to the instance in the client application, use the tenant name (which you specified when you created the instance) and the HEADOFFICE branch.
  3. If you are using Postman as the client application for testing, in the IntegrationDevelopmentGuide.postman_collection.json collection, make sure that the collection’s variables have the proper values. This collection is located in the IntegrationDevelopment\Help folder of the Help-and-Training-Examples repository on GitHub.
  4. Create a payment for an invoice and sales order, as described in Create a Payment for an Invoice and a Sales Order.
    Tip: If you use the IntegrationDevelopmentGuide.postman_collection.json Postman collection for testing, you do not need to perform the following configuration steps because they are performed in the pre-request script.
  5. Use the Payments and Applications (AR302000) form or the REST API to remove the created payment from hold and specify the payment amount.

Request

You can use the following request example to invoke the release process for the 000077 AR payment through the contract-based REST API. The reference number of the AR payment is specified in the ReferenceNbr field.

Tip: In the request example below, <MYOB Acumatica instance URL> is the URL of the MYOB Acumatica instance (such as https://my.acumatica.com/MyInstance). You can omit the instance name in the URL (that is, you can use https://my.acumatica.com) if the instance is installed in the root of the website.
POST /Release HTTP/1.1
Host: [<MYOB Acumatica instance URL>]/entity/Default/24.200.001/Payment
Accept: application/json
Content-Type: application/json

{
    "entity": {
        "Type": { "value": "Payment" },
        "ReferenceNbr": { "value": "000077" }
    }
}

If the request returns 202 response code, the Location header of the response contains the URL that you can use to check the status of the operation by using the GET HTTP method. When the GET HTTP method with this URL returns 204 No Content, the operation is completed. For more information, see Execute an Action That Is Present in an Endpoint.