Pensio Payment Gateway
Merchant API Integration Guide
10. Jan. 2012
Table of Contents
Revision History
5
Concept
7
Protocol
7
API base url
7
Authentication
7
Method calls
7
API/index
7
API/login
7
API/payments
8
Optional parameters
8
Return values
8
Example
8
Example XMLResult
8
API/captureReservation
10
Required parameters
10
Optional parameters
10
Example
10
Orderlines Example
10
Example XMLResult
10
API/releaseReservation
12
Required parameters
12
Example
12
Example XMLResult
12
API/refundCapturedReservation
13
Required parameters
13
Optional parameters
13
Example
13
Example XMLResult
13
API/splitTransaction (Deprecated)
15
Required parameters
15
Example
15
Example XMLResult
15
API/setupSubscription
18
Required parameters
18
Optional parameters
18
Ignored parameters
18
Example
18
API/captureRecurring
19
Required parameters
19
Optional parameters
19
Example
19
Example XMLResult
19
API/preauthRecurring
21
Required parameters
21
Optional parameters
21
Example
21
Example XMLResult
21
API/fundingList
23
Required parameters
23
Optional parameters
23
Example
23
Example XMLResult
23
API/fundingDownload
25
Required parameters
25
Optional parameters
25
Example
25
Example Result
25
Content description
25
API/reservationOfFixedAmountMOTO
27
Required parameters:
27
Required Credit Card parameters (normal):
27
Required Credit Card parameters (token):
27
Optional parameters:
27
Mandatory fraud detection parameters:
27
Optional fraud detection parameters:
28
Example (based on new credit card)
28
Example (based on credit card token)
28
Example XMLResult
28
Example XMLError (when using an unknown credit card token)
29
API/credit
30
Required parameters:
30
Required Credit Card parameters (normal):
30
Required Credit Card parameters (token):
30
Optional parameters:
30
API/getTerminals
31
Example XMLOutput
31
API/getInvoiceText
32
Required parameters
32
Example
32
Example XMLResult
32
Explanation of error cases
33
API/createPaymentRequest
35
GET Example:
35
Return xml example
35
Parameters additionally available for createPaymentRequest
35
API/createInvoiceReservation
37
Required parameters:
37
Optional parameters:
37
Mandatory parameters for invoice payments:
37
Parameters for invoice payment identification:
37
GET Example:
38
Return xml example
38
Detailed Response XML descriptions:
40
ThreeDSecureResult:
40
Revision History
Date
Changes
13. Jul. 2009
•Added revision history table
•Corrected http to https
4. Aug. 2009
•Corrected the example result of captureRecurring
9. Sep. 2009
•CreatedDate and UpdatedDate to returned Transactions
24. Nov. 2009
•Added API/preauthRecurring
26. Nov. 2009
•Added info about CardStatus
17. Dec. 2009
•Added <Result> to all api responses
12. Feb. 2010
•Changed old term 'transaction' with new term 'payment' where possible.
•Added MO/TO section.
16. Mar. 2010
•Added info about auto reauth
4. May. 2010
•Added 'payment_status' to payments API call
25. May. 2010
•Added note about refunds not being available on all payments
2. Jun. 2010
•Updated example xml
•Added fundingList documentation
23. Jun. 2010
•Added fraud detection parameters to response XML
7. Sep. 2010
•Added payment_source to MO/TO reservation method to allow
additional non 3DSecure eCommerce payments.
28. Sep. 2010
•Added updated description of the fundingdownload CSV file.
•Updated API response examples with “ReconciliationIdentifiers”.
•General update of examples
27. Oct. 2010
•Added explanation of error cases
19. Jan. 2011
•Added fraud/avs info to moto call
14. Feb. 2011
•Minor correction on fundingList example
15. Feb. 2011
•Added orderlines to capture
17. Feb. 2011
•Added datatypes to fundingDownload description
15. Mar. 2011
•Added getInvoiceText
28. Mar. 2011
•Added Example to getInvoiceText
10. May. 2011
•Added API/login method
11. May. 2011
•Added API/getTerminals method
•General cleanup of document
03. Oct. 2011
•Added documentation for createPaymentRequest
05. Oct. 2011
•Added description for callback url send to createPaymentRequest
Date
Changes
20. Oct. 2011
•Added documentation for createInvoiceReservation
25. Oct. 2011
•Documented the new elements in the API response
(ThreeDSecureResult, BlacklistToken, PaymentNature,
PaymentNatureService)
21. Dec. 2011
•Documented new elements in the API response
(CustomerInfo/UserAgent, CustomerInfo/IpAddress)
•Added documentation for credit api method
Concept
When the orders are being paid by the customers they end up as a payment in the Pensio Payment
Gateway. From there they must be handled by you either using our browser based Merchant
Information Interface or by integrating our API in your current ITsolution.
Protocol
The API uses normal HTTPS traffic for communication. This should pose no problems with
firewalls, it should be easy to integrate into anything and the traffic is encrypted. Since we use
HTTPS you can access all the actions from your browser to inspect the return values and formatting
of the responses.
API base url
https://{yourshopname}.pensio.com/merchant/API/
https://testgateway.pensio.com/merchant/API/
Authentication
To authenticate with our system your IT system must use normal HTTPauthentication. You can find
numerous examples in numerous programming languages on the web on how to do this. The
username and password for your shops is:
Username:
{API_USERNAME}
Password:
{API_PASSWORD}
Method calls
The API has a number of methods you can call on it. All of these are invoked with simple HTTP
requests and their responses are simple XML which can be parsed easily by your ITsystem.
API/index
This method requires no authentication and is presented for your system to test the connection to our
system.
API/login
This method requires authentication and is presented for your system to test the username/password
before doing any “real” API calls.
API/payments
This action is used to get a list of payments. This action takes some optional parameters which will
limit the number of results.
Optional parameters
shop
The shop that you want to get payments for – default is to show
payments from all the shops enabled for the APIuser.
string
terminal
The terminal you want to get payments for – detault is to show
payments for all terminals.
string
transaction_id
The id of a specific payment.
[09af]{1,32}
shop_orderid
The shop orderid passed in by the shop when the payment was
created.
[azAZ09]{1,100}
payment_status
The latest status of the payments seached for, e.g. 'preauth',
'captured','refunded','released' etc. See the status dropdown in the
orders search filter in the Merchant Information Interface for
more.
string
Return values
Below is an explanation of some of the nonobvious values in the returned xml.
<CardStatus>
Gives an indication wether a card is expired or is about to
expire. “Expired” is returned for expired credit cards,
“SoonExpired” for cards that will expire in the next 3
months and “Valid” for everything else. If no creditcard has
been set on the payment yet, it will be “NoCreditCard”
Expired|SoonExpired|
Valid|NoCreditCard
<RecurringMaxAmount>
The maximum amount that can be captured from a
Recurring Payment
float
<TransactionInfo>
The payment infos that was submitted to the payment form.
Key will be the tagname and the content the value.
Node
<FraudRiskScore>
When fraud detection is enabled for the terminal, this value
will contain the risk in percentage (0.00 – 100.00) of this
order being a fraud attempt
float
Example
https://gateway.pensio.com/merchant/API/payments/?terminal=Terminal+1Example XMLResult
<?xml version="1.0" encoding="utf8" ?> <APIResponse version="20100929">
<Header>
<Date>20100929T12:34:56+02:00</Date> <Path>API/transactions</Path>
<ErrorCode>0</ErrorCode> <ErrorMessage />
</Header> <Body>
<ResultFilter /> <Transactions> <Transaction>
<TransactionId>1</TransactionId> <CardStatus>Valid</CardStatus>
<CreditCardToken>93f534a2f5d66d6ab3f16c8a7bb7e852656d4bb2</CreditCardToken> <CreditCardMaskedPan>411111******1111</CreditCardMaskedPan>
<ThreeDSecureResult>Not_Applicable</ThreeDSecureResult>
<BlacklistToken>4f244dec4907eba0f6432e53b17a60ebcf51365e</BlacklistToken> <ShopOrderId>myorderid</ShopOrderId>
<Shop>Pensio Shop</Shop>
<Terminal>Pensio Test Terminal</Terminal> <TransactionStatus>captured</TransactionStatus> <MerchantCurrency>978</MerchantCurrency>
<CardHolderCurrency>978</CardHolderCurrency> <ReservedAmount>1.00</ReservedAmount>
<CapturedAmount>1.00</CapturedAmount> <RefundedAmount>0</RefundedAmount>
<RecurringMaxAmount>0</RecurringMaxAmount>
<CreatedDate>20100928 12:34:56</CreatedDate>
<UpdatedDate>20100928 12:34:56</UpdatedDate> <PaymentNature>CreditCard</PaymentNature> <PaymentNatureService name="TestAcquirer"> <SupportsRefunds>true</SupportsRefunds> <SupportsRelease>true</SupportsRelease>
<SupportsMultipleCaptures>true</SupportsMultipleCaptures> <SupportsMultipleRefunds>false</SupportsMultipleRefunds> </PaymentNatureService>
<FraudRiskScore>13.37</FraudRiskScore>
<FraudExplanation>Fraud detection explanation</FraudExplanation> <TransactionInfo>
<Form_Created_At>20100928 12:34:56</Form_Created_At> <Form_Provider>Pensio Test Form</Form_Provider>
<Merchant_Provided_Info>Some info by merchant</Merchant_Provided_Info> </TransactionInfo> <CustomerInfo> <UserAgent>Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.41 Safari/535.7</UserAgent> <IpAddress>127.127.127.127</IpAddress> </CustomerInfo> <ReconciliationIdentifiers> <ReconciliationIdentifier>
<Id>f4e2533ec5784383b075bc8a6866784a</Id> <Amount currency="978">1.00</Amount>
<Type>captured</Type>
<Date>20100928T12:00:00+02:00</Date> </ReconciliationIdentifier> </ReconciliationIdentifiers> </Transaction> </Transactions> </Body> </APIResponse>
API/captureReservation
When the funds of a payment has been reserved and the goods are ready for delivery your system
should capture the payment.
By default auto reauth is enabled for all terminals, which means if the capture fails the system will
automatically try to reauth the payment and then capture again. Reauthed payments, however, do not
have cvv or 3dsecure protection, which means the protection against chargebacks is not as good. If
you wish to disable auto reauth for one or more of your terminals please contact Pensio.
Required parameters
transaction_id
The id of a specific payment.
[09af]{1,32}
Optional parameters
amount
If you do not want to capture the full amount a smaller amount
can be captured. This must be more than 0.00 and it must be equal
to or less than the reserved amount.
float
orderLines
If you capture an invoice payment, the orderLines is mandatory.
OrderLines should be an array of lines with the following keys:
Key
Type
Description
description
String (255)
Description of item.
itemId
String (100)
Item number.
quantity
Decimal
Quantity.
taxPercent
Decimal
Decimal
unitCode
String (50)
Measurement unit, e.g., kg.
unitPrice
Decimal
Unit price excluding sales
tax
reconciliation_i
dentifier
If you wish to define the reconciliation identifier used in the reconciliation csv files, you can
choose to set it here.
Example
https://gateway.pensio.com/merchant/API/captureReservation/?transaction_id=12345&amount=0.20Orderlines Example
https://gateway.pensio.com/merchant/API/captureReservation/? transaction_id=12345&amount=14.50&orderLines[0][description]=White%20sugar&orderLines[0] [itemId]=productid&orderLines[0][quantity]=1.5&orderLines[0][taxPercent]=20&orderLines[0] [unitCode]=kg&orderLines[0][unitPrice]=5.75&orderLines[1][description]=Brown%20sugar&orderLines[1] [itemId]=productid2&orderLines[1][quantity]=2.5&orderLines[1][taxPercent]=20&orderLines[1] [unitCode]=kg&orderLines[1][unitPrice]=8.75Example XMLResult
<?xml version="1.0" encoding="utf8" ?> <APIResponse version="20100929">
<Header>
<Date>20100929T12:34:56+02:00</Date> <Path>API/captureReservation</Path> <ErrorCode>0</ErrorCode> <ErrorMessage></ErrorMessage> </Header> <Body> <CaptureAmount>0.20</CaptureAmount> <CaptureCurrency>978</CaptureCurrency> <Result>Success</Result>
<CaptureResult>Success</CaptureResult> <! deprecated > <Transactions>
<Transaction>
<TransactionId>1</TransactionId> <CardStatus>Valid</CardStatus>
<CreditCardToken>93f534a2f5d66d6ab3f16c8a7bb7e852656d4bb2</CreditCardToken> <CreditCardMaskedPan>411111******1111</CreditCardMaskedPan>
<ThreeDSecureResult>Not_Applicable</ThreeDSecureResult>
<BlacklistToken>4f244dec4907eba0f6432e53b17a60ebcf51365e</BlacklistToken> <ShopOrderId>myorderid</ShopOrderId>
<Shop>Pensio Shop</Shop>
<Terminal>Pensio Test Terminal</Terminal> <TransactionStatus>captured</TransactionStatus> <MerchantCurrency>978</MerchantCurrency>
<CardHolderCurrency>978</CardHolderCurrency> <ReservedAmount>1.00</ReservedAmount>
<CapturedAmount>1.00</CapturedAmount> <RefundedAmount>0</RefundedAmount>
<RecurringMaxAmount>0</RecurringMaxAmount>
<CreatedDate>20100928 12:34:56</CreatedDate>
<UpdatedDate>20100928 12:34:56</UpdatedDate> <PaymentNature>CreditCard</PaymentNature> <PaymentNatureService name="TestAcquirer"> <SupportsRefunds>true</SupportsRefunds> <SupportsRelease>true</SupportsRelease>
<SupportsMultipleCaptures>true</SupportsMultipleCaptures> <SupportsMultipleRefunds>false</SupportsMultipleRefunds> </PaymentNatureService>
<FraudRiskScore>13.37</FraudRiskScore>
<FraudExplanation>Fraud detection explanation</FraudExplanation> <TransactionInfo>
<Form_Created_At>20100928 12:34:56</Form_Created_At> <Form_Provider>Pensio Test Form</Form_Provider>
<Merchant_Provided_Info>Some info by merchant</Merchant_Provided_Info> </TransactionInfo> <CustomerInfo> <UserAgent>Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.41 Safari/535.7</UserAgent> <IpAddress>127.127.127.127</IpAddress> </CustomerInfo> <ReconciliationIdentifiers> <ReconciliationIdentifier>
<Id>f4e2533ec5784383b075bc8a6866784a</Id> <Amount currency="978">1.00</Amount>
<Type>captured</Type>
<Date>20100928T12:00:00+02:00</Date> </ReconciliationIdentifier> </ReconciliationIdentifiers> </Transaction> </Transactions> </Body> </APIResponse>
API/releaseReservation
Every now and then you for some reason do not want to capture a payment. In these cases you must
cancel it to release the reservation of the funds.
Required parameters
transaction_id
The id of a specific payment.
[09af]{1,32}
Example
https://gateway.pensio.com/merchant/API/releaseReservation/?transaction_id=12345
Example XMLResult
<?xml version="1.0" encoding="utf8" ?> <APIResponse version="20100929">
<Header>
<Date>20100929T12:34:56+02:00</Date> <Path>API/releaseReservation</Path> <ErrorCode>0</ErrorCode>
<ErrorMessage></ErrorMessage> </Header>
<Body>
<Result>Success</Result>
<CancelResult>Success</CancelResult> <! deprecated > <Transactions>
<Transaction>
<TransactionId>1</TransactionId> <CardStatus>Valid</CardStatus>
<CreditCardToken>93f534a2f5d66d6ab3f16c8a7bb7e852656d4bb2</CreditCardToken> <CreditCardMaskedPan>411111******1111</CreditCardMaskedPan>
<ThreeDSecureResult>Not_Applicable</ThreeDSecureResult>
<BlacklistToken>4f244dec4907eba0f6432e53b17a60ebcf51365e</BlacklistToken> <ShopOrderId>myorderid</ShopOrderId>
<Shop>Pensio Shop</Shop>
<Terminal>Pensio Test Terminal</Terminal>
<TransactionStatus>cancelled</TransactionStatus> <MerchantCurrency>978</MerchantCurrency>
<CardHolderCurrency>978</CardHolderCurrency> <ReservedAmount>1.00</ReservedAmount>
<CapturedAmount>0</CapturedAmount> <RefundedAmount>0</RefundedAmount>
<RecurringMaxAmount>0</RecurringMaxAmount>
<CreatedDate>20100928 12:34:56</CreatedDate>
<UpdatedDate>20100928 12:34:56</UpdatedDate> <PaymentNature>CreditCard</PaymentNature> <PaymentNatureService name="TestAcquirer"> <SupportsRefunds>true</SupportsRefunds> <SupportsRelease>true</SupportsRelease>
<SupportsMultipleCaptures>true</SupportsMultipleCaptures> <SupportsMultipleRefunds>false</SupportsMultipleRefunds> </PaymentNatureService>
<FraudRiskScore>13.37</FraudRiskScore>
<FraudExplanation>Fraud detection explanation</FraudExplanation> <TransactionInfo>
<Form_Created_At>20100928 12:34:56</Form_Created_At> <Form_Provider>Pensio Test Form</Form_Provider>
<Merchant_Provided_Info>Some info by merchant</Merchant_Provided_Info> </TransactionInfo>
<UserAgent>Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.41 Safari/535.7</UserAgent> <IpAddress>127.127.127.127</IpAddress> </CustomerInfo> <ReconciliationIdentifiers/> </Transaction> </Transactions> </Body> </APIResponse>
API/refundCapturedReservation
Sometimes after delivering the goods/services and capturing the funds you want to repay/refund the
customer. Either you want to make a full refund or you only want to make a partial refund.
Note that not all payments can be refunded, and some can be refunded multiple times, depending on
the payment nature (CreditCard, EPayment, BankPayment and iDEAL) and on the acquirer used.
Required parameters
transaction_id
The id of a specific payment.
[09af]{1,32}
Optional parameters
amount
The amount you want to refund the card holder. This must be less
than or equal to the amount which was captured in this payment.
float
reconciliation_i
dentifier
If you wish to define the reconciliation identifier used in the
reconciliation csv files, you can choose to set it here.
String {0,100}
Example
https://gateway.pensio.com/merchant/API/refundCapturedReservation/?transaction_id=12345&amount=0.12
Example XMLResult
<?xml version="1.0" encoding="utf8" ?> <APIResponse version="20100929">
<Header>
<Date>20100929T12:34:56+02:00</Date> <Path>API/refundCapturedReservation</Path> <ErrorCode>0</ErrorCode> <ErrorMessage></ErrorMessage> </Header> <Body> <RefundAmount>0.12</RefundAmount> <RefundCurrency>978</RefundCurrency> <Result>Success</Result>
<RefundResult>Success</RefundResult> <! deprecated > <Transactions>
<Transaction>
<TransactionId>1</TransactionId> <CardStatus>Valid</CardStatus>
<CreditCardToken>93f534a2f5d66d6ab3f16c8a7bb7e852656d4bb2</CreditCardToken> <CreditCardMaskedPan>411111******1111</CreditCardMaskedPan>
<ThreeDSecureResult>Not_Applicable</ThreeDSecureResult>
<BlacklistToken>4f244dec4907eba0f6432e53b17a60ebcf51365e</BlacklistToken> <ShopOrderId>myorderid</ShopOrderId>
<Terminal>Pensio Test Terminal</Terminal> <TransactionStatus>refunded</TransactionStatus> <MerchantCurrency>978</MerchantCurrency> <CardHolderCurrency>978</CardHolderCurrency> <ReservedAmount>1.00</ReservedAmount> <CapturedAmount>1.00</CapturedAmount> <RefundedAmount>0.12</RefundedAmount> <RecurringMaxAmount>0</RecurringMaxAmount> <CreatedDate>20100928 11:34:56</CreatedDate> <UpdatedDate>20100928 13:00:00</UpdatedDate> <PaymentNature>CreditCard</PaymentNature> <PaymentNatureService name="TestAcquirer"> <SupportsRefunds>true</SupportsRefunds> <SupportsRelease>true</SupportsRelease>
<SupportsMultipleCaptures>true</SupportsMultipleCaptures> <SupportsMultipleRefunds>false</SupportsMultipleRefunds> </PaymentNatureService>
<FraudRiskScore>13.37</FraudRiskScore>
<FraudExplanation>Fraud detection explanation</FraudExplanation> <TransactionInfo>
<Form_Created_At>20100928 12:34:56</Form_Created_At> <Form_Provider>Pensio Test Form</Form_Provider>
<Merchant_Provided_Info>Some info by merchant</Merchant_Provided_Info> </TransactionInfo> <CustomerInfo> <UserAgent>Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.41 Safari/535.7</UserAgent> <IpAddress>127.127.127.127</IpAddress> </CustomerInfo> <ReconciliationIdentifiers> <ReconciliationIdentifier>
<Id>f4e2533ec5784383b075bc8a6866784a</Id> <Amount currency="978">1.00</Amount>
<Type>captured</Type>
<Date>20100928T12:00:00+02:00</Date> </ReconciliationIdentifier>
<ReconciliationIdentifier>
<Id>8774bcef75494497948e82280ca69f80</Id> <Amount currency="978">0.12</Amount>
<Type>refunded</Type>
<Date>20100928T13:00:00+02:00</Date> </ReconciliationIdentifier> </ReconciliationIdentifiers> </Transaction> </Transactions> </Body> </APIResponse>
API/splitTransaction (Deprecated)
Please use multiple capture invocations instead.
If only part of the delivery can be delivered at the moment, the payment can be split into two.
Required parameters
transaction_id
The id of a specific payment.
[09af]{1,32}
amount
The amount you want for the first of the splitted payments. This
must be less than the amount which was authed in this payment.
float
Example
https://gateway.pensio.com/merchant/API/splitTransaction/?transaction_id=1&amount=1500.00
Example XMLResult
<?xml version="1.0" encoding="utf8" ?> <APIResponse version="20100929">
<Header>
<Date>20100929T12:34:56+02:00</Date> <Path>API/splitTransaction</Path> <ErrorCode>0</ErrorCode>
<ErrorMessage></ErrorMessage> </Header>
<Body>
<Result>Success</Result>
<SplitResult>Success</SplitResult> <! deprecated > <Transactions>
<Transaction>
<TransactionId>1</TransactionId> <CardStatus>Valid</CardStatus>
<CreditCardToken>93f534a2f5d66d6ab3f16c8a7bb7e852656d4bb2</CreditCardToken> <CreditCardMaskedPan>411111******1111</CreditCardMaskedPan>
<ThreeDSecureResult>Not_Applicable</ThreeDSecureResult>
<BlacklistToken>4f244dec4907eba0f6432e53b17a60ebcf51365e</BlacklistToken> <ShopOrderId>myorderid</ShopOrderId>
<Shop>Pensio Shop</Shop>
<Terminal>Pensio Test Terminal</Terminal> <TransactionStatus>splitted</TransactionStatus> <MerchantCurrency>978</MerchantCurrency>
<CardHolderCurrency>978</CardHolderCurrency> <ReservedAmount>2500.00</ReservedAmount> <CapturedAmount>0</CapturedAmount> <RefundedAmount>0</RefundedAmount>
<RecurringMaxAmount>0</RecurringMaxAmount>
<CreatedDate>20100928 12:34:56</CreatedDate>
<UpdatedDate>20100928 12:34:56</UpdatedDate> <PaymentNature>CreditCard</PaymentNature> <PaymentNatureService name="TestAcquirer"> <SupportsRefunds>true</SupportsRefunds> <SupportsRelease>true</SupportsRelease>
<SupportsMultipleCaptures>true</SupportsMultipleCaptures> <SupportsMultipleRefunds>false</SupportsMultipleRefunds> </PaymentNatureService>
<FraudRiskScore>13.37</FraudRiskScore>
<FraudExplanation>Fraud detection explanation</FraudExplanation> <TransactionInfo>
<Form_Provider>Pensio Test Form</Form_Provider>
<Merchant_Provided_Info>Some info by merchant</Merchant_Provided_Info> </TransactionInfo> <CustomerInfo/> <ReconciliationIdentifiers/> </Transaction> <Transaction> <TransactionId>2</TransactionId> <CardStatus>Valid</CardStatus>
<CreditCardToken>93f534a2f5d66d6ab3f16c8a7bb7e852656d4bb2</CreditCardToken> <CreditCardMaskedPan>411111******1111</CreditCardMaskedPan>
<ThreeDSecureResult>Not_Applicable</ThreeDSecureResult>
<BlacklistToken>4f244dec4907eba0f6432e53b17a60ebcf51365e</BlacklistToken> <ShopOrderId>myorderid</ShopOrderId>
<Shop>Pensio Shop</Shop>
<Terminal>Pensio Test Terminal</Terminal> <TransactionStatus>preauth</TransactionStatus> <MerchantCurrency>978</MerchantCurrency> <CardHolderCurrency>978</CardHolderCurrency> <ReservedAmount>1500.00</ReservedAmount> <CapturedAmount>0</CapturedAmount> <RefundedAmount>0</RefundedAmount>
<RecurringMaxAmount>0</RecurringMaxAmount>
<CreatedDate>20100928 12:34:56</CreatedDate>
<UpdatedDate>20100928 12:34:56</UpdatedDate> <PaymentNature>CreditCard</PaymentNature> <PaymentNatureService name="TestAcquirer"> <SupportsRefunds>true</SupportsRefunds> <SupportsRelease>true</SupportsRelease>
<SupportsMultipleCaptures>true</SupportsMultipleCaptures> <SupportsMultipleRefunds>false</SupportsMultipleRefunds> </PaymentNatureService>
<FraudRiskScore>13.37</FraudRiskScore>
<FraudExplanation>Fraud detection explanation</FraudExplanation> <TransactionInfo/> <CustomerInfo/> <ReconciliationIdentifiers/> </Transaction> <Transaction> <TransactionId>3</TransactionId> <CardStatus>Valid</CardStatus>
<CreditCardToken>93f534a2f5d66d6ab3f16c8a7bb7e852656d4bb2</CreditCardToken> <CreditCardMaskedPan>411111******1111</CreditCardMaskedPan>
<ThreeDSecureResult>Not_Applicable</ThreeDSecureResult>
<BlacklistToken>4f244dec4907eba0f6432e53b17a60ebcf51365e</BlacklistToken> <ShopOrderId>myorderid</ShopOrderId>
<Shop>Pensio Shop</Shop>
<Terminal>Pensio Test Terminal</Terminal> <TransactionStatus>preauth</TransactionStatus> <MerchantCurrency>978</MerchantCurrency> <CardHolderCurrency>978</CardHolderCurrency> <ReservedAmount>1000.00</ReservedAmount> <CapturedAmount>0</CapturedAmount> <RefundedAmount>0</RefundedAmount>
<RecurringMaxAmount>0</RecurringMaxAmount>
<CreatedDate>20100928 12:34:56</CreatedDate>
<UpdatedDate>20100928 12:34:56</UpdatedDate> <PaymentNature>CreditCard</PaymentNature> <PaymentNatureService name="TestAcquirer"> <SupportsRefunds>true</SupportsRefunds> <SupportsRelease>true</SupportsRelease>
<SupportsMultipleCaptures>true</SupportsMultipleCaptures> <SupportsMultipleRefunds>false</SupportsMultipleRefunds> </PaymentNatureService>
<FraudRiskScore>13.37</FraudRiskScore>
<FraudExplanation>Fraud detection explanation</FraudExplanation> <TransactionInfo/>
<CustomerInfo/> <ReconciliationIdentifiers/> </Transaction> </Transactions> </Body> </APIResponse>
API/setupSubscription
This method is used to setup a subscription for later use with API/captureRecurring or
API/preauthRecurring. It is mostly a
Required parameters
The same as for “API/reservationOfFixedAmountMOTO”
Optional parameters
The same as for “API/reservationOfFixedAmountMOTO”
Ignored parameters
As this method is works as a shortcut for API/reservationOfFixedAmountMOTO the parameter
“type” will be ignored.
Example
https://gateway.pensio.com/merchant/API/setupSubscription? terminal=Pensio+Terminal&shop_orderid=abc123&amount=42.75¤cy=EUR&cardnum=4111111111111111&emont h=08&eyear=2022&cvc=123API/captureRecurring
This is used to capture a recurring payments once. You can call this multiple times with the same
payment to do several captures.
Required parameters
transaction_id
The id of the original recurring payment.
[09af]{1,32}
Optional parameters
amount
The amount you want to capture. This must be less than the max
amount defined by the original setup of a recurring payment
1.
float
reconciliation_i
dentifier
If you wish to define the reconciliation identifier used in the
reconciliation csv files, you can choose to set it here.
String {0,100}
Example
https://gateway.pensio.com/merchant/API/captureRecurring/?transaction_id=1&amount=5
Example XMLResult
<?xml version="1.0" encoding="utf8" ?> <APIResponse version="20100929">
<Header>
<Date>20100929T12:34:56+02:00</Date> <Path>API/captureRecurring</Path> <ErrorCode>0</ErrorCode>
<ErrorMessage></ErrorMessage> </Header>
<Body>
<Result>Success</Result> <Transactions>
<Transaction>
<TransactionId>1</TransactionId> <CardStatus>Valid</CardStatus>
<CreditCardToken>93f534a2f5d66d6ab3f16c8a7bb7e852656d4bb2</CreditCardToken> <CreditCardMaskedPan>411111******1111</CreditCardMaskedPan>
<ThreeDSecureResult>Not_Applicable</ThreeDSecureResult>
<BlacklistToken>4f244dec4907eba0f6432e53b17a60ebcf51365e</BlacklistToken> <ShopOrderId>myorderid</ShopOrderId>
<Shop>Pensio Shop</Shop>
<Terminal>Pensio Test Terminal</Terminal>
<TransactionStatus>recurring_confirmed</TransactionStatus> <MerchantCurrency>978</MerchantCurrency>
<CardHolderCurrency>978</CardHolderCurrency> <ReservedAmount>0</ReservedAmount>
<CapturedAmount>0</CapturedAmount> <RefundedAmount>0</RefundedAmount>
<RecurringMaxAmount>10.00</RecurringMaxAmount> <CreatedDate>20100928 12:34:56</CreatedDate>
<UpdatedDate>20100928 12:34:56</UpdatedDate> <PaymentNature>CreditCard</PaymentNature> <PaymentNatureService name="TestAcquirer"> <SupportsRefunds>true</SupportsRefunds> <SupportsRelease>true</SupportsRelease>
<SupportsMultipleCaptures>true</SupportsMultipleCaptures> <SupportsMultipleRefunds>false</SupportsMultipleRefunds> </PaymentNatureService>
<FraudRiskScore>13.37</FraudRiskScore>
<FraudExplanation>Fraud detection explanation</FraudExplanation> <TransactionInfo>
<Form_Created_At>20100928 12:34:56</Form_Created_At> <Form_Provider>Pensio Test Form</Form_Provider>
<Merchant_Provided_Info>Some info by merchant</Merchant_Provided_Info> </TransactionInfo> <CustomerInfo/> <ReconciliationIdentifiers /> </Transaction> <Transaction> <TransactionId>2</TransactionId> <CardStatus>Valid</CardStatus>
<CreditCardToken>93f534a2f5d66d6ab3f16c8a7bb7e852656d4bb2</CreditCardToken> <CreditCardMaskedPan>411111******1111</CreditCardMaskedPan>
<ThreeDSecureResult>Not_Applicable</ThreeDSecureResult>
<BlacklistToken>4f244dec4907eba0f6432e53b17a60ebcf51365e</BlacklistToken> <ShopOrderId>myorderid</ShopOrderId>
<Shop>Pensio Shop</Shop>
<Terminal>Pensio Test Terminal</Terminal> <TransactionStatus>captured</TransactionStatus> <MerchantCurrency>978</MerchantCurrency>
<CardHolderCurrency>978</CardHolderCurrency> <ReservedAmount>5.00</ReservedAmount>
<CapturedAmount>5.00<CapturedAmount> <RefundedAmount>0</RefundedAmount>
<RecurringMaxAmount>0</RecurringMaxAmount>
<CreatedDate>20100928 12:34:56</CreatedDate>
<UpdatedDate>20100928 12:34:56</UpdatedDate> <PaymentNature>CreditCard</PaymentNature> <PaymentNatureService name="TestAcquirer"> <SupportsRefunds>true</SupportsRefunds> <SupportsRelease>true</SupportsRelease>
<SupportsMultipleCaptures>true</SupportsMultipleCaptures> <SupportsMultipleRefunds>false</SupportsMultipleRefunds> </PaymentNatureService>
<FraudRiskScore>13.37</FraudRiskScore>
<FraudExplanation>Fraud detection explanation</FraudExplanation> <TransactionInfo/>
<CustomerInfo/>
<ReconciliationIdentifiers> <ReconciliationIdentifier>
<Id>f4e2533ec5784383b075bc8a6866784a</Id> <Amount currency="978">5.00</Amount>
<Type>captured</Type>
<Date>20100928T12:34:56+02:00</Date> </ReconciliationIdentifier> </ReconciliationIdentifiers> </Transaction> </Transactions> </Body> </APIResponse>
API/preauthRecurring
This is used to create a preauth from a recurring payment, as opposed to capturing it right away. You
can call this multiple times with the same 'recurring_confirmed' payment to do several preauths.
Note that the reservations must later be captured with the API/captureRecurring call.
Required parameters
transaction_id
The id of the original recurring payment.
[09af]{1,32}
Optional parameters
amount
The amount you want to preauth. This must be less than the max
amount defined by the original setup of a recurring payment
2.
float
Example
https://gateway.pensio.com/merchant/API/preauthRecurring/?transaction_id=1&amount=5Example XMLResult
<?xml version="1.0" encoding="utf8" ?> <APIResponse version="20100929">
<Header>
<Date>20100929T12:34:56+02:00</Date> <Path>API/preauthRecurring</Path> <ErrorCode>0</ErrorCode>
<ErrorMessage></ErrorMessage> </Header>
<Body>
<Result>Success</Result> <Transactions>
<Transaction>
<TransactionId>1</TransactionId> <CardStatus>Valid</CardStatus>
<CreditCardToken>93f534a2f5d66d6ab3f16c8a7bb7e852656d4bb2</CreditCardToken> <CreditCardMaskedPan>411111******1111</CreditCardMaskedPan>
<ThreeDSecureResult>Not_Applicable</ThreeDSecureResult>
<BlacklistToken>4f244dec4907eba0f6432e53b17a60ebcf51365e</BlacklistToken> <ShopOrderId>myorderid</ShopOrderId>
<Shop>Pensio Shop</Shop>
<Terminal>Pensio Test Terminal</Terminal>
<TransactionStatus>recurring_confirmed</TransactionStatus> <MerchantCurrency>978</MerchantCurrency> <CardHolderCurrency>978</CardHolderCurrency> <ReservedAmount>0</ReservedAmount> <CapturedAmount>0</CapturedAmount> <RefundedAmount>0</RefundedAmount> <RecurringMaxAmount>10.00</RecurringMaxAmount> <CreatedDate>20100928 12:34:56</CreatedDate> <UpdatedDate>20100928 12:34:56</UpdatedDate> <PaymentNature>CreditCard</PaymentNature> <PaymentNatureService name="TestAcquirer"> <SupportsRefunds>true</SupportsRefunds> <SupportsRelease>true</SupportsRelease>
<SupportsMultipleCaptures>true</SupportsMultipleCaptures> <SupportsMultipleRefunds>false</SupportsMultipleRefunds>
</PaymentNatureService>
<FraudRiskScore>13.37</FraudRiskScore>
<FraudExplanation>Fraud detection explanation</FraudExplanation> <TransactionInfo>
<Form_Created_At>20100928 12:34:56</Form_Created_At> <Form_Provider>Pensio Test Form</Form_Provider>
<Merchant_Provided_Info>Some info by merchant</Merchant_Provided_Info> </TransactionInfo> <CustomerInfo/> <ReconciliationIdentifiers/> </Transaction> <Transaction> <TransactionId>2</TransactionId> <CardStatus>Valid</CardStatus>
<CreditCardToken>93f534a2f5d66d6ab3f16c8a7bb7e852656d4bb2</CreditCardToken> <CreditCardMaskedPan>411111******1111</CreditCardMaskedPan>
<ThreeDSecureResult>Not_Applicable</ThreeDSecureResult>
<BlacklistToken>4f244dec4907eba0f6432e53b17a60ebcf51365e</BlacklistToken> <ShopOrderId>myorderid</ShopOrderId>
<Shop>Pensio Shop</Shop>
<Terminal>Pensio Test Terminal</Terminal> <TransactionStatus>preauth</TransactionStatus> <MerchantCurrency>978</MerchantCurrency> <CardHolderCurrency>978</CardHolderCurrency> <ReservedAmount>5.00</ReservedAmount> <CapturedAmount>0</CapturedAmount> <RefundedAmount>0</RefundedAmount> <RecurringMaxAmount>0</RecurringMaxAmount> <CreatedDate>20100928 12:34:56</CreatedDate> <UpdatedDate>20100928 12:34:56</UpdatedDate> <PaymentNature>CreditCard</PaymentNature> <PaymentNatureService name="TestAcquirer"> <SupportsRefunds>true</SupportsRefunds> <SupportsRelease>true</SupportsRelease>
<SupportsMultipleCaptures>true</SupportsMultipleCaptures> <SupportsMultipleRefunds>false</SupportsMultipleRefunds> </PaymentNatureService>
<FraudRiskScore>13.37</FraudRiskScore>
<FraudExplanation>Fraud detection explanation</FraudExplanation> <TransactionInfo>
<Form_Created_At>20100928 12:34:56</Form_Created_At> <Form_Provider>Pensio Test Form</Form_Provider>
<Merchant_Provided_Info>Some info by merchant</Merchant_Provided_Info> </TransactionInfo> <CustomerInfo/> <ReconciliationIdentifiers/> </Transaction> </Transactions> </Body> </APIResponse>
API/fundingList
Used to get a list of fundings, which details when and how much money is transfered to your
companys bank account.
Required parameters
Optional parameters
page
This method will only show 100 fundings pr. call. Setting this
parameter allows you to fetch more.
Int
Example
https://gateway.pensio.com/merchant/API/fundingList/?page=1Example XMLResult
<?xml version="1.0" encoding="utf8" ?> <APIResponse version="20100929">
<Header>
<Date>20100929T12:34:56+02:00</Date> <Path>API/fundingList</Path>
<ErrorCode>0</ErrorCode> <ErrorMessage></ErrorMessage> </Header> <Body> <Fundings numberOfPages="1"> <Funding>
<Filename>CreatedByTest</Filename>
<ContractIdentifier>1234567890123456</ContractIdentifier> <Shops>
<Shop>Pensio Functional Test Shop</Shop> <Shop>Pensio Functional Test Shop Two</Shop> </Shops>
<Acquirer>TestAcquirer</Acquirer> <FundingDate>20100926</FundingDate> <Amount>50.00 EUR</Amount>
<CreatedDate>20100927</CreatedDate> <DownloadLink> http://localhost/merchant.php/API/fundingDownload?id=1 </DownloadLink> </Funding> <Funding>
<Filename>CreatedByTest</Filename>
<ContractIdentifier>1234567890123456</ContractIdentifier> <Shops>
<Shop>Pensio Functional Test Shop</Shop> <Shop>Pensio Functional Test Shop Two</Shop> </Shops>
<Acquirer>TestAcquirer</Acquirer> <FundingDate>20100926</FundingDate> <Amount>50.00 EUR</Amount>
<CreatedDate>20100927</CreatedDate> <DownloadLink> http://localhost/merchant.php/API/fundingDownload?id=2 </DownloadLink> </Funding> </Fundings>
</Body> </APIResponse>
API/fundingDownload
Used to get a comma separated value file containing the details of a funding.
Required parameters
Optional parameters
id
The id of the funding.
Int
Example
https://gateway.pensio.com/merchant/API/fundingDownload?id=32Example Result
Date;Type;ID;"Reconciliation Identifier";Payment;Order;Terminal;Shop;"Transaction Currency";"Transaction Amount";"Exchange Rate";"Settlement Currency";"Settlement Amount";"Fixed Fee";"Fixed Fee VAT";"Rate Based Fee";"Rate Based Fee VAT" "20100922 00:00:00";payment;5;3f664accc71d45e68c6aa15838451a77;5;"settlement functional4c9a127b159a0";"Pensio Test Terminal";"Pensio Functional Test Shop";EUR;50.00;100.000000;EUR;50.00;;;;Content description
Column name
Type
Description
Date
YYYYMMDD
The 'settlement date' of the transaction – this is the date within
the Visa/MC networks where the transaction is processed.
Typically this is the bank day following the date of the
payment/refund.
Type
string
Type of the funding. Possible values: payment, refund,
chargeback, and adjustment.
ID
string(100)
Pensio payment ID
Reconciliation Identifier
*UUID
Unique ID of the funding record
Payment
*[09af](140)
Pensio payment ID
Order
*string(100)
Shop order ID
Terminal
*string(100)
Terminal name
Shop
*string(100)
Shop name
Transaction Currency
string(3)
The currency of the original payment, ISO4217
Transaction Amount
float
The amount of the original payment
Exchange Rate
float
Exchange rate from transaction to settlement amount. (exchage
rate 1/1 = 100)
Settlement Currency
string(3)
The currency of the settlement record, ISO4217
Settlement Amount
float
The amount of the settlement record
Fixed Fee VAT
float
VAT of the transaction cost
Rate Based Fee
float
Rate based transaction cost (incl. VAT where applicable)
Rate Based Fee VAT
float
VAT of the transaction cost
API/reservationOfFixedAmountMOTO
This will create a MO/TO payment. The payment can be made with a credit card, or a credit card
token and the CVV.
Required parameters:
terminal
<TERMINAL TITLE>
string
shop_orderid
The id of the order in your web shop, this is what we will post
back to you so you know which order a given payment is
associated with.
[azAZ09]{1,100}
amount
The amount of the payment in english notation (ex. 89.95)
For a recurring payment the amount is the maximum amount for
each capture.
float
currency
The currency of the order. It is a 3 digit currency code. Our
gateway comply with the ISO4217 standard
3.
Integer
Required Credit Card parameters (normal):
cardnum
The credit card number (PAN)
[09]{1119}
emonth
The expiry month
0112
eyear
The expiry year
20002999
Required Credit Card parameters (token):
credit_card_token
A credit card token previously received from an eCommerce
payment or an other MO/TO payment.
[09af]{40}
Optional parameters:
cvc
The CVC/CVV/CVV2/Security Code
[09]{34}
transaction_info
This is a onedimensional associative array. This is where you
put any value that you would like to bind to the payment.
Array, max 50 entries.
Each entry of max 255
chars.
type
The type of payment. This should be either “payment”,
“paymentAndCapture” or “recurring”. Defaults to “payment”
String
payment_source
The source of the payment. Default is “moto”
“eCommerce”/”moto”
Mandatory
4fraud detection parameters:
billing_city
The city of the customer's billing address.
string
billing_region
The region of the customer's billing
address.
string
billing_postal
The postal code of the customer's billing
string
3 http://www.iso.org/iso/support/faqs/faqs_widely_used_standards/widely_used_standards_other/currency_codes/currency_codes_list1.htm
or read more about the standard in general at: http://en.wikipedia.org/wiki/ISO_4217 4 Fraud detection parameters are only mandatory if fraud detection is enabled for the terminal
address.
billing_country
The country of the customer's billing
address as a 2 character ISO3166 country
code.
[azAZ]{2}
Optional fraud detection parameters:
The customer's email address.
string
customer_phone
The customer's telephone number.
string
bank_name
The name of the bank where the credit
card was issued.
string
bank_phone
The phone number of the bank where the
credit card was issued.
String
billing_firstname
The first name for the customer's billing
address.
String
billing_lastname
The last name for the customer's billing
address.
String
billing_address
The street address of the customer's
billing address.
string
Example (based on new credit card)
<form action="https://gateway.pensio.com/merchant/API/reservationOfFixedAmountMOTO/"> <input name="terminal" value="Terminal 1" />
<input name="shop_orderid" value="myorder123" /> <input name="amount" value="2499.95" />
<input name="currency" value="978" />
<input name="cardnum" value="4111111111111111" /> <input name="eyear" value="2014" />
<input name="emonth" value="09" /> <input name="cvc" value="123" /> </form>
Example (based on credit card token)
<form action="https://gateway.pensio.com/merchant/API/reservationOfFixedAmountMOTO/"> <input name="terminal" value="Terminal 1" />
<input name="shop_orderid" value="myorder123" /> <input name="amount" value="2499.95" />
<input name="currency" value="978" />
<input name="credit_card_token" value="0a4d55a8d778e5022fab701977c5d840bbc486d0" /> <input name="cvc" value="123" />
</form>
Example XMLResult
<?xml version="1.0"?><APIResponse version="20100929"> <Header>
<Date>20100929T12:34:56+02:00</Date>
<Path>API/reservationOfFixedAmountMOTO</Path> <ErrorCode>0</ErrorCode>
<ErrorMessage></ErrorMessage> </Header>
<Body>
<Result>Success</Result> <Transactions>
<Transaction>
<TransactionId>3</TransactionId> <CardStatus>Valid</CardStatus>
<CreditCardToken>85c1d13de7b5dceb6b739829cc27e089631b0fda</CreditCardToken> <CreditCardMaskedPan>411111******1111</CreditCardMaskedPan>
<ThreeDSecureResult>Not_Applicable</ThreeDSecureResult>
<BlacklistToken>4f244dec4907eba0f6432e53b17a60ebcf51365e</BlacklistToken> <ShopOrderId>myorder123</ShopOrderId>
<Shop>Pensio Functional Test Shop</Shop> <Terminal>Pensio Test Terminal</Terminal> <TransactionStatus>preauth</TransactionStatus> <MerchantCurrency>978</MerchantCurrency> <CardHolderCurrency>978</CardHolderCurrency> <ReservedAmount>2499.95</ReservedAmount> <CapturedAmount>0</CapturedAmount> <RefundedAmount>0</RefundedAmount> <RecurringMaxAmount>0</RecurringMaxAmount> <CreatedDate>20100928 12:34:56</CreatedDate> <UpdatedDate>20100928 12:34:56</UpdatedDate> <PaymentNature>CreditCard</PaymentNature> <PaymentNatureService name="TestAcquirer"> <SupportsRefunds>true</SupportsRefunds> <SupportsRelease>true</SupportsRelease>
<SupportsMultipleCaptures>true</SupportsMultipleCaptures> <SupportsMultipleRefunds>false</SupportsMultipleRefunds> </PaymentNatureService>
<TransactionInfo>
<Payment_Type>payment</Payment_Type> </TransactionInfo> <CustomerInfo/> <ReconciliationIdentifiers/> </Transaction> </Transactions> </Body> </APIResponse>
Example XMLError (when using an unknown credit card token)
<?xml version="1.0"?> <APIResponse version="20100929"> <Header> <Date>20100212T21:45:52+01:00</Date><Path>API/reservationOfFixedAmountMOTO</Path> <ErrorCode>762813994</ErrorCode> <ErrorMessage>No credit card with selected token exists: 0a4d55a8d778e5022fab701977c5d840bbc486d0</ErrorMessage> </Header> <Body/> </APIResponse>