Class Payment
This class contains the comprehensive information about a payment transaction that has been executed or is in the process of being executed. It includes details about the payment amounts, status, timing, and associated metadata.
A payment is the result of successfully executing an outgoing payment request against a specific quote. It tracks the actual amounts that were sent and received, as well as any grant spending information and failure status.
The payment represents the final step in the Interledger payment flow:
- Create incoming payment (receiver)
- Create quote (sender)
- Create outgoing payment (sender)
- Execute payment - this class represents the result
- Since:
- 1.0
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionTimestamp when this payment was created.The amount that was debited from the sender's account.Indicates whether this payment has failed.The amount spent from the grant's debit limit for this payment.The amount spent from the grant's receive limit for this payment.Unique identifier for this payment.Optional metadata associated with this payment.Optional reference to the quote that was used for this payment.The amount that was actually received by the receiver.The receiver (incoming payment) endpoint that received this payment.The amount that was actually sent through the Interledger network.Timestamp when this payment was last updated.The wallet address from which this payment was sent. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
id
Unique identifier for this payment.This URI uniquely identifies the payment transaction within the Interledger network. It can be used to query the payment status, reference the payment in other operations, or for audit purposes.
Example: "https://ilp.interledger-test.dev/payments/123e4567-e89b-12d3-a456-426614174000"
-
walletAddress
The wallet address from which this payment was sent.This identifies the sender's wallet address that initiated and executed this payment. It corresponds to the wallet that was debited for the payment amount.
Example: "https://ilp.interledger-test.dev/alice"
-
quoteId
Optional reference to the quote that was used for this payment.This URI identifies the specific quote that was used to determine the payment amounts and fees. The quote provides the cost estimate that was used when creating the payment.
If present, this can be used to reconcile the actual payment amounts with the originally quoted amounts.
Example: "https://ilp.interledger-test.dev/quotes/456e7890-e89b-12d3-a456-426614174000"
-
failed
Indicates whether this payment has failed.This field is set to true if the payment execution failed for any reason. When a payment fails, the amounts may be partial or zero, and the metadata may contain additional error information.
A failed payment may have already sent some amount before failing, so clients should check the sent and received amounts even for failed payments.
-
receiver
The receiver (incoming payment) endpoint that received this payment.This URI identifies the destination where the payment was delivered. It corresponds to the incoming payment that was created by the receiver to accept this payment.
Example: "https://ilp.interledger-test.dev/incoming-payments/789e0123-e89b-12d3-a456-426614174000"
-
receivedAmount
The amount that was actually received by the receiver.This represents the actual amount that was successfully delivered to the receiver's account. This may be different from the originally intended amount due to partial payments or payment failures.
For successful payments, this should match the quote's receive amount. For failed payments, this may be less than expected.
-
debitAmount
The amount that was debited from the sender's account.This represents the total amount that was debited from the sender's wallet to execute this payment. It includes the payment amount plus any fees or exchange rate costs.
For successful payments, this should match the quote's debit amount. For failed payments, this may be less than expected.
-
sentAmount
The amount that was actually sent through the Interledger network.This represents the amount that was transmitted through the Interledger protocol to deliver the payment. It may be different from the debit amount due to local wallet fees or processing costs.
The sent amount is typically between the debit amount and the received amount, accounting for network fees and exchange rates.
-
grantSpentDebitAmount
The amount spent from the grant's debit limit for this payment.This field tracks how much of the access grant's debit limit was consumed by this payment. It's used for grant management and to ensure that payments don't exceed the authorized limits.
This information is important for tracking grant usage and for determining how much of the grant's debit authorization remains.
-
grantSpentReceiveAmount
The amount spent from the grant's receive limit for this payment.This field tracks how much of the access grant's receive limit was consumed by this payment. It's used for grant management and to ensure that payments don't exceed the authorized limits.
This information is important for tracking grant usage and for determining how much of the grant's receive authorization remains.
-
createdAt
Timestamp when this payment was created.This indicates when the payment was first initiated and created in the system. It marks the beginning of the payment execution process.
-
updatedAt
Timestamp when this payment was last updated.This indicates when the payment information was last modified, such as when the payment status changed, amounts were updated, or when the payment was completed or failed.
-
metadata
Optional metadata associated with this payment.This can include additional context, references, or descriptive information about the payment purpose, invoice numbers, or other business-related data that was provided when creating the payment.
- See Also:
-
-
Constructor Details
-
Payment
public Payment()
-
-
Method Details