This specification allows a web page or web host to indicate the presence of a page for receiving and accepting donations. Anyone wishing to make a donation to the website can issue a request to this page, specifying the amount they wish to donate. The page will create a Web Payments Payment Request in the browser.
This is a good idea to getting artists and people paid, but this document unofficial and in early draft form.
Web Payment Donate URI provides a way for a User-agent to realize & act upon a "donation" endpoint provided by a web page.
A web host which is setup for WebPayment Donation URI will provide a endpoint, which when given an amount in the querystring, creates and shows Payment Request for that amount.
Two main uses are provided:
In order to provide enhanced services to it's user, a User-agent must first become aware of the Donation Acceptance endpoint.
Three options are provided for advertisement:
Donation acceptance should be available on the designated Well-known URI", which is designated `/.well-known/donate`. Issuing a HEAD or GET request to this endpoint should be sufficient to indicate the presence of a Donation Acceptance implementation.
Links in a page's headers may include a link with a link-relation of "donation-acceptance" to indicate the presence of a donation acceptance URI.
Example:
<link rel=donation-acceptance" href="/.well-known/donation-acceptance"></link>
Links may be offered to alternative locations:
<link rel="donation-acceptance" href="/donate"></link<
Donation Acceptance can be indicated via embedded linked-data, via a EntryPoint with a `potentialAction` of DonateAction.
Example:
{ "@context": { "@vocab": "http://schema.org/" }, "@type": "EntryPoint", "url": "/.well-known/donate", "potentialAction": { "@type": "DonateAction" } }
This data may also be constructed as Microdata or RDFa markup in HTML.
Issuing a HTTP GET or POST to the endpoint will return a web page that ought fire a Web Payment Request, for the amount specified in it's "amount" query parameter.
GET /.well-known/donate?amount=20.00 HTTP/1.1 Host: yoyodyne.net Date: Thur, 07 Dec 2017 20:51:35 GMT Accept: text/html
Were a user to go to this page, they should expect a Web Payment Payment Request interface to appear in their User-agent.
If the user completes this payment request action, the donation is expected to be complete.