> ## Documentation Index
> Fetch the complete documentation index at: https://docs.debitdirect.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Migrate an existing

## Moving an existing agreement to Debitdirect

You can move an existing agreement to Debitdirect as follows.

## Planning the change

A Leverandørservice agreement only can have **one dataprocessor** (dataleverandør in Danish), which means you will move away from your current data processor.

We recommend you plan the change carefully, as it may impact your customers. Here are some key points to consider:

* **Customer communication**: Inform your customers about the change in dataprocessor and any potential impact on their payments.
* **Timing**: Choose a date for the change that minimizes disruption, such as the mid of a billing cycle.

Conducting the change at the right time can help ensure a smooth transition for both your business and your customers.

## Requesting the change

<Steps>
  <Step title="Overview">
    Follow the steps below to change the dataprocessor to Debitdirect.
  </Step>

  <Step title="Open the form">
    Using a browser, navigator to [Skift dataleverandør](https://www.xn--leverandrservice-sxb.dk/leverandoerservice/kontaktformular/skift-dataleverandoer/).
  </Step>

  <Step title="Add company information">
    Fill out the form with key information such as CVR number, company name, merchant number, contact information etc.
  </Step>

  <Step title="Change dataprocessor">
    Under **Dataprocessor** (Dataleverandør in danish), first type the date of the change.

    Next, type the following Dataprocessing number: **38571583** and type **Debitdirect ApS** as the name of the dataprocessor.
  </Step>

  <Step title="Request mandates">
    **NB! Important** In the additional information field (supplerende oplysninger in Danish), copy/paste the following text:

    <code>
      Migration of dataprocessor. New dataprovider (Debitdirect) should receive a (500 delivery) file with all active debtors.
      We request that the agreement is marked to provide supplying payment information ("supplerende betalingsoplysninger").
      In addition, we request that Debitdirect is granted access to create new mandates on our behalf (enable 510 Opret Betalingstilladelse).
    </code>
  </Step>

  <Step title="Optional authorization">
    If you wish to authorize Debitdirect - or an employee without authorization - to handle the migration on your behalf, please add an authorization statement as an attachment.
  </Step>

  <Step title="Submit the form">
    Review the information you have provided, and submit the form.
  </Step>
</Steps>

Due to KYC and AML procedures, migrating the agreement takes anywhere **between 1-14 days**. You will recieve a letter in e-boks, with the new information.

## Adding the agreement to Debitdirect via API

Once you completed the form, follow this step to continue. Add the agreement as follows:

```bash theme={null}
curl --location 'https://api.debitdirect.io/agreements' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic xxxxxxxxxxxxxxxxxxxxxx' \
--data '{
	"scheme" : "nets-ls",
	"test" : false,
	"meta" : {
		"CreditorNumber" : "12345",
		"CvrNumber" : "12345678"
	}
}'
```

Your will get an agreement handle returned, and the agreement will be in state `Pending` until Debitdirect have verified the agreement. This happens automatically. Once your agreement is ready, the state of the agreement will be `Active`.
