micropayment - CreditCard Service

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.
Service Interface (PHP) view / download | Micropayment Service Client

API Functionality

Methods

Notifications

Types

Details About the Methods

customerCreate

Creates a new customer
Parameter List
NameTypeRequiredStandardDescription
accessKeystringYesNoAccess key from the ControlCenter
testModeintegerNo0 Activate test environment
customerIdstringNoNULL Own unique ID of the customer; is generated otherwise [min/max no. of characters 10/40, alphanumeric]
freeParamsmapNoNULL List of free parameters that are assigned to the customer
firstnamestringYesNoFirst name of the customer
surnamestringYesNoLast name of the customer
emailstringNoNULL E-mail address of the customer if an e-mail should be sent to the customer after the transaction
culturestringNo'de-DE' Language & country of the customer | Valid example values are "de", "de-DE", "en-US"
The response received is a string
Own or generated unique customer ID

customerSet

Changes the data for an existing customer
Parameter List
NameTypeRequiredStandardDescription
accessKeystringYesNoAccess key from the ControlCenter
testModeintegerNo0 Activate test environment
customerIdstringYesNoUnique customer ID
freeParamsmapNoNULL List of free parameters: NULL - parameter list stays unchanges | Empty HashMap - deletes parameter list | Filled HashMap expands/overwrites existing parameter list
firstnamestringNoNULL First name of the customer: NULL - current value stays the same | Example valid value: "John"
surnamestringNoNULL Last name of the customer: NULL - current value stays the same | Example valid value: "Doe"
emailstringNoNULL E-mail address of the customer: NULL - current value stays the same | Example valid value: "john@doe.com" replaces the current value
culturestringNoNULL 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 boolean

customerGet

Returns the data for an existing customer
Parameter List
NameTypeRequiredStandardDescription
accessKeystringYesNoAccess key from the ControlCenter
testModeintegerNo0 Activate test environment
customerIdstringYesNoCustomer ID
The response is a string
NameTypeRequiredStandardDescription
freeParamsmapNoNULL List of all free parameters
firstnamestringYesNoFirst name of the customer
surnamestringYesNoLast name of the customer
emailstringYesNoE-mail address of the customer
culturestringYesNoLanguage & country of the customer

creditcardDataSet

Changes the credit card data of an existing customer
Parameter List
NameTypeRequiredStandardDescription
accessKeystringYesNoAccess key from the ControlCenter
testModeintegerNo0 Activate test environment
customerIdstringYesNoCustomer ID
numberstringYesNoCredit card number
expiryYearintegerYesNoYear of credit card expiration
expiryMonthintegerYesNoMonth of credit card expiration
The response received is a boolean
The 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
NameTypeRequiredStandardDescription
accessKeystringYesNoAccess key from the ControlCenter
testModeintegerNo0 Activate test environment
customerIdstringYesNoCustomer ID
The response is a string
NameTypeRequiredStandardDescription
typestringYesNoCard type
numberstringYesNoPartial credit card number (last 4 numbers)
expiryYearintegerYesNoYear of credit card expiration
expiryMonthintegerYesNoMonth of credit card expiration
cvc2RequiredbooleanYesNoThe 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
NameTypeRequiredStandardDescription
accessKeystringYesNoAccess key from the ControlCenter
testModeintegerNo0 Activate test environment
customerIdstringNoNULL Unique customer ID
dtmFromdatetimeNoNULL
dtmTodatetimeNoNULL
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
NameTypeRequiredStandardDescription
accessKeystringYesNoAccess key from the ControlCenter
testModeintegerNo0 Activate test environment
customerIdstringYesNoCustomer ID
sessionIdstringNoNULL Own unique transaction ID; otherwise one is created [max. 40 characters]
projectstringYesNoThe project code for the session
projectCampaignstringNoNULL The project operator's campaign code
accountstringNoNULL 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
webmasterCampaignstringNoNULL A project operator's campaign code
amountintegerNoNULL The amount to be booked - If no amount is provided, the amount from the configuration is used
currencyCurrencyNo"EUR" Currency
titlestringNoNULL 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.
paytextstringNoNULL Description of the item to be purchased - Use: Include this information when sending an e-mail, if desired.
ipstringYesNoIPv4 of the user
freeParamsmapNoNULL List of free parameters that are assigned to the session
sendMailbooleanNoTrue
The response is a struct
NameTypeRequiredStandardDescription
sessionIdstringYesNoOwn or generated unique customer ID
statusSessionStatusYesNo"INIT" session status
expiredatetimeYesNoSession expiration time

sessionGet

Returns information about the transaction
Parameter List
NameTypeRequiredStandardDescription
accessKeystringYesNoAccess key from the ControlCenter
testModeintegerNo0 Activate test environment
sessionIdstringYesNoUnique session ID
The response is a struct
NameTypeRequiredStandardDescription
customerIdstringYesNoCustomer ID
projectstringYesNoThe project code for the session
projectCampaignstringYesNoThe project operator's campaign code
accountstringYesNoAccount of the participating webmaster or own account
webmasterCampaignstringYesNoA project operator's campaign code
amountintegerYesNoThe amount to be booked. If no amount is provided, the amount from the configuration is used
currencyCurrencyYesNoCurrency unit
titlestringYesNoDescription of the item to be purchased
ipstringYesNoIPv4 of the user
freeParamsmapNoNULL List of free parameters that are assigned to the session
statusSessionStatusYesNo
expiredatetimeNoNULL Expiration date of the session, only when status is INIT or EXPIRED
mailMailStatusYesNoStatus of mail delivery
transactionIdsstring[]NoNULL List of transaction IDs that are linked to this session

transactionGet

Returns information about a transaction
Parameter List
NameTypeRequiredStandardDescription
accessKeystringYesNoAccess key from the ControlCenter
testModeintegerNo0 Activate test environment
transactionIdstringYesNoTransaction number
The response received is a struct
NameTypeRequiredStandardDescription
transactionIdstringYesNoTransaction number
sessionIdstringYesNoUnique session ID
customerIdstringYesNoCustomer ID
authstringYesNoAuthCode
amountintegerYesNoThe amount to be booked. If no amount is provided, the amount from the configuration is used
currencyCurrencyYesNoCurrency unit
typeTransactionTypeYesNoTransaction type
statusTransactionStatusYesNoTransaction status
createddatetimeYesNoTime point of the transaction
ipstringYesNoIPv4 of the user
cardTypestringYesNoCard type
cardNumberstringYesNoPartial credit card number (last 4 numbers)
cardExpiryYearintegerYesNoYear of credit card expiration
cardExpiryMonthintegerYesNoMonth 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
NameTypeRequiredStandardDescription
accessKeystringYesNoAccess key from the ControlCenter
testModeintegerNo0 Activate test environment
sessionIdstringYesNoSession ID
cvc2stringNoNULL CVC2 code of the credit card; must be inputted at least once for each credit card/expiration date
The response received is a struct
NameTypeRequiredStandardDescription
sessionStatusSessionStatusYesNoStatus of the entire session
transactionStatusTransactionStatusYesNoStatus of the initiated transaction
transactionIdstringYesNoTransaction number
transactionCreateddatetimeYesNoTime point of the transaction
transactionAuthstringYesNoAuthCode

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
NameTypeRequiredStandardDescription
accessKeystringYesNoAccess key from the Control Center
testModeintegerNo0 Activate test environment
sessionIdstringYesNoSession ID
cvc2stringNoNULL CVC2 code of the credit card; must be inputted at least once for each credit card/expiration date
The response received is a struct
NameTypeRequiredStandardDescription
sessionStatusSessionStatusYesNoStatus of the entire session
transactionStatusTransactionStatusYesNoStatus of the initiated transaction
transactionIdstringYesNoTransaction number
transactionCreateddatetimeYesNoTime point of the transaction
transactionAuthstringYesNoAuthCode

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
NameTypeRequiredStandardDescription
accessKeystringYesNoAccess key from the Control Center
testModeintegerNo0 Activate test environment
sessionIdstringYesNoSession ID
transactionIdstringNoNULL Transaction number from "transactionAuthorization"
amountintegerNoNULL NULL - corresponds to amount from preauthorization | If divergent, it contains the amount to be booked <= Amount from preauthorization
The response received is a struct
NameTypeRequiredStandardDescription
sessionStatusSessionStatusYesNoStatus of the entire session
transactionStatusTransactionStatusYesNoStatus of the initiated transaction
transactionIdstringYesNoTransaction number
transactionCreateddatetimeYesNoTime point of the transaction
transactionAuthstringYesNoAuthCode

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
NameTypeRequiredStandardDescription
accessKeystringYesNoAccess key from the ControlCenter
testModeintegerNo0 Activate test environment
sessionIdstringYesNoSession ID
transactionIdstringYesNoTransaction number of the transaction to be reversed
The response received is a struct
NameTypeRequiredStandardDescription
sessionStatusSessionStatusYesNoStatus of the entire session
transactionStatusTransactionStatusYesNoStatus of the initiated transaction
transactionIdstringYesNoTransaction number
transactionCreateddatetimeYesNoTime point of the transaction
transactionAuthstringYesNoAuthCode

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
NameTypeRequiredStandardDescription
accessKeystringYesNoAccess key from the ControlCenter
testModeintegerNo0 Activate test environment
sessionIdstringYesNoSession ID
transactionIdstringYesNoTransaction number of the transaction to be reversed
amountintegerNoNULL Amount to be refunded, if different from original transaction amount
The response received is a struct
NameTypeRequiredStandardDescription
sessionStatusSessionStatusYesNoStatus of the entire session
transactionStatusTransactionStatusYesNoStatus of the initiated transaction
transactionIdstringYesNoTransaction number
transactionCreateddatetimeYesNoTime point of the transaction
transactionAuthstringYesNoAuthCode

Details on Notifications

transactionChargeback

Provides notification of a chargeback
Parameter List (Data transferred to you):
NameTypeRequiredStandardDescription
sessionIdstringYesNoSession ID
customerIdstringYesNoCustomer ID
transactionIdstringYesNoTransaction number
transactionAuthstringYesNoAuthCode
titlestringYesNoDescription of the purchased item
amountintegerYesNoCancelled amount
currencyCurrencyNo"EUR" Currency
countrystringNo"DE" ISO country code
freeParamarrayNoNULL List of all of the session's free parameters
The response received (expected / optional) is a struct
NameTypeRequiredStandardDescription
statusNotificationStatusNo"SUCCESS" Status of notification processing
statusMessagestringNoNULL Free status text that is shown later in the Control Center; can potentially help with future error diagnostics
freeParammapNoNULL 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[]

A "string" type array

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