Payment Line Apply (POST)

Allocate the balance of a payment to reduce the balance of an invoice. The response includes an ID of the payment line invoice or payment line invoice line that represents the payment balance allocated against the invoice.

Use the Commerce Payments APIs to send your payment and refund details to external payment gateways for processing against a customer’s bank. See Commerce Payments resources to check the APIs for payment gateways, payment captures, and payment authorizations.

Resource 

1/commerce/billing/payments/{paymentId}/actions/apply

Resource Example 

1https://{yourInstance}.salesforce.com/services/data/v68.0/commerce/billing/payments/{1PLR000000000dDOAQ}/actions/apply

Available Version 

64.0

HTTP Methods 

POST

Path Parameter for POST 

NameTypeDescriptionRequired or OptionalAvailable Version
paymentIdStringID of the payment record.Required64.0

Request Body for POST 

JSON Example

1{
2  "appliedToId": "3ttR000000001IkIAI",
3  "amount": 10,
4  "effectiveDate": "2020-08-11T07:53:15.000Z",
5  "comments": "Apply payment",
6  "associatedAccountId": "001R00000060AyuIAE"
7}

Properties

NameTypeDescriptionRequired or OptionalAvailable Version
amountDoubleAmount that’s applied. The amount must be less than the invoice line and payment balance.Required64.0
applied​ToIdStringID of the invoice line that this payment is applied to. Specify the IDs for these records.Required64.0
associated​AccountIdStringID of the associated account.Optional64.0
commentsStringComments that you can add to the payment line application.Optional64.0
effective​DateStringDate from which the payment line application takes effect.Optional64.0

Supported values:

  • Invoice
  • Invoice Line

Response Body for POST 

Payment Line Apply