NETS Easy

NETS Easy has to be implemented in your checkout and specifically also enabling and saving subscriptions in NETS Easy is required to utilize recurring payments in NETS Easy. Go to NETS easy documentation on subscriptions.

  1. Save a subscription in NETS Easy

Example JSON body from NETS Easy documentation:

{
    "order": {
        "items": [
            {
                "reference": "10",
                "name": "Monthly subscription",
                "unit": "month"
            }
        ],
        "amount": 0,
        "currency": "SEK",
        "reference": "Subscription Test"
    },
    "checkout": {
        "integrationType": "EmbeddedCheckout",
        "url": "https://<YOUR_WEBSITE>/cart.html",
        "termsUrl": "https://<YOUR_WEBSITE>/terms.html"
    },
    "subscription": {
      "interval": 0,
      "endDate": "2021-07-18T00:00:00+00:00"
   }
}
  1. The response is a subscriptionId for example 0260000060003b7b47f0833960dc60d6

  2. Save the subscriptionId to Upodi as the source in a POST payment method call

curl --location --request POST 'http://api.upodi.io/v3/paymentmethods/{customerId}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer {key}' \
--data-raw '{ "type" : 64, "makedefault" : "true", "puretoken" : { "token" : "0260000060003b7b47f0833960dc60d6", "paymentgateway" : "dibs_easy" }}'