I'm currently wrapping my head around what is necessary to be (kind of) certain that a Stellar payment will succeed.
A stellar payment has a source, a destination, an asset, and an amount.
What could go wrong? I'm aware of those:
- Source account does not have enough of the specified asset. This can be checked by getting the balance of the specified account. The
selling_liabilitiesare already subtracted from this amount (are they?)
- Destination account does not exist
- Destination account has specified a limit which is too low.
limit >= balance + payment.amountmust hold. What happens if no limit is set? I've seen omitempty.
- Destination account has
False. Can this even happen if the account holds the given asset? What does it mean if the attribute
is_authorizedof the source account matter?
- Are there other aspects that can affect the payment operation?
is_authorized_to_maintain_liabilities completely irrelevant for payment operations?
For this question, I'm only interested in the payment operation. The payment operation is part of a transaction that can fail for several other reasons, e.g. issues with the sequence number or with the signature. That is not part of my question.