Payment method flow

This flow lets the user communicate a payment method id to you for such purposes as direct charge (where you create the orders). The user will be asked to add a new payment method or select on they have already stored in SPiD, and the ID will retrurned to you as part of the redirect uri.

It requires a logged in user, so it will start of in the auth flow.

URL Path: /flow/payment

How it works

Flow is initiated by visiting the path /flow/payment with the required query parameters client_id, redirect_uri and response_type. The optional parameters are: methods and subscription_id.

The methods parameter determines which payment methods that should be available. Valid values can be found in the this list.

Examples

Credit card only

https://login.schibsted.com/flow/payment?methods=2&client_id=[...]&redirect_uri=[...]&response_type=code

Credit card and SMS

https://login.schibsted.com/flow/payment?methods=6&client_id=[...]&redirect_uri=[...]&response_type=code

Updating SPiD subscriptions

This flow can also be used to manage the payment method of SPiD subscriptions. In this case there is no need to act on the outgoing payment method id, but the subscription id (preferrably the "original subscription id") must be added as a flow start parameter (so SPiD will know which subscription to update) as a subscription_id parameter.

Example

https://login.schibsted.com/flow/payment?methods=6&subscription_id=123&client_id=[...]&redirect_uri=[...]&response_type=code

Results

Like all SPiD flows, the user will, upon successful completion of the flow, be sent to the redirect_uri along with a code parameter (that must be consumed as per all flows to identify the returning user), but also with an added parameter payment_id which is id of the payment method the user selected.

Flows

Help us improve

Did you spot an error? Or maybe you just have a suggestion for how we can improve? Leave a comment, or better yet, send us a pull request on GitHub to fix it (in-browser editing, only takes a moment).

History of this page

Comments/feedback

Do you have questions, or just want to contribute some newly gained insight? Want to share an example? Please leave a comment. SPiD reads and responds to every question. Additionally, your experience can help others using SPiD, and it can help us continuously improve our documentation.