API Description
micropayment provides an API for the booking of credit card transactions 
(Unfortunately the test environment activated with the testMode parameter is not currently available!)
CreditCard - API.Event must be activated manually to be used. 
Following activation, you must go to the "My Configuration" menu item in the ControlCenter. 
- Here you'll find the access key required to use the service 
- You can configure and activate the service at the sub-menu item "Access Authorizations" 
- At the "Access Authorizations" sub-menu item you should enter your server IP in order to gain access to the API from this server
URL of the API
	 						To use the service, please use the following URL:
	 					
http://webservices.micropayment.de/public/creditcard/v1/nvp/
Using the API
							We provide you with the 
Micropayment Service Client so that you can make use of the service.
 With this client and the 
Service Interface you have easy access to service's functions.
							
API Functionality
Methods
- sessionList- Returns a list of previous transactions based on the following parameters: Customer and/or time... 
 
- transactionReversal- Transaction for the cost-free cancellation of a payment before daily accounting...  
 
- transactionRefund- Transaction for the booking of a refund - The buyer receives the purchase ... 
 
Notifications
Types
- string- String: a data type that contains a string of characters (i.e. letters... 
 
- integer- Integer: a data type that saves whole numbers 
 
- map- Associative array: a data structure, which, in contrast to a real array,... 
 
- boolean- Boolean - a data type that always takes on one of two values... 
 
- struct- Structure - a data type composed of other data types 
 
- SessionStatus- Status of a session - possible values are: INIT, SUCCESS, FAILED, PENDIN... 
 
- Currency- Currency - possible values are: EUR 
 
- MailStatus- Status of a mail delivery - possible values are: NO - no mail sent YES... 
 
- TransactionType- Transaction type - possible values are: PURCHASE, AUTHORIZATION, CAPTURE, R... 
 
- TransactionStatus- Status of a transaction - possible values are: SUCCESS, FAILED, PENDING, ... 
 
- array- Array: a data structure that contains a list of elements, usually a... 
 
Details About the Methods
customerCreate
Creates a new customer
Parameter List| Name | Type | Required | Standard | Description | | accessKey | string | Yes | No | Access key from the ControlCenter | 
| testMode | integer | No | 0 | Activate test environment | 
| customerId | string | No | NULL | Own unique ID of the customer; is generated otherwise [min/max no. of characters 10/40, alphanumeric] | 
| freeParams | map | No | NULL | List of free parameters that are assigned to the customer | 
| firstname | string | Yes | No | First name of the customer | 
| surname | string | Yes | No | Last name of the customer | 
| email | string | No | NULL | E-mail address of the customer if an e-mail should be sent to the customer after the transaction | 
| culture | string | No | 'de-DE' | Language & country of the customer |  Valid example values are "de", "de-DE", "en-US" | 
The 
response received is a 
stringOwn or generated unique customer ID
customerSet
Changes the data for an existing customer
Parameter List| Name | Type | Required | Standard | Description | | accessKey | string | Yes | No | Access key from the ControlCenter | 
| testMode | integer | No | 0 | Activate test environment | 
| customerId | string | Yes | No | Unique customer ID | 
| freeParams | map | No | NULL | List of free parameters: NULL - parameter list stays unchanges | Empty HashMap - deletes parameter list | Filled HashMap expands/overwrites existing parameter list | 
| firstname | string | No | NULL | First name of the customer: NULL - current value stays the same | Example valid value: "John" | 
| surname | string | No | NULL | Last name of the customer: NULL - current value stays the same | Example valid value: "Doe" | 
| email | string | No | NULL | E-mail address of the customer: NULL - current value stays the same | Example valid value: "john@doe.com" replaces the current value | 
| culture | string | No | NULL | Language & country of the customer: NULL - current value stays the same | Example valid value: ''en-US" replaces the current value | 
The 
response received is a 
booleancustomerGet
Returns the data for an existing customer
Parameter List| Name | Type | Required | Standard | Description | | accessKey | string | Yes | No | Access key from the ControlCenter | 
| testMode | integer | No | 0 | Activate test environment | 
| customerId | string | Yes | No | Customer ID | 
The 
response is a 
string| Name | Type | Required | Standard | Description | | freeParams | map | No | NULL | List of all free parameters | 
| firstname | string | Yes | No | First name of the customer | 
| surname | string | Yes | No | Last name of the customer | 
| email | string | Yes | No | E-mail address of the customer | 
| culture | string | Yes | No | Language & country of the customer | 
creditcardDataSet
Changes the credit card data of an existing customer
Parameter List| Name | Type | Required | Standard | Description | | accessKey | string | Yes | No | Access key from the ControlCenter | 
| testMode | integer | No | 0 | Activate test environment | 
| customerId | string | Yes | No | Customer ID | 
| number | string | Yes | No | Credit card number | 
| expiryYear | integer | Yes | No | Year of credit card expiration | 
| expiryMonth | integer | Yes | No | Month of credit card expiration | 
The 
response received is a 
booleanThe response value indicates whether or not a CVC2 code is required for the next booking
creditcardDataGet
Returns the credit card data of an existing customer
Parameter List| Name | Type | Required | Standard | Description | | accessKey | string | Yes | No | Access key from the ControlCenter | 
| testMode | integer | No | 0 | Activate test environment | 
| customerId | string | Yes | No | Customer ID | 
The 
response is a 
string| Name | Type | Required | Standard | Description | | type | string | Yes | No | Card type | 
| number | string | Yes | No | Partial credit card number (last 4 numbers) | 
| expiryYear | integer | Yes | No | Year of credit card expiration | 
| expiryMonth | integer | Yes | No | Month of credit card expiration | 
| cvc2Required | boolean | Yes | No | The CVC2 code is required for the next booking | 
sessionList
Returns a list of previous transactions based on the following parameters: Customer and/or time
Parameter List| Name | Type | Required | Standard | Description | | accessKey | string | Yes | No | Access key from the ControlCenter | 
| testMode | integer | No | 0 | Activate test environment | 
| customerId | string | No | NULL | Unique customer ID | 
| dtmFrom | datetime | No | NULL |  | 
| dtmTo | datetime | No | NULL |  | 
The 
response received is a 
string[]sessionCreate
Creates a new payment session. A customer is necessarily required for the payment to be booked (customerCreate)
Parameter List| Name | Type | Required | Standard | Description | | accessKey | string | Yes | No | Access key from the ControlCenter | 
| testMode | integer | No | 0 | Activate test environment | 
| customerId | string | Yes | No | Customer ID | 
| sessionId | string | No | NULL | Own unique transaction ID; otherwise one is created [max. 40 characters] | 
| project | string | Yes | No | The project code for the session | 
| projectCampaign | string | No | NULL | The project operator's campaign code | 
| account | string | No | NULL | Account of the participating webmaster, otherwise own - prerequisite is the activation of the webmaster capability of the project - Note: Webmaster capability is not currently available | 
| webmasterCampaign | string | No | NULL | A project operator's campaign code | 
| amount | integer | No | NULL | The amount to be booked - If no amount is provided, the amount from the configuration is used | 
| currency | Currency | No | "EUR" | Currency | 
| title | string | No | NULL | Description of the item to be purchased - Use: In the event of a notification, this value is sent for the identification of the product - If no value is provided, the value from the configuration is used. | 
| paytext | string | No | NULL | Description of the item to be purchased - Use: Include this information when sending an e-mail, if desired. | 
| ip | string | Yes | No | IPv4 of the user | 
| freeParams | map | No | NULL | List of free parameters that are assigned to the session | 
| sendMail | boolean | No | True |  | 
The 
response is a 
struct| Name | Type | Required | Standard | Description | | sessionId | string | Yes | No | Own or generated unique customer ID | 
| status | SessionStatus | Yes | No | "INIT" session status | 
| expire | datetime | Yes | No | Session expiration time | 
sessionGet
Returns information about the transaction
Parameter List| Name | Type | Required | Standard | Description | | accessKey | string | Yes | No | Access key from the ControlCenter | 
| testMode | integer | No | 0 | Activate test environment | 
| sessionId | string | Yes | No | Unique session ID | 
The 
response is a 
struct| Name | Type | Required | Standard | Description | | customerId | string | Yes | No | Customer ID | 
| project | string | Yes | No | The project code for the session | 
| projectCampaign | string | Yes | No | The project operator's campaign code | 
| account | string | Yes | No | Account of the participating webmaster or own account | 
| webmasterCampaign | string | Yes | No | A project operator's campaign code | 
| amount | integer | Yes | No | The amount to be booked. If no amount is provided, the amount from the configuration is used | 
| currency | Currency | Yes | No | Currency unit | 
| title | string | Yes | No | Description of the item to be purchased | 
| ip | string | Yes | No | IPv4 of the user | 
| freeParams | map | No | NULL | List of free parameters that are assigned to the session | 
| status | SessionStatus | Yes | No |  | 
| expire | datetime | No | NULL | Expiration date of the session, only when status is INIT or EXPIRED | 
| mail | MailStatus | Yes | No | Status of mail delivery | 
| transactionIds | string[] | No | NULL | List of transaction IDs that are linked to this session | 
transactionGet
Returns information about a transaction
Parameter List| Name | Type | Required | Standard | Description | | accessKey | string | Yes | No | Access key from the ControlCenter | 
| testMode | integer | No | 0 | Activate test environment | 
| transactionId | string | Yes | No | Transaction number | 
The 
response received is a 
struct| Name | Type | Required | Standard | Description | | transactionId | string | Yes | No | Transaction number | 
| sessionId | string | Yes | No | Unique session ID | 
| customerId | string | Yes | No | Customer ID | 
| auth | string | Yes | No | AuthCode | 
| amount | integer | Yes | No | The amount to be booked. If no amount is provided, the amount from the configuration is used | 
| currency | Currency | Yes | No | Currency unit | 
| type | TransactionType | Yes | No | Transaction type | 
| status | TransactionStatus | Yes | No | Transaction status | 
| created | datetime | Yes | No | Time point of the transaction | 
| ip | string | Yes | No | IPv4 of the user | 
| cardType | string | Yes | No | Card type | 
| cardNumber | string | Yes | No | Partial credit card number (last 4 numbers) | 
| cardExpiryYear | integer | Yes | No | Year of credit card expiration | 
| cardExpiryMonth | integer | Yes | No | Month of credit card expiration | 
transactionPurchase
Carries out a transaction for the immediate booking of the payment amount. For the transaction to be carried out, a valid session is required (sessionCreate). Credit card data for the customer must also be
stored (creditcardDataSet)  
Parameter List| Name | Type | Required | Standard | Description | | accessKey | string | Yes | No | Access key from the ControlCenter | 
| testMode | integer | No | 0 | Activate test environment | 
| sessionId | string | Yes | No | Session ID | 
| cvc2 | string | No | NULL | CVC2 code of the credit card; must be inputted at least once for each credit card/expiration date | 
The 
response received is a 
struct| Name | Type | Required | Standard | Description | | sessionStatus | SessionStatus | Yes | No | Status of the entire session | 
| transactionStatus | TransactionStatus | Yes | No | Status of the initiated transaction | 
| transactionId | string | Yes | No | Transaction number | 
| transactionCreated | datetime | Yes | No | Time point of the transaction | 
| transactionAuth | string | Yes | No | AuthCode | 
transactionAuthorization
Carries out a transaction for the preauthorization of a payment amount (you reserve a payment amount). For this transaction to be carried out, a valid session is required (sessionCreate). Credit card data 
for the customer must also be stored (creditcardDataSet)
Parameter List| Name | Type | Required | Standard | Description | | accessKey | string | Yes | No | Access key from the Control Center | 
| testMode | integer | No | 0 | Activate test environment | 
| sessionId | string | Yes | No | Session ID | 
| cvc2 | string | No | NULL | CVC2 code of the credit card; must be inputted at least once for each credit card/expiration date | 
The 
response received is a 
struct| Name | Type | Required | Standard | Description | | sessionStatus | SessionStatus | Yes | No | Status of the entire session | 
| transactionStatus | TransactionStatus | Yes | No | Status of the initiated transaction | 
| transactionId | string | Yes | No | Transaction number | 
| transactionCreated | datetime | Yes | No | Time point of the transaction | 
| transactionAuth | string | Yes | No | AuthCode | 
transactionCapture
Carries out a transaction for the booking of a preauthorization (you book a reserved payment amount). For this transaction to be carried out, a valid session is required (sessionCreate) for which a preauthorization 
transaction has been carried out (transactionAuthorization)
Parameter List| Name | Type | Required | Standard | Description | | accessKey | string | Yes | No | Access key from the Control Center | 
| testMode | integer | No | 0 | Activate test environment | 
| sessionId | string | Yes | No | Session ID | 
| transactionId | string | No | NULL | Transaction number from "transactionAuthorization" | 
| amount | integer | No | NULL | NULL - corresponds to amount from preauthorization | If divergent, it contains the amount to be booked <= Amount from preauthorization | 
The 
response received is a 
struct| Name | Type | Required | Standard | Description | | sessionStatus | SessionStatus | Yes | No | Status of the entire session | 
| transactionStatus | TransactionStatus | Yes | No | Status of the initiated transaction | 
| transactionId | string | Yes | No | Transaction number | 
| transactionCreated | datetime | Yes | No | Time point of the transaction | 
| transactionAuth | string | Yes | No | AuthCode | 
transactionReversal
Transaction for the cost-free cancellation of a payment before daily accounting or for the approval of preauthorizations. Can be used for transactions that have been created with "transactionPurchase" 
or "transactionAuthorization" 
Parameter List| Name | Type | Required | Standard | Description | | accessKey | string | Yes | No | Access key from the ControlCenter | 
| testMode | integer | No | 0 | Activate test environment | 
| sessionId | string | Yes | No | Session ID | 
| transactionId | string | Yes | No | Transaction number of the transaction to be reversed | 
The 
response received is a 
struct| Name | Type | Required | Standard | Description | | sessionStatus | SessionStatus | Yes | No | Status of the entire session | 
| transactionStatus | TransactionStatus | Yes | No | Status of the initiated transaction | 
| transactionId | string | Yes | No | Transaction number | 
| transactionCreated | datetime | Yes | No | Time point of the transaction | 
| transactionAuth | string | Yes | No | AuthCode | 
transactionRefund
Transaction for booking a refund - Buyer receives the payment account from a successful booking in part or in whole. Can be used with transactions that have been created with "transactionPurchase" 
or "transactionCapture" 
Parameter List| Name | Type | Required | Standard | Description | | accessKey | string | Yes | No | Access key from the ControlCenter | 
| testMode | integer | No | 0 | Activate test environment | 
| sessionId | string | Yes | No | Session ID | 
| transactionId | string | Yes | No | Transaction number of the transaction to be reversed | 
| amount | integer | No | NULL | Amount to be refunded, if different from original transaction amount | 
The 
response received is a 
struct| Name | Type | Required | Standard | Description | | sessionStatus | SessionStatus | Yes | No | Status of the entire session | 
| transactionStatus | TransactionStatus | Yes | No | Status of the initiated transaction | 
| transactionId | string | Yes | No | Transaction number | 
| transactionCreated | datetime | Yes | No | Time point of the transaction | 
| transactionAuth | string | Yes | No | AuthCode | 
Details on Notifications
transactionChargeback
Provides notification of a chargeback
Parameter List (Data transferred to you):| Name | Type | Required | Standard | Description | | sessionId | string | Yes | No | Session ID | 
| customerId | string | Yes | No | Customer ID | 
| transactionId | string | Yes | No | Transaction number | 
| transactionAuth | string | Yes | No | AuthCode | 
| title | string | Yes | No | Description of the purchased item | 
| amount | integer | Yes | No | Cancelled amount | 
| currency | Currency | No | "EUR" | Currency | 
| country | string | No | "DE" | ISO country code | 
| freeParam | array | No | NULL | List of all of the session's free parameters | 
The 
response received (expected / optional) is a 
struct| Name | Type | Required | Standard | Description | | status | NotificationStatus | No | "SUCCESS" | Status of notification processing | 
| statusMessage | string | No | NULL | Free status text that is shown later in the Control Center; can potentially help with future error diagnostics | 
| freeParam | map | No | NULL | List of free parameters: NULL - parameter list stays unchanges | Empty HashMap - deletes parameter list | Filled HashMap expands/overwrites existing parameter list | 
Details on the Types
string
String: a data type that contains a string of characters (i.e. letters, numbers, special symbols and control characters) from a defined character set
integer
Integer: a data type that saves whole numbers
map
An associative array: A data structure, which, in contrast to a real array, uses a non-numerical key (at least a string) in order to address the contained elements
boolean
Boolean - a data type that always takes on one of two values in order to make a logical statement, normally "true/false" or "1/0" (true = 1; false = 0)
struct
Structure - a data type composed of other data types
string[]
datetime
Date+time (YYYY-MM-DD hh:mm:ss)
SessionStatus
Status of a session - possible values are: INIT, SUCCESS, FAILED, PENDING, EXPIRED
Currency
Currency - possible values are: EUR
MailStatus
Status of a mail delivery - possible values are: NO - don't send a mail YES - a mail will be sent SEND - a mail has been sent NOTSEND - mail delivery failure
TransactionType
Transaction type - possible values are: PURCHASE, AUTHORIZATION, CAPTURE, REVERSAL, REFUND
TransactionStatus
Status of a transaction - possible values are: SUCCESS, FAILED, PENDING, EXPIRED, ERROR, FATAL
NotificationStatus
Notification-processing status - possible values are: SUCCESS - Notification has been received and successfully processed FAILED - Notification has been received, but an error occurred during processing 
ERROR - Notification could not be received/processed by the server
array
Array: a data structure that contains a list of elements, usually a unified data type - The elements are addressed using an integer index