6. Test and Go live

You can use the Generation API from the testing environment (https://api.playground.klarna.com/instantshopping/v1/buttons) and obtain a testing Button key. When using it, you need to include two configuration parameters. The parameters are:

  • environment
  • region

The respective configuration will look like:

1
<klarna-instant-shopping data-key="123e4567-e89b-12d3-a456-888888880000" data-environment="playground" data-region="eu"/>
1
<klarna-instant-shopping data-key="123e4567-e89b-12d3-a456-888888880000" data-environment="playground" data-region="na"/>

The environment and region attributes are optional and default to production and eu respectively

Note that purchases completed in the test environment are not processed by our production system and will not result in proper invoices or any fees collected on invoices.