Introduction

Context

API Context

Payment Context

  • Payment Transaction IDThe identifier of the "Payment Customer" (starts with "PCI")

  • Payment TransactionAn order which should/was paid

  • PCI The Payment Transaction ID

Getting Started

Possible actions

  • Get a list of Payment Transactions

  • Cancel a specific Payment Transaction

  • Revoke the accrual flag of a specific Payment Transaction

The response model

Sample Response
{
"object":"payment.transactions",
"id":"PCI_12XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"merchant":{
"object":"general.merchants",
"id":"MRC_23XXXXXXXXXXXXXXXXXXXXXXXXXXXX"
},
"trans_id":11811777,
"product_id":310,
"product":"Crowdfunding Vorkasse",
"product_raw":"Crowdfunding Vorkasse",
"zahlungsmittel_id":0,
"contract_id":321321,
"amount":750000,
"currency":"EUR",
"created":"2018-03-28T23:29:27+02:00",
"updated":"2018-03-28T23:29:27+02:00",
"description":"",
"description_raw":"",
"status":25,
"status_text":"Vorkasse wartend",
"details":{
"cleared":"open",
"status":25,
"status_text":"Vorkasse wartend",
"status_simple":2,
"status_simple_text":"authorized",
"amount":750000,
"description":"",
"description_raw":""
},
"customer":{
"object":"general.users",
"id":"USR_34XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"companyname":null,
"title":null,
"salutation":null,
"forename":"Max",
"surname":"Muster"
},
"incoming_payment_date":"2018-11-23T12:00:00+01:00",
"payout_date":"2018-12-03T12:00:00+01:00"
}

Get a list of payment transactions

At first you can get a list of payment transactions.

For this you can use the API-Endpoint "GET Payment/Transactions".

API

Endpoint

GET https://connect.secucard.com/api/v2/Payment/Transactions

Header

Accept:application/json
Content-Type:application/json
Accept-Charset:utf-8
Authorization:Bearer {{access_token}}

Body

The body is not needed for GET calls.

Response

{
"count":2149,
"data":[
{
"object":"payment.transactions",
"id":"PCI_12XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
...
  }
]
}

Response-Parameter

Name

Type

Description

Sample

count

int

Number of available entries

2149

data

The result list

Get the details of one payment transaction

In order to get details for a transaction, you first have to request a list of payment transcations.

There are two ways to get the details for a transaction:

1) GET Payment/Transactions/PCI_XYZ - only the PCI can be used for the request; all payment methods can be accessed

2) GET Payment/Secupayprepays/PCI_XYZ - the exact endpoint has to be set e.g. Secupayprepays/Secupaydebits; PCI or paymentid (hash) can be used.

It is not possible to get additional details for a payment transaction that was not created via secuconnect API.

Request

GET /api/v2/Payment/Secupayprepays/PCI_12XXXXXXXXXXXXXXXXXXXXXXXXXXXX HTTP/1.1
Host: connect-testing.secupay-ag.de
Content-Type: application/json
Authorization: Bearer ...

Response

{
"object":"payment.secupayprepays",
"id":"xxxxxxxxxxxx1111111",
"trans_id":"11811777",
"status":"authorized",
"amount":750000,
"currency":"EUR",
"purpose":"ABC-1234-A1234-E12345",
"order_id":"11926",
"transaction_status":"25",
"payment_action":"sale",
"transfer_purpose":"TA 11811777",
"transfer_account":{
"iban":"DE19850400610000000000",
"bic":"COBADEFFXXX",
"accountnumber":"0000000000",
"bankcode":"85040061",
"account_owner":"secupay AG"
},
"customer":{
"object":"payment.customers",
"id":"PCU_W4XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"contract":{
"object":"payment.contracts",
"id":"PCR_26XXXXXXXXXXXXXXXXXXXXXXXXXXXX"
},
"contact":{
"forename":"Max",
"surname":"Muster",
"name":"Max Muster",
"salutation":"Herr",
"address":{
"street":"Berliner Allee",
"street_number":"1",
"postal_code":"01234",
"city":"Berlin"
},
"email":"max.muster@example.com",
"dob":"1974-09-16T23:00:00+01:00"
},
"created":"2018-03-28T23:29:26+02:00"
},
"used_payment_instrument":{
"type":"bank_account",
"data":{
"owner":"",
"iban":"DE19 XXXX XXXX XXXX XX00 00",
"bic":"COBADEFFXXX",
"bankname":"Commerzbank"
}
},
"redirect_url":{
"iframe_url":"https://api-testing.secupay-ag.de/payment/xxxxxxxxxxxx1111111",
"url_success":"http://example.com",
"url_failure":"http://example.com"
}
}

The field "used_payment_instrument" contains the payment data that was used by the payer (or source of the money). Some details can only be seen if your contract is has an active setting to do so.

Request Transactions via SDK

.NET-SDK

Get the list

var service = client.Payment.PaymentTransactions;
 
// Create a filter to reduce the result amount
var filter = new Product.Common.Model.QueryParams();
filter.Count = 1;
filter.SortOrder = new System.Collections.Generic.Dictionary<string, string>();
filter.SortOrder.Add("trans_id", "desc");
 
var transactions = service.GetList(filter);

Get the details

var service2 = client.Payment.Secupayprepays;
var transaction = service2.Get(transactions.List[0].Id);

Limitations

There are some limitations about the transactions you can see.

Currently, only the most common payment product ids are shown, these are for example:

ID

Name (DE)

Description (DE)

Name (EN)

16

ZG LS

Zahlungsgarantie Lastschrift

PAYMENTGUARANTEE_DEBIT

26

ZG KK

Zahlungsgarantie Kreditkarte

PAYMENTGUARANTEE_CREDITCARD

36

Vorkasse

Vorkasse

PREPAY

50

Aut. ZG LS

Autorisierung Zahlungsgarantie Lastschrift

PREAUTHORISATION_PAYMENTGUARANTEE_DEBIT

92

Gutschrift KK

Gutschrift Kreditkarte

PAYMENTGUARANTEE_CREDITCARD_REFUND

218

Aut. ZG KK

Voraut. Zahlungsgarantie Kreditkarte

PREAUTORISSATION_PAYMENTGUARANTEE_CREDITCARD

267

Kauf auf Rechnung

Kauf auf Rechnung

INVOICE

283

Abschlagszahlung

Abschlagszahlung

PARTIAL_PAYMENT

309

Crowdfunding Lastschrift Voraut.

Crowdfunding Lastschrift Voraut.

DEBIT_CROWDFUNDING

310

Crowdfunding Vorkasse

Crowdfunding Vorkasse

PREPAY_CROWDFUNDING

311

Crowdfunding Kreditkarte Voraut.

Crowdfunding Kreditkarte Voraut.

CREDITCARD_CROWDFUNDING

397

Stakeholder-Anteil

Stakeholder-Anteil

STAKEHOLDER_PAYMENT

398

Stakeholder-Abzug

Stakeholder-Abzug

STAKEHOLDER_DEDUCTION

437

Stakeholder-Gutschrift

Stakeholder-Gutschrift

STAKEHOLDER_REFUND

438

Stakeholder-Rückforderung

Stakeholder-Rückforderung

STAKEHOLDER_RECALL