Skip to main content
knowledgecenter.2checkout.com

Use GiroPay

Overview

GiroPay is an online banking-based payment method for users in Germany. GiroPay supports online payments via secure online transfers directly between bank accounts. GiroPay accounted for a share of 2% of online payments in Germany in 2019.

Supported currencies

GiroPay is restricted to Germany and supports transactions in EUR.

Workflow

  1. Shoppers select GiroPay as a payment option in the checkout interface you provide to them.
  2. Create the order object. Use “GIROPAY” as the type of the PaymentDetails object.
  3. Use the placeOrder method to send the data to 2Checkout.
  4. Use the PaymentMethod object to create a redirect URL for the shoppers. Using the provided URL, make a request using the provided method (usually a GET request) and add the parameters (located in the Params object) as key-value pairs to the URL of the request.
  5. 2Checkout returns an Order object as the output of the placeOrder method. 
  6. Once you place the order, 2Checkout logs it into the system. At this point in time, the status of the order is PENDING.

Parameters

Parameters Type/Description

sessionID

Required (string)

 

Session identifier, the output of the Login method. Include sessionID into all your requests. 2Checkout throws an exception if the values are incorrect.  The sessionID expires in 10 minutes.

Order

Required (Object)

 

Object designed to collect all data necessary for an order, including billing, product/subscription plan and payment details.

See code sample for more details. 

Request Example 

 <?php

require ('PATH_TO_AUTH');

$Order = new stdClass();
$Order->RefNo = NULL;
$Order->Currency = "EUR" ;
$Order->Country = "DE";
$Order->Language = 'EN';
$Order->CustomerIP = '10.5.22.197';
$Order->ExternalReference = NULL;
$Order->Source = NULL;
$Order->AffiliateId = NULL;
$Order->CustomerReference = NULL;
$Order->Items = array();
$Order->Items[0] = new stdClass();
$Order->Items[0]->Code = '67B4EDC822';
$Order->Items[0]->Quantity = 1;
$Order->Items[0]->PriceOptions = NULL;
$Order->Items[0]->SKU = NULL;
$Order->Items[0]->Price = NULL;
$Order->Items[0]->CrossSell = NULL;
$Order->Items[0]->Trial = false;
$Order->Items[0]->AdditionalFields = NULL;
$Order->Items[0]->SubscriptionStartDate = NULL; //If empty or null, subscriptions become active when purchase is made.
$Order->BillingDetails = new stdClass();
$Order->BillingDetails->FirstName = 'John';
$Order->BillingDetails->LastName = 'Doe';
$Order->BillingDetails->CountryCode = "DE";
$Order->BillingDetails->State = 'Espírito Santo';
$Order->BillingDetails->City = 'City';
$Order->BillingDetails->Address1 = '-';
$Order->BillingDetails->Address2 = NULL;
$Order->BillingDetails->Zip = '1111111';
$Order->BillingDetails->Email = 'brazil1@2checkout.com';
$Order->BillingDetails->Phone = '123432323212';
$Order->BillingDetails->Company = 'blank';
$Order->DeliveryDetails = new stdClass();
$Order->DeliveryDetails->FirstName = 'John';
$Order->DeliveryDetails->LastName = 'Doe';
$Order->DeliveryDetails->CountryCode = 'NZ';
$Order->DeliveryDetails->State = 'Espírito Santo';
$Order->DeliveryDetails->City = 'City';
$Order->DeliveryDetails->Address1 = '-';
$Order->DeliveryDetails->Address2 = NULL;
$Order->DeliveryDetails->Zip = '1111111';
$Order->DeliveryDetails->Email = 'brazil1@2checkout.com';
$Order->DeliveryDetails->Phone = '123432323212';
$Order->DeliveryDetails->Company = NULL;
$Order->PaymentDetails = new stdClass ();
$Order->PaymentDetails->Type = 'GIROPAY';
$Order->PaymentDetails->Currency = "EUR" ;
$Order->PaymentDetails->HadPayPalToken = false;
$Order->PaymentDetails->CustomerIP = '10.5.22.197';
$Order->PaymentDetails->PaymentMethod = new stdClass ();
$Order->Promotions = NULL;
$Order->AdditionalFields = NULL;
$Order->LocalTime = NULL;
$Order->GiftDetails = NULL;

try {
   $newOrder = $client->placeOrder($sessionID, $Order);
   var_dump($newOrder);
}
catch (SoapFault $e) {
    echo "newOrder: " . $e->getMessage();
    exit;
}
?>

Response Parameters

Parameter Type/Description

Order information

Object

  Object containing order information.
  • Was this article helpful?