Nets Easy

About

Nets Easy is a nordic payment service provider operated by Nets A/S. Additional information can be found here:

Setup

Have your Nets Easy account ready. A trial account can be created here. To setup Nets Easy in Upodi, please have your integration keys from Nets Easy available. You will need four (4) keys found under Company > Integration.

In Upodi, go to Settings > Payment Providers > Configuration. Select Nets Easy and click Connect. Provide the four keys and click Connect to complete.

📘

Sandbox = Test and Production = Live

When the Upodi environment is in sandbox mode, the test credentials are used and payments and tokens are issued towards the test environment. Once you put Upodi in production mode, payments and tokens are issued towards the live environment.

Adding a payment method

This is used to create a recurring payment method, which can be used for recurring transactions in Upodi. This does not come with an initial reservation or transaction on the card.

Step 1: Create the token in Nets Easy

Follow this guide from Nets Easy to create a Nets Easy subscription token

What you need from Nets Easy is a Subscription Token.

Step 2: Post the token to Upodi

To create a payment method for Nets Easy, make a POST request to /paymentmethods/ with a JSON body as follows:

Example of body

{
  "gateway" :"dibs_easy", 
  "source" : "{subscription token}",
  "customerid" : "{customerId}",
  "makedefault" : true   
}

Adding a payment method with a reservation

This creates a recurring payment method with an initial reservation, which Upodi will capture on the first payment attempt. Useful especially in combination with the Checkout functionality, because here you know the first payment amount.

Step 1: Create the token with reservation in Nets Easy

Follow this guide from Nets Easy to create a Nets Easy subscription token.

curl --location -g --request POST 'https://api.dibspayment.eu/v1/payments' \
--header 'Authorization: {NetsEasySecretKey}' \
--header 'Content-Type: application/json' \
--header 'Idempontecy-key: {uniqueKey}' \
--header 'Accept: application/json' \
--data-raw '{
    "order": {
        "items": [
            {
                "reference": "{invoiceline.sku}",
                "name": "{invoiceline.title}",
                "quantity": 1.0,
                "unit": "pc",
                "unitPrice": 50,
                "taxRate": 2500,
                "taxAmount": 12.5,
                "grossTotalAmount": 62.5,
                "netTotalAmount": 50
            },
            {
                "reference": "{invoiceline.sku}",
                "name": "{invoiceline.title}",
                "quantity": 1.0,
                "unit": "pc",
                "unitPrice": 100,
                "taxRate": 2500,
                "taxAmount": 25,
                "grossTotalAmount": 125,
                "netTotalAmount": 100
            }
        ],
        "amount": 162.5,
        "currency": "EUR"
    },
    "checkout": {
        "termsUrl": "http://ourterms.com",
        "merchantHandlesConsumerData": true,
        "charge": false,
        "returnUrl": "https://example.com/confirmation"
    },
    "subscription": {
        "endDate": "2060-07-18T00:00:00+00:00",
        "interval": 0
    }
}'

Remember to flag it with the Charge: False parameter to make the payment into a reservation.

Step 2: Post the token to Upodi

{
  "gateway" :"dibs_easy", 
  "source" : "{\"SubscriptionId\":\"{SubscriptionId}\",\"PaymentId\":\"{PaymentId}\"}",
  "customerid" : "{customerId}",
  "makedefault" : true   
}

SubscriptionId is the recurring token from Nets Easy.

PaymentId is the reserved payment in Nets Easy.