The payment contract defines what payment methods and what additional payment methods you can use. To change something in your Contract using API you will need additional access rights for this(Currently only secupay users can delete or update a contract). Mostly you will be only allowed to get your data.

Sometimes you will get the access rights to call the method “clone” or “requestId”, which will creates new payment contracts (called sub-contract) with the same configuration of your payment contract. Then you are also allowed to get the data of your sub-contract (but not to modify them).

“clone” is when you want to create a sub-contract for yourself

“requestId” is when you want to create a sub-contract for a third party

Using the secuconnect API one can:

  • create a new contract;
  • clone contract;
  • read the contract data;
  • update an existing contract;
  • delete a contract;
  • read a list of all existing contracts.

Every API user who is able to access the payment service can read his data, and get a list of all existing contracts.

The following parameter MUST be transmitted every time a transaction is created or updated

  • project
  • contact
    • salutation
    • forename
    • surname
    • dob
    • companyname (only in case of a company)
    • address
      • street (street_number)
      • postal_code
      • city
    • email
    • phone
  • payout_account

Example

{
 "project":"project_name 2018-08-29 #000000",
 "contact":{
  "salutation":"Mr.",
  "forename":"John",
  "surname":"Doe",
  "dob":"1901-02-03",
  "address":{
   "street":"Example Street",
   "postal_code":"01234",
   "city":"Examplecity"
  },
  "email":{
   "email":"example@example.com"
  },
  "phone":{
   "phone":"0049-123-456789"
  }
 },
 "payout_account":{
  "iban":"DE89370400440532013000",
  "bic":"",
  "owner":"Test #1"
 }
}

SecuConnectApi.PaymentContractsApi

All URIs are relative to https://connect-testing.secupay-ag.de/api/v2/

Method HTTP request Description
paymentContractsGet GET Payment/Contracts GET Payment/Contracts
paymentContractsGetById GET Payment/Contracts/{id} GET Payment/Contracts/{id}
paymentContractsIdClonePost POST Payment/Contracts/{id}/clone POST Payment/Contracts/{id}/clone
paymentContractsIdDelete DELETE Payment/Contracts/{id} DELETE Payment/Contracts/{id}
paymentContractsIdPaymentMethodsGet GET Payment/Contracts/{id}/PaymentMethods GET Payment/Contracts/{id}/PaymentMethods
paymentContractsIdPut PUT Payment/Contracts/{id} PUT Payment/Contracts/{id}
paymentContractsIdRequestIdPost POST Payment/Contracts/{id}/requestId POST Payment/Contracts/{id}/requestId
paymentContractsPost POST Payment/Contracts POST Payment/Contracts

paymentContractsGet

PaymentContractsList paymentContractsGet(opts)

GET Payment/Contracts

Get a list of payment contracts

Example

import SecuConnectApi from 'secu_connect_api';
let defaultClient = SecuConnectApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth_token
let oauth_token = defaultClient.authentications['oauth_token'];
oauth_token.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new SecuConnectApi.PaymentContractsApi();

let opts = { 
  'count': 56, // Number | The number of items to return.
  'offset': 56, // Number | The position within the whole result set to start returning items (First element is at 0).
  'fields': "fields_example", // String | List of fields to include in the result. Nested properties can be accessed with this notation: prop1.prop2  Example: prop3,prop1.prop2
  'q': "q_example", // String | A query string to restrict the returned items to given conditions. The query string must consist of any combination of single expressions in the form property:condition.  *                  A condition may contain:  *                      - wildcard \"*\" for any number of characters  *                      - wildcard \"?\" for one character  *                      - ranges in the form [value TO value]  *  *                  Single expressions may combined by 'AND', 'OR', 'NOT' operators and parenthesis '(', ')' for grouping.  *                  Property names can be nested like \"prop1.prop2\".  *                  Example: (NOT customer.name:meier*) AND (customer.age:[30 TO 40] OR customer.age:[50 TO 60])  *                  
  'sort': "sort_example" // String | String with comma separated pairs of field:order (e.g. contact.surname:asc,contact.comapnyname:desc). Result set will be sorted by included fields, in ascending 'asc', or descending 'dsc' order.
};
apiInstance.paymentContractsGet(opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
count Number The number of items to return. [optional]
offset Number The position within the whole result set to start returning items (First element is at 0). [optional]
fields String List of fields to include in the result. Nested properties can be accessed with this notation: prop1.prop2 Example: prop3,prop1.prop2 [optional]
q String A query string to restrict the returned items to given conditions. The query string must consist of any combination of single expressions in the form property:condition. A condition may contain: - wildcard \"\" for any number of characters - wildcard \"?\" for one character - ranges in the form [value TO value] Single expressions may combined by 'AND', 'OR', 'NOT' operators and parenthesis '(', ')' for grouping. Property names can be nested like \"prop1.prop2\". Example: (NOT customer.name:meier) AND (customer.age:[30 TO 40] OR customer.age:[50 TO 60]) * [optional]
sort String String with comma separated pairs of field:order (e.g. contact.surname:asc,contact.comapnyname:desc). Result set will be sorted by included fields, in ascending 'asc', or descending 'dsc' order. [optional]

Return type

SwaggerJsClient.PaymentContractsList

Properties

Name Type Description Notes
count Number Number of existing payment contracts [optional]
data [PaymentContractsProductModel] GET Payment/Contracts [optional]

Authorization

oauth_token

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

paymentContractsGetById

PaymentContractsProductModel paymentContractsGetById(id)

GET Payment/Contracts/{id}

Get all payment contracts

Example

import SecuConnectApi from 'secu_connect_api';
let defaultClient = SecuConnectApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth_token
let oauth_token = defaultClient.authentications['oauth_token'];
oauth_token.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new SecuConnectApi.PaymentContractsApi();

let id = "id_example"; // String | Search one by provided id

apiInstance.paymentContractsGetById(id).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String Search one by provided id

Return type

PaymentContractsProductModel

Authorization

oauth_token

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

paymentContractsIdClonePost

PaymentContractsProductModel paymentContractsIdClonePost(id)

POST Payment/Contracts/{id}/clone

Clone an existing payment contract

Example

import SecuConnectApi from 'secu_connect_api';
let defaultClient = SecuConnectApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth_token
let oauth_token = defaultClient.authentications['oauth_token'];
oauth_token.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new SecuConnectApi.PaymentContractsApi();

let id = "id_example"; // String | Contract identifier

apiInstance.paymentContractsIdClonePost(id).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String Contract identifier

Return type

PaymentContractsProductModel

Authorization

oauth_token

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

paymentContractsIdDelete

[PaymentContractsProductModel] paymentContractsIdDelete(id)

DELETE Payment/Contracts/{id}

Delete payment contract

Example

import SecuConnectApi from 'secu_connect_api';
let defaultClient = SecuConnectApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth_token
let oauth_token = defaultClient.authentications['oauth_token'];
oauth_token.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new SecuConnectApi.PaymentContractsApi();

let id = "id_example"; // String | Payment contract id

apiInstance.paymentContractsIdDelete(id).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String Payment contract id

Return type

[PaymentContractsProductModel]

Authorization

oauth_token

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

paymentContractsIdPaymentMethodsGet

['String'] paymentContractsIdPaymentMethodsGet(id)

GET Payment/Contracts/{id}/PaymentMethods

Get available payment methods for given contract

Example

import SecuConnectApi from 'secu_connect_api';
let defaultClient = SecuConnectApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth_token
let oauth_token = defaultClient.authentications['oauth_token'];
oauth_token.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new SecuConnectApi.PaymentContractsApi();

let id = "id_example"; // String | Contract identifier

apiInstance.paymentContractsIdPaymentMethodsGet(id).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String Contract identifier

Return type

['String']

Authorization

oauth_token

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

paymentContractsIdPut

PaymentContractsProductModel paymentContractsIdPut(id, body)

PUT Payment/Contracts/{id}

Update payment contract

Example

import SecuConnectApi from 'secu_connect_api';
let defaultClient = SecuConnectApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth_token
let oauth_token = defaultClient.authentications['oauth_token'];
oauth_token.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new SecuConnectApi.PaymentContractsApi();

let id = "id_example"; // String | Payment contract id

let body = new SecuConnectApi.PaymentContractsDTO(); // PaymentContractsDTO | Payment contract properties

apiInstance.paymentContractsIdPut(id, body).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String Payment contract id
body PaymentContractsDTO Payment contract properties

Return type

PaymentContractsProductModel

Authorization

oauth_token

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

paymentContractsIdRequestIdPost

PaymentContractsRequestIdResult paymentContractsIdRequestIdPost(id)

POST Payment/Contracts/{id}/requestId

This method clones your payment contract, so that you can use this to separate the merchants of your marketplace. (Needs to be activated))

Example

import SecuConnectApi from 'secu_connect_api';
let defaultClient = SecuConnectApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth_token
let oauth_token = defaultClient.authentications['oauth_token'];
oauth_token.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new SecuConnectApi.PaymentContractsApi();

let id = "id_example"; // String | Contract identifier

apiInstance.paymentContractsIdRequestIdPost(id).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
id String Contract identifier

Return type

SwaggerJsClient.PaymentContractsRequestIdResult

Properties

Name Type Description Notes
contract PaymentContractsProductModel The payment contract object [optional]
apikey String Returns the apikey of the created merchant [optional]
payingAccount PaymentContractsRequestIdResultPayingAccount [optional]

Authorization

oauth_token

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined

paymentContractsPost

PaymentContractsProductModel paymentContractsPost(body)

POST Payment/Contracts

Add new contract

Example

import SecuConnectApi from 'secu_connect_api';
let defaultClient = SecuConnectApi.ApiClient.instance;

// Configure OAuth2 access token for authorization: oauth_token
let oauth_token = defaultClient.authentications['oauth_token'];
oauth_token.accessToken = 'YOUR ACCESS TOKEN';

let apiInstance = new SecuConnectApi.PaymentContractsApi();

let body = new SecuConnectApi.PaymentContractsDTO(); // PaymentContractsDTO | Payment contracts properties

apiInstance.paymentContractsPost(body).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
body PaymentContractsDTO Payment contracts properties

Return type

PaymentContractsProductModel

Authorization

oauth_token

HTTP request headers

  • Content-Type: Not defined
  • Accept: Not defined