API

API is organised around REST. Our API is designed to have predictable, resource-oriented URLs and to use HTTP response codes to indicate API errors.

Overview

TLS and API communication

Nordea Connect require you to use TLS 1.1 or above to access the API due to security reasons. TLS 1.0 was released in 1999, making it a nearly two-decade-old protocol. It has been known to be vulnerable to attacks—such as BEAST and POODLE—for years, in addition to supporting weak cryptography, which doesn’t keep modern-day connections sufficiently secure. TLS 1.0 and SSL are deprecated since June 30 2018.

Examples:

  • .NET: System.Net.ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
  • PHP: curl_setopt ($setuploginurl, CURLOPT_SSLVERSION, 6);
  • Ruby: ctx.ssl_version = :TLSv1_2
  • Curl: curl --tlsv1.2 https://api.nordeaconnect.com/v1/transactions
  • JS: secureProtocol: "TLSv1_2_method"

3D-Secure

Nordea Connect understands the need to incorporate best business practices in security. That’s why we’ve made it easy for Merchants to implement 3D Secure or “3 Domain Secure” as the industry standard identity check solution to minimize chargebacks from fraudulent credit cards, all included in our simple pricing. 3D-Secure refers to second authentication factor products such as Verified by VisaMastercardⓇSecureCode™ and American Express SafekeyⓇ.

NOTE: While you can create your own payment experience, We strongly recommend using our Payment Window solution to save time in implementing 3D-Secure and client side encryption to your checkout procedure.

Important note on API Card Payments

In order to process card payments either by storing or transfer without storing, you would need full PCI DSS compliance.

Please make use of the stored cards functionality to facilitate API based card payments.

Authentication

Nordea Connect API calls are made via our REST endpoints and the user is identified using Basic Auth. The user name is your Merchant ID and password can be set in the admin console: https://access.nordeaconnect.com/en/settings

Partial data

While doing API calls you can use pagination to fetch parts of your data using limit, offset and start_id.

Pagination Example:

https://api.nordeaconnect.com/v1/transactions?limit=2&offset=20

ID range Example:

https://api.nordeaconnect.com/v1/transactions?start_id=1051&limit=15

Pagination information

Pagination of partial data can be achieved using the Content-Range header. The Content-Range show what part of the data-set that is being returned.

Content-Range:items 16-20/173

Order

You can order your resource list by using the order_by query parameter.

Order example

https://api.nordeaconnect.com/v1/transactions?order_by=amount

Descending order example

https://api.nordeaconnect.com/v1/transactions?order_by=amount:desc

Filter
If you know what you are looking for, you can filter your result with the filter query parameter.

Strings and Booleans support equal and wildcard matches, e.g.:

  • filter[status]=approved
  • filter[card_number]=411*
  • filter[test]=true

Integers, Decimals and Dates supports equal matches, as well as up to, from, and ranges, e.g.:

  • filter[amount]=..1000 will fetch resources where amount is less than or equal to 1000
  • filter[amount]=100.. will fetch resources where amount is greater than or equal to 100
  • filter[created_at]=20180101..20180131 will fetch resources created in January 2018 (from the first up until the 31st)
  • filter[created_at]=20180930T084821 will fetch resources with exact date and time value

Metadata filters

  • filter[metadata.customer.name]=anna will fetch resources where metadata contains a customer which have a name that is anna
  • filter[metadata.customer]=* will fetch resources where metadata have a customer object
  • filter[metadata.products.0.name]=* will fetch the first resources from the products array

Filter example:

https://api.nordeaconnect.com/v1/transactions?filter[test]=false&filter[amount]100..&filter[created_at]=20180101..20181231

HTTP Response Codes

The HTTP answer of a successful call is always HTTP 200 and contains the same JSON as with a GET call. A bad call will return HTTP 40x with a JSON error response.

Object Graph

In many cases the response does not contain full object graph but just a simple object like ..”customer”:{“id”:1}..
In this case you can extend the object using Extendability.

Language

The API supports responses in Swedish and English so if you specify locale=sv or locale=en either as a parameter that you send in or int the query you will receive error messages in the desired language.

Transaction

A transaction is a function to make payments using cards though the REST API. This is done using javaScript (nordeaconnect.js) or a server to server implementation. A Merchant is identified using Basic Auth and can do GET calls to fetch one or many transactions, or POST to create a transaction (a purchase).

A transaction contains JSON with the following data:

idintegerId of the transaction
created_atdatetimeEx. 2018-04-25T10:20:48Z (UTC)
merchant_idstringID of Merchant
amountdecimalThe transaction amount ex. 12.00
vat_amountdecimalThe vat amount for the transaction ex. 3.00
payment_refstringThe Merchant order/payment ID
card_holderstringThe name on the charged credit card
card_numberstringA masked card number ex. 411111****1111
card_expirystringMMYY ex. 0120
testbooleanWhether the transaction is a test transaction.
currencystringThe currency (SEK, CAD, CNY, COP, CZK, DKK, HKD, HUF, ISK, INR, ILS, JPY, KES, KRW, KWD, LVL, MYR, MXN, MAD, OMR, NZD, NOK, PAB, QAR, RUB, SAR, SGD, ZAR, CHF, THB, TTD, AED, GBP, USD, TWD, VEF, RON, TRY, EUR, UAH, PLN, BRL)
statusstringStatus of the api transaction.

  • pending – created but not yet processed
  • approved
  • authorized
  • declined
  • failed
card_typestringVISA, MASTERCARD, etc. (STORED_CARD if the transaction is done with stored card)
payment_requestobjectThe payment request from the Merchant
template_idintHosted Page template ID
errorobjectFor example:

error: {
         name: 'errors.card_number.missing',
         code: 118,
         description: 'Card number is missing'
       }
costobjectThe cost of transaction

{"percentual_fee":0,"fixed_fee":0,"percentual_exchange_fee":0,"total":"0.0", "vat_rate": 0.25}
success_urlstringURL after successful transaction. Can contain Liquid.
error_urlstringURL after unsuccessful transaction. Can contain Liquid.
metadataobjectMerchant specific Metadata
refundarrayAn array with refunds objects where the token value is used for making transactions with the stored card
stored_cardobjectIf the transaction has a stored card connected it will have a token value that is used for making transactions with the stored card
customerobjectCustomer that owns the transaction
transaction_typestringcredit_card/stored_card/recurring
subscriptionobjectThe connected subscription
webhooksarrayA list of Webhooks related to the transaction
hrefstringA HTTP link to a payment page where the customer can finish a payment. Ex. https://pay.nordeaconnect.com/v1/form/hrr5sEwz0y-XgcYOyNXhew
ItemsArray of items objectsitems
payment_detailsobjectpayment_details
payment_methodstringCan be any of the following: credit_card, recurring, stored, invoice, swish, paypal, bank
processed_atdatetimeThe exact time when the payment was confirmed. Ex. 2018-04-25T10:20:48Z (UTC)

Show Transaction

To show a transaction you need to do a GET to https://api.nordeaconnect.com/v1/transactions/3 that will return a transaction with ID 3.

EXAMPLE REQUEST
      
      curl --user 3:password https://api.nordeaconnect.com/v1/transactions/443
      
      EXAMPLE RESPONSE
      
      {
        "amount" : "480.0",
        "card_holder" : "Anna Andersson",
        "card_number" : "*****************1111",
        "card_type" : "VISA",
        "cost" : { "fixed_fee" : 0,
          "percentual_exchange_fee" : 0,
          "percentual_fee" : 0,
          "total" : "0.0"
        },
        "created_at" : "2018-12-17T13:41:07Z",
        "currency" : "SEK",
        "customer" : null,
        "error" : null,
        "error_url" : "https://nordeaconnect.com/payment-error",
        "id" : 443,
        "merchant_id" : 3,
        "metadata" : {
          "products" : [ "awesomeness","coolness"],
          "user" : { "email" : "justmyemail@nordeaconnect.com"}
        },
        "payment_ref" : null,
        "ref" : null,
        "refunds" : [  ],
        "status" : "approved",
        "stored_card" : null,
        "subscription" : null,
        "success_url" : "https://nordeaconnect.com/payment-ok?status=A",
        "template_id" : 10,
        "test" : false,
        "transaction_type" : null,
        "webhooks" : [  ]
      }
EXAMPLE REQUEST
      
      transaction = NordeaConnect::CreditCard::Transaction.get(8176)
      
      EXAMPLE RESPONSE
      
      [{"title"=>"T-shirt"}, {"title"=>"Shoes"}]},
        @validation_context=nil,
        @hash="7234484a4ca9ea19f594b7fda7268562",
        @id=8176,
        @created_at="2018-08-07T13:38:37Z",
        @merchant_id=10,
        @test=false,
        @status="approved",
        @transaction_type="credit_card",
        @cost={"percentual_fee"=>"0.025", "fixed_fee"=>"2.5", "percentual_exchange_fee"=>"0.035", "total"=>"46.0"},
        @stored_card=nil,
        @customer={"id"=>3052},
        @subscription=nil>
      
      
EXAMPLE REQUEST
      
      $transaction = nordeaconnect\api\transaction::get(443);
      
      EXAMPLE RESPONSE
      
      Array
      (
      [id] => 443
      [created_at] => 2018-12-17T13:41:07Z
      [merchant_id] => 3
      [amount] => 480.0
      [payment_ref] =>
        [ref] =>
        [card_holder] => Anna Andersson
      [card_number] => *****************1111
      [test] =>
        [metadata] => Array
      (
      [user] => Array
      (
      [email] => justmyemail@nordeaconnect.com
      )
      
      [products] => Array
      (
      [0] => awesomeness
      [1] => coolness
      )
      
      )
      
      [currency] => SEK
      [status] => approved
      [card_type] => VISA
      [transaction_type] =>
        [template_id] => 10
      [error] =>
        [cost] => Array
      (
      [percentual_fee] => 0
      [fixed_fee] => 0
      [percentual_exchange_fee] => 0
      [total] => 0.0
      )
      
      [success_url] => https://nordeaconnect.com/payment-ok?status=A
      [error_url] => https://nordeaconnect.com/payment-error
      [stored_card] =>
        [customer] =>
        [subscription] =>
        [refunds] => Array
      (
      )
      
      [webhooks] => Array
      (
      )
      
      )
EXAMPLE REQUEST
      
      curl --user 3:password https://api.nordeaconnect.com/v1/transactions/443
      
      EXAMPLE RESPONSE
      
      {
        "amount" : "480.0",
        "card_holder" : "Anna Andersson",
        "card_number" : "*****************1111",
        "card_type" : "VISA",
        "cost" : { "fixed_fee" : 0,
          "percentual_exchange_fee" : 0,
          "percentual_fee" : 0,
          "total" : "0.0"
        },
        "created_at" : "2018-12-17T13:41:07Z",
        "currency" : "SEK",
        "customer" : null,
        "error" : null,
        "error_url" : "https://nordeaconnect.com/payment-error",
        "id" : 443,
        "merchant_id" : 3,
        "metadata" : {
          "products" : [ "awesomeness","coolness"],
          "user" : { "email" : "justmyemail@nordeaconnect.com"}
        },
        "payment_ref" : null,
        "ref" : null,
        "refunds" : [  ],
        "status" : "approved",
        "stored_card" : null,
        "subscription" : null,
        "success_url" : "https://nordeaconnect.com/payment-ok?status=A",
        "template_id" : 10,
        "test" : false,
        "transaction_type" : null,
        "webhooks" : [  ]
      }

List Transactions

To list transactions you need to do a GET to https://api.nordeaconnect.com/v1/transactions that will return a list of your transactions. The default limit is 10.

To get transactions for a specific customer: GET to: https://api.nordeaconnect.com/v1/customers/3/transactions

To get transactions for a specific subscription: GET to: https://api.nordeaconnect.com/v1/subscription/3/transactions

Transactions support filters on: amount, card_holder, card_number, card_type, created_at, currency, customer_id, error_url, href_token, id, payment_ref, status, stored_card_id, subscription_id, success_url, template_id, test, transaction_type and updated_at.

EXAMPLE REQUEST
      
      curl -X GET --user 3:custom00 'https://api.nordeaconnect.com/v1/transactions?limit=2&offset=1'
      
      EXAMPLE RESPONSE
      
      [
        {
          "amount" : "1.0",
          "card_holder" : "Anna Andersson",
          "card_number" : "411111******1111",
          "card_type" : "VISA",
          "cost" : {
            "fixed_fee" : "2.5",
            "percentual_exchange_fee" : "0.035",
            "percentual_fee" : "0.025",
            "total" : "2.56"
          },
          "created_at" : "2018-07-22T16:42:10Z",
          "currency" : "eur",
          "customer" : null,
          "error" : null,
          "error_url" : null,
          "id" : 6643,
          "merchant_id" : 3,
          "metadata" : {
            "products" : [ {
              "id" : "1",
              "name" : "Nice Shoe",
              "price" : "1.00",
              "qty" : "1",
              "url" : "http://mysite.com/product/1"
            } ],
            "user" : { "email" : "jd@email.com" }
          },
          "payment_ref" : "1785",
          "ref" : null,
          "refunds" : [  ],
          "status" : "approved",
          "stored_card" : null,
          "subscription" : null,
          "success_url" : null,
          "template_id" : null,
          "test" : true,
          "transaction_type" : "credit_card",
          "webhooks" : [ {
            "created_at" : "2018-07-22T16:42:10Z",
            "data_format" : null,
            "email" : "info@nordeaconnect.com",
            "http_method" : null,
            "id" : 18031,
            "response" : null,
            "trigger" : "payment",
            "type" : "Email",
            "url" : null
          } ]
        },
        {...}
      ]
# EXAMPLE REQUEST
      
      transactions = NordeaConnect::CreditCard::Transaction.all(limit: 2, offset: 4)
      
      
      # EXAMPLE RESPONSE
      
      [
        [{"title"=>"T-shirt"}, {"title"=>"Shoes"}]},
          @currency="sek",
          @status="approved",
          @card_type="VISA",
          @transaction_type="credit_card",
          @cost={"percentual_fee"=>"0.025", "fixed_fee"=>"2.5", "percentual_exchange_fee"=>"0.035", "total"=>"46.0"},
          @stored_card=nil,
          @customer={"id"=>3052},
          @subscription=nil>,
        [{"title"=>"T-shirt"}, {"title"=>"Shoes"}]},
          @currency="sek",
          @status="approved",
          @card_type="VISA",
          @transaction_type="credit_card",
          @cost={"percentual_fee"=>"0.025", "fixed_fee"=>"2.5", "percentual_exchange_fee"=>"0.035", "total"=>"46.0"},
          @stored_card=nil,
          @customer={"id"=>3052},
          @subscription=nil>
      ]
      
EXAMPLE REQUEST
      
      $transaction = nordeaconnect\api\transaction::index(10,0);
      
      EXAMPLE RESPONSE
      
      Array
      (
        [0] => Array
        (
          [id] => 7541
          [created_at] => 2018-08-04T19:54:43Z
          [merchant_id] => 3
          [amount] => 10.0
          [payment_ref] => 56203
          [ref] =>
          [card_holder] => php sdk
          [card_number] => 411111******1111
          [test] => 1
          [metadata] =>
          [currency] => eur
          [status] => approved
          [card_type] => VISA
          [transaction_type] => credit_card
          [template_id] =>
          [error] =>
          [cost] => Array
          (
            [percentual_fee] => 0.025
            [fixed_fee] => 2.5
            [percentual_exchange_fee] => 0.035
            [total] => 3.1
          )
      
          [success_url] =>
          [error_url] =>
          [stored_card] =>
          [customer] =>
          [subscription] =>
          [refunds] => Array
          (
          )
      
          [webhooks] => Array
          (
          )
        )
      )
      ...
EXAMPLE REQUEST
      
      var transactions = Transaction.List(3,0);
      
      EXAMPLE RESPONSE
      
      [
        {
          "amount" : "10.00",
          "card_cvv" : "200",
          "card_holder" : ".net sdk",
          "card_number" : "411111******1111",
          "card_type" : "VISA",
          "cost" : {
            "fixed_fee" : "2.5",
            "percentual_exchange_fee" : "0.035",
            "percentual_fee" : "0.025",
            "total" : "2.8"
          },
          "created_at" : "2018-08-06T17:39:47.2978516Z",
          "currency" : "eur",
          "customer" : null,
          "encrypted" : null,
          "error" : null,
          "error_url" : null,
          "id" : 1,
          "merchant_id" : 0,
          "metadata" : null,
          "payment_ref" : "123",
          "payment_request" : null,
          "refund" : null,
          "status" : "complete",
          "stored_card" : null,
          "subscription" : null,
          "success_url" : null,
          "template_id" : 1,
          "test" : true,
          "transcation_type" : null,
          "webhooks" : null
        }...
      ]

Create Transaction

To create a transaction you need to do a POST to https://api.nordeaconnect.com/v1/transactions that will return a the newly created transaction in the same way as doing a GET.

Each param can be encrypted with the public RSA key for better security and lower PCI DSS requirements for the Merchant. The parameter “encrypted” must also be sent and contain the names of the encrypted parameters such as “card_number,card_cvv,card_holder,card_expiry,card_type”. You would also need to base64 encode the string both before and after encryption, i.e. base64_encode( encrypt( base64_encode( actual_value ) ) ).

For transactions with a stored card, the value “card_number” must be the token that the Merchant got in the store-response and the “card_type” must be “STORED_CARD”. So instead of a card number use the token and instead of “VISA” use “STORED_CARD”.

The parameters you can send to create a transaction:

merchant_idstring *required The ID of the Merchant
amountdecimal *required The transaction amount ex. 12.00
vat_amountdecimalThe vat amount for the transaction ex. 3.00
payment_refstring *required Merchant order/payment ID
card_holderstringThe name on the charged credit card. Not required if process = false.
card_cvvstringCVV code. Not required if process = false.
card_expirystringExpiration date of the credit card in the format MMYY. Not required if process = false.
card_numberstringThe card number. Not required if process = false.
testbooleanWhether the transaction is a test transaction. Defaults false
metadataobjectMerchant custom Metadata
currencystring *required The currency (SEK, CAD, CNY, COP, CZK, DKK, HKD, HUF, ISK, INR, ILS, JPY, KES, KRW, KWD, LVL, MYR, MXN, MAD, OMR, NZD, NOK, PAB, QAR, RUB, SAR, SGD, ZAR, CHF, THB, TTD, AED, GBP, USD, TWD, VEF, RON, TRY, EUR, UAH, PLN, BRL)
card_typestringVISA, MASTERCARD, STORED_CARD (if the transaction is done using a stored card), etc
store_cardbooleantrue/false if you want to store the card
plan_idintThe ID of the subscription plan.
start_datedateThe first date of a new subscription. Ex: 2020-01-01 (YYYY-MM-DD)
customer_refstringThe Merchant specific user/customer ID
hash

string *required The hash is a MD5 encoded string with some of your Merchant and order specific parameters, which is used to verify the payment, and make sure that it is not altered in any way.

The Hash string usually includes: merchant_id,payment_ref,customer_ref,amount,currency,test,secret, and might vary depending on your settings.

Note that you will need to view your Merchant specific hash settings in the Admin console.

  • Your secret is found in the admin console.
  • The customer_ref is only needed if you are providing a customer_ref parameter.
  • The currency must be in all lowercase
  • If applicable, use UTF8 as encoding
webhookobjectYou can specify a custom Webhook for a transaction. For example sending e-mail or POST to your backend.
encryptedstringA comma separated string containing the params you have encrypted. Ex: “card_number,card_holder,card_cvv”
processbooleanShould be false if you want to process the payment at a later stage. You will not need to send in card data (card_number, card_cvv, card_holder, card_expiry) in this case.
success_urlstring *required A URL to the page where the user is redirected after a successful transaction.
template_idint Hosted Page template ID
error_urlstring *required A URL to the page where the user is redirected after a unsuccessful transaction.
authorizebooleanauthorize = true, means that the transaction should be reserved (Authorized).
ItemsArray of items objectsitems
payment_detailsobjectpayment_details
payment_methodstringCan be any of the following: credit_card, recurring, stored, invoice, swish, paypal, bank

Important when storing a card/subscribing to a plan

In some cases the card can not be stored, but we will still try to charge it. This means that the transaction might be successful even though the card can not be stored.

Always check the response to see if there is a stored_card (or subscription), which will be missing if the card could not be stored.

EXAMPLE REQUEST
      
      curl -X POST --data "card_number=4111111111111111&card_expiry=0116&card_holder=name%20name&card_type=VISA&amount=5.00&payment_ref=53dfaa67&card_cvv=200&currency=sek&hash=6bd88f621553edcf0c553f91bf6fb797&test=true" --user 3:password 'https://api.nordeaconnect.com/v1/transactions'
      
      
      EXAMPLE RESPONSE
      
      {
        "amount" : "5.0",
        "vat_amount": "0.2",
        "card_holder" : "name name",
        "card_number" : "411111******1111",
        "card_type" : "VISA",
        "cost" : {
          "fixed_fee" : "2.5",
          "percentual_exchange_fee" : "0.035",
          "percentual_fee" : "0.025",
          "total" : "2.8"
        },
        "authorize": false,
        "href": "https://pay.nordeaconnect.com/v1/form/Av6lK7OItURlSvYZ6pQ",
        "created_at" : "2018-08-04T15:45:11Z",
        "currency" : "sek",
        "customer" : null,
        "error" : null,
        "success_url": "https://admin.nordeaconnect.com/payment-ok",
        "error_url": "https://admin.nordeaconnect.com/payment-error",
        "id" : 7510,
        "merchant_id" : 3,
        "metadata" : null,
        "payment_ref" : "53dfaa67",
        "ref" : null,
        "refunds" : [  ],
        "status" : "approved",
        "stored_card" : null,
        "subscription" : null,
        "success_url" : null,
        "template_id" : 123,
        "test" : true,
        "transaction_type" : "credit_card",
        "webhooks" : [],
        "items": [],
        "client_info": {
          "raw_user_agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36",
          "browser": "Chrome",
          "version": "60.0.3112.113",
          "platform": "Macintosh",
          "ip": "59.21.2.160",
          "accept_language": "en-GB,en;q=0.8,en-US;q=0.6,sv;q=0.4"
        },
        "response_hash": "6b5f0b8687dbbc25ff1e579ac10a0d48",
        "request_hash": "f42e350aca7a37600973b2b3143e2917",
        "payment_details": {
          "id": 1,
          "card_number": "411111******1111",
          "card_holder": "name name",
          "card_type": "MASTERCARD",
          "customer_number": null,
          "personal_number": null,
          "first_name": null,
          "last_name": null,
          "zip": null,
          "country_code": null,
          "country": null,
          "address": null,
          "city": null,
          "bank_name": null,
          "bank_acc_lastdigits": null,
          "phone": null,
          "ssn": null,
          "card_issuer": "WESTPAC BANKING CORPORATION",
          "credit_or_debit": "debit",
          "card_country_code": "AU",
          "campaign": null,
          "segmentation": "b2c",
          "address_1": null,
          "address_2": null,
          "swish_number": null,
          "email": null
        }
      }
# EXAMPLE REQUEST
      
      attributes = {
        amount: '725.00',
        currency: 'sek',
        payment_ref: 'order-1146',
        card_holder: 'Test User',
        card_number: '4111 1111 1111 1111',
        card_expiry: '1016',
        card_cvv: '200',
        card_type: 'VISA',
        customer_ref: 'user_25',
        metadata: {
          products: [
            {title: 'T-shirt'},
            {title: 'Shoes'}
          ]i
        }
      }
      
      transaction = NordeaConnect::CreditCard::Transaction.create(attributes)
      
      # EXAMPLE RESPONSE
      
      [{"title"=>"T-shirt"}, {"title"=>"Shoes"}]},
        @validation_context=nil,
        @hash="7234484a4ca9ea19f594b7fda7268562",
        @id=8176,
        @created_at="2018-08-07T13:38:37Z",
        @merchant_id=10,
        @test=false,
        @status="approved",
        @transaction_type="credit_card",
        @cost={"percentual_fee"=>"0.025", "fixed_fee"=>"2.5", "percentual_exchange_fee"=>"0.035", "total"=>"46.0"},
        @stored_card=nil,
        @customer={"id"=>3052},
        @subscription=ni>l
      
EXAMPLE REQUEST
      
      $payment = array(
        "card_number" => "4111111111111111",
        "card_holder" => "php sdk",
        "card_expiry" => "0116",
        "card_cvv" => "200",
        "card_type" => "VISA",
        "amount" => "10.00",
        "payment_ref" => $ref,
        "currency" => "eur",
        "test" => "true",
        "hash" => md5(configuration::$app_settings['username'].$ref."10.00".configuration::$app_settings['secret'])
      );
      
      $transaction = nordeaconnect\api\transaction::create($payment);
      
      EXAMPLE RESPONSE
      
      Array
      (
        [id] => 7543
        [created_at] => 2018-08-04T20:02:32Z
        [merchant_id] => 3
        [amount] => 10.0
        [payment_ref] => 99485
        [ref] =>
        [card_holder] => php sdk
        [card_number] => 411111******1111
        [test] => 1
        [metadata] =>
        [currency] => eur
        [status] => approved
        [card_type] => VISA
        [transaction_type] => credit_card
        [template_id] =>
        [error] =>
        [cost] => Array
        (
          [percentual_fee] => 0.025
          [fixed_fee] => 2.5
          [percentual_exchange_fee] => 0.035
          [total] => 3.1
        )
      
        [success_url] =>
        [error_url] =>
        [stored_card] =>
        [customer] =>
        [subscription] =>
        [refunds] => Array
        (
        )
      
        [webhooks] => Array
        (
        )
      
      )
      
EXAMPLE REQUEST
      
      var payment_ref = DateTimeOffset.Now.Ticks.ToString();
      var postData = new List();
      var encryptedCard = "4111111111111111".RSAEncrypt();
      
      postData.Add(new KeyValuePair("amount", "10.00"));
      postData.Add(new KeyValuePair("payment_ref", payment_ref));
      postData.Add(new KeyValuePair("card_expiry", "0116"));
      postData.Add(new KeyValuePair("card_holder", ".net sdk"));
      postData.Add(new KeyValuePair("test", "true"));
      postData.Add(new KeyValuePair("card_cvv", "200"));
      postData.Add(new KeyValuePair("card_number", encryptedCard));
      postData.Add(new KeyValuePair("card_type", "VISA"));
      postData.Add(new KeyValuePair("currency", "sek"));
      postData.Add(new KeyValuePair("locale", "en"));
      postData.Add(new KeyValuePair("hash", (Settings.ApiUsername + payment_ref + "10.00" + "sek" + Settings.ApiSecret).ToMD5()));
      postData.Add(new KeyValuePair("encrypted", "card_number"));
      
      var transaction = Transaction.Create(postData);
      
      EXAMPLE RESPONSE
      
      {
        "amount" : "10.00",
        "card_cvv" : "200",
        "card_holder" : ".net sdk",
        "card_number" : "411111******1111",
        "card_type" : "VISA",
        "cost" : {
          "fixed_fee" : "2.5",
          "percentual_exchange_fee" : "0.035",
          "percentual_fee" : "0.025",
          "total" : "2.8"
        },
        "created_at" : "2018-08-06T17:41:50.8261719Z",
        "currency" : "sek",
        "customer" : null,
        "encrypted" : "card_number",
        "error" : null,
        "error_url" : null,
        "id" : 1,
        "merchant_id" : 3,
        "metadata" : null,
        "payment_ref" : "635429509106230469",
        "payment_request" : null,
        "refund" : null,
        "status" : "complete",
        "stored_card" : null,
        "subscription" : null,
        "success_url" : null,
        "template_id" : 1,
        "test" : true,
        "transcation_type" : null,
        "webhooks" : null
      }

Create a Transaction with a stored card

In a Stored Card payment you need to have the token as card_number and STORED_CARD as card_type. The response will have a Stored Card object with the ID of the card used.

EXAMPLE REQUEST
      
      curl -X POST --data "card_number=31407340575815445&card_type=STORED_CARD&amount=5.00&payment_ref=53e479ea&card_cvv=000&currency=sek&hash=e914a186f79333a9f4166b17c6dc791d&test=true" --user 3:password 'https://api.nordeaconnect.com/v1/transactions'
      
      EXAMPLE RESPONSE
      
      {
        "amount" : "5.0",
        "card_holder" : "635429445753750000",
        "card_number" : "411111******1111",
        "card_type" : "VISA",
        "cost" : {
          "fixed_fee" : "2.5",
          "percentual_exchange_fee" : "0.035",
          "percentual_fee" : "0.025",
          "total" : "2.8"
        },
        "created_at" : "2018-08-08T07:20:01Z",
        "currency" : "sek",
        "customer" : { "id" : 3026 },
        "error" : null,
        "error_url" : null,
        "id" : 8237,
        "merchant_id" : 3,
        "metadata" : null,
        "payment_ref" : "53e479ea",
        "ref" : null,
        "refunds" : [  ],
        "status" : "approved",
        "stored_card" : { "id" : 1055 },
        "subscription" : null,
        "success_url" : null,
        "template_id" : null,
        "test" : true,
        "transaction_type" : "stored_card",
        "webhooks" : [  ]
      }
file to be uploaded
EXAMPLE REQUEST
      
      $payment = array(
      "card_number" => "31407340575815445",
      "card_cvv" => "000",
      "card_type" => "STORED_CARD",
      "amount" => "10.00",
      "payment_ref" => "123",
      "currency" => "eur",
      "test" => "true",
      "hash" => md5(configuration::$app_settings['username'].$ref."10.00".configuration::$app_settings['secret'])
      );
      
      $transaction = nordeaconnect\api\transaction::create($payment);
      
      EXAMPLE RESPONSE
      
      Array
      (
        [id] => 7543
        [created_at] => 2018-08-04T20:02:32Z
        [merchant_id] => 3
        [amount] => 10.0
        [payment_ref] => 99485
        [ref] =>
        [card_holder] => php sdk
        [card_number] => 411111******1111
        [test] => 1
        [metadata] =>
        [currency] => eur
        [status] => approved
        [card_type] => VISA
        [transaction_type] => credit_card
        [template_id] =>
        [error] =>
        [cost] => Array
        (
          [percentual_fee] => 0.025
          [fixed_fee] => 2.5
          [percentual_exchange_fee] => 0.035
          [total] => 3.1
        )
      
        [success_url] =>
        [error_url] =>
        [stored_card] =>
        (
          [id] => 1055
        )
        [customer] =>
        [subscription] =>
        [refunds] => Array
        (
        )
      
        [webhooks] => Array
        (
        )
      
      )
      
EXAMPLE REQUEST
      
      var payment_ref = DateTimeOffset.Now.Ticks.ToString();
      var postData = new List();
      
      postData.Add(new KeyValuePair("amount", "10.00"));
      postData.Add(new KeyValuePair("payment_ref", payment_ref));
      postData.Add(new KeyValuePair("test", "true"));
      postData.Add(new KeyValuePair("card_cvv", "000"));
      postData.Add(new KeyValuePair("card_number", "31407340575815445"));
      postData.Add(new KeyValuePair("card_type", "STORED_CARD"));
      postData.Add(new KeyValuePair("currency", "sek"));
      postData.Add(new KeyValuePair("locale", "en"));
      postData.Add(new KeyValuePair("hash", (Settings.ApiUsername + payment_ref + "10.00" + "sek" + Settings.ApiSecret).ToMD5()));
      
      var transaction = Transaction.Create(postData);
      
      EXAMPLE RESPONSE
      
      {
        "amount" : "5.0",
        "card_holder" : "635429445753750000",
        "card_number" : "411111******1111",
        "card_type" : "VISA",
        "cost" : {
          "fixed_fee" : "2.5",
          "percentual_exchange_fee" : "0.035",
          "percentual_fee" : "0.025",
          "total" : "2.8"
        },
        "created_at" : "2018-08-08T07:20:01Z",
        "currency" : "sek",
        "customer" : { "id" : 3026 },
        "error" : null,
        "error_url" : null,
        "id" : 8237,
        "merchant_id" : 3,
        "metadata" : null,
        "payment_ref" : "53e479ea",
        "ref" : null,
        "refunds" : [  ],
        "status" : "approved",
        "stored_card" : { "id" : 1055 },
        "subscription" : null,
        "success_url" : null,
        "template_id" : null,
        "test" : true,
        "transaction_type" : "stored_card",
        "webhooks" : [  ]
      }

Update Transaction

To update a transaction with card details using the API, you need to PUT data to https://api.nordeaconnect.com/v1/transactions/1

You can update a transaction when it has previously been created and is not in approved status. For example, you can create a transaction and send in process = false to prepare but not process the actual payment. The next step would be to either pass the href link to the customer to proceed the payment in a payment window, or to make an API payment using this update call.

The parameters you can send to update a transaction:

card_holderstringThe name on the charged credit card
card_numberstringA card number ex. 41111111111111
card_cvvstringCVV code
card_expirystringExpiration date of the credit card in the format MMYY
currencystringThe currency (SEK, CAD, CNY, COP, CZK, DKK, HKD, HUF, ISK, INR, ILS, JPY, KES, KRW, KWD, LVL, MYR, MXN, MAD, OMR, NZD, NOK, PAB, QAR, RUB, SAR, SGD, ZAR, CHF, THB, TTD, AED, GBP, USD, TWD, VEF, RON, TRY, EUR, UAH, PLN, BRL)
card_typestringVISA, MASTERCARD, STORED_CARD (if the transaction is done using a stored card), etc
encryptedstringA comma separated string for the params that you send encrypted. Ex. “card_number,card_cvv”
itemsArray of items objectsitems
metadataobjectMetadata
amountdecimalThe transaction amount ex. 12.00
vat_amountdecimalThe VAT amount for the transaction ex. 3.00
customer_refstringThe Merchant specific user/customer ID
processbooleanShould be false if you want to process the payment at a later stage. You will not need to send in card data (card_number, card_cvv, card_holder, card_expiry) in this case.

You can update the Metadata property of an already processed transaction by passing metadata and process = false.

The submitted data will be merged with existing Metadata for that transaction.

By sending, for example: {"shop_order": {"id": "123123"}} as Metadata to the update method, you can connect your internal shop order ID to the Nordea Connect admin view.

Capture Transaction

To capture an previously authorized transaction, you need to PUT data to https://api.nordeaconnect.com/v1/transactions/1/capture

You can capture a transaction when it has previously been authorized. Authorization is achieved by passing authorize = true when creating a transaction using the API, Payment Window or NordeaConnect.js

The params you can send to capture an authorized transaction:

amountdecimal *required The transaction amount ex. 12.00. Can be lower that the authorized original amount.

Stored Card

To store a card though the API (also called tokenization) you need to POST data to https://api.nordeaconnect.com/v1/stored_card. When a card is stored you can use the provided token and make a token based transaction for that stored card. Token based payments use the token as card number and “STORED_CARD” instead of card type (ex. VISA).

idintThe ID of the stored card
created_atdatetimeCreated date (UTC)
tokenstringThe unique ID that can be used to make transactions
card_numberstringThe masked version of the credit card number.
currencystringThe currency code
expiresdatetimeEx. 2018-05-31T23:59:59Z (UTC)
merchant_idintThe Merchant ID
customerobjectCustomer that owns the stored card

Show Stored Card

By doing a GET request to https://api.nordeaconnect.com/v1/stored_cards/1 you will get the stored card with ID 1.

EXAMPLE REQUEST
      
      curl --user 3:password https://api.nordeaconnect.com/v1/stored_cards/954
      
      EXAMPLE RESPONSE
      
      {
        "card_holder" : "name name",
        "card_number" : "411111******1111",
        "created_at" : "2018-08-04T17:23:05Z",
        "currency" : "SEK",
        "customer" : { "id" : 2923 },
        "expires" : "2018-01-31T23:59:59Z",
        "id" : 954,
        "merchant_id" : 3,
        "ref" : null,
        "status" : "active",
        "test" : true,
        "token" : "31407172985450590"
      }
# EXAMPLE REQUEST
      
      stored_card = NordeaConnect::CreditCard::StoredCard.get(1076)
      
      # RESPONSE EXAMPLE
      
      3073}>
      
EXAMPLE REQUEST
      
      $stored_card = nordeaconnect\api\stored_card::get(1);
      
      EXAMPLE RESPONSE
      
      Array
      (
        [id] => 1
        [created_at] => 2018-08-05T08:17:50Z
        [token] => 31407226670131682
        [card_holder] => php sdk
        [card_number] => 411111******1111
        [status] => active
        [currency] => EUR
        [expires] => 2018-01-31T23:59:59Z
        [ref] =>
        [merchant_id] => 3
        [test] => 1
        [customer] => Array
        (
          [id] => 2947
        )
      
      )
      
      
      
EXAMPLE REQUEST
      
      var res = StoredCard.Get(1);
      
      EXAMPLE RESPONSE
      
      {
        "card_cvv" : "200",
        "card_holder" : ".net sdk",
        "card_number" : "411111******1111",
        "card_type" : "VISA",
        "created_at" : "2018-08-06T17:45:53.1767579Z",
        "currency" : "eur",
        "customer" : null,
        "customer_id" : 0,
        "customer_ref" : null,
        "encrypted" : null,
        "expires" : "0001-01-01T00:00:00",
        "id" : 1,
        "merchant_id" : 0,
        "status" : "complete",
        "test" : true,
        "token" : "esuyrh9c467bconwenc"
      }

List Stored Cards

By doing a GET request to https://api.nordeaconnect.com/v1/stored_cards you will get all stored cards for a Merchant.

You can also get the stored cards for a specific customer by doing a GET to: https://api.nordeaconnect.com/v1/customers/3/stored_cards

Stored cards support filters on: card_holder, card_number, card_type, created_at, currency, customer_id, expires, id, status, test, token and updated_at.

EXAMPLE REQUEST
      
      #All cards for a Merchant:
      curl --user 3:password https://api.nordeaconnect.com/v1/stored_cards
      
      #All cards for a customer:
      curl --user 3:password https://api.nordeaconnect.com/v1/customers/2923/stored_cards
      
      EXAMPLE RESPONSE
      
      [
        {
          "card_holder" : "name name",
          "card_number" : "411111******1111",
          "created_at" : "2018-08-04T17:23:05Z",
          "currency" : "SEK",
          "customer" : { "id" : 2923 },
          "expires" : "2018-01-31T23:59:59Z",
          "id" : 954,
          "merchant_id" : 3,
          "ref" : null,
          "status" : "active",
          "test" : true,
          "token" : "31407172985450590"
        }
      ]
      
# REQUEST EXAMPLE
      
      stored_cards = NordeaConnect::CreditCard::StoredCard.all(limit: 2, offset: 4)
      
      # RESPONSE EXAMPLE
      
      [
        2513}>,
        2203}>
      ]
      
EXAMPLE REQUEST
      
      $stored_cards = nordeaconnect\api\stored_card::index(2,0);
      
      EXAMPLE RESPONSE
      
      Array
      (
        [0] => Array
        (
        [id] => 974
        [created_at] => 2018-08-05T08:17:50Z
        [token] => 31407226670131682
        [card_holder] => php sdk
        [card_number] => 411111******1111
        [status] => active
        [currency] => EUR
        [expires] => 2018-01-31T23:59:59Z
        [ref] =>
        [merchant_id] => 3
        [test] => 1
        [customer] => Array
        (
          [id] => 2947
        )
      
      )
      
      [1] => Array
      (
      ...
EXAMPLE REQUEST
      
      var res = StoredCard.List(3,0);
      
      EXAMPLE RESPONSE
      
      [
        {
          "card_cvv" : "200",
          "card_holder" : ".net sdk",
          "card_number" : "411111******1111",
          "card_type" : "VISA",
          "created_at" : "2018-08-06T17:49:46.5722657Z",
          "currency" : "eur",
          "customer" : null,
          "customer_id" : 0,
          "customer_ref" : null,
          "encrypted" : null,
          "expires" : "0001-01-01T00:00:00",
          "id" : 1,
          "merchant_id" : 0,
          "status" : "complete",
          "test" : true,
          "token" : "ksfyw8h467c957"
        }...
      ]

Create Stored Card

By doing a POST request to https://api.nordeaconnect.com/v1/stored_cards you can store the card information and receive a token for future transactions.

Parameters to send:

card_numberstring *required The masked version of the credit card number.
card_holderstring *required The name on the charged credit card
card_cvvstring *required CVV code
card_expirystring *required Expiration date of the credit card in the format MMYY
currencystring *required The currency (SEK, CAD, CNY, COP, CZK, DKK, HKD, HUF, ISK, INR, ILS, JPY, KES, KRW, KWD, LVL, MYR, MXN, MAD, OMR, NZD, NOK, PAB, QAR, RUB, SAR, SGD, ZAR, CHF, THB, TTD, AED, GBP, USD, TWD, VEF, RON, TRY, EUR, UAH, PLN, BRL)
card_typestring *required VISA, MASTERCARD, STORED_CARD (if the transaction is done using a stored card), etc
customer_refstringMerchant specific customer ID. If this customer exists the card will be added to that customer. If it doesn’t exists a customer will be created.
customer_idintNordea Connect specific customer ID. If this customer exists the card will be added to that customer. If it doesn’t exists an error will occur.
encryptedstringA comma separated string for the params that you send encrypted. Ex. “card_number,card_cvv”
testboolMust be true if you are using a test card number.

To store card though the API you need to POST data to https://api.nordeaconnect.com/v1/stored_card. When a card is stored you can use the provided token and make a token based transaction for that stored card. Token based payments use the token as the card number and “STORED_CARD” instead of card type (ex. VISA).

EXAMPLE REQUEST
      
      curl -X POST --data "card_number=4111111111111111&card_expiry=0116&card_holder=name%20name&card_type=VISA&card_cvv=200&currency=sek&test=true" --user 3:password 'https://api.nordeaconnect.com/v1/stored_cards'
      
      EXAMPLE RESPONSE
      
      {
        "card_holder" : "name name",
        "card_number" : "411111******1111",
        "created_at" : "2018-08-04T17:23:05Z",
        "currency" : "SEK",
        "customer" : { "id" : 2923 },
        "expires" : "2018-01-31T23:59:59Z",
        "id" : 954,
        "merchant_id" : 3,
        "ref" : null,
        "status" : "active",
        "test" : true,
        "token" : "31407172985450590"
      }
      
# EXAMPLE REQUEST
      
      attributes = {
        card_holder: 'Jane Doe',
        card_type: 'VISA',
        card_number: '4111 1111 1111 1111',
        card_cvv: '200',
        card_expiry: '0916',
        currency: 'SEK'
      }
      
      stored_card = NordeaConnect::CreditCard::StoredCard.create(attributes)
      
      # EXAMPLE RESPONSE
      
      
      3073}>
      
EXAMPLE REQUEST
      
      $data = array(
        "card_number" => "4111111111111111",
        "card_holder" => "php sdk",
        "card_expiry" => "0116",
        "card_cvv" => "200",
        "card_type" => "VISA",
        "currency" => "eur",
        "test" => "true"
      );
      
      $res = nordeaconnect\api\stored_card::create($data);
      
      EXAMPLE RESPONSE
      
      Array
      (
        [id] => 975
        [created_at] => 2018-08-05T08:17:53Z
        [token] => 31407226673424954
        [card_holder] => 99221
        [card_number] => 411111******1111
        [status] => active
        [currency] => EUR
        [expires] => 2018-01-31T23:59:59Z
        [ref] =>
        [merchant_id] => 3
        [test] => 1
        [customer] => Array
        (
          [id] => 2948
        )
      
      )
EXAMPLE REQUEST
      
      var refdata = DateTimeOffset.Now.Ticks.ToString();
      var postData = new List();
      var encryptedCard = "4111111111111111".RSAEncrypt();
      
      postData.Add(new KeyValuePair("card_expiry", "0116"));
      postData.Add(new KeyValuePair("card_holder", refdata));
      postData.Add(new KeyValuePair("test", "true"));
      postData.Add(new KeyValuePair("card_cvv", "200"));
      postData.Add(new KeyValuePair("card_number", encryptedCard));
      postData.Add(new KeyValuePair("card_type", "VISA"));
      postData.Add(new KeyValuePair("currency", "sek"));
      postData.Add(new KeyValuePair("locale", "en"));
      postData.Add(new KeyValuePair("encrypted", "card_number"));
      
      var res = StoredCard.Create(postData);
      
      
      EXAMPLE RESPONSE
      
      {
        "card_cvv" : "200",
        "card_holder" : "635429515090009766",
        "card_number" : "411111******1111",
        "card_type" : "VISA",
        "created_at" : "2018-08-06T17:51:49.209961Z",
        "currency" : "eur",
        "customer" : null,
        "customer_id" : 0,
        "customer_ref" : null,
        "encrypted" : null,
        "expires" : "0001-01-01T00:00:00",
        "id" : 1,
        "merchant_id" : 0,
        "status" : "complete",
        "test" : true,
        "token" : "dkjsf7w6824yfwh97"
      }

Update Stored Card

By doing a PUT request to https://api.nordeaconnect.com/v1/stored_cards/1 you can update the card information.

Parameters to send:

statusstring *required active/inactive/deleted

Delete Stored Card

To delete a stored card, you need to do a DELETE request to a specific stored card using this URL https://api.nordeaconnect.com/v1/stored_cards/954

EXAMPLE REQUEST
      
      curl -X DELETE --user 3:password https://api.nordeaconnect.com/v1/stored_cards/954
      
      EXAMPLE RESPONSE
      
      {
        "card_holder" : "name name",
        "card_number" : "411111******1111",
        "created_at" : "2018-08-04T17:23:05Z",
        "currency" : "SEK",
        "customer" : { "id" : 2923 },
        "expires" : "2018-01-31T23:59:59Z",
        "id" : 954,
        "merchant_id" : 3,
        "ref" : null,
        "status" : "deleted",
        "test" : true,
        "token" : "31407172985450590"
      }
file to be uploaded
EXAMPLE REQUEST
      
      $res = nordeaconnect\api\stored_card::delete(976);
      
      EXAMPLE RESPONSE
      
      Array
      (
        [id] => 976
        [created_at] => 2018-08-05T08:26:38Z
        [token] => 31407227198478378
        [card_holder] => php sdk
        [card_number] => 411111******1111
        [status] => deleted
        [currency] => EUR
        [expires] => 2018-01-31T23:59:59Z
        [ref] =>
        [merchant_id] => 3
        [test] => 1
        [customer] => Array
        (
          [id] => 2949
        )
      
      )
EXAMPLE REQUEST
      
      var res = StoredCard.Delete(1);
      
      EXAMPLE RESPONSE
      
      {
        "card_cvv" : "200",
        "card_holder" : ".net sdk",
        "card_number" : "411111******1111",
        "card_type" : "VISA",
        "created_at" : "2018-08-06T17:54:31.381836Z",
        "currency" : "eur",
        "customer" : null,
        "customer_id" : 0,
        "customer_ref" : null,
        "encrypted" : null,
        "expires" : "0001-01-01T00:00:00",
        "id" : 1,
        "merchant_id" : 0,
        "status" : "deleted",
        "test" : true,
        "token" : "dafklgjd0r98gd0ugjl"
      }

Plan

A subscription plan is a payment template for recurring payments that automatically will be executed in Nordea Connect.

idintPlan ID
created_atdatetimeEx. 2018-04-25T10:36:33Z (UTC)
interval_unitstringdays / months
periodsintHow many periods to run this plan. 0 = forever
setup_feesobjectStarts costs of a plan

{"eur":"0","sek":"0"}
intervalintHow often a interval unit should be executed. Ex. every 1 month.
pricesobjectPrice for each subscription transaction

{"eur":"10","sek":"100"}
statusstringactive,cancelled
namestringName of plan
descriptionstringDescription of plan
trial_lengthintAmount of days before the first transaction. 0 = no trial.
merchant_idintId of Merchant account

The plans can be created and edited in the admin console.

Show Plan

To show a plan with ID 1 you need to GET the following url https://api.nordeaconnect.com/v1/plans/1

List Plans

To show a list of plans you need to GET the following url https://api.nordeaconnect.com/v1/plans

Plans support filters on: created_at, description, id, interval, interval_unit, name, periods, ref, status, trial_length and updated_at.

Create Plans

To create a plan you need to POST the following url https://api.nordeaconnect.com/v1/plans

Parameters to send:

interval_unitstring *required days / months
periodsintHow many periods to run this plan. 0 = forever
intervalint *required How often a interval unit should be executed. Ex. every 1 month.
pricesobject *required Price for each Merchant available currency as a JSON string

{"eur":"10","sek":"100"}
namestring *required Name of plan
descriptionstringDescription of plan
trial_lengthintAmount of days before the first transaction. 0 = no trial.

Subscription

Subscriptions are recurring payments connected to a Plan. They have information about customer, stored card and other data.

idintSubscription ID
created_atdatetimeEx. 2018-04-25T10:36:33Z (UTC)
debtdecimalAdditional purchases or discounts that should be added (or subtracted if negative) from the price of the subscription in the next charge.
interval_unitstringdays / months
periods_leftintNumber of transactions before subscription ends.
total_periodsintNumber of transactions in subscription.
intervalintHow often a interval unit should be executed. Ex. every 1 month.
pricedecimalPrice for each transaction
statusstringactive,cancelled
next_atdatetimeNext date and time for execution (UTC)
customerobjectCustomer that owns the subscription
planobjectThe plan connected to the subscription
stored_cardobjectThe stored card connected to the subscription
subscription_quantityintA number that says how many times the cost of the plan that should processed.
itemsarrayAn array of subscription unique items
retry_countintA number of failed transactions for the subscription. Ex. when a card has expired and cannot be processed.

Show Subscription

To show a subscription with ID 1 you need to GET the following url https://api.nordeaconnect.com/v1/subscriptions/1

List Subscription

To show a list of subscriptions you need to GET the following url https://api.nordeaconnect.com/v1/subscriptions

You can also get the subscriptions for a specific customer by doing a GET to: https://api.nordeaconnect.com/v1/customers/3/subscriptions

Create Subscription

To create a subscriptions you need to POST the following url https://api.nordeaconnect.com/v1/subscriptions

You need to send one of stored_card_id, customer_ref or customer_id in order to connect a card to the subscription.

Parameters to send:

plan_idstring *required The ID of the plan
start_datedateThe first date of a subscription
stored_card_idintID of stored card
customer_refstringMerchant specific customer ID. If this customer exists the card will be added to that customer. If it doesn’t exists a customer will be created.
customer_idintNordea Connect specific customer ID. If this customer exists the card will be added to that customer. If it doesn’t exists an error will occur.
subscription_quantityintA number that says how many times the cost of the plan that should processed. This could be used as a licence factor when the plan cost A amount and the customer want to subscribe to A * the number of licenses (the multiplier) for each period.
metadataobjectYour own custom data in JSON format
itemsarrayAn array of subscription unique items

Update Subscription

To update a subscriptions with ID 1 you need to PUT the following url https://api.nordeaconnect.com/v1/subscriptions/1.

Parameters to send:

debtdecimalAdditional purchases or discounts that should be added (or subtracted if negative) from the price of the subscription in the next charge.
plan_idstringThe ID of the plan. You can move a subscription between plans.
statusstringactive for making this subscription active, or cancelled to make it passive and non active.
subscription_quantityintA number that says how many times the cost of the plan that should processed. This could be used as a licence factor when the plan cost A amount and the customer want to subscribe to A * the number of licenses (the multiplier) for each period.
metadataobjectYour own custom data in JSON format
stored_card_idintThe id for a previously stored card. Update this to change the underlying card for a subscription
itemsobjectAn array of subscription unique items

Customer

A customer is an object that represents an owner of a transaction, stored card or subscription.

created_atdatetimeEx. 2018-04-25T10:20:48Z (UTC)
idintThe ID of the customer
refstringThe Merchant internal ID for the customer. If not specified upon creation, it will be generated by Nordea Connect.
metadataobjectCustom Metadata

Show Customer

To show a specific customer you need to GET to the url https://api.nordeaconnect.com/v1/customers/1.

List Customers

To list customers you need to GET to the url https://api.nordeaconnect.com/v1/customers.

Customers support filters on: created_at, id, ref and updated_at.

Create Customer

To create customers you need to POST to the url https://api.nordeaconnect.com/v1/customers.

Both ref and metadata are optional but highly recommended to be used. The ref will be created for you if you don’t specify it.

Parameters to send:

refstringThe Merchant internal ID for the customer. If not specified upon creation, it will be generated by Nordea Connect.
metadataobjectCustom Metadata

Update Customer

To update the metadata of a customer you need to PUT to the url https://api.nordeaconnect.com/v1/customers/1.

Parameters to send:

metadataobjectCustom Metadata

Refund

A refund object is connected to a transaction where parts or the whole payment have been returned to the card holder.

idintThe refund ID
created_atdatetimeEx. 2018-04-25T10:20:48Z (UTC)
amountdecimalThe refunded amount
reasonstringThe reason for refunding the card holder
transactionobjectThe connected transaction object

Show Refund

To show a refund you need to GET to the url https://api.nordeaconnect.com/v1/refunds/1.

EXAMPLE REQUEST
      
      curl --user 3:password https://api.nordeaconnect.com/v1/refunds/30
      
      EXAMPLE RESPONSE
      
      {
        "amount" : "171.5",
        "created_at" : "2018-05-21T09:32:40Z",
        "id" : 30,
        "reason" : "Cancelled order",
        "ref" : null,
        "transaction" : { "id" : 1571 }
      }
# REQUEST EXAMPLE
      
      refund = NordeaConnect::CreditCard::Refund.get(493)
      
      # RESPONSE EXAMPLE
      
      8176}>
      
      
EXAMPLE REQUEST
      
      $res = nordeaconnect\api\refund::get(1);
      
      EXAMPLE RESPONSE
      
      
EXAMPLE REQUEST
      
      var res = Refund.Get(1);
      
      EXAMPLE RESPONSE
      
      {
        "amount" : "10.00",
        "created_at" : "2018-08-06T17:58:02.8828125Z",
        "id" : 1,
        "reason" : "test refund",
        "transaction" : null,
        "transaction_id" : 1
      }

Create Refund

To create a refund you need to POST to the url https://api.nordeaconnect.com/v1/refunds.

Parameters to send:

transaction_idint *required ID for the transaction to refund
amountdecimal *required The amount to refund. Ex. 5.00
reasonstring *required The reason for the refund. Ex. “Cancelled order”
EXAMPLE REQUEST
      
      curl -X POST --data "transaction_id=7510&amount=5.00&reason=cancelled%20order" --user 3:password 'https://api.nordeaconnect.com/v1/refunds'
      
      EXAMPLE RESPONSE
      
      {
        "amount" : "5.0",
        "reason" : "test",
        "ref" : null,
        "id" : 49,
        "created_at" : "2018-08-04T18:04:21Z",
        "transaction" : {
          "id" : 7510
        }
      }
# REQUEST EXAMPLE
      
          attributes = {
            transaction_id: 8176,
            amount: '725.00',
            reason: 'Customer cancelled order'
          }
      
          refund = NordeaConnect::CreditCard::Refund.create(attributes)
      
      # RESPONSE EXAMPLE
      
      8176}>
      
      
EXAMPLE REQUEST
      
      $data = array(
        "transaction_id" => "1",
        "amount" => "10.00",
        "reason" => "wrong order"
      );
      
      $res = nordeaconnect\api\refund::create($data);
      
      EXAMPLE RESPONSE
EXAMPLE REQUEST
      
      var refdata = DateTimeOffset.Now.Ticks.ToString();
      var postData = new List();
      postData.Add(new KeyValuePair("transaction_id", "1"));
      postData.Add(new KeyValuePair("amount", "1.00"));
      postData.Add(new KeyValuePair("reason", refdata));
      postData.Add(new KeyValuePair("locale", "en"));
      
      var res = Refund.Create(postData);
      
      EXAMPLE RESPONSE
      
      {
        "amount" : "1.00",
        "created_at" : "2018-08-06T17:59:25.756836Z",
        "id" : 100,
        "reason" : "635429519656083985",
        "transaction" : null,
        "transaction_id" : 1
      }

Webhook Templates

A Webhook template is connected to a Merchant and will server as a reporting template for sending e-mails or HTTP requests connected to payments.

idintThe webhook template ID
created_atdatetimeEx. 2018-04-25T10:20:48Z (UTC)
urldecimalTarget URL for a HTTP webhook. Can contain Liquid.
triggerstringThe event triggering the webhook. Can be either of none payment payment_success payment_error refund payment_form subscription_started subscription_success subscription_error card_stored card_updated change_address webhook_exhausted
typestringThe type can be either of custom_http email receipt
merchant_idintThe Merchant id
emailstringThe destination e-mail if type is e-mail or receipt. Can contain Liquid.
http_methodstringPOST, GET, PATCH, PUT, when using custom HTTP webhook.
data_formatstringjson, xml or form_post, when using custom HTTP webhook.
bodystringHTML Contents of e-mail or payload of HTTP webhook (JSON, XML or Form post). Can contain Liquid.
custom_headersstringCan contain Liquid. Example:

              key=value
                    key2=value2
senderstringE-mail of the sending person. Can contain Liquid.

Show Webhook Template

To show a webhook template you need to GET to the url https://api.nordeaconnect.com/v1/webhook_templates/1.

List Webhook Template

To show a webhook template you need to GET to the url https://api.nordeaconnect.com/v1/webhook_templates.

Create Webhook Template

To create a webhook template you need to POST to the url https://api.nordeaconnect.com/v1/webhook_templates.

Parameters to send:

urldecimalTarget URL for a HTTP webhook. Can contain Liquid.
triggerstring *required The event triggering the webhook. Can be either of none payment payment_success payment_error refund payment_form subscription_started subscription_success subscription_error card_stored card_updated change_address webhook_exhausted
typestring *required The type can be either of custom_http email receipt
merchant_idint *required The Merchant id
emailstringThe destination e-mail if type is e-mail or receipt. Can contain Liquid.
http_methodstringPOST, GET, PATCH, PUT, when using custom HTTP webhook.
data_formatstringjson, xml or form_post, when using custom HTTP webhook.
bodystring *required HTML Contents of e-mail or payload of HTTP webhook (JSON, XML or Form post). Can contain Liquid.
custom_headersstringCan contain Liquid. Example:

key=value
      key2=value2
senderstringE-mail of the sending person. Can contain Liquid.

Update Webhook Template

To update a webhook template you need to PUT to the url https://api.nordeaconnect.com/v1/webhook_templates/1.

Parameters to send:

urldecimalTarget URL for a HTTP webhook. Can contain Liquid.
triggerstringThe event triggering the webhook. Can be either of none payment payment_success payment_error refund payment_form subscription_started subscription_success subscription_error card_stored card_updated change_address webhook_exhausted
typestringThe type can be either of custom_http email receipt
merchant_idintThe Merchant id
emailstringThe destination e-mail if type is e-mail or receipt. Can contain Liquid.
http_methodstringPOST, GET, PATCH, PUT, when using custom HTTP webhook.
data_formatstringjson, xml or form_post, when using custom HTTP webhook.
bodystring *required HTML Contents of e-mail or payload of HTTP webhook (JSON, XML or Form post). Can contain Liquid.
custom_headersstringCan contain Liquid. Example:

key=value
      key2=value2
senderstringE-mail of the sending person. Can contain Liquid.

Helpers

Some help requests that can help you with the implementation.

Snn lookup

Lookup a Social Security number (Personnummer) https://api.nordeaconnect.com/v1/helpers/ssn/lookup.

This request is recommended to use if you want to use payment_method invoice

Parameters to send:

ssnstring *required Social Security number (Personnummer). Ex: 192803104351
country_codestring *required Use ISO 3166-1 alpha-3 codes, ex: SWE.
teststringSets the action to be live or in test mode. test = true, only allows test ssn numbers, test = false, only allow real ssn numbers.
{
      "first_name": "Solbritt",
      "last_name": "Jansson",
      "address_1": "Danagatan 1",
      "address_2": null,
      "city": "Trångsund",
      "zip": "14262",
      "country": "SWE",
      "ssn": "195203198089"
      }

Extendability

Many objects have child resources such as customer and stored card. To minimize the object graph being sent over REST calls you can choose to add full objects by specifying to extend them in the url:

Example:

To show the full transaction object in a refund GET: https://api.nordeaconnect.com/v1/refunds/1?extend=transaction

To show both customer and plan to a subscription GET: https://api.nordeaconnect.com/v1/subscriptions/1?extend=customer,plan

You can also extend specific attributes for an object like this: https://api.nordeaconnect.com/v1/subscriptions/1?extend=customer.ref,plan.id

Metadata

Metadata is custom schemaless information that you can choose to send in to Nordea Connect. It can be information about the customer, the product or about campaigns or offers.

The metadata can be used to customize your hosted payment window or sending personalized receipts to your customers in a webhook.

Example of metadata:

{
        "products":[
        {
          "id":"1",
          "name":"Nice Shoe",
          "price":"100.00",
          "qty":"1",
          "url":"http://mysite.com/product/1"
        }
        ],
        "user":{
          "email":"jd@email.com"
        }
      }

The values like products, 1, name, are optional and can be named freely by the Merchant. These will be shown in the transaction lists so you can analyze transactions based on metadata and get a comprehensive understanding of your sales.

Why Metadata?

One of the most important benefits of using Nordea Connect is the power of the data that you can send with the payment. The more data you send in the more parameters you have to create custom payment flows and analyze transaction data to see what are your best selling items, services and products.

Popular parameters are:

  • Order information (price, vat, categories, materials, tags)
  • Platform specs (iPhone/Android, OS version, screen size, locale)
  • Application specs (version number, tokens, sessions)
  • Customer information (location, language)

All sent in data can be visualized in your dashboard in graphs or charts so that you easy can follow up and analyze your sales. Nordea Connect understands that making relevant and important business decisions starts with knowing your customers habits, likes and preferences. Incorporating metadata into the payment gives you the best chance to optimize your checkout, A/B test and bring intelligence into your business.

Updating the transaction with shop order ID

By using the API, you can update the Metadata property of an already processed transaction by passing metadata and process = false.

The submitted data will be merged with existing Metadata for that transaction.

By sending, for example: {"shop_order": {"id": "123123"}} as Metadata to the update method, you can connect your internal shop order ID to the Nordea Connect admin view.

Liquid and Metadata

Liquid is an open-source, Ruby-based template language created by Shopify. It is a well-known framework and is used to load dynamic content on storefronts.

Liquid uses a combination of tags, objects, and filters to load dynamic content. They are used inside the Nordea Connect Payment Window payment form to display information from the payment data and make the template dynamic for each customer, product or transaction.

The official documentation can be found here: https://github.com/Shopify/liquid/wiki/Liquid-for-Designers

You can output information in your metadata to your Payment Window Form or in a Receipt Webhook using Liquid syntax. Using the example above, this is the way to output it:

Product name: {{ transaction.metadata['products'].first.name }}
      Product quantity: {{ transaction.metadata['products'].first.qty }}

To loop all products:

{%for item in transaction.metadata['products']%}
      <li>
        Name: {{ item['name'] }},
        Price: {{ item['price'] }} {{transaction.amount | upcase }},
        Quantity {{ item['qty'] }}
      </li>
      {% endfor %}

Liquid syntax is used within webhooks and Payment Windows. Please go to Payment Window to see the full white list of liquid elements

Webhooks

A webhook is a messaging service that is executed before or after a transaction. You can add one or more webhooks in the Admin console or specify a custom webhook for a transaction. The data that sent varies depending on the context, read more under triggers to see what data to expect.

idintWebhook ID
created_atdatetimeEx. 2018-04-25T10:36:33Z (UTC)
typestringWebhook type, ex: CustomHttp
responseobjectThe http response, ex: { "code":"400", "body":"Bad request (GET and HEAD requests may not contain a request body)", "message":"Bad Request", "error":"Net::HTTPBadRequest" }
http_methodstringWhich method that were used, ex. POST, GET
emailstringSender address in a e-mail Webhook
urlstringURL in a Custom Http Webhook
triggerstringWhat event to trigger Webhook, ex. payment_error
data_formatstringJSON, form_data or XML

Show Webhooks

To show a webhook with ID 1 you need to GET the following url https://api.nordeaconnect.com/v1/webhooks/1

List Webhooks

To show a list of webhooks you need to GET the following url https://api.nordeaconnect.com/v1/webhooks

Creating Webhooks in a transaction

Webhooks can either be created from a template in the Admin console, or custom attached to each transaction call from the Merchant shop. When creating custom Webhooks you define it using JSON described in the examples below:

Sending E-mail:

{"trigger":"payment_success","email":"myname@domain.com"}

Custom HTTP:

{"url":"https://mybackend.com/confirmOrderFromNordeaConnect","trigger":"payment_success","http_method":"post","data_format":"form_data"}

Or as an Array:

[{"trigger":"payment_success","email":"myname@domain.com"},{"url":"https://mybackend.com/confirmOrderFromNordeaConnect","trigger":"payment_success","http_method":"post","data_format":"form_data"}]

trigger can be:

http_method can be:

  • post
  • get
  • put
  • patch
  • delete

data_format can be:

  • json
  • xml
  • form_data

Important

Custom http webhooks will not follow redirects. Make sure to point them directly at your endpoint.

If you are using the https protocol, your SSL certificate must be valid for the webhook to work.

If the webhook encounters a “500 error” from your endpoint it will retry 20 times for approximately 2 days. If it doesn’t succeed during this timeframe you will receive a warning in the dashboard. Any other error will create a notification in the dashboard immediately.

NOTE: When notifications are created in the dashboard you will also be receiving an alert email. Opt-out is possible by unchecking “Get Email Alerts” in Settings > Administrators.

file to be uploaded
//Fetching the incoming transaction data
      
      $transaction = webhook::get($path);
// Fetches and parses the incoming transaction.
      // This example is coming from a WebAPI Post action and uses the ControllerContext for data
      
      var transaction = Webhook.GetWebhook(this.ControllerContext.Request);

Automatic job retry

Webhooks will retry failures up to 20 times, with an exponential backoff using the formula (retry_count ** 4) + 15 + (rand(30) * (retry_count + 1)) (i.e. 15, 16, 31, 96, 271, … seconds + a random amount of time).

It will perform 20 retries over approximately 3 days. Assuming you deploy a bug fix within that time, the job will get retried and successfully processed. After 20 times, Webhooks will move that job to the Dead Job queue, and create a notification on the Merchant dashboard.

Liquid and Receipt Webhooks

Liquid is an open-source, Ruby-based template language created by Shopify. It is a well-known framework and is used to load dynamic content on storefronts.

Liquid uses a combination of tags, objects, and filters to load dynamic content. They are used inside the Nordea Connect Payment Window payment form to display information from the payment data and make the template dynamic for each customer, product or transaction.

The official documentation can be found here: https://github.com/Shopify/liquid/wiki/Liquid-for-Designers

You can output information in your receipt Webhook using Liquid syntax. Using the example above, this is the way to output it:

Product name: {{ transaction.metadata['products'].first.name }}
      Product quantity: {{ transaction.metadata['products'].first.qty }}  %p To loop all products:
{%for item in transaction.metadata['products']%}
        <li>
          Name: {{ item['name'] }},
          Price: {{ item['price'] }} {{transaction.amount | upcase }},
          Quantity {{ item['qty'] }}
        </li>
      {% endfor %}  %strong For Refunds

You can send a refund confirmation using the After Refund event with the Receipt webhook. There you can output the refunded amount like this:

Hi, here is your refund confirmation for order:
      {{ transaction.payment_ref }}
      Amount:
      {{ transaction.refunds.last.amount }}
      Reason:
      {{ transaction.refunds.last.reason }}
      

Items

Items makes it possible to send product info about the items into a payment. This items array is required for invoice payments and can also be used in subscriptions to add additional product charges intop of the Plan amount.

This data is required if the transaction is of type invoice

artnostring (maxlength 50) *required Article number
descriptionstring (maxlength 150) *required Description about the item
amountinteger *required The total price of all the items
qtystring *required The item quantity
vatstring *required VAT rate, ex 25 (No verification or or calculation is made)
discountstringDiscount of the products (No verification or or calculation is made)

Example

[{"artno": "001", "amount": 1, "description": "user license2", "qty": 1, "vat": 25, "discount": 0}]

Payment Details

Payment Details make it possible to send customer data. Payment data is perfect way to send specific information about a customer.

This data is required if the transaction is of type invoice

ssnstring *required Social Security number (Personnummer). Ex: 192803104351
phonestring *required Phone number
emailstring *required Email adress
customer_numberstring (maxlength 150)Your custumer number
first_namestring (maxlength 150) *required The first name of the custumer
last_namestring (maxlength 150) *required The last name of the custumer
zipstring (maxlength 150) *required ZIP code
address_1string (maxlength 150) *required Primary address
address_2string (maxlength 150)Secondary address
citystring (maxlength 150) *required City
country_codestring *required Use ISO 3166-1 alpha-3 codes, ex: SWE.
company_namestring *required Company name, for b2b
segmentationstring *required Segmentation, b2c or b2b

Supported Card Types

Where are they used?

You need to POST the card type name as card_type parameter

Default card types that you will have access to are VISA and Mastercard, but the other such as AMEX, JCB and Diners are on separate contracts. Contact support for more information about card types.

visaVisa
mastercardMasterCard
maestroMaestro
electronElectron
debit_mastercardDebit MasterCard
visa_debitVisa Debit
amexAmerican Express
dinersDiners
uk_maestroUK Maestro
stored_cardStored Card
paypalPayPal
swishSwish

Accepted Currencies

sekSwedish Krona
cadCanadian Dollar
cnyChinese Yuan
copColombian Peso
czkCzech Republic Koruna
dkkDanish Krone
hkdHong Kong Dollar
hufHungarian Forint
iskIcelandic Króna
inrIndian Rupee
ilsIsraeli New Sheqel
jpyJapanese Yen
kesKenyan Shilling
krwSouth Korean Won
kwdKuwaiti Dinar
lvlLatvian Lats
myrMalaysian Ringgit
mxnMexican Peso
madMoroccan Dirham
omrOmani Rial
nzdNew Zealand Dollar
nokNorwegian Krone
pabPanamanian Balboa
qarQatari Rial
rubRussian Ruble
sarSaudi Riyal
sgdSingapore Dollar
zarSouth African Rand
chfSwiss Franc
thbThai Baht
ttdTrinidad and Tobago Dollar
aedUnited Arab Emirates Dirham
gbpBritish Pound Sterling
usdUS Dollar
twdNew Taiwan Dollar
vefVenezuelan Bolívar
ronRomanian Leu
tryTurkish Lira
eurEuro
uahUkrainian Hryvnia
plnPolish Zloty
brlBrazilian Real

Test Cards

To create test transactions you need to send in a test card number, and also a CVV code that can simulate different responses

Test card numbers:

VISA4111111111111111
VISA4012888888881881
VISA4222222222222
MASTERCARD5555555555554444
MASTERCARD5105105105105100
DINERS30569309025904
AMEX378282246310005

Test CVV codes:

When in test mode (test=true) you can use CVV codes to simulate different responses. Anything else will lead to Approved.

200ACCEPTED
201DECLINED
202CVV INVALID
203EXPIRED

Test Expiry dates:

When in test mode (test=true) you can use specific expiry dates to simulate failed recurring card payments

0137errors.payment.declined
0237errors.card.expired

Test Customers

To create test invoice transactions you need to send in a test ssn number. Use different SSN numbers to simulate different responses.

Approved persons Sweden

195203198089string{“first_name”: “Solbritt”, “last_name”: “Jansson”, “address_1”: “Danagatan 1”, “address_2”: nil, “city”: “Trångsund”, “zip_code”: “14262”, “country”: “SWE”, “ssn”: “195203198089”}
192803037999string{“first_name”: “Stig”, “last_name”: “Saleh”, “address_1”: “Lars Kaggsgatan 163 Lgh 1003”, “address_2”: nil, “city”: “Oxie”, “zip_code”: “23831”, “country”: “SWE”, “ssn”: “192803037999”}
192803104351string{“first_name”: “Erik”, “last_name”: “Nygren”, “address_1”: “Hablingbo Prästgården 151 Lgh 1203”, “address_2”: nil, “city”: “Nynäshamn”, “zip_code”: “14931”, “country”: “SWE”, “ssn”: “192803104351”}
192803290853string{“first_name”: “Erik”, “last_name”: “Karlsson”, “address_1”: “Sakrislundsvägen 45 Lgh 1001”, “address_2”: nil, “city”: “Ytterby”, “zip_code”: “44205”, “country”: “SWE”, “ssn”: “192803290853”}
192805181332string{“first_name”: “Jonas”, “last_name”: “Olivares”, “address_1”: “Fröjel Stora Hajdes 717”, “address_2”: nil, “city”: “Spånga”, “zip_code”: “16345”, “country”: “SWE”, “ssn”: “192805181332”}
192806225351string{“first_name”: “Gustaf”, “last_name”: “Roslin”, “address_1”: “Motalagatan 7 Lgh 1005”, “address_2”: nil, “city”: “Linköping”, “zip_code”: “58254”, “country”: “SWE”, “ssn”: “192806225351”}
195202057674string{“first_name”: #RANDOM#, “last_name”: #RANDOM#, “address_1”: #RANDOM#, “address_2”: #RANDOM#, “city”: #RANDOM#, “zip_code”: #RANDOM#, “country”: “SWE”, “ssn”: “195202057674”}
197003067985string{“first_name”: #RANDOM#, “last_name”: #RANDOM#, “address_1”: #RANDOM#, “address_2”: #RANDOM#, “city”: #RANDOM#, “zip_code”: #RANDOM#, “country”: “SWE”, “ssn”: “197003067985”}
197108262366string{“first_name”: #RANDOM#, “last_name”: #RANDOM#, “address_1”: #RANDOM#, “address_2”: #RANDOM#, “city”: #RANDOM#, “zip_code”: #RANDOM#, “country”: “SWE”, “ssn”: “197108262366”}

Denied persons Sweden

192806281719string{“first_name”: “Kent”, “last_name”: “Ludwig”, “address_1”: “Vindögatan 4 Lgh 1502”, “address_2”: nil, “city”: “Gärds Köpinge”, “zip_code”: “29197”, “country”: “SWE”, “ssn”: “192806281719”}
192808219691string{“first_name”: “Alex John”, “last_name”: “Säll”, “address_1”: “Arkeologvägen 52”, “address_2”: nil, “city”: “Skillingaryd”, “zip_code”: “56830”, “country”: “SWE”, “ssn”: “192808219691”}
192809162536string{“first_name”: “Erik”, “last_name”: “Wadman”, “address_1”: “Myrängsvägen 73 Lgh 1410”, “address_2”: nil, “city”: “Höllviken”, “zip_code”: “23638”, “country”: “SWE”, “ssn”: “192809162536”}
192901107488string{“first_name”: “Kristina”, “last_name”: “Lindell”, “address_1”: “Östra Skolgatan 10”, “address_2”: nil, “city”: “Ödeshög”, “zip_code”: “59979”, “country”: “SWE”, “ssn”: “192901107488”}
192901197497string{“first_name”: “Gustaf”, “last_name”: “Gustafsson”, “address_1”: “Spireav 1”, “address_2”: nil, “city”: “Stockholm”, “zip_code”: “11254”, “country”: “SWE”, “ssn”: “192901197497”}
195807065627string{“first_name”: “Anne Malin”, “last_name”: “Samuelsson”, “address_1”: “Härsbackavägen 69 Lgh 1309”, “address_2”: nil, “city”: “Karlstad”, “zip_code”: “65226”, “country”: “SWE”, “ssn”: “195807065627”}

Approved persons Norway

06073910828string{“first_name”: “Tester”, “last_name”: “Person”, “address_1”: “Startveien 56”, “address_2”: null, “city”: “FINNSNES”, “zip_code”: “9300”, “country”: “NOR”, “ssn”: “06073910828”}

Approved persons Finland

071259999Mstring{“first_name”: “Dmitri Jonatan”, “last_name”: “Casimirsson”, “address_1”: “Sepänkatu 11 A 1”, “address_2”: null, “city”: “KUOPIO”, “zip_code”: “70100”, “country”: “FIN”, “ssn”: “071259999M”}

Error Messages

We aim to send as many insightful and helpful error messages to you as possible, both in numeric, data and human readable.

{
        name: 'errors.card_number.missing',
        code: 118,
        description: 'Card number is missing'
      }

Simulate errors:

To simulate error messages send this json in your metadata. Use one of the following formats:

{
        "nordeaconnect_instructions": {
          "fail_as_code":"errors.invoice.address_not_found"
         }
      }
      
{
        "nordeaconnect_instructions": {
          "fail_as_message":"do not honour"
        }
      }

List of error messages:

101errors.order_id.processed
102errors.order_id.invalid
103errors.template.not_found
104errors.merchant.not_found
105errors.merchant_id.missing
106errors.hash.missing
107errors.hash.invalid
108errors.amount.missing
109errors.amount.invalid
110errors.success_url.missing
111errors.success_url.reserved
112errors.error_url.missing
113errors.error_url.reserved
116errors.currency.missing
117errors.currency.unsupported
118errors.card_number.missing
119errors.card_number.invalid
120errors.card_type.missing
121errors.card_type.unsupported
122errors.card_holder.missing
123errors.card_holder.invalid
124errors.card_cvv.missing
125errors.card_cvv.invalid
126errors.card_expiry.missing
127errors.card_expiry.invalid
128errors.transaction.not_found
129errors.payment.declined
130errors.card.expired
131errors.card_currency.unsupported
132errors.reason.missing
133errors.unexpected
134errors.amount.excess
135errors.plan.not_found
136errors.price.missing
137errors.stored_card.not_found
138errors.unauthorized
139errors.merchant.missing
140errors.transaction.missing
141errors.subscription.not_found
142errors.customer.not_found
143errors.customer.missing
144errors.generic
145errors.payment_ref.invalid
146errors.payment_ref.processed
147errors.file_type.unsupported
148errors.status.invalid
149errors.json.malformed
150errors.stored_card.not_active
151errors.webhook.invalid
152errors.transaction_id.missing
153errors.transaction.processed
154errors.invoice.not_purchable
155errors.reservation.not_approved
156errors.personal_number.missing
157errors.customer_number.missing
158errors.zip.missing
159errors.first_name.missing
160errors.last_name.missing
161errors.country_code.missing
162errors.address.missing
163errors.city.missing
164errors.payment_details.missing
165errors.customer_ref.invalid
166errors.items.missing
167errors.stored_card.not_test
168errors.stored_card.is_test
169errors.mpi.not_approved
170errors.subscription.status_invalid
171errors.customer_ref.taken
172errors.item.amount.missing
173errors.item.quantity.missing
174errors.item.vat_rate.missing
175errors.item.vat_amount.missing
176errors.item.id.missing
177errors.item.unit_code.missing
178errors.item.price.missing
179errors.item.line_number.missing
180errors.item.description.missing
181errors.merchant.invoice.not_configured
182errors.authentication.failed
183errors.raw_amount.invalid
184errors.name.missing
185errors.interval_unit.missing
186errors.interval_unit.invalid
187errors.prices.missing
188errors.interval.missing
189errors.interval.invalid
190errors.password.missing
191errors.email.missing
192errors.terms.not_accepted
193errors.webhook.failed
194errors.encrypted_param.missing
195errors.prices.invalid
196errors.not_found
197errors.decryption.failed
198errors.vat_amount.missing
199errors.reason.too_long
200errors.encoding.invalid
201errors.name.duplicate
202errors.merchant.invalid
203errors.amount.mismatch
204errors.webhook.not_found
205errors.filter_parameter.not_supported
206errors.filter_value.not_supported
207errors.account.locked
208errors.deposit.not_captured
209errors.ssn_or_country.missing
210errors.avarda_account.missing
211errors.missing_or_invalid.ssn
212errors.missing_or_too_long.first_name
213errors.missing_or_too_long.last_name
214errors.invalid.email
215errors.missing_or_invalid.phone_number
216errors.missing_or_too_long.address_1
217errors.missing.address_2
218errors.missing_or_too_long.city
219errors.missing_or_too_long.zip_code
220errors.missing_or_invalid.country_code
221errors.missing_or_invalid.amount_error
222errors.too_long.transaction_id
223errors.must_be_submitted.ssn
224errors.invoice.credit_approval_failed
225errors.invoice.credit_check
226errors.invoice.credit_not_approved
227errors.invoice.amount.requested.lower_than_minimum_purchase_amount
228errors.invoice.amount.requested.higher_than_maximum_purchase_amount
229errors.invoice.amount.maximal_decimal
230errors.item.missing_or_too_long.description
231errors.item.total_amount_error
232errors.item.notes_to_long
233errors.missing_or_too_long.order_reference
234errors.invoice.account_error
235errors.invoice.account_class_error
236errors.order.reference.error
237errors.invoice.credit_decision_process_failed
238errors.helper.ssn.invalid_format
239errors.helper.ssn.must_be_submitted
240errors.helper.ssn.for_sweden_must_be_12_digits
241errors.helper.ssn.address_is_available
242errors.helper.ssn.have_a_value
243errors.service_not_available
244errors.invoice.no_account_exists
245errors.invoice.purchase_for_different_country
246errors.invoice.payment_terms_error
247errors.invoice.account_number_error
248errors.invoice.account_was_overdrawn
249errors.invoice.execute.against.this.account
250errors.password_length
251errors.customer_not_found
252errors.request.json_error
253errors.request.bad_format
254errors.items.not_array
255errors.items.description_missing
256errors.items.notes_missing
257errors.items.amount_missing
258errors.items.description_too_long
259errors.items.amount_not_valid
260errors.items.transaction_amount_mismatch
261errors.rules_parser.declined
262errors.request.json_errors