openapi: 3.2.0
info:
title: DN Payment Initiation Device API
description: 'Public Payment Initiation API (PI-API) of Diebold Nixdorf to access the
Transaction Middleware.'
version: 1.9.11
contact:
email: ronald.schmieder@dieboldnixdorf.com
servers:
- url: http://localhost:8080/pi-api/v1
- url: https://localhost:8080/pi-api/v1
security:
- bearerAuth: []
- openId: []
tags:
- name: Device API
paths:
/{merchantId}/devices:
get:
tags:
- Device API
operationId: getDevices
summary: Get all devices of a certain merchant
description: Used to retrieve all payment devices of a certain merchant.
parameters:
- $ref: '#/components/parameters/PI-API-Merchant-ID'
- $ref: '#/components/parameters/X-Request-ID-Param'
- $ref: '#/components/parameters/TimestampParam'
- $ref: '#/components/parameters/PSU-IP-AddressParam'
- $ref: '#/components/parameters/PSU-User-AgentParam'
- $ref: '#/components/parameters/PSU-GEO-LocationParam'
- $ref: '#/components/parameters/SessionKeyParam'
- $ref: '#/components/parameters/CredentialsTypeParam'
- $ref: '#/components/parameters/CredentialsParam'
- $ref: '#/components/parameters/RetailUnitParam'
responses:
'200':
description: 'In case of a successful call, the PI-API device data are returned.
'
content:
application/json:
schema:
$ref: '#/components/schemas/DevicesResponse'
'401':
$ref: '#/components/responses/Unauthorized401'
'404':
$ref: '#/components/responses/NotFound404'
'500':
$ref: '#/components/responses/InternalServerError500'
/device/{merchantId}/{terminalId}:
post:
tags:
- Device API
summary: Create a payment device such as a POS terminal or a mobile device
description: Used to create and/or initialize a payment device.
operationId: initializeDevice
parameters:
- $ref: '#/components/parameters/PI-API-Merchant-ID'
- $ref: '#/components/parameters/Terminal-ID'
- $ref: '#/components/parameters/X-Request-ID-Param'
- $ref: '#/components/parameters/TimestampParam'
- $ref: '#/components/parameters/PSU-IP-AddressParam'
- $ref: '#/components/parameters/PSU-User-AgentParam'
- $ref: '#/components/parameters/PSU-GEO-LocationParam'
- $ref: '#/components/parameters/SessionKeyParam'
- $ref: '#/components/parameters/CredentialsTypeParam'
- $ref: '#/components/parameters/CredentialsParam'
- $ref: '#/components/parameters/StoreIdParam'
- $ref: '#/components/parameters/CashierIdParam'
- $ref: '#/components/parameters/PaymentProviderParam'
- $ref: '#/components/parameters/RetailUnitParam'
responses:
'201':
description: 'In case of a successful call, a PI-API a http status code 201 is returned.
'
'401':
$ref: '#/components/responses/Unauthorized401'
'404':
$ref: '#/components/responses/NotFound404'
'500':
$ref: '#/components/responses/InternalServerError500'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CreateDeviceRequest'
description: The request
required: true
put:
tags:
- Device API
operationId: updateDevice
summary: Update a payment device such as a POS terminal or a mobile device
description: Used to get, update or delete a payment device.
parameters:
- $ref: '#/components/parameters/PI-API-Merchant-ID'
- $ref: '#/components/parameters/Terminal-ID'
- $ref: '#/components/parameters/X-Request-ID-Param'
- $ref: '#/components/parameters/TimestampParam'
- $ref: '#/components/parameters/PSU-IP-AddressParam'
- $ref: '#/components/parameters/PSU-User-AgentParam'
- $ref: '#/components/parameters/PSU-GEO-LocationParam'
- $ref: '#/components/parameters/SessionKeyParam'
- $ref: '#/components/parameters/CredentialsTypeParam'
- $ref: '#/components/parameters/CredentialsParam'
- $ref: '#/components/parameters/StoreIdParam'
- $ref: '#/components/parameters/CashierIdParam'
- $ref: '#/components/parameters/PaymentProviderParam'
- $ref: '#/components/parameters/RetailUnitParam'
responses:
'200':
description: 'In case of a successful call, a http status code 200 is returned.
'
'401':
$ref: '#/components/responses/Unauthorized401'
'404':
$ref: '#/components/responses/NotFound404'
'500':
$ref: '#/components/responses/InternalServerError500'
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateDeviceRequest'
description: The request
required: true
get:
tags:
- Device API
operationId: getDevice
summary: Get device info of a payment device such as a POS terminal or a mobile device
description: Used to create and/or initialize a payment device.
parameters:
- $ref: '#/components/parameters/PI-API-Merchant-ID'
- $ref: '#/components/parameters/Terminal-ID'
- $ref: '#/components/parameters/X-Request-ID-Param'
- $ref: '#/components/parameters/TimestampParam'
- $ref: '#/components/parameters/PSU-IP-AddressParam'
- $ref: '#/components/parameters/PSU-User-AgentParam'
- $ref: '#/components/parameters/PSU-GEO-LocationParam'
- $ref: '#/components/parameters/SessionKeyParam'
- $ref: '#/components/parameters/CredentialsTypeParam'
- $ref: '#/components/parameters/CredentialsParam'
- $ref: '#/components/parameters/StoreIdParam'
- $ref: '#/components/parameters/CashierIdParam'
- $ref: '#/components/parameters/PaymentProviderParam'
- $ref: '#/components/parameters/RetailUnitParam'
responses:
'200':
description: 'In case of a successful call, the PI-API device data are returned.
'
content:
application/json:
schema:
$ref: '#/components/schemas/DeviceInfoResponse'
'401':
$ref: '#/components/responses/Unauthorized401'
'404':
$ref: '#/components/responses/NotFound404'
'500':
$ref: '#/components/responses/InternalServerError500'
delete:
tags:
- Device API
operationId: deleteDevice
summary: Delete a payment device such as a POS terminal or a mobile device
description: Used to create and/or initialize a payment device.
parameters:
- $ref: '#/components/parameters/PI-API-Merchant-ID'
- $ref: '#/components/parameters/Terminal-ID'
- $ref: '#/components/parameters/X-Request-ID-Param'
- $ref: '#/components/parameters/TimestampParam'
- $ref: '#/components/parameters/PSU-IP-AddressParam'
- $ref: '#/components/parameters/PSU-User-AgentParam'
- $ref: '#/components/parameters/PSU-GEO-LocationParam'
- $ref: '#/components/parameters/SessionKeyParam'
- $ref: '#/components/parameters/CredentialsTypeParam'
- $ref: '#/components/parameters/CredentialsParam'
- $ref: '#/components/parameters/StoreIdParam'
- $ref: '#/components/parameters/CashierIdParam'
- $ref: '#/components/parameters/PaymentProviderParam'
- $ref: '#/components/parameters/RetailUnitParam'
responses:
'200':
description: 'In case of a successful call, a http status code 200 is returned.
'
'401':
$ref: '#/components/responses/Unauthorized401'
'404':
$ref: '#/components/responses/NotFound404'
'500':
$ref: '#/components/responses/InternalServerError500'
components:
parameters:
PaymentProviderParam:
name: PaymentProvider
in: header
required: true
schema:
$ref: '#/components/schemas/PaymentProvider'
example: HUMM
PSU-GEO-LocationParam:
name: PSU-GEO-Location
in: header
required: false
description: 'The (optional) GEO location of the client, if available.
'
schema:
type: string
minLength: 8
maxLength: 255
pattern: GEO:(-?\d+(\.\d+)?),\s*(-?\d+(\.\d+)?)
example: GEO:52.506931,13.144558
RetailUnitParam:
name: RetailUnit
in: header
required: false
description: 'The ID of the retail unit. ISO-3166 2 letter country code as a possibility, e.g. "se" for Sweden, "de" for Germany and "us" for USA.
'
schema:
type: string
minLength: 2
maxLength: 10
example: se
PSU-User-AgentParam:
name: PSU-User-Agent
in: header
required: false
description: 'The user agent string of the client.
'
schema:
type: string
minLength: 5
maxLength: 255
example: Mozilla/5.0(IE 11.0; Windows NT 6.3; Trident/7.0; .NET4.0E; .NET4.0C; rv:11.0) like Gecko
TimestampParam:
name: Timestamp
in: header
required: true
description: 'The timestamp when the PI-API call was initiated by the PI-API client.
The format is defined by RFC3339 date-time.
Please see:
Date and Time on the Internet: Timestamps
'
schema:
type: string
format: date-time
example: '2017-10-02T15:34:12.345Z'
CredentialsTypeParam:
name: AuthorizationType
in: header
required: true
description: 'AuthorizationType describes the kind of CredentialsParam. Based on
the AuthorizationType the AuthorizationToken is evaluated and
checked.
'
schema:
type: string
enum:
- OAUTH
- USERNAME_PASSWORD
example: USERNAME_PASSWORD
SessionKeyParam:
name: SessionKey
in: header
required: true
description: "
The SessionKey parameter contains an base64 encoded AES-128bit\n(AES128) key, which is used to encrypt the AuthorizationType and\nAuthorizationToken.
\n\nMoreover, where appropriate, other parts of the request and/or response message are encrypted too, such as\n'buyerIdentityToken' in the 'UserAuthorizationData' of a\nInitiateCardlessPayment request.
\n\nIf the SessionKey is an empty string (with a zero length), it is assumed, that the\nAuthorizationType and AuthorizationToken are transmitted\nunencrypted, which is by no means recommended and -\nwhenever possible - should be avoided.
\n\nIf a part of a request or response message is or can be encrypted, this is explicitly\nindicated in the description.
\n\nThe key is separated from the InitializationVector using a '-' (Minus sign/Separator) like 'AESKey InitializationVector'.\n" schema: type: string example: QmFzZTY0IGVuY29kaW5nIHNjaGVtZXMgYXJlIGNvbW1vbmx5VGhlIHBhcnRpY3VsYXIgY2hvaWNlIA== CashierIdParam: name: CashierId in: header required: true description: "
An unique identifier of a cashier - a natural person - within the\nmerchant's eco-system.
\n" schema: type: string minLength: 4 maxLength: 256 example: cashier1 PSU-IP-AddressParam: name: PSU-IP-Address in: header required: false description: The IP-Address of the client. schema: type: string minLength: 8 maxLength: 48 example: 192.168.8.1 StoreIdParam: name: StoreId in: header required: true description: 'An unique identifier of store within the merchant''s eco-system.
' schema: type: string minLength: 4 maxLength: 256 example: '1234' PI-API-Merchant-ID: name: merchantId in: path required: true description: 'ID of the merchant in the PI API. ' schema: type: string minLength: 1 maxLength: 64 example: TM-Merchant-ID Terminal-ID: name: terminalId in: path required: true schema: type: string minLength: 1 maxLength: 64 description: 'UUID (Universally Unique Identifier) for a device, which is used by the PSU, if available. UUID identifies either a device or a device dependant application installation. In case of an installation identification this ID need to be unaltered until removal from device. ' example: terminal1 X-Request-ID-Param: name: X-Request-ID in: header required: true description: 'ID of the request, unique to the call, as determined by the initiating party.The contents and usage of the AuthorizationToken header field\ndepends on the authentication type as defined by the\nAuthorizationType header field.
\n\nWhen using the OAUTH approach, consequent API requests are being authorized using the\nrespective OAuth Access Token. The access token is sent to the API using the AuthorizationToken header\nfield and the BEARER authentication schema as defined in RFC 6750.\n
Example: 'Bearer SlAV32hkKG'
If USERNAME_PASSWORD is used as AuthorizationType a JSON object\nlike: { 'username': 'Tester', 'password': 'thePassword' } is expected.\nThe given user must have the an appropriate group to access the system\nusing the CHANNEL_REST. Please see the TM documentation how to create\nand assign right, roles and groups to user.
\n" schema: type: string minLength: 4 maxLength: 256 schemas: TransactionIdentifier: type: string minLength: 6 maxLength: 40 description: 'A unique identifier of a transaction in the PI-API backend domain.