A payment container is an object to store a payment instrument of a customer. Currently you can only store bank account data. But in general it is open for all types of payment instruments, f. e. like credit card or a paypal account.

The advantage of this payment container is, that it’s allow you to store sensitive data and then use only the id of the container to create new payment transactions (without storing the details on your side). Depending on your access rights and on the sensibility of the data (f.e for credit card data) you are maybe only allowed to receive the masked data of the payment instrument.

When you transmit the customer id to this container, you are only allowed to store the same payment instrument once for this customer. Otherwise you will get an error. (But you are able to store this data to another customer when needed).

Using the secuconnect API one can:

  • create a new container;
  • read the container data;
  • update an existing container;
  • delete a container;
  • read a list of all existing containers.

Every API user who is able to access the payment service can create or update a Payment Container but To delete a Payment Container you need additional access rights, so for the most of the api users it is not allowed.

API uses following data structures:

PaymentContainersApi

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

Method HTTP request Description
paymentContainersGet GET Payment/Containers GET Payment/Containers
paymentContainersGetById GET Payment/Containers/{id} GET Payment/Containers/{id}
paymentContainersIdAssignSecondaryIdDelete DELETE Payment/Containers/{id}/assign/{secondary-id} DELETE Payment/Containers/{id}/assign/{secondary-id}
paymentContainersIdAssignSecondaryIdPost POST Payment/Containers/{id}/assign/{secondary-id} POST Payment/Containers/{id}/assign/{secondary-id}
paymentContainersIdDelete DELETE Payment/Containers/{id} DELETE Payment/Containers/{id}
paymentContainersIdPut PUT Payment/Containers/{id} PUT Payment/Containers/{id}
paymentContainersPost POST Payment/Containers POST Payment/Containers

paymentContainersGet

PaymentContainersList paymentContainersGet(count, offset, fields, q, sort)

GET Payment/Containers

Get a list of payment containers

Example

// Import classes:
//import io.secuconnect.client.ApiClient;
//import io.secuconnect.client.ApiException;
//import io.secuconnect.client.Configuration;
//import io.secuconnect.client.auth.*;
//import io.secuconnect.client.api.PaymentContainersApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth_token
OAuth oauth_token = (OAuth) defaultClient.getAuthentication("oauth_token");
oauth_token.setAccessToken("YOUR ACCESS TOKEN");

PaymentContainersApi apiInstance = new PaymentContainersApi();
Integer count = 56; // Integer | The number of items to return.
Integer offset = 56; // Integer | The position within the whole result set to start returning items (First element is at 0).
String 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
String 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])  *
String 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.
try {
    PaymentContainersList result = apiInstance.paymentContainersGet(count, offset, fields, q, sort);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PaymentContainersApi#paymentContainersGet");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
count Integer The number of items to return. [optional]
offset Integer 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

PaymentContainersList

Properties

Name Type Description Notes
count Integer Number of existing payment containers [optional]
data List<PaymentContainersProductModel> GET Payment/Containers [optional]

Authorization

oauth_token

HTTP request headers

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

paymentContainersGetById

PaymentContainersProductModel paymentContainersGetById(id)

GET Payment/Containers/{id}

Get all payment containers

Example

// Import classes:
//import io.secuconnect.client.ApiClient;
//import io.secuconnect.client.ApiException;
//import io.secuconnect.client.Configuration;
//import io.secuconnect.client.auth.*;
//import io.secuconnect.client.api.PaymentContainersApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth_token
OAuth oauth_token = (OAuth) defaultClient.getAuthentication("oauth_token");
oauth_token.setAccessToken("YOUR ACCESS TOKEN");

PaymentContainersApi apiInstance = new PaymentContainersApi();
String id = "id_example"; // String | Search one by provided id
try {
    PaymentContainersProductModel result = apiInstance.paymentContainersGetById(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PaymentContainersApi#paymentContainersGetById");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String Search one by provided id

Return type

PaymentContainersProductModel

Authorization

oauth_token

HTTP request headers

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

paymentContainersIdAssignSecondaryIdDelete

List<PaymentContainersProductModel> paymentContainersIdAssignSecondaryIdDelete(id, secondaryId)

DELETE Payment/Containers/{id}/assign/{secondary-id}

Removes an existing payment container assignment

Example

// Import classes:
//import io.secuconnect.client.ApiClient;
//import io.secuconnect.client.ApiException;
//import io.secuconnect.client.Configuration;
//import io.secuconnect.client.auth.*;
//import io.secuconnect.client.api.PaymentContainersApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth_token
OAuth oauth_token = (OAuth) defaultClient.getAuthentication("oauth_token");
oauth_token.setAccessToken("YOUR ACCESS TOKEN");

PaymentContainersApi apiInstance = new PaymentContainersApi();
String id = "id_example"; // String | Payment container id
String secondaryId = "secondaryId_example"; // String | Id for which container is currently assigned to
try {
    List<PaymentContainersProductModel> result = apiInstance.paymentContainersIdAssignSecondaryIdDelete(id, secondaryId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PaymentContainersApi#paymentContainersIdAssignSecondaryIdDelete");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String Payment container id
secondaryId String Id for which container is currently assigned to

Return type

List<PaymentContainersProductModel>

Authorization

oauth_token

HTTP request headers

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

paymentContainersIdAssignSecondaryIdPost

PaymentContainersProductModel paymentContainersIdAssignSecondaryIdPost(id, secondaryId)

POST Payment/Containers/{id}/assign/{secondary-id}

Assign an existing payment container to ...

Example

// Import classes:
//import io.secuconnect.client.ApiClient;
//import io.secuconnect.client.ApiException;
//import io.secuconnect.client.Configuration;
//import io.secuconnect.client.auth.*;
//import io.secuconnect.client.api.PaymentContainersApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth_token
OAuth oauth_token = (OAuth) defaultClient.getAuthentication("oauth_token");
oauth_token.setAccessToken("YOUR ACCESS TOKEN");

PaymentContainersApi apiInstance = new PaymentContainersApi();
String id = "id_example"; // String | Payment container id
String secondaryId = "secondaryId_example"; // String | Id to which container will be assigned
try {
    PaymentContainersProductModel result = apiInstance.paymentContainersIdAssignSecondaryIdPost(id, secondaryId);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PaymentContainersApi#paymentContainersIdAssignSecondaryIdPost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String Payment container id
secondaryId String Id to which container will be assigned

Return type

PaymentContainersProductModel

Authorization

oauth_token

HTTP request headers

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

paymentContainersIdDelete

List<PaymentContainersProductModel> paymentContainersIdDelete(id)

DELETE Payment/Containers/{id}

Delete payment container

Example

// Import classes:
//import io.secuconnect.client.ApiClient;
//import io.secuconnect.client.ApiException;
//import io.secuconnect.client.Configuration;
//import io.secuconnect.client.auth.*;
//import io.secuconnect.client.api.PaymentContainersApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth_token
OAuth oauth_token = (OAuth) defaultClient.getAuthentication("oauth_token");
oauth_token.setAccessToken("YOUR ACCESS TOKEN");

PaymentContainersApi apiInstance = new PaymentContainersApi();
String id = "id_example"; // String | Payment container id
try {
    List<PaymentContainersProductModel> result = apiInstance.paymentContainersIdDelete(id);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PaymentContainersApi#paymentContainersIdDelete");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String Payment container id

Return type

List<PaymentContainersProductModel>

Authorization

oauth_token

HTTP request headers

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

paymentContainersIdPut

PaymentContainersProductModel paymentContainersIdPut(id, body)

PUT Payment/Containers/{id}

Update payment container

Example

// Import classes:
//import io.secuconnect.client.ApiClient;
//import io.secuconnect.client.ApiException;
//import io.secuconnect.client.Configuration;
//import io.secuconnect.client.auth.*;
//import io.secuconnect.client.api.PaymentContainersApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth_token
OAuth oauth_token = (OAuth) defaultClient.getAuthentication("oauth_token");
oauth_token.setAccessToken("YOUR ACCESS TOKEN");

PaymentContainersApi apiInstance = new PaymentContainersApi();
String id = "id_example"; // String | Payment container id
PaymentContainersDTO body = new PaymentContainersDTO(); // PaymentContainersDTO | Payment container properties
try {
    PaymentContainersProductModel result = apiInstance.paymentContainersIdPut(id, body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PaymentContainersApi#paymentContainersIdPut");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
id String Payment container id
body PaymentContainersDTO Payment container properties

Return type

PaymentContainersProductModel

Authorization

oauth_token

HTTP request headers

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

paymentContainersPost

PaymentContainersProductModel paymentContainersPost(body)

POST Payment/Containers

Add new containers

Example

// Import classes:
//import io.secuconnect.client.ApiClient;
//import io.secuconnect.client.ApiException;
//import io.secuconnect.client.Configuration;
//import io.secuconnect.client.auth.*;
//import io.secuconnect.client.api.PaymentContainersApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure OAuth2 access token for authorization: oauth_token
OAuth oauth_token = (OAuth) defaultClient.getAuthentication("oauth_token");
oauth_token.setAccessToken("YOUR ACCESS TOKEN");

PaymentContainersApi apiInstance = new PaymentContainersApi();
PaymentContainersDTO body = new PaymentContainersDTO(); // PaymentContainersDTO | Payment container properties
try {
    PaymentContainersProductModel result = apiInstance.paymentContainersPost(body);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PaymentContainersApi#paymentContainersPost");
    e.printStackTrace();
}

Parameters

Name Type Description Notes
body PaymentContainersDTO Payment container properties

Return type

PaymentContainersProductModel

Authorization

oauth_token

HTTP request headers

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