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

# Payments

Payments are issued against a mandate. Use the following snippet to issue a payment.

```bash theme={null}
curl -X POST https://api.debitdirect.io/payments \
    -H 'Content-Type: application/json' \
    -H 'Authorization: Basic XXXXXXXXXXXX' \
    -d '{
            "Mandate" : "md_xxxxxxxxxxxxxxxx"
            , "Currency" : "DKK"
            , "Amount" : 124500
            , "Description" : "Invoice INV48388"
            , "Reference" : "INV48388"
            , "PaymentDate" : "2022-03-03T00:00:00.0Z"
            , "Scheme" : "nets-ls"
        }'
```

# Timelines

You can issue any payment (debit) for Leverandørservice with **one (1) business day** advance. Credit notes (credit) for Leverandørservice can be issued with two business days advance.

If you issue a payment or credit on a date not possible for payment, Debitdirect will automatically correct the payment date to the next possible payment date.

# Stages

Payments change stage as they are processed in Debitdirect.

<Steps>
  <Step title="Pending schedule">
    When created a payment status is marked **pending** (value = 0)
  </Step>

  <Step title="Scheduled for processing">
    When the payment is scheduled for scheme processing, status is marked **scheduled** (value = 16).
  </Step>

  <Step title="Completed succesfully">
    If a payment is processed succesfully, the payment is marked **settled** (value = 8).
  </Step>

  <Step title="Completed with fault">
    If a payment is not processed succesfully, the payment is marked **rejected** (value = 64).
  </Step>
</Steps>

Some schemes allow the end-user to dispute the payment. In this case, Mastercard Payment Services may issue a charge back. In this case, the payment status is
set to **chargeback** (value = 256) and a webhoook is sent.

# Testing

When issuing payments against a test mandate, the payment is marked a test payment and will not be sent to the scheme.
