Payment Line Unapply (POST)

Revert the application of a payment line from an invoice, and return the payment and invoices to their preapplication state. Use this API to correct an input during the payment application process.

For example, you can use this API to revert an incorrect payment that’s applied to an invoice, or to rectify an incorrect amount.

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}/paymentlines/{paymentLineId}/actions/unapply

Resource Example 

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

Available Version 

64.0

HTTP Methods 

POST

Path Parameters for POST 

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

Request Body for POST 

JSON Example

1{
2  "effectiveDate": "2025-05-22T11:30:25.000Z",
3  "comments": "Unapply payment"
4}

Properties

NameTypeDescriptionRequired or OptionalAvailable Version
commentsStringComments that you can add when you revert a payment line application.Optional64.0
effective​DateStringDate from when the reversal of the payment line application is in effect.Optional64.0

Response Body for POST 

Payment Line Unapply