Skip to content

External Invoice - Overview

Target audience: Developers, Stakeholders

Introduction

This section covers how to get started with using External Invoicing using Payway. Please note that this payment method requires an existing subscription system that takes care of your invoices.

This article should not be confused with Tulo Invoice.

Getting started

To place your first Invoice/autogiro order with Payway, the following parameters are required:

Parameter Description Example value
account_id OR email The account id or email of the customer adeprimo@servicedesk.com
product_code The product code that should be sold adeprimo_digital
period_id The period id that should be sold 5c6291d537c2ed78a11518b7
receipt_url The receipt url that the customer should be redirected to upon purchase https://adeprimo.se/receipt
billing_address The billing address of the customer
first_name
The first name Adeprimo
last_name
The last name Service desk
street
The street address Street 123
zip_code
The zip code 00100
country_code
The country code FI

While more parameters can be defined, this is all you need for now.

After having defined these parameters, you will want to perform the following HTTP request, including the payload above:

curl --request POST \
  --url https://payway-api.stage.adeprimo.se/external/api/v2/accounts/create_order \
  --header 'accept: application/json' \
  --header 'authorization: Bearer token' \
  --header 'content-type: application/json' \
  --data '{
            "account_id": "",
            "product_code": "",
            "period_id": "",
            "receipt_url": "",
            "billing_address": {
              "first_name": "",
              "last_name": "",
              "street": "",
              "zip_code": "",
              "country_code": ""
            }
          }'

And that's it! Granted you got a 200 OK response, you have now successfully placed your first order with Payway!

Finding the required information

Parameter Description
product_code The easiest way is to navigate to PAP -> Packages & Campaigns, and locate the product that you wish to sell.
Once located, you will find the product code both in the table view as well as in the edit view.
If you wish to go via our API, you can read more here.
period_id You can find the associated period ids for a given product code using our API here.
account_id You can fetch the Account ID based on a customer's credentials by using our API here.
email The easiest way is to navigate to PAP -> Customer service, and locate the account that you wish to place an order on.
You will find the customer's contact email in the overview of the customer.
If you wish to go via our API, you can read more here.