Apply Payment Action
Applies a payment record to an invoice header by creating a PaymentLineInvoice record
with a type of Applied.
To access Commerce Payments resources, you need the following permissions: Salesforce Order Management License or Salesforce B2B Commerce License, and PaymentsAPIUser user permission. This permission is available with the Salesforce Order Management or B2B Commerce License. Your Salesforce admin assigns it to your user profile.
This object is available in API version 54.0 and later.
Supported REST HTTP Methods
URI: /services/data/v54.0/actions/standard/applyPayment
Formats: JSON
HTTP Methods: POST
Authentication: Authorization: Bearer token
Inputs
| Input | Type | Description |
|---|---|---|
| amount | number | Required. The amount to be applied to the invoice header. |
| appliedToId | ID | Required. The ID of the invoice that receives the payment. |
| associatedAccountId | ID | Optional. The ID of the account that contains the invoice. |
| comments | String | Optional comments for more information about the payment application. |
| effectiveDate | datetime | Optional. The date that the payment takes effect on the invoice. |
| paymentId | string | Required. The payment that's applied to the invoice. The application is represented by the PaymentLineInvoice created for a successful action. |
Outputs
| Output | Type | Description |
|---|---|---|
| appliedDate | datetime | The date that the payment was applied to the invoice header. |
| paymentLineInvoiceId | ID | Represents the application of the payment's amount to the invoice. Created after a successful action. |