> ## 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.

# Quickstart

The following highlights the few steps you need to get going with your Debitdirect account. It is our aim to get you up and running as quickly as possible.

In the following we will guide you through:

<Steps>
  <Step title="Create account">
    Creating an account and getting your credentials.
  </Step>

  <Step title="Add test data">
    Add a `test` agreement, create a customer and mandate.
  </Step>

  <Step title="Conduct your first payment">
    Create and simulate your first payment.
  </Step>
</Steps>

# Create account

To create your account, please use the following snippet:

```bash theme={null}
curl -X POST https://api.debitdirect.io/merchants' \
    -H 'Content-Type: application/json' \
    -d '{
        "Name" : "{your merchant name}",
        "Email" : "{provide your email}" }'
```

As with the first request, an ApiKey is returned from the request and must be stored safely for the given account.
You will receive an email to activate your account. The account cannot be used before it has been activated.

# Add test data

## Add an agreement

To create a test agreement please use the following snippet. The agreement will similate a `Leverandørservice` agreement:

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

## Add a customer

```bash theme={null}
curl --location 'https://api.debitdirect.io/customers' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic xxxxxxxxxxxxxxxxxxxxxx' \
--data '{
	"name" : "Sample Customer",
	"number" : "NO00001"
}'
```

## Add a mandate

Add a mandate using the following snippet. As only one agreement exist with an equal scheme (nets-ls), the mandate will automatically be marked as a test mandate.

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

You will receive a response as follows:

```json theme={null}
{
  "handle": "man_XXXXXXXXXXX",
  "scheme": "nets-ls",
  "status": "Created",
  "customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
```

# Conduct the first payment

To process the first payment, issue a request as follows:

```bash theme={null}
curl --location 'https://api.debitdirect.io/payments' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic xxxxxxxxxxxxxxxxxxxxxx' \
--data '{
  "mandate" : "man_XXXXXXXXXXX",
  "currency" : "DKK",
  "amount" : 1234500,
  "paymentDate" : "2022-03-03T00:00:00.0Z",
  "description" : "Payment",
	"scheme" : "nets-ls"
}'
```

# Simulate changes
