Skip to Content
0
Jul 31, 2023 at 01:08 PM

Subscription incorrect nextScheduledBillingDate

298 Views Last edit Jul 31, 2023 at 01:16 PM 3 rev

Hi,

I've created today 07/31/2023 a subscription, with a 3 months on reference date billing interval.

The expected nextScheduledBillingDate it's 10/31/2023 but what I receive checking the API is 08/01/2023.

This is the POST Subscription request

{  
  "customer": {
    "id": "4208752860"    
  },
  "market": {
    "id": "ES7XX"
  },
  "validFrom": "2023-07-31T10:24:55.000Z",  
  "snapshots": [
    {
      "effectiveDate": "2023-07-31T10:24:55.000Z",
      "items": [
        {
          "itemId": "1",
          "product": {
            "code": "00312257_3M"
          }
        }
      ]      
    }
  ]
}

{
    "metaData": {
        "version": 1
    },
    "subscriptionDocumentId": "1337",
    "subscriptionId": "A40B12ED-B925-401E-B5AF-3DD92988BE04",
    "subscriptionProfile": {
        "id": "1",
        "replicateSubscriptionsToProviderContract": false,
        "requireContractAccount": false,
        "forecastTypeId": "1",
        "activateUtilitiesExtension": false
    },
    "status": "Active",
    "customer": {
        "id": "4208752860"
    },
    "payer": {
        "id": "4208752860"
    },
    "shipTo": {
        "id": "4208752860"
    },
    "billTo": {
        "id": "4208752860"
    },
    "market": {
        "id": "ES7XX",
        "timeZone": "Europe/Madrid",
        "currency": "EUR"
    },
    "subscriptionTimeZone": "Europe/Madrid",
    "validFrom": "2023-07-31T10:24:55.000Z",
    "billingProfileId": "_initial",
    "billingCycle": "anniversary-quarterly",
    "nextScheduledBillingDate": "2023-07-31T22:00:00.000Z",
    "billingCycleReferenceDate": "2023-04-30T22:00:00.000Z",
    "cancellationPolicy": {
        "allowMidBillCycleExpiration": true
    },
    "canceledWithOverruledTerms": false,
    "pauseSchedule": [],
    "withReferenceToPricingScheme": false,
    "customReferences": [],
    "externalObjectReferences": [],
    "notificationSettings": [],
    "isPending": false,
    "isFailed": false,
    "isRejected": false,
    "createdAt": "2023-07-31T13:04:11.402Z",
    "changedAt": "2023-07-31T13:04:11.402Z",
    "documentNumber": 1337,
    "snapshots": [
        {
            "effectiveDate": "2023-07-31T10:24:55.000Z",
            "items": [
                {
                    "itemId": "1",
                    "lineNumber": "1",
                    "product": {
                        "id": "1e194e64-bc9c-49e1-a633-297fb757c8f4",
                        "code": "00312257_3M",
                        "name": "Producto de limpieza",
                        "configuration": []
                    },
                    "subscriptionParameters": [],
                    "technicalResources": [],
                    "subscriptionType": "Commercial",
                    "createRating": true,
                    "createBill": true,
                    "createInvoice": true,
                    "ratePlan": {
                        "id": "6201a1d8-699e-4cd4-847e-4593020ab6cd",
                        "source": "product"
                    },
                    "pricing": {
                        "pricingParameters": [],
                        "overridableFields": []
                    },
                    "customReferences": [],
                    "externalObjectReferences": [],
                    "providerContractItems": []
                }
            ],
            "createdAt": "2023-07-31T13:04:11.402Z"
        }
    ]
}

I assume that is something related with billingCycleReferenceDate that is set to 2023-04-30T22:00:00.000Z (3 months in the past) but I don't understand the reason for having this value.

In other older subscription I'm getting the expected date. For example, this was created on 07/28/2023 and the nextScheduledBillingDate is on 10/28/2023 which is correct.

{
    "metaData": {
        "version": 3
    },
    "subscriptionDocumentId": "1334",
    "subscriptionId": "F58558D9-FE62-418D-BA22-BE263EFD0F5B",
    "subscriptionProfile": {
        "id": "1",
        "replicateSubscriptionsToProviderContract": false,
        "requireContractAccount": false,
        "forecastTypeId": "1",
        "activateUtilitiesExtension": false
    },
    "status": "Active",
    "customer": {
        "id": "2792970217"
    },
    "payer": {
        "id": "2792970217"
    },
    "shipTo": {
        "id": "2792970217"
    },
    "billTo": {
        "id": "2792970217"
    },
    "market": {
        "id": "NLBoschB2C7XX",
        "timeZone": "Europe/Amsterdam",
        "currency": "EUR"
    },
    "subscriptionTimeZone": "Europe/Amsterdam",
    "validFrom": "2023-07-28T11:16:48.000Z",
    "billingProfileId": "_initial",
    "billingCycle": "anniversary-quarterly",
    "nextScheduledBillingDate": "2023-10-27T22:00:00.000Z",
    "billingCycleReferenceDate": "2023-07-27T22:00:00.000Z",
    "cancellationPolicy": {
        "allowMidBillCycleExpiration": false
    },
    "canceledWithOverruledTerms": false,
    "pauseSchedule": [],
    "billSplitElement": "862202cf-d173-445c-b23d-d578c7921d3c",
    "withReferenceToPricingScheme": false,
    "customReferences": [],
    "externalObjectReferences": [],
    "notificationSettings": [],
    "isPending": false,
    "isFailed": false,
    "isRejected": false,
    "createdAt": "2023-07-28T11:23:34.821Z",
    "changedAt": "2023-07-31T12:49:34.936Z",
    "changedBy": "CHA1ZAG",
    "documentNumber": 1334,
    "snapshots": [
        {
            "effectiveDate": "2023-07-28T11:16:48.000Z",
            "items": [
                {
                    "itemId": "1",
                    "lineNumber": "1",
                    "product": {
                        "id": "e41e9af5-5057-4213-96ad-a38d4f0be9d9",
                        "code": "00623653_3M",
                        "name": "Spons voor het Reinigen van een Stoomoven.",
                        "configuration": []
                    },
                    "subscriptionParameters": [],
                    "technicalResources": [],
                    "subscriptionType": "Commercial",
                    "createRating": true,
                    "createBill": true,
                    "createInvoice": true,
                    "ratePlan": {
                        "id": "dfd73ab9-f5af-4c01-bd87-825d1616b76c",
                        "source": "product"
                    },
                    "pricing": {
                        "pricingParameters": [],
                        "overridableFields": []
                    },
                    "customReferences": [],
                    "externalObjectReferences": [],
                    "providerContractItems": []
                }
            ],
            "createdAt": "2023-07-28T11:23:34.821Z"
        }
    ]
}

Please, could you help to understand what is happening?

BR,

Alberto.