Whats a Prepays Payment ?
Cash in Advance/Prepayment occurs when a buyer sends payment in the agreed currency and through agreed method to a seller before the product is manufactured and/or shipped. Upon receipt of payment this seller then ships the goods and all the necessary shipping and commercial documents directly to the buyer. See more

To use Secupay Prepays Payment your contract needs to be activated for this.

Canceling Secupay prepays transaction:
When the customer won’t have the ordered product anymore you can cancel the payment transaction and the payer will get his money back if he transferred it already.

Using the secuconnect API one can:

  • create a new prepay transaction;
  • ;
  • .

API uses following data structures:

SecuConnectApi.PaymentSecupayPrepaysApi

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

Method HTTP request Description
paymentSecupayPrepaysCancelById POST Payment/Secupayprepays/{hash}/cancel POST Payment/Secupayprepays/{id}/cancel
paymentSecupayPrepaysGetById GET Payment/Secupayprepays/{hash} GET Payment/Secupayprepays/{id}
paymentSecupayprepaysPost POST Payment/Secupayprepays POST Payment/Secupayprepays

paymentSecupayPrepaysCancelById

Object paymentSecupayPrepaysCancelById(hash)

POST Payment/Secupayprepays/{id}/cancel

Function to cancel the transaction

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.PaymentSecupayPrepaysApi();

let hash = "hash_example"; // String | Transaction hash

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

Parameters

Name Type Description Notes
hash String Transaction hash

Return type

Object

Authorization

oauth_token

HTTP request headers

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

paymentSecupayPrepaysGetById

SecupayTransactionProductModel paymentSecupayPrepaysGetById(hash)

GET Payment/Secupayprepays/{id}

Get the details of a payment transaction

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.PaymentSecupayPrepaysApi();

let hash = "hash_example"; // String | Payment transaction ID

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

Parameters

Name Type Description Notes
hash String Payment transaction ID

Return type

SecuConnectApi.SecupayTransactionProductModel

Properties

Name Type Description Notes
_object String Product name [optional]
id String ID of instance [optional]
transId Number Transaction identifier [optional]
status String Transaction status [optional]
amount Number Total amount of payment in cents (or the smallest cash unit of the relevant currency) [optional]
currency String ISO 4217 code of currency, eg EUR for Euro. [optional]
purpose String The purpose of the payment. This is the later assignment of the payment is for example on the account statement of the buyer. [optional]
orderId String Specifying an order number. Depending on the contract setting, this must be unique for each payment. [optional]
basket [SecupayBasketItem] A list of items that are being purchased. [optional]
transactionStatus String Transaction status (number) [optional]
accrual Boolean Indicates whether the payment is locked for pay-out (TRUE) or not (FALSE). Standard value here is FALSE. [optional]
paymentAction String Specifies whether a pre-authorization (\"authorization\") or instant payment ( \"sale\") is to be performed. Standard value here is \"sale\". The collection of the pre-authorized payment is made with the \"capture\" command. [optional]
transferPurpose String The purpose the payer needs to use for his transfer [optional]
transferAccount SecupayTransactionProductModelTransferAccount [optional]
customer PaymentCustomersProductModel The customer object [optional]
usedPaymentInstrument SecupayTransactionProductModelUsedPaymentInstrument [optional]
redirectUrl SecupayTransactionProductModelRedirectUrl [optional]
iframeUrl String The url of the payment checkout iframe [optional]
container PaymentContainersProductModel The container object [optional]

Authorization

oauth_token

HTTP request headers

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

paymentSecupayprepaysPost

SecupayTransactionProductModel paymentSecupayprepaysPost(opts)

POST Payment/Secupayprepays

Start a prepay payment transaction

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.PaymentSecupayPrepaysApi();

let opts = { 
  'body': new SecuConnectApi.SecupayTransactionProductDTO() // SecupayTransactionProductDTO | Prepay payment transaction input properties
};
apiInstance.paymentSecupayprepaysPost(opts).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

Name Type Description Notes
body SecupayTransactionProductDTO Prepay payment transaction input properties [optional]

Return type

SecuConnectApi.SecupayTransactionProductModel

Properties

Name Type Description Notes
_object String Product name [optional]
id String ID of instance [optional]
transId Number Transaction identifier [optional]
status String Transaction status [optional]
amount Number Total amount of payment in cents (or the smallest cash unit of the relevant currency) [optional]
currency String ISO 4217 code of currency, eg EUR for Euro. [optional]
purpose String The purpose of the payment. This is the later assignment of the payment is for example on the account statement of the buyer. [optional]
orderId String Specifying an order number. Depending on the contract setting, this must be unique for each payment. [optional]
basket [SecupayBasketItem] A list of items that are being purchased. [optional]
transactionStatus String Transaction status (number) [optional]
accrual Boolean Indicates whether the payment is locked for pay-out (TRUE) or not (FALSE). Standard value here is FALSE. [optional]
paymentAction String Specifies whether a pre-authorization (\"authorization\") or instant payment ( \"sale\") is to be performed. Standard value here is \"sale\". The collection of the pre-authorized payment is made with the \"capture\" command. [optional]
transferPurpose String The purpose the payer needs to use for his transfer [optional]
transferAccount SecupayTransactionProductModelTransferAccount [optional]
customer PaymentCustomersProductModel The customer object [optional]
usedPaymentInstrument SecupayTransactionProductModelUsedPaymentInstrument [optional]
redirectUrl SecupayTransactionProductModelRedirectUrl [optional]
iframeUrl String The url of the payment checkout iframe [optional]
container PaymentContainersProductModel The container object [optional]

Authorization

oauth_token

HTTP request headers

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