Payments: create

Posts a payment to a past due invoice.

Note: This can only be used if the paymentAllowed value for a past due invoice is true. This can be determined calling [ML:GetBillingInvoicesPastDue].

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 name Value Description
Path parameters
accountId string

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

Request Body

Responses

Code Description Reference
201 Created Successful response.
400 Bad Request Error encountered.

SDK Method

Billing::makePayment

Definitions Expand All | Collapse All

billingPayment

Contains information on a billing plan.

amount string

Reserved: TBD

invoiceId string

Reserved: TBD

paymentId string

billingPaymentRequest

paymentAmount string

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.

errorCode string

An error code associated with the error.

message string

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>