Credit Products

For processing credit products we recommend to do a direct API integration to have the flexibility of creating your user experience in your own check out.

How does it work?

The credit flow is processed via synchronous API calls and requires three simple steps.

*The following elements are recommended:

  • Function to retrieve user's address (folkbokföringsadress) - Optional
  • Function to display all payment methods available for the current purchase
  • Functions for user to confirm the purchase (e.g. "Complete purchase", "Pay now")

Step 1: Get checkout assets

1.1 Get Payment options

This function retrieves all the available payment options for the current purchase based on the total amount, currency and country.

Use the information from the response to display the available payment options to the user. The API response includes detailed information about the invoice and installment payment options, including information about fees, interest rates, installment length and links to legal documents.

The different invoice and installment payment options are also tagged with a group key (either invoice or installment) in case you want to show them separately in the checkout.

Example

"POST" https://api.paynova.com/paymentoptions

{
  "TotalAmount": 125.00,
  "CurrencyCode": "SEK",
  "PaymentChannelId": 1,
  "CountryCode": "SE",
  "LanguageCode": "SWE"
}

1.2 Get addresses

The first step is to retrieve the customer's name and registered address information. For
invoice and installment purchases in Sweden, the invoicing address will be the customer's registered address (Swedish: folkbokföringsadress).

To retrieve this address, send a GET request with the customer's personal number and country
code in the URL. The data in the response can optionally be used to fill in the appropriate address fields in your checkout.

If you populate address fields automatically with the registered address you receive from Paynova, we recommend that you disable editing of these fields if the customer has chosen invoice as the payment method since the official registered address is the only address allowed for invoice purchases.

We recommend that you mask the returned address fields in your checkout to minimize the risk of misuse of the service.

Example

"GET" https://api.paynova.com/addresses/SE/198901157993

Step 2: Process payment

2.1 Create order

The next step is to create an order in Paynova's system.
The order contains information about what items the customer has purchased and the related VAT information.

For invoice purchases you are required to provide us with full order line information e.g a detailed order. See our Order page for more information about the difference between simple and detailed orders.

See the CreateOrder Documentation for details on optional and required fields.

Example

{
  "orderNumber": "TEST",
  "currencyCode": "SEK",
  "totalAmount": 125.00,
  "customer": {
    "customerId": "",
    "governmentId": "196006208133",
    "emailAddress": "[email protected]",
    "name": {
      "companyName": "",
      "firstName": "CHRISTOPHER",
      "lastName": "WILLIAMS"
    },
    "homeTelephone": "",
    "workTelephone": "",
    "mobileTelephone": ""
  },
  "billTo": {
    "name": {
      "companyName": "",
      "firstName": "CHRISTOPHER",
      "lastName": "WILLIAMS"
    },
    "address": {
      "street1": "TESTSTREET1",
      "street2": "",
      "street3": "",
      "street4": "",
      "city": "Göteborg",
      "postalCode": "405 08",
      "regionCode": "",
      "countryCode": "SE"
    }
  },
  "shipTo": {
    "name": {
      "companyName": "",
      "firstName": "CHRISTOPHER",
      "lastName": "WILLIAMS"
    },
    "address": {
      "street1": "TESTSTREET1",
      "street2": "",
      "street3": "",
      "street4": "",
      "city": "Göteborg",
      "postalCode": "405 08",
      "regionCode": "",
      "countryCode": "SE"
    }
  },
  "lineItems": [
    {
      "id": 1,
      "articleNumber": "1",
      "name": "Sample train ticket #1",
      "description": "Sample train ticket description goes here",
      "productUrl": "http://www.google.se",
      "quantity": 1,
      "unitMeasure": "st",
      "unitAmountExcludingTax": 100,
      "taxPercent": 25,
      "totalLineTaxAmount": 25,
      "totalLineAmount": 125
    }
  ],
  "orderDescription": "travel",
  "salesChannel": "web",
  "salesLocationId": "my office"
}

## 2.2 Authenticate user Paynova offers an e-authentication interface to 3rd party digital authentication providers via our API. * Create a session for the authentication with [Initiate Authentication Session](http://api.developers.paynova.com/docs/e-leg-get-providers) * Retrieve the authentication session and implement the possible outcomes (Status Codes) with [Get Authentication Session](http://api.developers.paynova.com/docs/get-authentication-session-status)
## 2.3 Authorize payment Once the order has been created in Paynova's system an authorization request is sent to Paynova. In this step Paynova will perform the relevant fraud and credit checks and respond with a transaction status (**Success** or **Declined**) and the transaction details. See the Error codes [section](http://api.developers.paynova.com/docs/errorcodes) for more information.

In a typical checkout flow the authorization request should be sent immediately after the order has been created. A successful authorization request means that credit has been approved for this purchase.

API Documentation

Example

"POST" https://api.paynova.com/orders/76806205-cbfb-4c05-9c40-a6c400ff9b97/authorizePayment

{
"AuthorizationType": "InvoicePayment",
"TotalAmount": 125.00,
"PaymentMethodId": 311,
"PaymentMethodProductId": "DirectInvoice",
"PaymentChannelId": 1
}

Step 3: Activate purchase

3.1 Finalize authorization

When the order is ready to be shipped to the customer the purchase can be activated in Paynova's system. For digital products, the purchase can be activated immediately. Paynova will process the credit purchase and notify the user accordingly.

API Documentation

Example

"POST" https://api.paynova.com/orders/47bf277b-17b0-4d8b-b9c9-a3b100dbb21c/transactions/201409251527280673/finalize/125.00