Skip to main content
knowledgecenter.2checkout.com

Use Konbini

Overview

Place an order with catalog products defined in your Control Panel and collect the payment using Konbini.

Requirements

Shoppers in Japan can purchase using Konbini. The billing country and the order country code has to be JP.

Supported currencies

Konbini supports JPY transactions.

Workflow

  1. If the shopper is located in Japan and is paying in Japanese Yens, then in the shopping cart they can choose Konbini as a payment method.
  2. In the checkout form, it is mandatory to fill in the phone number in the billing details.
  3. After the order is generated by calling the placeOrder method, in the order's details the shopper will find a URL where they need to be redirected in order to finalize the payment.
  4. The URL can be found in the PaymentMethod response object. Also, a PaymentReference number is returned on the same level; this will contain the reference number of the payment in the Konbini system.
  5. Once the shopper finishes the payment process on the Konbini side, the order will be updated in the 2Checkout system as well.

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');

$CartObj = new stdClass();
$CartObj->Currency = JPY;
$CartObj->Language = "EN";
$CartObj->Country =  "JP";
$CartObj->CountryCode = "JP";
$CartObj->CustomerIP = '91.220.121.21';
$CartObj->Source = "sourceAPI.net";
$CartObj->LocalTime = date('Y-m-d H:i:s');
$CartObj->CustomerReference = '421820999';
$CartObj->Items = array();
$CartObj->Items[0] = new stdClass();
$CartObj->Items[0]->Code = "151D8D2C20";
$CartObj->Items[0]->Quantity = 1;
$CartObj->Items[0]->PriceOptions = [];
$priceOption = new stdClass();
$priceOption->Name = 'Users';
$priceOption->Code = 'USERS_1';
$priceOption->Options = [];
$priceOptionOption = new stdClass();
$priceOptionOption->Name = '10 users';
$priceOptionOption->Value = '10_users';
$priceOptionOption->Surcharge = 0;
$priceOption->Options[] = $priceOptionOption;
$CartObj->Items[0]->PriceOptions[] = $priceOption;
$priceOption2 = new stdClass();
$priceOption2->Name = 'Maintenance period';
$priceOption2->Code = 'MAINTE_PERIOD';
$priceOption2->Options = [];
$priceOptionOption2 = new stdClass();
$priceOptionOption2->Name = '12 months';
$priceOptionOption2->Value = 'jira_maintenance_12_mths';
$priceOptionOption2->Surcharge = 0;
$priceOption2->Options[] = $priceOptionOption2;
$CartObj->Items[0]->PriceOptions[] = $priceOption2;
$CartObj->MachineId = 'machineIdTestDan';
$CartObj->Discount = null;
$CartObj->ExternalReference = null;

$CartObj->BillingDetails = new stdClass();
$CartObj->BillingDetails->IsCompany = false;
$CartObj->BillingDetails->Address1 = 'Hirohito Blvd 23';
$CartObj->BillingDetails->Address2 = 'floor 5';
$CartObj->BillingDetails->City = 'Osaka';
$CartObj->BillingDetails->State = '';
$CartObj->BillingDetails->CountryCode = 'JP';
$CartObj->BillingDetails->Phone = '80-1234-5678';
$CartObj->BillingDetails->Email = 'hitomi@tanaka.co.jp';
$CartObj->BillingDetails->FirstName = 'Hitomi';
$CartObj->BillingDetails->LastName = 'Tanaka';
$CartObj->BillingDetails->Zip = '223343';

$CartObj->DeliveryDetails = new stdClass();
$CartObj->DeliveryDetails->Address1 = 'Hirohito Blvd 23';
$CartObj->DeliveryDetails->Address2 = 'floor 5';
$CartObj->DeliveryDetails->City = 'Osaka';
$CartObj->DeliveryDetails->State = '';
$CartObj->DeliveryDetails->CountryCode = 'JP';
$CartObj->DeliveryDetails->Phone = '80-1234-5678';
$CartObj->DeliveryDetails->Email = 'hitomi@tanaka.co.jp';
$CartObj->DeliveryDetails->FirstName = 'Hitomi';
$CartObj->DeliveryDetails->LastName = 'Tanaka';
$CartObj->DeliveryDetails->Zip = '223343';
$CartObj->PaymentDetails = new stdClass();
$CartObj->PaymentDetails->Type = "KONBINI";
$CartObj->PaymentDetails->Currency = 'JPY';
$CartObj->PaymentDetails->CustomerIP = '91.220.121.21';

$CartObj->PaymentDetails->PaymentMethod = new stdClass();
$CartObj->PaymentDetails->PaymentMethod->RecurringEnabled = false;

$jsonRpcRequest = array (
'method' => 'placeOrder',
'params' => array($sessionID, $Order),
'id' => $i++,
'jsonrpc' => '2.0'
);

$output = callRPC($jsonRpcRequest, $host);

var_dump($output);

 

Response Example

Parameter Type/Description

Order information

Object

  Object containing order information.

 

 

  • Was this article helpful?