Skip to content

Address

Target audience: Developers

Introduction

This document describes the address input- and output format used for the Payway API.

Input Address Format

This describes the fields available to you in a Payway Address when using the API to either update or create an address.

Example of required input

{  
  "first_name": "Kalle",
  "last_name": "Anka",
  "street": "Södra Vollsjövägen",
  "zip_code": "27567",
  "city": "Vollsjö",
  "country_code": "SE"
}

Available input fields

Field Required Type Description
first_name Required String first name e.g. 'Kalle'. Can be substituted by company_name.
last_name Required String last name e.g. 'Von Anka'. Can be substituted by company_name.
street Required String Street name e.g 'My street'
street_number Optional String Street name or building e.g '2' or '34-36'
staircase Optional String Staircase or stairwell e.g. 'A', 'B' etc
floor Optional String The floor, not commonly used
apartment Optional String If there is only one staircase, aparment is used. E.g. 'lgh. as.'
apartment_number Optional String The apartment number. E.g. '1101'
zip_code Required String The zip code. E.g. '65100'
city Required String The city. E.g. 'New York'
country_code Required String The country code. E.g. 'SE', 'FI'
mobile_number Optional String The mobile number
phone_number Optional String The phone/home number
contact_email Optional String Email, most often used with digital invoicing
drop_box Optional String Dropbox, used when mail is deliverd in bulk to a shared box
care_of Optional String Care of or C/O, used to when addressing a place of work where multiple people are found at the same address
company_name Optional String Company name, used as name if defined. E.g 'Adeprimo Ab'
company_department Optional String Company deparment. E.g. 'Billing', 'Sales'
company_reference Optional String Company reference. Most often used to tag invoices. E.g. 'REF-123'
company_crn Optional String Company registration number. E.g. 123456-1234
company_vat_number Optional String The registered company vat number E.q. A123-123
citizenship_country_code Optional String Used in few cases where the customer orders something from abroad.

Output Address Format

In the output address format, you have access to two different methods of using the given address, fields and views.

Example output

{
  "fields": {
    "type": "default",
    "first_name": "Kalle",
    "last_name": "Anka",
    "street": "Södra Vollsjövägen",
    "street_number": "311-16",
    "staircase": "",
    "floor": null,
    "apartment": null,
    "apartment_number": "",
    "zip_code": "27567",
    "city": "Vollsjö",
    "mobile_number": null,
    "phone_number": null,
    "contact_email": null,
    "country_code": "SE",
    "drop_box": null,
    "care_of": null,
    "company_name": null,
    "company_department": null,
    "company_reference": null,
    "company_crn": null,
    "company_vat_number": null,
    "citizenship_country_code": null
  },
  "views": {
    "address": {
      "name": "Kalle Anka",
      "att": null,
      "co": null,
      "street_address": "Södra Vollsjövägen 311-16",
      "postal_area": "27567 Vollsjö",
      "country": "SE"
    },
    "contact": {
      "name": "Kalle Anka",
      "email": null,
      "number": null
    }
  }
}

Fields

The fields object can be used to retrieve each property of the address separately, allowing you to build your own address in any way that you'd like.

Views

The views object comes with a pre-formatted address that you can simply pick up and use "out of the box". No need for address parsing.

Field Description
address Object containing information about the address
name
Full name of the recipient
att
att. (Attention)
co
℅ (Care-Of)
street_address
Complete street address with street number, apartment number staircase etc
postal_area
Postal area of the recipient (including city and zip code)
country
Country code representing the country of the recipient
contact Object containing information about the contact person at the given address
name
Full name of the contact person at the given address
email
Email of the contact person at the given address
number
Mobile/phone number of the contact person at the given address