# Get Started

Welcome to the Deluxe Payment Network (DPN) API.

The Deluxe Payment Network enables organizations to submit payment instructions, monitor processing activity, and track payment outcomes throughout the payment lifecycle. Use DPN APIs to automate payment operations, support reconciliation workflows, and integrate payment status reporting into downstream business systems.

This guide covers the prerequisites, credentials, authentication, environments, and API requests needed to get started.

### Base URLs

**Sandbox (XUAT)**

```text
https://stage.dcip.deluxe.com
```

**Production**

```text
https://dcip.deluxe.com
```

### Supported Solutions

DPN supports the following payment fulfillment solutions:

- **Print & Scan (P+S)** - Deluxe prints checks and delivers them to a designated lockbox for scanning and deposit.
- **Print & Mail (P+M)** - Deluxe prints checks and mails them directly to payees, with status tracking available throughout the fulfillment process.


If your organization uses both solutions, credentials and onboarding may be managed separately for each.

### Prerequisites

Before you begin, make sure you have:

- An active Deluxe Payment Network account configured for API access.
- Access to the Deluxe Developer Portal.
- A Client ID and Client Secret.
- Your `businessPartner` identifier.
- A DDN `apiKey` if your integration uses Lockbox Directory APIs.


### Obtaining Credentials

To request API access, contact your Account Manager or the [Deluxe Integrations Team](mailto:DPXProgramSupport@deluxe.com).

Include:

- Business name
- Account information
- Intended DPN use case
- Required solution (Print & Scan, Print & Mail, or both)


Deluxe will provide credentials for the solution(s) enabled for your account.

Store credentials securely and never share them publicly.

### Credential Definitions

| Credential | Description |
|  --- | --- |
| Client ID | Identifies your application and is used when requesting an access token. |
| Client Secret | Confidential value paired with the Client ID and used to obtain an access token. |
| Access Token | Short-lived token returned by the authentication service. Include it in the `Authorization` header of API requests. |
| `businessPartner` | Identifies the organization on whose behalf a DPN payment request is made. |
| `apiKey` | Credential used for DDN Lockbox Directory APIs. |


### Connecting to the API

Connecting to DPN involves three steps:

1. Obtain an access token.
2. Verify connectivity.
3. Call a DPN API endpoint.


### Token Endpoints

#### Sandbox (XUAT)

```text
https://developer.services.deluxe.com/oauth2/v2/token
```

#### Production

```text
https://services.deluxe.com/oauth2/v2/token
```

### 1. Obtain an Access Token

Send a `POST` request to the token endpoint using the Client Credentials grant type.

Base64-encode the `ClientID:ClientSecret` pair and include it using Basic Authentication.

```bash
curl --request POST \
  'https://developer.services.deluxe.com/oauth2/v2/token' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --header 'Authorization: Basic <base64(ClientID:ClientSecret)>' \
  --data-urlencode 'grant_type=client_credentials'
```

The response returns an `access_token` and expiration information. Include the access token in subsequent API requests.

### 2. Verify Connectivity

Verify that authentication and environment configuration are functioning correctly before making business requests.

```bash
curl --location \
  'https://stage.dcip.deluxe.com/payables/dpxn/v1/' \
  --header 'Authorization: Bearer <access_token>'
```

For Production, replace the Sandbox URL with the Production base URL.

### 3. Make Your First API Request

Include the access token and `businessPartner` header when calling DPN payment endpoints.

The following example retrieves the status of a payment file using its `file_guid`:

```bash
curl --location \
  'https://stage.dcip.deluxe.com/payables/dpxn/v1/payment-files/<file_guid>' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'businessPartner: <your_businessPartner>'
```

For DDN Lockbox Directory APIs, include the `apiKey` header instead of `businessPartner`:

```bash
curl --location \
  'https://stage.dcip.deluxe.com/payables/ddn/v1/lockbox' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'apiKey: <your_apiKey>'
```

### Refreshing Access Tokens

Access tokens are valid for a limited time.

Request a new token before the current token expires to avoid authorization failures. If an API request fails due to token expiration, obtain a new token and retry the request.

### Developer Tips

If a request fails, verify that:

- The token endpoint and API base URL belong to the same environment.
- The credentials correspond to the solution being accessed.
- The token request uses `Content-Type: application/x-www-form-urlencoded`.
- Basic Authentication is configured correctly.
- API requests include a valid bearer token in the `Authorization` header.
- DPN requests include a valid `businessPartner` value.
- DDN requests include a valid `apiKey`.


### Next Steps

Continue with:

- [Plan Your Integration →](/products/deluxe-payment-network/build-with-deluxe/implementation-guide)
- [Set Up Your Environment →](/products/deluxe-payment-network/build-with-deluxe/authenticate-guide)