This chapter refers to the chapter "3.4 Status check" of the flex.API documentation.

General

The call for getting the status of an existing payment transaction is similar to the old API, but you will receive a lot of additional information. In the new API you need to call the same URL (payment method) with which you had created the payment transaction.

API-Call

Old API

URL: https://api.secupay.ag/payment/status

HTTP-Method: POST

Request-Body

{
  "data":{
    "apikey":"d7a78f8363ed086e3235df4e627e2d69a57ed61a",
    "hash":"zqpprymhogcn2210038"
  }
}

Response-Body

{
  "status":"ok",
  "data":{
    "hash":"zqpprymhogcn2210038",
    "payment_status":"acccepted",
    "status":"accepted",
    "created":"2017-09-08 10:27:42",
    "demo":0,
    "trans_id":"9984095",
    "amount":199,
    "opt":{

    }
  },
  "errors":null
}

New API

URL: https://connect.secucard.com/api/v2/Payment/Secupaydebits/

HTTP-Method: GET

Request-Body

empty

Response-Body

{
  "object":"payment.secupaydebits",
  "id":"zqpprymhogcn2210038",
  "trans_id":"9984095",
  "status":"accepted",
  "amount":"199",
  "currency":"EUR",
  "purpose":"Test Order #1",
  "order_id":"100203",
  "transaction_status":"11",
  "basket":[
    {
      "item_type":"shipping",
      "name":"standard delivery",
      "tax":19,
      "total":1324
    },
    {
      "item_type":"article",
      "article_number":3211,
      "quantity":2,
      "name":"Testname 1",
      "ean":"4123412341243",
      "tax":19,
      "total":1324,
      "price":1000
    },
    {
      "item_type":"article",
      "article_number":48875,
      "quantity":2,
      "name":"Testname 1",
      "ean":"4123412341236",
      "tax":19,
      "total":1324,
      "price":1000
    }
  ],
  "payment_action":"sale",
  "customer":{
    "object":"payment.customers",
    "id":"PCU_29H566U4Q2MDZ9H2X75XU5T7QAA0AJ",
    "contract":{
      "object":"payment.contracts",
      "id":"PCR_2C0S37QHH2MASN9V875XU3YFNM8UA6"
    },
    "contact":{
      "forename":"Test FN",
      "surname":"Test LN",
      "companyname":"Test Company",
      "name":"Test FN Test LN",
      "salutation":"Herr",
      "address":{
        "street":"Test Street",
        "street_number":"5t",
        "postal_code":"12345",
        "city":"TestCity",
        "country":"DE"
      },
      "email":"example@example.com",
      "phone":"+4912342134123",
      "dob":"1901-02-03T00:00:00+01:00"
    },
    "created":"2017-09-08T09:52:37+02:00"
  },
  "used_payment_instrument":{
    "type":"bank_account",
    "data":{
      "owner":"Test FN Test LN",
      "iban":"DE37 XXXX XXXX XXXX XX05 24",
      "bic":"FTSBDEFAXXX",
      "bankname":"ABN AMRO Bank, Frankfurt Branch"
    }
  }
}