Getting started

Prerequisites

  • Verified PaysonAccount with invoice activated on the account.
  • Ensure that all API calls are made with TLS 1.1 or higher.

Use an existing integration

Read more about which modules and partners support Payson Checkout 2.0 on the Payson website.

Make your own integration

You need to know some programming in order to create a fully customized integration for your webshop, but you have come to the right place and we will help you with all the details you need!

To help you get started with the integration you can use one of our libraries.
PHP: https://github.com/PaysonAktiebolag/PaysonCheckout2-PHP
.NET: https://github.com/PaysonAktiebolag/PaysonCheckout2-.NET

1) Setup checkout and confirmation page

The first step is to make place for the checkout-snippet on your page.

The snippet is responsive and made to look good in different widths, but it is recommended that you try your page out on several devices before going live.

Make sure your pages are accessible from the internet since you provide a URI to the created pages in the API call when creating a new checkout resource.

If you want the confirmation to be displayed on the same page as the checkout you can use the same page to hold the snippet. Just send the same URI as both checkoutUri and confirmationUri. If you want the confirmation to be on a separate page you need to provide different URIs.

2) Integrate!

The flow of a purchase will look like this:

  • The customer fills a shopping cart with items and the data is stored in an order in your shop database.
  • The order data is used to create a JSON-representation of a checkout resource
  • The JSON-representation is sent as a body in an Create-call
  • The id or the URI of the created resource is saved in the shop database
  • Wait for a call to notificationUri. When a call is received, a Read-call is made to check the new status
  • If the status is ReadyToShip the goods are ready to be sent
  • Once you have set the products to sent, using the API or your  PaysonAccount, the status of the resource is set to Shipped and an Update-call with the updated resource as a body is made

3) Test the integration

Before going live with your own integration it is highly recommended that you test it against our test server.

To create an TestAccount: https://test-www.payson.se/TestAccount/Create

For test credentials visit: https://demoshop.payson.se/2.0/apidemo/