OneTimePayments
Payments on the GoodDollar wallet are done via payment links.
G$s are held in an escrow and the recipient can retrieve the funds if he has the key. While the money is in escrow the sender can choose to cancel the payment and retrieve the funds. Based on Celo's payments contract.
Events
PaymentDeposit
Emitted when payment was performed. Occurs only during the token contract call.
Parameter name | Annotation |
---|---|
from | The address of the tokens sender. |
paymentId | The address representing an ID of the payment. |
amount | Amount of the payment. |
To deposit a payment to a one time payment address call perform the further:
The above will trigger OneTimePayments onTokenTransfer callback, which will trigger the PaymentDeposit.
PaymentCancel
Emitted when payment was cancelled.
Parameter name | Annotation |
---|---|
from | The address of the tokens sender. |
paymentId | The address representing an ID of the payment. |
amount | Amount of the payment. |
PaymentWithdraw
Emitted when payment was withdrawn.
Parameter name | Annotation |
---|---|
from | The address of the tokens sender. |
to | The address of the tokens receiver. |
paymentId | The address representing an ID of the payment. |
amount | Amount of the payment. |
withdraw
Withdrawal function.
Parameter name | Annotation |
---|---|
paymentId | The address of the public key that the rightful receiver of the payment knows the private key to. |
signature | The signature of a the message containing the |
cancel
Payments cancel function.
Parameter name | Annotation |
---|---|
_paymentId | The ID of the payment to cancel. |
Allows only creator of payment to cancel.
Last updated