PaymentWorkPage

Protocol.PaymentWorkPage History

Hide minor edits - Show changes to output

Added lines 3-4:
* '''Rename this subprotocol to "transaction"'''
Changed lines 232-233 from:
Receipt Accept
to:
Promise Release
Changed line 235 from:
   "type": "receipt-accept",
to:
   "type": "promise-release",
Added lines 240-242:
       "payment-id": (string),
        "path-id": (string),
        "path-amount": (decimal),
Deleted lines 243-246:
       "receipt-redeem" {
            (body of receipt redeem)
        },
        ("max-receipt": (decimal))
Deleted lines 245-260:


Promise Release

{
    "type": "promise-release",
    "to": (string),
    "from": (string),
    "time": (date/time),
    "body": {
        "payment-id": (string),
        "path-id": (string),
        "path-amount": (decimal),
        "amount": (decimal),
    }
}
Added lines 19-22:
'''Payment Completion'''

Maybe the payment shouldn't be complete until the signed receipt makes it back to the payer, at which point he has "proof of payment"?  That gives the payer motivation to pay to get the receipt, and maybe makes deadlines not so much of an issue.

Added lines 1-256:
'''Todo'''

* message signing
* public key data structure
* certificate data structure
* routing onion data structure
* releasing promises
* collecting on penalties
* delays/disputes
* third-party timestamp/relay/verifiers - how can they deliver?
* partial receipts/max receipt amount field
* fees (flat fees possible by intermediary altering path-amount?)
* max-fees limit on promise (requires specifying known path-units)
* define valid receipt
* error messages
* flesh out finalizing payment
* handle rounding

---------------

!!!Ripple Payment Protocol Messages

Account Data Structure

{
    "payment-account": {
        "account-id": (string),
        "unit": (URI),
        "initiator": {
            "node-id": (Ripple ID),
            "key": (public key data structure)
        },
        "partner": {
            "node-id": (Ripple ID),
            "key": (public key data structure)
        },
    }
}


Account Request

{
    "type": "payment-account-request",
    "to": (string),
    "from": (string),
    "request-id": (integer),
    "body": {
        "payment-account": {
            "account-id": (string),
            (remaining account data structure containing requested field values)
        },
        "note": (string)
    }
}


Account Set

{
    "type": "payment-account-set",
    "to": (string),
    "from": (string),
    "request-id": (integer - only present on responses to account-requests),
    "time": (date/time string),
    "body": {
        "payment-account": {
            "account-id": (string),
            (remaining account data structure containing requested field values)
        },
    }
}


Account Close

{
    "type": "payment-account-close",
    "to": (string),
    "from": (string),
    "request-id": (integer),
    "body": {
        "account-id": (string)
    }
}

-------------

Payment Request

{
    "type": "payment-request",
    "to": (string),
    "from": (string),
    "body": {
        "payment-id": (string),
        "amount": (decimal),
        "unit": (URI),
        "note": (string)
    }
}


Payment Init

{
    "type": "payment-init",
    "to": (string),
    "from": (string),
    "body": {
        "payment-id": (string),
        "amount": (decimal),
        "units": (URI),
        "note": (string)
    }
}


Payment Accept

{
    "type": "payment-accept",
    "to": (string),
    "from": (string),
    "body": {
        "payment-init": {
            (copy of payment init message) 
        }
        "recipient-receipt-key": (public key data structure),
        "recipient-certificate": (certificate data structure)
    }
}


Promise

{
    "type": "promise",
    "to": (string),
    "from": (string),
    "time": (date/time),
    "body": {
        "payment-id": (string),
        "path-id": [(ordered list of strings)],
        "path-amount": (decimal),
        ("path-units": (URI),)
        "account-id": (string),
        "amount": (decimal),
        ("onion": (routing onion data structure),)
        "ttl": (date/time string),
        ("penalty-deadline": (date/time string),)
        ("penalty-rate": (decimal),)
        "deadline": (date/time string),
        ("max-receipt": (decimal),)
        "payer-receipt-key": (public key data structure),
        "recipient-receipt-key": (public key data structure),
        "timestamp": (date/time string)
    }
}


Routing Onion Data Structure

{
    "encryption-method": ("none" | "rsa" | "dsa")
    ("key-id": (string),)
    "blob": (encrypted routing blob data structure)
}


Routing Blob Data Structure

{
    (arbitrary data),
    "onion": (inner layers of onion)
}


Promise Received

{
    "type": "promise-received",
    "to": (string),
    "from": (string),
    "time": (date/time),
    "body": {
        "payment-id": (string),
        "path-id": [(ordered list of strings)],
        "deadline": (date/time string),
        "amount": (decimal),
        ("max-receipt": (decimal))
    }
}


Receipt

{
    "receipt": {
        "payment-id": (string),
        "path-id": [(ordered list of strings)],
        "path-amount": (decimal)
    }
}


Receipt Redeem

{
    "type": "receipt-redeem",
    "to": (string),
    "from": (string),
    "body": {
        "account-id": (string),
        "amount": (decimal),
        "signed": {
            (receipt)
        },
        "signatures": [
            (...)
        ]
    }
}


Receipt Accept

{
    "type": "receipt-accept",
    "to": (string),
    "from": (string),
    "time": (date/time),
    "body": {
        "amount": (decimal),
        "receipt-redeem" {
            (body of receipt redeem)
        },
        ("max-receipt": (decimal))
    }
}


Promise Release

{
    "type": "promise-release",
    "to": (string),
    "from": (string),
    "time": (date/time),
    "body": {
        "payment-id": (string),
        "path-id": (string),
        "path-amount": (decimal),
        "amount": (decimal),
    }
}