> This page is for API Reference.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.navipartner.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.navipartner.com/_mcp/server.

# Start Subscription

POST https://api.npretail.app/{tenant}/{environment}/{company}/membership/{membershipId}/subscription/start

Use this endpoint to enable subscription for the membership. This requires that a payment method is active and selected for the membership. If the subscription has an unprocessed refund (partial regret), the request is rejected unless `confirmPendingRefund` is set to `true`.

Reference: https://docs.navipartner.com/apis/api-reference/memberships/service-subscription/start-subscription

## Authentication

- `x-np-api-key` header (required) — API Key authentication via header

## Request

### Path parameters

- `tenant` (string, required) — Your Entra Tenant ID. [More details.](/paths#1-tenant)
- `environment` (string, required) — Your Business Central Environment. [More details.](/paths#2-environment)
- `company` (string, required) — Your Business Central Company. [More details.](/paths#3-company)
- `membershipId` (UUID, required) — Unique identifier for a membership.

### Query parameters

- `confirmPendingRefund` (boolean, optional) — When true, allows starting the subscription even if it has an unprocessed refund (partial regret) that might be processed at a later point and affect the membership. Defaults to false, in which case the request is rejected when an unprocessed refund exists.

## Response

### 200

- `id` (UUID, required) — Unique identifier for a subscription.
- `blocked` (boolean, required) — Defines if the subscription is blocked and therefore not useable for renewing the membership.
- `autoRenew` (enum, required) — Indicates the auto-renewal state
  - Allowed values: `NO`, `YES_INTERNAL`, `YES_EXTERNAL`, `TERMINATION_REQUESTED`
- `startedAt` (datetime, optional) — Defines the date the subscription was started.
- `committedUntil` (date, optional) — Defines the date that the subscription is committed until. It's not possible to terminate the subscription before this date.
- `terminateAt` (date, optional) — Defines the date the membership will be terminated if it has been requested to terminate.
- `terminationRequestedAt` (datetime, optional) — Defines the date and time termination was requested.
- `terminationReason` (enum, optional) — Defines the reason for a termination.
  - Allowed values: `CUSTOMER_INITIATED`, `FORCED_TERMINATION`
- `usableUntilDate` (date, optional) — The last date the membership remains usable if auto-renewal is cancelled now, inclusive. Terminating only switches auto-renewal off and does not shorten the period already paid for, so this is the end of that period, or of the last period a notice period forces a renewal into. It is not the date the termination itself takes effect: that is reported separately as terminateAt. Null when it cannot be determined, for example when auto-renewal is off or is managed externally. Informational only: do not send this value back as a terminationDate when terminating - omit that field and the server applies its own earliest acceptable date.
- `renewalRequiredBeforeTermination` (boolean, optional) — True when the notice period runs past the end of the paid period, so the membership renews, and is charged, once more before it can be terminated. Null whenever usableUntilDate is null, since there is then no termination to describe.
- `nextRenewalAttemptDate` (date, optional) — The next date an automatic renewal payment will be attempted. Null when no further attempt is planned, for example when auto-renewal is off or every scheduled attempt is already in the past.

## Examples

**Response**

```json
{
  "id": "7322dddf-af86-42ea-8d85-f0d377e2a3b2",
  "blocked": false,
  "autoRenew": "YES_INTERNAL",
  "startedAt": "2025-06-17T16:34:00.000Z",
  "committedUntil": "2025-12-17",
  "usableUntilDate": "2025-12-17",
  "renewalRequiredBeforeTermination": false,
  "nextRenewalAttemptDate": "2025-12-12"
}
```

**SDK Code**

```python SubscriptionStarted
import requests

url = "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/cdef7890-abcd-0123-1234-567890abcdef/subscription/start"

headers = {"x-np-api-key": "<NaviPartner API Key>"}

response = requests.post(url, headers=headers)

print(response.json())
```

```javascript SubscriptionStarted
const url = 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/cdef7890-abcd-0123-1234-567890abcdef/subscription/start';
const options = {method: 'POST', headers: {'x-np-api-key': '<NaviPartner API Key>'}};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go SubscriptionStarted
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/cdef7890-abcd-0123-1234-567890abcdef/subscription/start"

	req, _ := http.NewRequest("POST", url, nil)

	req.Header.Add("x-np-api-key", "<NaviPartner API Key>")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby SubscriptionStarted
require 'uri'
require 'net/http'

url = URI("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/cdef7890-abcd-0123-1234-567890abcdef/subscription/start")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["x-np-api-key"] = '<NaviPartner API Key>'

response = http.request(request)
puts response.read_body
```

```java SubscriptionStarted
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/cdef7890-abcd-0123-1234-567890abcdef/subscription/start")
  .header("x-np-api-key", "<NaviPartner API Key>")
  .asString();
```

```php SubscriptionStarted
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/cdef7890-abcd-0123-1234-567890abcdef/subscription/start', [
  'headers' => [
    'x-np-api-key' => '<NaviPartner API Key>',
  ],
]);

echo $response->getBody();
```

```csharp SubscriptionStarted
using RestSharp;

var client = new RestClient("https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/cdef7890-abcd-0123-1234-567890abcdef/subscription/start");
var request = new RestRequest(Method.POST);
request.AddHeader("x-np-api-key", "<NaviPartner API Key>");
IRestResponse response = client.Execute(request);
```

```swift SubscriptionStarted
import Foundation

let headers = ["x-np-api-key": "<NaviPartner API Key>"]

let request = NSMutableURLRequest(url: NSURL(string: "https://api.npretail.app/01234567-89ab-cdef-0123-456789abcdef/production/CRONUS%2520International%2520Ltd./membership/cdef7890-abcd-0123-1234-567890abcdef/subscription/start")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```