Confirmed users
324
edits
m (→Overview) |
m (→Invocation) |
||
Line 15: | Line 15: | ||
* When an app triggers an in-app payment or when a marketplace triggers an app purchase, it invokes <code>navigator.mozPay()</code> in JavaScript with a [http://openid.net/specs/draft-jones-json-web-token-07.html JWT] (JSON Web Token). | * When an app triggers an in-app payment or when a marketplace triggers an app purchase, it invokes <code>navigator.mozPay()</code> in JavaScript with a [http://openid.net/specs/draft-jones-json-web-token-07.html JWT] (JSON Web Token). | ||
* A window opens up on the customer’s device to a URL of the payment provider. This URL is determined by the typ field of the JWT but must also be in a special whitelist on the phone. All new payment providers must work with Mozilla to have their URLs added to the whitelist that is shipped with devices. | * A window opens up on the customer’s device to a URL of the payment provider. This URL is determined by the typ field of the JWT but must also be in a special whitelist on the phone. All new payment providers must work with Mozilla to have their URLs added to the whitelist that is shipped with devices. | ||
* The user agent makes a GET request to the payment provider to load the payment screen. The URL looks like this: <code> | * The user agent makes a GET request to the payment provider to load the payment screen. The URL looks like this: <code>https://paymentprovider.com/mozpay?req=<JWT></code> | ||
* See the [[WebAPI/WebPayment|WebPayment]] API for details on the acceptable JWT parameters. | * See the [[WebAPI/WebPayment|WebPayment]] API for details on the acceptable JWT parameters. | ||