====== eps ====== Information about eps can be found under [[https://www.girosolution.de/girocheckout/fuer-haendler/|https://www.girosolution.de/girocheckout/fuer-haendler/]]. **eps can only process EURO payments.** ===== test data ===== {{page>en:testdata:eps&noheader&nofooter}} ===== workflow ===== hide footbox participant "buyer/ customer" as buyer participant "merchant" as shop participant "GiroCheckout" as girocheckout participant "eps" as eps participant "online banking" as bank autonumber buyer -> shop: shop -> girocheckout: girocheckout -> eps: eps -> girocheckout: girocheckout -> shop: shop -> buyer: buyer -> eps: eps -> bank: bank -> buyer: buyer -> bank: bank -> bank: bank -> eps: eps -> girocheckout: girocheckout -> shop shop -> shop: shop -> girocheckout: girocheckout -> eps: eps -> shop: center footer (c)2013 by GiroSolution AG - buyer/ customer chooses eps and enters his bank's BIC - merchant initialises eps ([[en:girocheckout:eps:start#initialise_eps_payment|initialise eps payment]]) - GiroCheckout initialises request at eps - eps submits response to GiroCheckout - merchant gets response about initialisation (if an issue occurs the transaction is finished) - merchant sends redirect URL to buyer/ customer - the buyer's/ customer's browser redirects to eps where the bank is selected (optional, only if bank is not already stored in browser) - eps redirects to the customer's online banking - bank shows login page - buyer/ customer authorises eps payment - bank processes reqest - bank submits result to eps - eps submits result to GiroCheckout - GiroCheckout notifies merchant about the result ([[en:girocheckout:eps:start#notification_about_the_payment_result|payment result notification]]) - merchant processes result - merchant sends HTTP Statuscode to GiroCheckout - GiroCheckout sends merchants redirect page to eps - buyer/customer clicks "Zurück zum Shop" and gets redirected to the merchant ([[en:girocheckout:eps:start#redirection_of_the_customer_to_merchant|buyer redirection]]) ===== API functions ===== ==== Overview ===== As shown in the workflow there are different API calls during an eps transaction. - check bankstatus - initialise transaction - payment result notification to merchant - buyer redirection to the merchant (triggered by buyer) ==== check bankstatus ==== **This call should not be used anymore. All eps transactions now use an external bank selection form!** This API call checks, if a bank supports the eps payment method. Therefore the BIC of the buyer's account has to be submitted. The response shows if the bank provides eps. It is recommended to do this prior to an initial payment, to make sure that the buyer's bank supports eps. === API call === **URL:** https://payment.girosolution.de/girocheckout/api/v2/eps/bankstatus \\ **provided by:** GiroCheckout \\ **called by:** merchant == POST parameter == ^parameter ^mandatory ^type ^description ^ |merchantId |yes |Integer |Merchant ID of an eps project | |projectId |yes |Integer |Project ID of an eps project | |bic |yes |String(11)|the buyer's bank account BIC (8 or 11-digits), which schould be checked| |hash |yes |String(32)|HMAC MD5 hash over all API call params (see [[en:girocheckout:general:start#hash generation|hash generation]])| == example == {{page>codesamples:eps#bankstatus.request&noheader&nofooter}} === reply === The reply contains an encoded JSON string. A response code is submitted in the field rc. If the response contains **rc = 0**, the bank supports eps. If eps is supported, additional information can be found in the //eps// parameter. Additional information about the bank will also be returned, if they are known. == JSON parameter == ^name ^mandatory ^type ^description ^ |rc |yes |Integer |[[en:girocheckout:errorcodes|error codes]] | |msg |yes |String |additional informationen about the response code | |bic |yes |String |BIC | |bankname |yes |String |name of the bank | |eps |yes |Integer |0 = eps payment is not supported \\ 1 = eps payment is supported| ^HEADER parameter^^^^ |hash |yes |String |HMAC MD5 hash overall the JSON string. (see [[en:girocheckout:general:start#api_call_reply_to_the_merchant|api call reply]]) | == example == {{page>codesamples:eps#bankstatus.response&noheader&nofooter}} ==== eps issuer bank request ==== **This call should not be used anymore. All eps transactions now use an external bank selection form!** Returns a list which contains all supported eps issuer banks. The buyer has to choose his one. **URL:** https://payment.girosolution.de/girocheckout/api/v2/eps/issuer \\ **provided by:** GiroSolution AG \\ **called by:** Händler == POST parameter == ^name ^mandatory ^type ^description ^ |merchantId |yes |Integer |Merchant ID | |projectId |yes |Integer |Project ID | |hash |yes |String(32)|HMAC MD5 hash (see [[en:girocheckout:general:start#hash_generation|hash generation]])| == example == {{page>codesamples:eps#issuer.request&noheader&nofooter}} === reply === The reply contains an encoded JSON string. An response code is submitted in the field rc. If the response contains **rc = 0**, the request was successful. == JSON parameter == ^name ^mandatory ^type ^description ^ |rc |yes |Integer |[[en:girocheckout:errorcodes|error codes]] | |msg |yes |String |additional informationen about the response code | |issuer |optional |Mixed |list of all supported issuer banks containing bic as key and name| == Beispiel == {{page>codesamples:eps#issuer.response&noheader&nofooter}} ==== Initialize eps payment ==== The initialisation of an eps can be processed in different ways. This will be distinguished just by the project id. Torwards a successful initialisation you receive a reference number and an redirect link. The redirect link leads to the online banking account of the buyer's bank. He has to be redirected to his bank. This can be achieved by a HTTP-Redirect-Header, HTML page with an corresponding Meta-Tag or JavaScript redirect. === request === **URL:** https://payment.girosolution.de/girocheckout/api/v2/transaction/start \\ **provided by:** GiroCheckout \\ **called by:** merchant == POST parameter == ^name ^mandatory ^type ^description ^ |merchantId |yes |Integer |merchant ID of an eps project | |projectId |yes |integer |project ID of an eps project | |merchantTxId |yes |String(255) |unique transaction id of the merchant | |amount |yes |Integer |if a decimal currency is used, the amount has to be in the smallest unit of value, eg. Cent, Penny | |currency |yes |String(3) |currency\\ EUR = Euro| |purpose |yes |String(27) |purpose | |bic |**deprecated** |String(11) |**This parameter must not be used anymore. All eps transactions now use an external bank selection form!** BIC (8 or 11-digits)| |urlRedirect |yes |String |URL, where the buyer has to be sent after payment | |urlNotify |yes |String |URL, where the notification has to be sent after payment | |hash |yes |String |HMAC MD5 hash (see [[en:girocheckout:general:start#hash_generation|hash generation]]) | == example == {{page>codesamples:eps#transactionstart.request&noheader&nofooter}} === reply === The reply includes a JSON encoded string. The field rc contains the response code. If it is 0 the transaction was successfully initialised. The response also includes a transaction id and a redirect URL to the online banking account of the buyer's bank. == Parameter == ^name ^mandatory ^type ^description ^ |rc |yes |Integer |[[en:girocheckout:errorcodes|response code]] | |msg |yes |String |additional information about the response code | |reference |optional |String |unique GiroCheckout transaction ID | |redirect |optional |String |redirect URL to the buyer's online banking account| ^HEADER parameter^^^^ |hash |yes |String |HMAC MD5 hash overall the JSON string. (see [[en:girocheckout:general:start#api_call_reply_to_the_merchant|api call reply]]) | == example in case of success == {{page>codesamples:eps#transactionstart.response.true&noheader&nofooter}} == example in case of error == {{page>codesamples:eps#transactionstart.response.false&noheader&nofooter}} ==== notification about the payment result ==== The result of a initialised transaction will be submitted to the prior in the //urlNotify// parameter specified URL. This notification should be used to update the payment status in the merchant's system. The result of an eps payment is contained in the field //gcResultPayment//. Due to the internal eps process, a redirection of the customer to urlRedirect is not done automatically but only after a customer click. === request === **URL:** notifyUrl of the prior init transaction call \\ **provided by:** merchant \\ **called by:** GiroCheckout == GET parameter == ^name ^mandatory ^ type ^description ^ |gcReference |yes |String | unique GiroCheckout transaction ID | |gcMerchantTxId |yes | String | merchant transaction ID | |gcBackendTxId |yes |String | payment processor transaction ID | |gcAmount |yes |Integer | if a decimal currency is used, the amount has to be in the smallest unit of value, eg. cent, penny | |gcCurrency |yes |String | currency | |gcResultPayment |yes |Integer | [[en:girocheckout:resultcodes#zahlungsausgang|payment result codes]]| |gcHash |yes |String | HMAC MD5 hash (see [[en:girocheckout:general:start#hash_generation|hash generation]]) | === reply === As a reply to the GET request, one of the following HTTP status codes is expected. ^HTTP status code ^description ^ |200 (OK) | The notification was processed correctly. | |400 (Bad Request) |The merchant did not process the notification and does not wish to be notified again. | |all others |The notification is repeated no more than 10 times every 30 minutes until the merchant returns the status code 200 or 400. | ==== redirection of the customer to merchant ==== After completing the payment, the customer may return to the merchant through a link. This return is not done automatically. === request === **URL:** redirectUrl of the prior init transaction call \\ **provided by:** merchant \\ **called by:** GiroCheckout == GET parameter == ^name ^ mandatory ^ type ^description ^ |gcReference |yes |String | unique GiroCheckout transaction ID | |gcMerchantTxId |yes | String | merchant transaction ID | |gcBackendTxId |yes |String | payment processor transaction ID | |gcAmount |yes |Integer | if a decimal currency is used, the amount has to be in the smallest unit of value, eg. cent, penny | |gcCurrency |yes |String | currency | |gcResultPayment |yes |Integer | [[en:girocheckout:resultcodes#zahlungsausgang|payment result codes]]| |gcHash |yes |String | HMAC MD5 hash (see [[en:girocheckout:general:start#hash_generation|hash generation]]) |