Payments: create

Posts a payment to a past due invoice.

This method can only be used if the paymentAllowed value for a past due invoice is true. This can be determined calling Billing::listInvoicesPastDue.

The response returns information for a single payment, if a payment ID was used in the endpoint, or a list of payments. If the from date or to date queries or payment ID are not used, the response returns payment information for the last 365 days. If the request was for a single payment ID, the nextUri and previousUri properties are not returned.

Privileges required: account administrator

Request

HTTP request

POST /v2/accounts/{accountId}/billing_payments

Parameters

Parameter NameValueDescription
Path Parameters
accountIdstring

The external account number (int) or account ID Guid.

Responses

CodeDescriptionReference
201

Successful response.

billingPaymentResponse
400

Error encountered.

errorDetails

SDK Method

Billing::makePayment

Definitions

billingPayment

Contains information on a billing plan.

amountstring

Reserved: TBD

invoiceIdstring

Reserved: TBD

paymentIdstring

billingPaymentRequest

paymentAmountstring

The payment amount for the past due invoices. This value must match the pastDueBalance value retrieved using Get Past Due Invoices.

billingPaymentResponse

Defines an billing payment response object.

billingPayments[billingPayment]

Reserved: TBD

errorDetails

This object describes errors that occur. It is only valid for responses, and ignored in requests.

errorCodestring

An error code associated with the error.

messagestring

A short error message.

Examples

Generic JSON Request/Response

Request
{
  "paymentAmount": "sample string 1"
}
Response
{
  "billingPayments": [
    {
      "invoiceId": "sample string 1",
      "paymentId": "sample string 2",
      "amount": "sample string 3"
    }
  ]
}
Generic XML Request/Response

Request
<billingPaymentRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
  <paymentAmount>sample string 1</paymentAmount>
</billingPaymentRequest> 
Response
<billingPaymentResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
  <billingPayments>
    <billingPayment>
      <amount>sample string 3</amount>
      <invoiceId>sample string 1</invoiceId>
      <paymentId>sample string 2</paymentId>
    </billingPayment>
  </billingPayments>
</billingPaymentResponse> 
}} />