Skip to main content

 

 

Coupa Success Portal

5.1 Create Payment in ERP and Update Coupa

Using API

  1. Create a Payment for an Invoice previously created during integration in ERP.
  2. The ERP Connector platform should trigger an API call to Coupa using GET API to query Coupa for the Invoice's <id>. The call should query for the Supplier and Invoice number combination (that makes a unique match).
  3. Ensure that you get a 200 API response and it is logged in your ERP Connector platform logging engine. If you get a different API response (for example, 400) error, the API error (returned on API response <errors><error> tag(s)) must be logged in the ERP connector platform logging engine and a notification must be sent to the relevant person.
  4. The ERP Connector platform should trigger an API call to Coupa using POST API to update an Invoice with Payment.
  5. Ensure that you get a 201 API response and it is logged in your ERP Connector platform logging engine. If you get a different API response (for example, 400) error, the API error (returned on API response <errors><error> tag(s)) must be logged in the ERP connector platform logging engine and a notification must be sent to the relevant person.
  6. Validate that the Invoice is updated correctly in Coupa.

Sample API

GET

https://<instance>/api/invoices?invoice-number=test1234536&supplier[name[=12345

Response

<invoice-header>
  <id type=”integer”>106</id>
  ...
  ...
  <invoice-number>test1234536</invoice-number>
  ...
   <supplier>
    <name>12345</name?
   </supplier>
</invoice-header>

POST

https://<instance>/api/invoices/<invoice id> (<invoice id>=”106)

Payload

<?xml version="1.0" encoding="UTF-8"?>
<invoice-header>
  <paid type="boolean">true</paid>
  <payment-date type="datetime">2016-06-23T00:00:00-08:00</payment-date>
  <payment-notes>ADAMTEST|#10|USD|1.00|FULLY PAID|</payment-notes>
  <payments>
    <payment>
      <amount-paid>1.00</amount-paid>
      <notes>10</notes>
      <payment-date>2016-06-23</payment-date>
    </payment>
  </payments>
</invoice-header>

Using CSV

  1. Create a Payment for an Invoice previously created during integration in ERP.
  2. The ERP Connector platform generates a CSV flat file from your ERP Connector platform. (The file must have at least the mandatory fields populated.)
  3. The ERP Connector platform places the CSV file to the /Incoming/Invoice Payments folder on the Coupa sFTP site.
  4. Once the scheduled job picks up and processes the file, validate that the Invoice is updated with the Payment information correctly in Coupa.

Sample CSV

Place the CSV file to the/Incoming/Invoice Payments folder, where the file is picked up and processed in 5 minutes, and validate that the Invoice's details are updated.

For a sample file, see create_invoice_payment.csv.

The CSV flat file upload is monitored in Coupa at https://<instance>/data_sources. Coupa sends a notification to Coupa Admin on an upload failure, and Coupa Admin needs to investigate further.

  • Was this article helpful?