SecupayTransactionProductModel
Payment transaction is represented by instance of SecupayTransactionProductModel with following properties:
'object'
=>
'string'
,
'id'
=>
'string'
,
'trans_id'
=>
'string'
,
'status'
=>
'string'
,
'amount'
=>
'string'
,
'currency'
=>
'string'
,
'purpose'
=>
'string'
,
'order_id'
=>
'string'
,
'basket'
=>
'\Secuconnect\Client\Model\SecupayBasketItem[]'
,
'transaction_status'
=>
'string'
,
'accrual'
=>
'bool'
,
'payment_action'
=>
'string'
,
'transfer_purpose'
=>
'string'
,
'transfer_account'
=>
'\Secuconnect\Client\Model\SecupayTransactionProductModelTransferAccount'
,
'customer'
=>
'\Secuconnect\Client\Model\PaymentCustomersProductModel'
,
'used_payment_instrument'
=>
'\Secuconnect\Client\Model\SecupayTransactionProductModelUsedPaymentInstrument'
,
'redirect_url'
=>
'\Secuconnect\Client\Model\SecupayTransactionProductModelRedirectUrl'
,
'iframe_url'
=>
'string'
,
'container'
=>
'\Secuconnect\Client\Model\PaymentContainersProductModel'
SecupayTransactionProductModel |
|||
Payment transaction is represented by instance of SecupayTransactionProductModel |
|||
property |
description |
type |
possible values |
object |
Product name |
string |
#TODO |
id |
ID of product instance |
string |
18 alphanumerical characters |
trans_id |
Transaction identifier |
string |
#TODO |
status |
Transaction status |
string |
#TODO |
amount |
Total amount of payment in cents (or the smallest cash unit of the relevant currency) |
string |
Positive integer |
currency |
ISO 4217 code of currency, eg EUR for Euro. |
string |
ISO 4217 code of currency |
purpose |
The purpose of the payment. This is the later assignment of the payment is for example on the account statement of the buyer. |
string |
Text |
order_id |
Specifying an order number. Depending on the contract setting, this must be unique for each payment. |
string |
Up to user of API |
basket |
A list of items that are being purchased. |
SecupayBasketItem[] |
SecupayBasketItem |
transaction_status |
Transaction status |
string |
#TODO |
accrual |
Indicates whether the payment is locked for pay-out (TRUE) or not (FALSE). Standard value here is FALSE. |
bool |
True/False; default is False |
payment_action |
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. |
string |
"authorization", "sale"; default is "sale" |
transfer_purpose |
The purpose the payer needs to use for his transfer |
string |
Text |
transfer_account |
The bank account the payer needs to use for his transfer |
SecupayTransactionProductModelTransferAccount |
|
customer |
The customer object |
PaymentCustomersProductModel |
|
used_payment_instrument |
The payment data which has the payer used (like bank account, credit card, ...). This data is always masked. |
SecupayTransactionProductModelUsedPaymentInstrument |
#TODO |
redirect_url |
A list of redirect urls used for the payment checkout page |
SecupayTransactionProductModelRedirectUrl |
|
iframe_url |
The url of the payment checkout iframe |
string |
Reserved (for IFrame app). |
container |
The container object |
PaymentContainersProductModel |
|
Basket
The payment basket is a list of items that require payment. Those items may be goods or services. Each item is self-contained. The basket is independent from the broader payment structure, however it is always embedded in it.
The basket cannot be managed through API only. It is created when Payment is initiated and cancelled when Payment that contains it is cancelled. A Payment can not be modified, i.e. the basket can not be modified.
Basket do not require specific permissions, instead payment permissions are in effect.
The following types of basket elements are possible:
|
|
|
Code Snippet |
article |
Good or service |
The sum of types "article", "shipping" and "donation" must correspond to value "amount" of the transaction. "stakeholder_payment" is not included in sum of amount. |
{ "item_type" : "article" , "article_number" : "5AG000048.0" , "name" : "Bratwurst vom Hochlandrind" , "model" : "" , "ean" : "" , "quantity" : "2" , "price" : 802 , "total" : 1604 , "tax" : "7" , "reference_id" : "5AG000048.0_1" } |
shipping |
Shipping and handling |
{ "item_type" : "shipping" , "name" : "standard delivery" , "total" : 700 }, |
|
donation |
Donation |
|
|
coupon |
Coupon (will be displayed negative on the checkout page) |
|
|
stakeholder_payment |
Amount for third parties (needs a separate activation for the contract) |
Requires parameter contract_id or apikey to identify the recipient. |
{ "item_type" : "stakeholder_payment" , "apikey" : "8e4e30958884ab9ad4451f0acbe794638653285b" , "total" :500, "name" : "plattform provision - position5" } |
transaction_payout |
Special type for the payment method "payout" |
|
|
sub_transaction |
Allows dividing the basket into sub_baskets. |
sub_basket can contain items article, shipping, stakeholder payment, coupon or donation. Must not contain sub_transaction. Using a sub_transactions means that other items except sub_transaction in basket are not allowed. |
{ "item_type" : "sub_transaction" , "reference_id" : "5AG000048.0_5" , "apikey" : "37373c132df0299c5bdcf7c7638dd47aa41a2fe2" , "name" : "Position 5 aus Bestellung 5AG000048.0" , "total" : 2792 , "sub_basket" :[ ] } |
{
"customer"
:
"PCU_28ECP90XK2N7NCZ0YH3G93VK68JNAH"
,
"amount"
:
2792
,
"purpose"
:
"for what text"
,
"basket"
: [{
"item_type"
:
"sub_transaction"
,
"reference_id"
:
"5AG000048.0_5"
,
"apikey"
:
"37373c132df0299c5bdcf7c7638dd47aa41a2fe2"
,
"name"
:
"Position 5 aus Bestellung 5AG000048.0"
,
"total"
:
2792
,
"sub_basket"
: [{
"item_type"
:
"article"
,
"article_number"
:
"5AG000048.0"
,
"name"
:
"Bratwurst vom Hochlandrind"
,
"model"
:
""
,
"ean"
:
""
,
"quantity"
:
"2"
,
"price"
:
802
,
"total"
:
1604
,
"tax"
:
"7"
,
"reference_id"
:
"5AG000048.0_1"
}, {
"item_type"
:
"article"
,
"article_number"
:
"5AG000047.0"
,
"name"
:
"Knacker vom Hochlandrind"
,
"model"
:
""
,
"ean"
:
""
,
"quantity"
:
"6"
,
"price"
:
198
,
"total"
:
1188
,
"tax"
:
"7"
,
"reference_id"
:
"5AG000047.0_5"
}, {
"item_type"
:
"stakeholder_payment"
,
"apikey"
:
"8e4e30958884ab9ad4451f0acbe794638653285b"
,
"total"
:
500
,
"name"
:
"plattform provision - position5"
}]
}]
}
property |
description |
type |
possible values |
---- |
Basket is just PHP array and it contains SecupayBasketItem |
|
|
SecupayBasketItem
As explained in section above basket items represent particular goods or services for which Payment is to be made.
'item_type'
=>
'string'
,
'article_number'
=>
'string'
,
'quantity'
=>
'string'
,
'name'
=>
'string'
,
'model'
=>
'string'
,
'ean'
=>
'string'
,
'tax'
=>
'string'
,
'total'
=>
'string'
,
'price'
=>
'string'
,
'apikey'
=>
'string'
,
'transaction_hash'
=>
'string'
,
'contract_id'
=>
'string'
SecupayBasketItem |
|||
property |
description |
type |
possible values |
item_type |
Category of item |
string |
"shipping", "article" |
article_number |
Article number, if item is of article category |
string |
#TODO |
quantity |
Quantity of articles in item |
string |
Positive integer |
name |
Descriptive name of item |
string |
Text |
model |
Model of item |
string |
Text |
ean |
European article number |
string |
Valid EAN |
tax |
Applicable tax in percentages |
string |
#TODO |
total |
Total price |
string |
#TODO |
price |
Price of single article, if item is of article category |
string |
#TODO |
apikey |
#TODO |
string |
#TODO |
transaction_hash |
#TODO |
string |
#TODO |
contract_id |
#TODO |
string |
#TODO |
SecupayTransactionProductModelTransferAccount
SecupayTransactionProductModelTransferAccount describe the bank account the payer needs to use for his transfer.
'iban'
=>
'string'
,
'bic'
=>
'string'
,
'accountnumber'
=>
'string'
,
'bankcode'
=>
'string'
,
'account_owner'
=> 'string
SecupayTransactionProductModelTransferAccount |
|||
property |
description |
type |
possible values |
iban |
IBAN |
string |
Valid IBAN |
bic |
BIC |
string |
Valid BIC |
accountnumber |
Bank account number |
string |
Bank account number |
bankcode |
The name of the bank institute |
string |
Valid name of the bank institute |
account_owner |
The owner of bank account |
string |
Valid bank account owner |
PaymentCustomersProductModel
See PaymentCustomersProductModel section here for full definition.
SecupayTransactionProductModelUsedPaymentInstrument
The payment data which has the payer used (like bank account, credit card, ...). This data is always masked.
'type'
=>
'string'
,
'data'
=>
'\Secuconnect\Client\Model\BankAccountDescriptor'
SecupayTransactionProductModelUsedPaymentInstrument |
|||
property |
description |
type |
possible values |
type |
The type of the payment instrument data, like: 'bank_account' or 'credit_card' |
string |
#TODO |
data |
Holds the payment instrument data |
BankAccountDescriptor |
|
SecupayTransactionProductModelRedirectUrl
A list of redirect urls used for the payment checkout page
'iframe_url'
=>
'string'
,
'url_success'
=>
'string'
,
'url_failure'
=>
'string'
,
'url_push'
=> 'string
SecupayTransactionProductModelRedirectUrl |
|||
A list of redirect urls used for the payment checkout page |
|||
property |
description |
type |
possible values |
iframe_url |
Url of the payment checkout for iframe |
string |
URL |
url_success |
After successfully entering the cash data of the payer is returned to this page |
string |
URL |
url_failure |
After canceling or on errors the payer will be redirected to this page and can select there an another payment method |
string |
URL |
url_push |
The secupay system will be send status change notifications to this URL |
string |
URL |
PaymentContainersProductModel
See PaymentContainersProductModel section here for full definition.