NX Technologies - Bezahl.de (0.2.0)

Download OpenAPI specification:Download

Description

This document describes the handling of the API and the basic concepts of sending payment requests and how to get updates when a buyer paid the payments.

The API is a JSON REST API which reports every information in Realtime. There are no batch processes involved. (an additional Webhook will be released soon)

Basic principles

  1. User An User can signup and us the service for free. All users are identified via the email address.

  2. Organizations To send a payment request an user has to create an organizations, which holds the information about organization address, target iban, allowed payment methods An organization can have multiple users with different roles.

  3. Orders and Payments The payment request is call order within the API. Every order belongs to an organization and an creator user. When a payer does a payment the order will be updated with the information regarding the payment status.

Limitations

  1. Every Organization has (without a contract) the ability to send only 2 orders and invite one additional user.
    1. If you use the Staging Enviroment and it is down more than 10 Minutes, please inform us, that you need this enviroment.
    2. If you miss any API Endpoint, we may have not documented the endpoint yet, just ask us and we are happy to help you.

Workflow Overview

shows the process workflow

  1. You create a new payment request (order)

     POST [API]/order
     {
       "name": "Zahlung #123", // public name
       "price": 1000000, // price in euro cent
       "orgId": "abcdef", // organization id
     }
    
     // response
     {
       "id": "BJ8ivGHSKq", // order reference
       ...
     }
  2. (Optional) You send the order via E-Mail

     POST [API]/order/:orderid/recipient
     {
       "recipient" : {
         "email": "mail@example.com"
       }
     }
    
     //response
     { ... }
  3. Payer will receive the payment request via email (from Bezahl.de) or direct from the Dealer

  4. Payer will choose one of the payment methods and will start the payment process

  5. Every status update is requestable via API

     GET [API]/order/:orderid
    
     //response
     {
       "status": "open",
       ...
     }

Environments

We provide different systems for you to access the bezahl.de API

Staging

Authentication

For the Authentication with our System we provide a Token which you can generate at [host]/clients.

NX-Token

Then the user receives a token which should be provided for each Call as NX-Token Header.

  1. Now you can access the API in the name of the user with the HTTP Header NX-Token.
     curl -X GET \
       https://partner.staging.sicherbezahlen.de/nxt/v1/user \
       -H 'Content-Type: application/json' \
       -H 'NX-Token: [token]'

generate NX-Token via API

  1. login

     curl -X POST \
       https://partner.staging.sicherbezahlen.de/nxt/v1/auth/login \
       -H 'Content-Type: application/json' \
       -d '{
         "email": "",
         "password": ""
       }'
  2. grap the temporary token from the Response and put at [TOKEN]

     curl -X POST \
       https://partner.staging.sicherbezahlen.de/nxt/v1/auth/token \
       -H 'Content-Type: application/json' \
       -H 'NX-Token: [TOKEN]' \
       -d '{
         "expiresIn": "86400",
         "description": "generic api token or put your name in it"
       }'
     // expiresIn: provides the expires seconds from now.
     // description: any description you want to provide to the user
    
     // response
     {
       "token": "[TOKEN]"
     }

Questions

If you have any questions, don't hesitate to contact us at dev@nx-technologies.com or our customer service at https://bezahl.de.

user

information about the user

getUser Data

This can only be done by the logged in user.

header Parameters
NX-Token
required
string

Responses

200

successful operation

get /user
https://mein.sicherbezahlen.de/nxt/v1/user

Response samples

application/json
Copy
Expand all Collapse all
{
  • "id": "SJyN6dR-7",
  • "email": "foo@bar.de",
  • "activeOrganization": "5b3379c1b81d2b5c81619f85"
}

organization

maintain an organization

get list of organization

This can only be done by the logged in user.

header Parameters
NX-Token
required
string

Responses

200

successful operation

get /organization/
https://mein.sicherbezahlen.de/nxt/v1/organization/

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

get one organization

This can only be done by the logged in user.

path Parameters
orgId
required
string

id of the organization

header Parameters
NX-Token
required
string

Responses

200

successful operation

get /organization/:orgId
https://mein.sicherbezahlen.de/nxt/v1/organization/:orgId

Response samples

application/json
Copy
Expand all Collapse all
{
  • "id": "string",
  • "key": "string",
  • "name": "string",
  • "nick": "string",
  • "picture": "string",
  • "contact":
    {
    },
  • "users":
    [
    ],
  • "bankaccounts":
    [
    ],
  • "paymentoptions":
    {
    }
}

order

create and track status of an order

get all orders

This can only be done by the logged in user.

header Parameters
NX-Token
required
string

Responses

200

successful operation

get /order
https://mein.sicherbezahlen.de/nxt/v1/order

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

get one order

This can only be done by the logged in user.

path Parameters
id
required
string

id of the single order

header Parameters
NX-Token
required
string

Responses

200

successful operation

get /order/:id
https://mein.sicherbezahlen.de/nxt/v1/order/:id

Response samples

application/json
Copy
Expand all Collapse all
{
  • "name": "string",
  • "price": 0,
  • "organization": "string",
  • "status": "open",
  • "paymentselected": true,
  • "pickupdate": "2018-10-15",
  • "paymentoptions":
    {
    },
  • "payments":
    [
    ],
  • "attachements":
    [
    ],
  • "recipient":
    [
    ],
  • "creator":
    {
    },
  • "contactperson":
    {
    }
}

add new order

This can only be done by the logged in user.

header Parameters
NX-Token
required
string
Request Body schema: application/json
orgId
string

id of the organization the order will be assigned

name
string

title for the order

price
integer

price in cent

pickupdate
string <date>

date as UTC timestamp.

contactperson
string <email>

The user's e-mail address, which is displayed to the buyer as a contact person. If this field is empty, the requesting user will be used.

Responses

200

successful operation

post /order/
https://mein.sicherbezahlen.de/nxt/v1/order/

Request samples

application/json
Copy
Expand all Collapse all
{
  • "orgId": "string",
  • "name": "string",
  • "price": 0,
  • "pickupdate": "2018-10-15",
  • "contactperson": "user@example.com"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "responsekey": "order.add.success",
  • "responsemessage": "Erfolgreich gespeichert"
}

upload attachement

This can only be done by the logged in user.

path Parameters
id
required
string

id of the single order

header Parameters
NX-Token
required
string
Request Body schema: application/json
attachement
string <byte>

Responses

200

successful operation

post /order/:id/attachement
https://mein.sicherbezahlen.de/nxt/v1/order/:id/attachement

Request samples

application/json
Copy
Expand all Collapse all
{
  • "attachement": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "responsekey": "order.attachement.success",
  • "responsemessage": "Erfolgreich gespeichert"
}

add recipient

This can only be done by the logged in user.

path Parameters
id
required
string

id of the single order

header Parameters
NX-Token
required
string
Request Body schema: application/json
recipient
object

Responses

200

successful operation

post /order/:id/recipient
https://mein.sicherbezahlen.de/nxt/v1/order/:id/recipient

Request samples

application/json
Copy
Expand all Collapse all
{
  • "recipient":
    {
    }
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "responsekey": "order.attachement.success",
  • "responsemessage": "Erfolgreich gespeichert"
}

webhook

get webhoook list

This can only be done by the logged in user.

header Parameters
NX-Token
required
string

Responses

200

successful operation

get /webhook
https://mein.sicherbezahlen.de/nxt/v1/webhook

Response samples

application/json
Copy
Expand all Collapse all
[
  • {
    }
]

post webhoook

This can only be done by the logged in user.

header Parameters
NX-Token
required
string
Request Body schema: application/json
orgId
string
url
string
secret
string

Responses

200

successful operation

post /webhook
https://mein.sicherbezahlen.de/nxt/v1/webhook

Request samples

application/json
Copy
Expand all Collapse all
{
  • "orgId": "string",
  • "url": "string",
  • "secret": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "responsekey": "webhook.create.success",
  • "responsemessage": "Erfolgreich gespeichert"
}

delete webhoook

This can only be done by the logged in user.

header Parameters
NX-Token
required
string
Request Body schema: application/json
orgId
string
id
string

Responses

200

successful operation

delete /webhook
https://mein.sicherbezahlen.de/nxt/v1/webhook

Request samples

application/json
Copy
Expand all Collapse all
{
  • "orgId": "string",
  • "id": "string"
}

Response samples

application/json
Copy
Expand all Collapse all
{
  • "responsekey": "webhook.delete.success",
  • "responsemessage": "Erfolgreich gespeichert"
}