Onboarding Process

If there is a limited number of merchants, they can be onboarded in a manual process. Otherwise the onboarding needs to be automated.

The automated merchant onboarding consists of three steps:

  1. You create a contract for your merchant. This initiates the onboarding process.
  2. We conduct the further steps of registration with the merchant until they become eligible to receive payments.
  3. We mark the contract active, and send a push notification to your system.

Optionally, you upload the registration documents of the merchant to save them double effort. The upload can be automated, or done in secuOffice.

The above steps are described in more detail at the next pages.

Create a Merchant Contract

The first step is to create a contract for the new merchant/platform participant. This contract will be closed between the merchant/participant and us to the conditions of your framework contract. It authorises the merchant/participant to receive payments for sales/services at your marketplace/platform.

This contract is derived from a master contract, using the endpoint POST /api/v2/Payment/Contracts/{id}/requestId. The master contract ID in our example has the ID GCR_33V83WAUVJ8QHC226N3N9KM8Y0DSOH:

Request
POST /api/v2/Payment/Contracts/GCR_33V83WAUVJ8QHC226N3N9KM8Y0DSOH/RequestId HTTP/1.1
Host: connect-testing.secuconnect.com
Authorization: Bearer qb56tjj1bcvo9n2nj4u38k84lo
Content-Type: application/json
Accept: application/json
 
{
"contact": {
"salutation": "Mr.",
"title": "Dr.",
"forename": "Max",
"surname": "Mustermann",
"companyname": "Musterfirma GmbH",
"dob": "1981-02-03",
"email": "muster@example.com",
"phone": "+49 555 5555555",
"mobile": "+49 170 5555555",
"address": {
"street": "Musterstr.",
"street_number": "1a",
"postal_code": "09999",
"city": "Musterstadt",
"country": "DE"
}
},
"project": "Musterfirma GmbH",
"payout_account": {
"iban": "DE27100777770209299700",
"owner": "Musterfirma GmbH"
}
"payin_account": true,
"payout_purpose": "Auszahlung example.com"
}

Request parameters in detail:

Field

Type

Meaning

project

string

Projekt name; must be unique per marketplace or platform

payout_account

object

Bank account of the merchant or the platform participant

payout_account.owner

string

Account holder name in correct spelling

payout_account.iban

string

Account IBAN

payout_account.bic

string

Account BIC (only required for accounts not starting with β€œDE…”)

payin_account

boolean

Whether to create a payin_account; please use true 

payout_purpose

string

(Optional but recommended) Purpose that appears at the bank statement of the merchant or the platform participant

Up to 100 characters; accepts only:

  • Digits 0 .. 9
  • Upper and lower case letters A .. Z, a .. z
  • Space character (0x20)
  • Special characters: / ? : ( ) . , ' + -

Regex: ^[0-9A-Za-z \/?:().,'+\-]{1,100}$

If everything is fine, the API responds with 200 OK and the needed details:

Response
HTTP/1.1 200 OK
Content-Type: application/json
 
{
"merchant": {
"object": "general.merchants",
"id": "MRC_EDFUVDKYKY58CH0B70U73SFAGW0XOK"
},
"contract": {
"object": "general.contracts",
"id": "GCR_7GDYFMMJ9SK75P2BJRRN6JA8Y0DSOJ"
},
"apikey": "fc1aa3bed1b1608b2253fc407b96858d55121210"
}

After creation, the contract is locked for payouts. When the KYC process is finished and the contract is unlocked, you receive an automated push notification. This notification is described in the Reference section for Push Notifications.

The response object contains a contract ID (contract/id). You need to store this ID in the system. It is needed when you create transactions the orders.

Upload the Registration Documents

The documents accompanying the request can be uploaded with the HTTP multipart form-data method, or using a regular API request.

The Document Uploads can be accessed for up to twenty minutes. Please ensure that your application performs the file upload shortly before using the IDs in the following request.

Document Upload with Multipart Message

The endpoint for multipart message uploads is POST /api/v2/Document/Uploads with Content-Type: multipart/form-data:

Request
POST /api/v2/Document/Uploads HTTP/1.1
Host: connect-testing.secuconnect.com
Authorization: Bearer qb56tjj1bcvo9n2nj4u38k84lo
Content-Type: multipart/form-data; boundary=----Boundary7MA4YWxkTrZu0gW
Accept: application/json
 
----Boundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="Dummy file"; filename="dummy.pdf"
Content-Transfer-Encoding: base64
Content-Type: application/pdf
 
JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMg...GCg==
----Boundary7MA4YWxkTrZu0gW

If you need to understand more about multipart data transmission, you can refer to https://en.wikipedia.org/wiki/MIME#Form-Data.

Response
{
"object": "document.uploads",
"id": "DUP_8Z092GGNK60KD94JPZFKYDS6C67X4C",
"created": "2018-08-01T08:00:30+02:00"
}

Response parameters:

Field

Type

Meaning

object

string

Always document.uploads

id

string

ID of uploaded file; needed for subsequent API requests

created

string

Date and time of the upload (ISO 8601)

The file content is not contained in the object representation.

Document Upload with JSON Request

The endpoint for JSON uploads is POST /api/v2/Document/Uploads with Content-Type: application/json:

Request
POST /api/v2/Document/Uploads HTTP/1.1
Host: connect-testing.secuconnect.com
Authorization: Bearer qb56tjj1bcvo9n2nj4u38k84lo
Content-Type: application/json
Accept: application/json
 
{
"name": "Gewerbeanmeldung",
"type": "application/pdf",
"content": "JVBERi0xLjQKJcOkw7zDtsOfCjIgMCBvYmoKPDwvTGVuZ3RoIDMg...GCg=="
}

The parameters name and type are optional but recommended. The field content takes the Base64 encoded file.

The API responds with an representation of the created file object.

Response
HTTP/1.1 200 OK
Content-Type: application/json
 
{
"object": "document.uploads",
"id": "DUP_8Z092GGNK60KD94JPZFKYDS6C67X4C",
"created": "2018-08-01T08:00:30+02:00"
}

Response parameters:

Field

Type

Meaning

object

string

Always document.uploads

id

string

ID of uploaded file; needed for subsequent API requests

created

string

Date and time of the upload (ISO 8601)

The file content is not contained in the object representation.

Create a Service Case

Having uploaded the files, we create the Service Case.

The endpoint for this is POST /api/v2/Services/Uploadidents:

Request
POST /api/v2/Services/Uploadidents HTTP/1.1
Host: connect-testing.secuconnect.com
Accept: application/json
Content-Type: application/json
Accept-Charset: utf-8
Authorization: Bearer b7ekfehla82elit67jk7n1ng00
{
"contract_id": "GCR_7GDYFMMJ9SK75P2BJRRN6JA8Y0DSOJ",
"documents": [
      "DUP_8Z092GGNK60KD94JPZFKYDS6C67X4C",
"DUP_37L1T9B3BYGVTJ759FOKXFFPJY0NVG"
  ]
}

If everything is fine, the API responds with 200 OK and the ticket ID:

Response
HTTP/1.1 200 OK
Content-Type: application/json
 
{
"service_issue_id": 12345678
}

The response contains a service issue ID. It should be saved in your system. So it can be used to identify the ticket at secupay.

Check the Activation Status

Push Notification

When the contract is changed, our system sends an HTTPS POST request to your generic push URL. The JSON body contains information about the object and the event it was generated for:

Push Request
POST {YOUR_CALLBACK_URL_PATH} HTTP/1.1
Host: {YOUR_PLATFOM_DOMAIN}
Content-Type: application/json
 
{
"object": "event.pushes",
"id": "evt_b71d48758ad94c1dba39f2597b9ec190",
"created": "2021-07-12T08:12:00+02:00",
"target": "general.contracts",
"type": "changed",
"data": [
{
"object": "general.contracts",
"id": "GCR_7GDYFMMJ9SK75P2BJRRN6JA8Y0DSOJ"
}
]
}

The values "target": "general.contracts" and "type": "changed" signalise a modification of the General Contract.

The message is sent repeatedly until your system responds with 200 OK or another 2xx status code. After 24 hours without such acknowledgement, our system discards the notification for this event.

You can also provide a short response body in any format for help us with troubleshooting.

Read the Merchant Contract

Now you need to read the General Contract to recognise whether it is approved or not:

Request
GET /api/v2/General/Contracts/GCR_7GDYFMMJ9SK75P2BJRRN6JA8Y0DSOJ HTTP/1.1
Host: connect-testing.secuconnect.com
Authorization: Bearer qb56tjj1bcvo9n2nj4u38k84lo
Accept: application/json

If everything is fine, the API responds with 200 OK and the representation of the General Contract:

Response
HTTP/1.1 200 OK
Content-Type: application/json
 
{
"object": "general.contracts",
"id": "GCR_7GDYFMMJ9SK75P2BJRRN6JA8Y0DSOJ",
"id_old": 1015383,
"approved": true,
"merchant": {
"object": "general.merchants",
"id": "MRC_PTBGSDJPO0H024K2Q5FBOMD21UNATQ"
}
}

The property "approved" tells, whether the contract can receive payments (true) or not (false).

See Also