-
Notifications
You must be signed in to change notification settings - Fork 48
Description
The initial proposal assumed that Payment Request API (PR API) should be used to trigger the SPC flow. The client code would use PR API providing the payment method as predefined value e.g. "secure-payment-confirmation" and the necessary parameters such as total amount, cryptographic nonce, fallback URL, and so on.
Alternatively, the same SPC flow could be triggered simply by invoking the Credential Management API CredentialsContianer.get() method as it happens for other types of credentials. Example SPRC request:
navigator.credentials. get({
spc:{
credentialIds: 'array of credential identifiers',
amount: 'amount w/currency',
nonce: 'server-side generated cryptographic nonce',
fallbackUrl: 'URL of the fallback page',
timeout: 'timeout for the request'
})
Similarly, the SPCCredential or PaymentCredential would extend the Credential interface to be consistent with the Credential Management API.
Are there any clear benefits of using Payment Request API instead of Credential Management API?