Skip to main content

 

 

Coupa Success Portal

Invoice Payments API Example Calls

Example: Add payment information to an existing invoice

In this example we are adding payment formation to an existing invoice. This is using the fields: Paid, Flag, Payment Notes, and Payment Dates.

We posted it to the URL: https://<instance>.coupahost.com/api/invoices/<invoice id>.

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

Example: Update invoice with multiple payments

In this example we are updating an existing invoice with multiple check numbers.  This is using the fields: Amount Paid, Check Number, and Payment Date.

We posted it to the URL: https://<instance>.coupahost.com/api/invoices/<invoice id>. 

<?xml version="1.0" encoding="UTF-8"?>
<invoice-header>
   <paid type="boolean">true</paid>
   <payment-date type="datetime">2009-06-23T00:00:00-08:00</payment-date>
   <payment-notes>CHECK|#1003|USD|989.00|FULLY PAID|</payment-notes>
   <payments type="array">
      <payment>
         <amount-paid type="decimal" nil="true">100.23</amount-paid>
         <notes nil="true">232</notes>
         <payment-date type="datetime" nil="true">2010-09-25T02:22:11Z</payment-date>
      </payment>
      <payment>
         <amount-paid type="decimal" nil="true">9032.32</amount-paid>
         <notes nil="true">233</notes>
         <payment-date type="datetime" nil="true">2010-09-25T02:22:11Z</payment-date>
      </payment>
   </payments>
</invoice-header>

Invoice Payments GET

Overview

The following describes how you can use the Coupa API to update an invoice with payment information

Our Invoice Payment API allows you to do two things:

1. Update an invoice with three attributes: Paid Flag, Payment Date, and Payment Notes
a. This is what Coupa originally offered as part of our invoice object.  Allowing you to put in information into these different fields.  If you had multiple payments then you would have to append the payment notes field.
2. Update an invoice with multiple payment information: Payment Date, Notes (Check Number), and Amount Paid.  After customer feedback, we added the capability to add in multiple payment information for a single invoice.  This allows you to assign multiple payment dates, check numbers, and amount paid to a single invoice.  Since customers were using the original implementation of Paid Flag, Payment Date, and Payment Notes, we decided to leave both for maximum flexibility.
This is the URL you can PUT this information to:

  • <instance url>/api/invoices/<invoice id>
  • Typically you would use the invoice number and supplier to find the correct invoice id in order to use in the PUT

Successful requests will return HTTP 200 Created. The body of the response will include the payment information and the invoice that was updated.

Unsuccessful requests will return HTTP 400 Bad Request. The body of the response will include validation errors formatted as XML.

 Coupa 14

Coupa 13

Referenced Objects

There are no referenced objects as part adding invoice payment information to an invoice.

Field Definitions

Name Required? Type Allowable Values Description
paid no boolean true or false This is the paid field on the invoice header. It's set to a true or false value.
payment-date no datetime YYYY-MM-DDTHH:MM:SS+HH:MM The date and time the payment was made
payment-notes no text description or notes if any These are notes you add as part of the payment information.
<payments>       payment array begins
<payment>       payment installment
amount-paid no decimal 2 Decimal Number This is the amount paid as part of the payment array.
notes no String transactional data Check or Transaction or payment information captured for the payment. This field has replaced <check-number>. Any data sent to the depreciated tag will be stored in the notes field. The check # tag will be populated in the Coupa instance. (<check-number> may be used too).
payment-date no text YYYY-MM-DDTHH:MM:SS+HH:MM The date and time the payment was made
</payment>        
</payments>       payment array ends

Notes

  • The fields above between the <payments> tag represent the multiple payments on a single invoice scenario. You can pass in multiple payments using this method in a single PUT.
  • Payments are not updated or voided through API. Current best practice is to create a new payment for the negative amount of the payment you wish to void to 'zero out' the existing payment.

Sample API Calls

Invoice Payments POST

Overview

The following describes how you can use the Coupa API to update an invoice with payment information

Our Invoice Payment API allows you to do two things:

1. Update an invoice with three attributes: Paid Flag, Payment Date, and Payment Notes

a. This is what Coupa originally offered as part of our invoice object.  Allowing you to put in information into these different fields.  If you had multiple payments then you would have to append the payment notes field.

2. Update an invoice with multiple payment information: Payment Date, Notes (Check Number), and Amount Paid.  After customer feedback, we added the capability to add in multiple payment information for a single invoice.  This allows you to assign multiple payment dates, check numbers, and amount paid to a single invoice.  Since customers were using the original implementation of Paid Flag, Payment Date, and Payment Notes, we decided to leave both for maximum flexibility.

This is the URL you can PUT this information to:

  • <instance url>/api/invoices/<invoice id>
  • Typically you would use the invoice number and supplier to find the correct invoice id in order to use in the PUT

Successful requests will return HTTP 200 Created. The body of the response will include the payment information and the invoice that was updated.

Unsuccessful requests will return HTTP 400 Bad Request. The body of the response will include validation errors formatted as XML.

Coupa 14

 

Coupa 13

Download the Coupa 13 Flat File Integration Mapping Excel file, if you still need it.

Referenced Objects

There are no referenced objects as part adding invoice payment information to an invoice.

Field Definitions

Name Required? Type Allowable Values Description
paid no boolean true or false This is the paid field on the invoice header. It's set to a true or false value.
payment-date no datetime YYYY-MM-DDTHH:MM:SS+HH:MM The date and time the payment was made
payment-notes no text description or notes if any These are notes you can add as part of the payment information.
<payments>       payment array begins
<payment>       payment installment
amount-paid no decimal 2 Decimal Number This is the amount paid as part of the payment array.
notes no String transactional data Check or Transaction or payment information captured for the payment. This field has replaced <check-number>. Any data sent to the depreciated tag will be stored in the notes field. The check # tag will be populated in the Coupa instance. (<check-number> may be used too).
payment-date no text YYYY-MM-DDTHH:MM:SS+HH:MM The date and time the payment was made
</payment>        
</payments>       payment array ends

Notes

  • The fields above between the <payments> tag represent the multiple payments on a single invoice scenario. You can pass in multiple payments using this method in a single PUT.
  • Payments are not updated or voided through the API. Current beset practice is to create a new payment for the negative amount of the payment you wish to void to 'zero out' the existing payment.
  • Was this article helpful?