ISubscription |
SubscriptionInvoicePaymentResponse PerformBalancePayment( PerformSubscriptionBalancePaymentRequest request )
If the customer owes less money than the amount paid, the remainder will be added to the balance of the subscription. If the customer owes more money than the amount paid, the negative balance will be adjusted accordingly. In either case, the new amount will be reflected in the next invoice generated by the system.
To get a payment agreement ID, you can use the GetPaymentAgreement(GetSubscriptionPaymentAgreementRequest) operation on this endpoint or the GetCustomerPaymentAgreements(GetPaymentAgreementsByCustomerRequest) operation.
The agreement used does not need to be the one associated with the subscription, but it must belong to the same customer. Otherwise a PaymentAgreementSubscriptionMismatchFault will be thrown.
Performing a payment in this manner is a fairly complicated process, which may sometimes fail for seemingly arbitrary reasons. One piece of validation that should be taken into account is the fault BalancePaymentTooSmallFault. This fault is thrown in cases where the requested payment is smaller than the smallest minimum allowed payment that's been configured for the payment type and/or title. The fault object will contain the minimum allowed amount, so it should be possible to give the end user a relatively "friendly" error message.
There's currently no API for retrieving the minimum allowed amount without actually attempting a payment.