Provided payment methods

Available since SPiD version 2.111.0

In case when Client wants to give the user the possibility to pay with payment method that is not supported in SPiD (Payment Platform), Client is able to provide all new payment method details via Paylink.

If user chooses this payment method, SPiD redirects him to URL provided by Client in Paylink details.

Such payment methods are called provided (external).

Choose payment method step

Basic functionality

In order to allow provided payment methods, payment method details has to be provided in create Paylink request, in paymentOptions field, as a JSON array of Payment Option objects.

There is a possibility to setup the Paylink to be paid:

  • only with payment methods supported in SPiD
  • both with payment methods supported in SPiD and with provided payment methods
  • only with provided payment methods

Payment with payment methods supported in SPiD

In order to give the user the possibility to pay with payment methods supported in SPiD, the only required parameter in Payment Option object is type. Other parameters are ignored.

See the Payment Option type specification for further details on type field.

curl https://payment.schibsted.no/api/2/paylink \
   -X POST \
   -d "oauth_token=[access token]" \
   -d "title=Freebies for all" \
   -d "items=[{\"name\":\"Episode\",\"description\":\"Star Wars IV\",\"price\":9900,\"vat\":2500},{\"description\":\"Star Wars V\",\"price\":9900,\"vat\":2500},{\"description\":\"Star Wars VI\",\"price\":9900,\"vat\":2500}]" \
   -d "paymentOptions=[{\"type\":\"PAYEX_CC\"},{\"type\":\"KLARNA\"}]" \

Payment with provided payment methods

In order to give the user the possibility to pay with provided payment methods, additional parameters defining Payment Option have to be provided - subType, url, name, imageUrl and description.

Parameter subType is used by SPiD to distinguish between all provided payment methods. It is important to agree this value with SPiD support before use.

After user chooses to pay with provided payment method, SPiD redirects him to url.

Parameters name, imageUrl and description are used to display provided payment method in SPiD checkout.

Choose payment provided details

See the Payment Option object specification for further details.

Passed array can contain one or more Payment Option objects of type PROVIDED.

curl https://payment.schibsted.no/api/2/paylink \
   -X POST \
   -d "oauth_token=[access token]" \
   -d "title=Freebies for all" \
   -d "items=[{\"name\":\"Episode\",\"description\":\"Star Wars IV\",\"price\":9900,\"vat\":2500},{\"description\":\"Star Wars V\",\"price\":9900,\"vat\":2500},{\"description\":\"Star Wars VI\",\"price\":9900,\"vat\":2500}]" \
   -d "paymentOptions=[{\"type\":\"PROVIDED\",\"subType\":\"Vouchers\",\"url\":\"https://external-url.com\",\"name\":\"Vouchers\",\"imageUrl\":\"https://external-url.com/vouchers-icon.jpeg\",\"description\":\"Vouchers allow you to pay with voucher code.\"},{\"type\":\"PROVIDED\",\"subType\":\"Wallet\",\"url\":\"https://external-wallet-url.com\",\"name\":\"Wallet\",\"imageUrl\":\"https://external-wallet-url.com/wallet-icon.jpeg\",\"description\":\"You can pay with money from your Wallet.\"}]" \

Payment with payment methods supported in SPiD and with provided payment methods

curl https://payment.schibsted.no/api/2/paylink \
   -X POST \
   -d "oauth_token=[access token]" \
   -d "title=Freebies for all" \
   -d "items=[{\"name\":\"Episode\",\"description\":\"Star Wars IV\",\"price\":9900,\"vat\":2500},{\"description\":\"Star Wars V\",\"price\":9900,\"vat\":2500},{\"description\":\"Star Wars VI\",\"price\":9900,\"vat\":2500}]" \
   -d "paymentOptions=[{\"type\":\"PAYEX_CC\"},{\"type\":\"KLARNA\"},{\"type\":\"PROVIDED\",\"subType\":\"Vouchers\",\"url\":\"https://external-url.com\",\"name\":\"Vouchers\",\"imageUrl\":\"https://external-url.com/vouchers-icon.jpeg\",\"description\":\"Vouchers allow you to pay with voucher code.\"}]" \

Preconditions and requirements

  • Access to the paylink endpoints. Only given to vetted implementations and use cases.
  • Provided payment method type (subType, see Payment Option object specification) has to be determined in cooperation with SPiD support.
  • Provided payment methods URLs have to be whitelisted in client configuration.

Table of Contents

Relevant endpoints

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.