Introduction

Context

API Context

Payment Context

  • Payment Transaction ID – The identifier of the "Payment Customer" (starts with "PCI")
  • Payment Transaction – An 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

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:

IDName (DE)Description (DE)Name (EN)

16

ZG LS

Zahlungsgarantie Lastschrift

PAYMENTGUARANTEE_DEBIT
26

ZG KK

Zahlungsgarantie Kreditkarte

PAYMENTGUARANTEE_CREDITCARD
36VorkasseVorkassePREPAY
50Aut. ZG LSAutorisierung Zahlungsgarantie LastschriftPREAUTHORISATION_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
283AbschlagszahlungAbschlagszahlungPARTIAL_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
397Stakeholder-AnteilStakeholder-AnteilSTAKEHOLDER_PAYMENT
398Stakeholder-AbzugStakeholder-AbzugSTAKEHOLDER_DEDUCTION
437Stakeholder-GutschriftStakeholder-GutschriftSTAKEHOLDER_REFUND
438Stakeholder-RückforderungStakeholder-RückforderungSTAKEHOLDER_RECALL

The response model

Sample

{
    "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"
}

Integration

Get the details of one payment transaction

After you got a list of payment transactions you can request the details of these transactions.

For this you need to know the id of the payment transaction, f. e. "PCI_12XXXXXXXXXXXXXXXXXXXXXXXXXXXX" and the used payment method, f. e. "secupayprepays".

With this parameter you can use the API-Endpoint "GET Payment/Secupayprepays/PCI_12XXXXXXXXXXXXXXXXXXXXXXXXXXXX".

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

Get the list

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

NameTypeDescriptionSampleNotes
countintNumber of available entries2149
data
The result list

Get the details

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"
  }
}

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);

PHP-SDK

The "Get List"-Method command can be accessed via:

https://github.com/secuconnect/secuconnect-php-sdk-demo/blob/master/src/payment/transaction/getTransactions.php 

NodeJS-SDK

https://github.com/secuconnect/secuconnect-js-sdk-demo/blob/master/nodejs/src/payment/transaction/getTransactions.js

JAVA-SDK

https://github.com/secuconnect/secuconnect-java-sdk-demo/blob/master/src/main/java/com/secuconnect/demo/payment/transaction/getTransactions.java

Error-Handling

There are no special errors.