PaymentsBilling Class

Use the PaymentsBilling class to allocate the balance of a payment to reduce the balance of an invoice. Additionally, revert the application of a payment line from an invoice.

Namespace 

ConnectApi

PaymentsBilling Methods 

These methods are for PaymentsBilling. All methods are static.

applyPaymentLine(PaymentLineApplyInput, paymentId) 

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

API Version 

64.0

Requires Chatter 

No

Signature 

public static ConnectApi.PaymentLineApplyResponse applyPaymentLine(ConnectApi.PaymentLineApplyRequest PaymentLineApplyInput, String paymentId)

Parameters 

PaymentLineApplyInput

Type: ConnectApi.PaymentLineApplyRequest

Input representation of the payment line details.

paymentId

Type: String

ID of the payment record.

Return Value 

Type: ConnectApi.PaymentLineApplyResponse

Usage 

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.

applyRefundLine(RefundLineApplyInput, refundId) 

Make a refund transaction against a payment.

API Version 

64.0

Requires Chatter 

No

Signature 

public static ConnectApi.RefundLineApplyResponse applyRefundLine(ConnectApi.RefundLineApplyRequest RefundLineApplyInput, String refundId)

Parameters 

RefundLineApplyInput

Type: ConnectApi.RefundLineApplyRequest

Input representation of the details of a transaction refund request. This representation outlines the properties of a refund, including the refund amount and ID of the payment or credit memo record that the refund is applied to.

refundId

Type: String

ID of the refund record.

Return Value 

Type: ConnectApi.RefundLineApplyResponse

unapplyPaymentLine(PaymentLineUnapplyInput, paymentId, paymentLineId) 

Revert the application of a payment line from an invoice, and return the payment and invoices to their pre-application state. Use this method if you need to correct an input during the payment application process.

API Version 

64.0

Requires Chatter 

No

Signature 

public static ConnectApi.PaymentLineUnapplyResponse unapplyPaymentLine(ConnectApi.PaymentLineUnapplyRequest PaymentLineUnapplyInput, String paymentId, String paymentLineId)

Parameters 

PaymentLineUnapplyInput

Type: ConnectApi.PaymentLineUnapplyRequest

Input representation of the payment line details.

paymentId

Type: String

ID of the payment record.

paymentLineId

Type: String

ID of the payment line record.

Return Value 

Type: ConnectApi.PaymentLineUnapplyResponse

Usage 

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.

unapplyPaymentLine(PaymentLineUnapplyInput, paymentLineId) 

Revert the application of a payment line from an invoice, and return the payment and invoices to their pre-application state. Use this method if you need to correct an input during the payment application process.

API Version 

64.0

Requires Chatter 

No

Signature 

public static ConnectApi.PaymentLineUnapplyResponse unapplyPaymentLine(ConnectApi.PaymentLineUnapplyRequest PaymentLineUnapplyInput, String paymentLineId)

Parameters 

PaymentLineUnapplyInput

Type: ConnectApi.PaymentLineUnapplyRequest

Input representation of the payment line details.

paymentLineId

Type: String

ID of the payment line record.

Return Value 

Type: ConnectApi.PaymentLineUnapplyResponse

Usage 

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.