概要
KOMOJU API は決済のための RESTful HTTP インターフェースを提供いたします。各リソース毎の詳細な説明は、 リソースページ でご確認ください。
現在 KOMOJU API は次の決済方法に対応しております:クレジットカード、 銀行振込、 キャリア決済(日本)、 LINE Pay、メルペイ、 PayPay、 楽天ペイ、 コンビニ決済、 PayEasy、BitCash、NET CASH、WebMoney、Konbini、 PayEasy、 BitCash、 NET CASH、 WebMoney、 Alipay、 Bancontact、 BLIK、 EPS、 Giropay、 iDEAL、 Multibanco、 MyBank、 paysafecard、 paysafecash、 Przelewy24、 Sofort、 UnionPay、 WeChat Pay, Dragonpay, eNETS, FPX Online Banking, GrabPay シンガポール, PAYCO, Happy Money, Culture Voucher, および キャリア決済.
KOMOJU API へのリクエストは HTTPS を使う必要があり、エンドポイントは https://komoju.com/api/v1 である必要があります。API から返ってきたデータはすべて JSON フォーマットになっています。リクエスト作成時の文字コードは UTF-8 を使用してください。
認証
KOMOJU は、秘密 API キーおよび公開 API キーをクライアントに提供しますので、そのキーで API へのリクエストを作成することができます。テスト環境用および本番環境用に 2 本のキーをご用意いたします。このキーは、お使いのクライアントアカウント設定ページでご確認いただけます。
KOMOJU API は、 HTTP ベーシック認証 を使用して API リクエストを認証していますので、お使いの API キーをユーザー名として渡す必要があります。その際パスワードは要りません。例えば、以下のようなコードとなります:
curl -u secret_key: "https://komoju.com/api/v1/payments"
レスポンス & エラー
HTTP ステータスコード
KOMOJU API は HTTP ステータスコードを使用してリクエストの成功または失敗を表現します。次の表は、KOMOJU API が返すステータスコードの一覧です。
ステータスコード | 説明 |
---|---|
200 OK |
サーバーがリクエストを正常に処理しました |
202 Accepted |
リソースは正常に作成されましたが、プロセスは完了していません |
204 No Content |
サーバーはリクエストを正常に処理しましたが、返す情報がありません |
401 Not Authorized |
API キーが無効、または見つかりません |
403 Forbidden |
API キーにはリソースにアクセスする権限がありません |
404 Not Found |
リソースが見つかりません |
422 Unprocessible Entity |
パラメータが不正または不足しています |
500 Internal Server Error |
KOMOJU サーバー内でなんらかの問題が発生しました |
502 Bad Gateway |
上位の決済プロセッサがエラーを返してきました |
503 Service Unavailable |
サーバーメンテナンス中 |
エラー
エラーは JSON フォーマットで返されます。code
および message
パラメータは各エラーメッセージ毎に返されます。
属性
パラメータ | タイプ | 詳細 |
---|---|---|
message |
文字列 | エラーメッセージの内容が記載された文字列 |
code |
文字列 | エラーコード |
param |
文字列 | エラーの発生したパラメータ |
JSON Object
{
"error": {
"message": "A required parameter (amount) is missing",
"code": "missing_parameter",
"param": "amount"
}
}
エラーコード
エラーコード | HTTP ステータスコード | メッセージ例 |
---|---|---|
bad_request |
400 |
不正な要求です。サーバーは要求を処理できません。 |
unauthorized |
401 |
ユーザーの認証に失敗しました。 |
not_found |
404 |
リソースが見つかりませんでした。 |
internal_server_error |
500 |
内部エラーが発生しました。 |
forbidden |
403 |
リソースへのアクセスは許可されていません。 |
unprocessable_entity |
422 |
指定されたパラメータに何らかの不整合があるため処理できません。 |
bad_gateway |
502 |
上位ゲートウェイがエラーを返却しました。 |
gateway_timeout |
504 |
支払いの処理中にゲートウェイタイムアウトが発生しました。請求は行われていません。支払いを再試行してください。 |
service_unavailable |
503 |
メンテナンス中です。しばらくしてからもう一度実行してください。 |
request_failed |
402 |
リクエストが失敗しました。 |
invalid_payment_type |
422 |
支払い方法が無効です。 %{provided} は %{allowed} の一つではありません。 |
invalid_token |
422 |
トークンの値が不正です。 |
invalid_currency |
422 |
指定された通貨が不正です。 |
not_refundable |
422 |
返金できない支払いです。 |
not_capturable |
422 |
入金できない決済です。 |
not_cancellable |
422 |
キャンセルできない支払いです。 |
not_chargebackable |
422 |
チャージバックできない決済です。 |
fraudulent |
422 |
不正行為の疑いのある支払いです。 |
invalid_parameter |
422 |
%{param} の値が不正です。 |
missing_parameter |
422 |
必須パラメータ (%{param}) が指定されていません。 |
insufficient_funds |
502 |
残高不足です。 |
used_number |
502 |
使用済みの番号です。 |
card_declined |
502 |
カードは拒否されました。 |
invalid_password |
502 |
パスワードが不正です。 |
bad_verification_value |
502 |
セキュリティーコードが不正です。 |
exceeds_limit |
502 |
決済可能額を超過しました。 |
card_expired |
502 |
カードは期限切れです。 |
invalid_number |
502 |
指定された番号が不正です。 |
invalid_account |
502 |
アカウントが不正です。 |
restricted_account |
502 |
アカウントの利用が制限されています。 |
other_error |
502 |
その他のエラーです。 |
invalid_user_key |
502 |
アカウントが不正です。 |
other_invalid |
502 |
不正なカードです。 |
ページネーション
10 以上のアイテムを含むリクエストはデフォルトでページ割りされます。KOMOJU では page
および per_page
パラメータを使ってページ割りを行います。per_page
パラメータの最大値は 100 です。
curl -u komoju-mart: "https://komoju.com/api/v1/payments?page=2&per_page=100"
ペイメント
ペイメントリソース
フィールド | 詳細 |
---|---|
id |
文字列 |
resource |
文字列 payment の値 |
status |
文字列 ペイメント状況 |
amount |
整数 課税前の合計金額。0 以上である必要があります。千の単位を表すカンマ、または小数点は使用しません。例えば、amountが10で、currencyがEURで指定されれば、決済額が0.10ユーロとなります。 |
customer |
文字列 顧客ID |
payment_deadline |
タイムスタンプ ペイメントの有効期限が切れる日時です。これは次のような ISO 8601 フォーマットのタイムスタンプで表します:YYYY-MM-DDTHH:MM:SSZ |
payment_details |
ハッシュまたはトークン お支払方法を表します |
payment_method_fee |
整数 特定のお支払方法に追加される手数料など |
total |
整数 お支払合計金額。これは、お支払金額 + 税 + お支払方法による手数料 |
currency |
文字列 決済が行われた 3 文字の ISO 通貨コード |
description |
文字列 お支払方法の詳細 (オプションが有効な場合はメールの文面に使用されます) |
captured_at |
タイムスタンプ ペイメントが保存された日時を表す ISO 8601 フォーマットのタイムスタンプ |
external_order_num |
文字列 決済におけるクライアントのユニーク ID です決済ひとつひとつを特定できるように、すべてのコールバックに必ず含まれます |
metadata |
ハッシュ key-value のペアのセット |
created_at |
タイムスタンプ ペイメントが作成された日時を表す ISO 8601 フォーマットのタイムスタンプ |
amount_refunded |
整数 返金済み金額 |
locale |
文字列 お支払いメールや支払方法の説明などの言語 |
refunds |
ハッシュ 返金情報 |
refund_requests |
ハッシュ 返金申込み情報 |
ペイメントの詳細
複数の支払い方法を抽象化し、統一されたAPIを提供するために、KOMOJU API はリクエストとレスポンスにpayment_details
ハッシュを使用しています。
payment_details
ハッシュには、下記のいずれかの値をとる type
パラメータを含めてください。: credit_card
, konbini
, bank_transfer
, pay_easy
, web_money
, bit_cash
, net_cash
, japan_mobile
, linepay
, merpay
, paypay
, paidy
, rakutenpay
, alipay
, bancontact
, blik
, eps
, giropay
, ideal
, multibanco
, mybank
, paysafe_card
, paysafe_cash
, przelewy24
, sofortbanking
, unionpay
, wechatpay
, dragonpay
, grabpayotp
, enets
, fpx
, payco
, happy_money
, culture_voucher
, mobile
.
サンプル
- クレジットカード
- コンビニ
- 銀行振込
- PayEasy
- WebMoney
- ビットキャッシュ
- NET CASH
- キャリア決済(日本)
- LINE Pay
- メルペイ
- PayPay
- Paidy
- 楽天ペイ
- Alipay
- Bancontact
- BLIK
- EPS
- Giropay
- iDEAL
- Multibanco
- MyBank
- paysafecard
- paysafecash
- Przelewy24
- SOFORT Banking
- UnionPay
- Wechat Pay
- Dragonpay
- GrabPay シンガポール
- eNETS
- FPX Online Banking
- PAYCO
- Happy Money
- Culture Voucher
- キャリア決済
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=KRW" \
-d "email=foo@bar.com" \
-d "payment_details[email]=foo@bar.com" \
-d "payment_details[type]=mobile" \
-d "return_url=http://example.com" \
-d "tax=0"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'KRW',
'email': 'foo@bar.com',
'payment_details[email]': 'foo@bar.com',
'payment_details[type]': 'mobile',
'return_url': 'http://example.com',
'tax': '0'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "KRW",
email: "foo@bar.com",
payment_details: {
email: "foo@bar.com",
type: "mobile"
},
return_url: "http://example.com",
tax: "0"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=100" \
-d "currency=JPY" \
-d "debug=true" \
-d "payment_details[email]=test@example.com" \
-d "payment_details[prepaid_number]=1111111111111111" \
-d "payment_details[type]=bit_cash"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '100',
'currency': 'JPY',
'debug': 'true',
'payment_details[email]': 'test@example.com',
'payment_details[prepaid_number]': '1111111111111111',
'payment_details[type]': 'bit_cash'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "100",
currency: "JPY",
debug: "true",
payment_details: {
email: "test@example.com",
prepaid_number: "1111111111111111",
type: "bit_cash"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=JPY" \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=linepay" \
-d "return_url=https://example.com"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'JPY',
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'linepay',
'return_url': 'https://example.com'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "JPY",
payment_details: {
email: "test@example.com",
type: "linepay"
},
return_url: "https://example.com"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=JPY" \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=merpay" \
-d "return_url=https://example.com"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'JPY',
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'merpay',
'return_url': 'https://example.com'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "JPY",
payment_details: {
email: "test@example.com",
type: "merpay"
},
return_url: "https://example.com"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=JPY" \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=paypay" \
-d "return_url=https://example.com"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'JPY',
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'paypay',
'return_url': 'https://example.com'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "JPY",
payment_details: {
email: "test@example.com",
type: "paypay"
},
return_url: "https://example.com"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=JPY" \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=rakutenpay" \
-d "return_url=https://example.com"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'JPY',
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'rakutenpay',
'return_url': 'https://example.com'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "JPY",
payment_details: {
email: "test@example.com",
type: "rakutenpay"
},
return_url: "https://example.com"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=JPY" \
-d "payment_details[brand]=docomo" \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=japan_mobile" \
-d "return_url=https://example.com"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'JPY',
'payment_details[brand]': 'docomo',
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'japan_mobile',
'return_url': 'https://example.com'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "JPY",
payment_details: {
brand: "docomo",
email: "test@example.com",
type: "japan_mobile"
},
return_url: "https://example.com"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=JPY" \
-d "external_order_num=123" \
-d "metadata[foobar]=hoge" \
-d "payment_details[email]=test@example.com" \
-d "payment_details[expiry_days]=3" \
-d "payment_details[phone]=090-1111-2222" \
-d "payment_details[store]=lawson" \
-d "payment_details[type]=konbini"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'JPY',
'external_order_num': '123',
'metadata[foobar]': 'hoge',
'payment_details[email]': 'test@example.com',
'payment_details[expiry_days]': '3',
'payment_details[phone]': '090-1111-2222',
'payment_details[store]': 'lawson',
'payment_details[type]': 'konbini'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "JPY",
external_order_num: "123",
metadata: {
foobar: "hoge"
},
payment_details: {
email: "test@example.com",
expiry_days: "3",
phone: "090-1111-2222",
store: "lawson",
type: "konbini"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=JPY" \
-d "external_order_num=123" \
-d "metadata[foobar]=hoge" \
-d "payment_details[email]=test@example.com" \
-d "payment_details[family_name]=山田" \
-d "payment_details[family_name_kana]=ヤマダ" \
-d "payment_details[given_name]=太郎" \
-d "payment_details[given_name_kana]=タロウ" \
-d "payment_details[phone]=080-1111-2222" \
-d "payment_details[type]=pay_easy"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'JPY',
'external_order_num': '123',
'metadata[foobar]': 'hoge',
'payment_details[email]': 'test@example.com',
'payment_details[family_name]': '山田',
'payment_details[family_name_kana]': 'ヤマダ',
'payment_details[given_name]': '太郎',
'payment_details[given_name_kana]': 'タロウ',
'payment_details[phone]': '080-1111-2222',
'payment_details[type]': 'pay_easy'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "JPY",
external_order_num: "123",
metadata: {
foobar: "hoge"
},
payment_details: {
email: "test@example.com",
family_name: "山田",
family_name_kana: "ヤマダ",
given_name: "太郎",
given_name_kana: "タロウ",
phone: "080-1111-2222",
type: "pay_easy"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=JPY" \
-d "external_order_num=123" \
-d "metadata[foobar]=hoge" \
-d "payment_details[email]=test@example.com" \
-d "payment_details[prepaid_number]=1111111111111111" \
-d "payment_details[type]=net_cash"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'JPY',
'external_order_num': '123',
'metadata[foobar]': 'hoge',
'payment_details[email]': 'test@example.com',
'payment_details[prepaid_number]': '1111111111111111',
'payment_details[type]': 'net_cash'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "JPY",
external_order_num: "123",
metadata: {
foobar: "hoge"
},
payment_details: {
email: "test@example.com",
prepaid_number: "1111111111111111",
type: "net_cash"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=KRW" \
-d "external_order_num=123" \
-d "metadata[foobar]=hoge" \
-d "payment_details[happy_money_id]=11111111" \
-d "payment_details[happy_money_password]=11111111" \
-d "payment_details[type]=happy_money"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'KRW',
'external_order_num': '123',
'metadata[foobar]': 'hoge',
'payment_details[happy_money_id]': '11111111',
'payment_details[happy_money_password]': '11111111',
'payment_details[type]': 'happy_money'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "KRW",
external_order_num: "123",
metadata: {
foobar: "hoge"
},
payment_details: {
happy_money_id: "11111111",
happy_money_password: "11111111",
type: "happy_money"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=JPY" \
-d "external_order_num=123" \
-d "metadata[foobar]=hoge" \
-d "payment_details[email]=test@example.com" \
-d "payment_details[expiry_days]=14" \
-d "payment_details[family_name]=山田" \
-d "payment_details[family_name_kana]=ヤマダ" \
-d "payment_details[given_name]=太郎" \
-d "payment_details[given_name_kana]=タロウ" \
-d "payment_details[phone]=080-1111-2222" \
-d "payment_details[type]=bank_transfer"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'JPY',
'external_order_num': '123',
'metadata[foobar]': 'hoge',
'payment_details[email]': 'test@example.com',
'payment_details[expiry_days]': '14',
'payment_details[family_name]': '山田',
'payment_details[family_name_kana]': 'ヤマダ',
'payment_details[given_name]': '太郎',
'payment_details[given_name_kana]': 'タロウ',
'payment_details[phone]': '080-1111-2222',
'payment_details[type]': 'bank_transfer'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "JPY",
external_order_num: "123",
metadata: {
foobar: "hoge"
},
payment_details: {
email: "test@example.com",
expiry_days: "14",
family_name: "山田",
family_name_kana: "ヤマダ",
given_name: "太郎",
given_name_kana: "タロウ",
phone: "080-1111-2222",
type: "bank_transfer"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=KRW" \
-d "external_order_num=123" \
-d "metadata[foobar]=hoge" \
-d "payment_details[culture_id]=11111111" \
-d "payment_details[culture_password]=11111111" \
-d "payment_details[type]=culture_voucher"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'KRW',
'external_order_num': '123',
'metadata[foobar]': 'hoge',
'payment_details[culture_id]': '11111111',
'payment_details[culture_password]': '11111111',
'payment_details[type]': 'culture_voucher'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "KRW",
external_order_num: "123",
metadata: {
foobar: "hoge"
},
payment_details: {
culture_id: "11111111",
culture_password: "11111111",
type: "culture_voucher"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=JPY" \
-d "external_order_num=123" \
-d "metadata[foobar]=hoge" \
-d "payment_details[email]=test@example.com" \
-d "payment_details[month]=01" \
-d "payment_details[name]=Taro Yamada" \
-d "payment_details[number]=4111111111111111" \
-d "payment_details[type]=credit_card" \
-d "payment_details[verification_value]=123" \
-d "payment_details[year]=2025"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'JPY',
'external_order_num': '123',
'metadata[foobar]': 'hoge',
'payment_details[email]': 'test@example.com',
'payment_details[month]': '01',
'payment_details[name]': 'Taro Yamada',
'payment_details[number]': '4111111111111111',
'payment_details[type]': 'credit_card',
'payment_details[verification_value]': '123',
'payment_details[year]': '2025'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "JPY",
external_order_num: "123",
metadata: {
foobar: "hoge"
},
payment_details: {
email: "test@example.com",
month: "01",
name: "Taro Yamada",
number: "4111111111111111",
type: "credit_card",
verification_value: "123",
year: "2025"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=JPY" \
-d "external_order_num=123" \
-d "metadata[foobar]=hoge" \
-d "payment_details[email]=test@example.com" \
-d "payment_details[prepaid_number]=1111111111111111" \
-d "payment_details[type]=web_money"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'JPY',
'external_order_num': '123',
'metadata[foobar]': 'hoge',
'payment_details[email]': 'test@example.com',
'payment_details[prepaid_number]': '1111111111111111',
'payment_details[type]': 'web_money'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "JPY",
external_order_num: "123",
metadata: {
foobar: "hoge"
},
payment_details: {
email: "test@example.com",
prepaid_number: "1111111111111111",
type: "web_money"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=JPY" \
-d "external_order_num=123" \
-d "metadata[foobar]=hoge" \
-d "payment_details[email]=test@example.com" \
-d "payment_details[prepaid_number]=1111111111111111" \
-d "payment_details[type]=nanaco"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'JPY',
'external_order_num': '123',
'metadata[foobar]': 'hoge',
'payment_details[email]': 'test@example.com',
'payment_details[prepaid_number]': '1111111111111111',
'payment_details[type]': 'nanaco'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "JPY",
external_order_num: "123",
metadata: {
foobar: "hoge"
},
payment_details: {
email: "test@example.com",
prepaid_number: "1111111111111111",
type: "nanaco"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=EUR" \
-d "payment_details[name]=name" \
-d "payment_details[type]=alipay" \
-d "return_url=https://example.com"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'EUR',
'payment_details[name]': 'name',
'payment_details[type]': 'alipay',
'return_url': 'https://example.com'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "EUR",
payment_details: {
name: "name",
type: "alipay"
},
return_url: "https://example.com"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=EUR" \
-d "payment_details[name]=name" \
-d "payment_details[type]=bancontact" \
-d "return_url=https://example.com"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'EUR',
'payment_details[name]': 'name',
'payment_details[type]': 'bancontact',
'return_url': 'https://example.com'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "EUR",
payment_details: {
name: "name",
type: "bancontact"
},
return_url: "https://example.com"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=PLN" \
-d "payment_details[name]=name" \
-d "payment_details[type]=blik" \
-d "return_url=https://example.com"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'PLN',
'payment_details[name]': 'name',
'payment_details[type]': 'blik',
'return_url': 'https://example.com'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "PLN",
payment_details: {
name: "name",
type: "blik"
},
return_url: "https://example.com"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=EUR" \
-d "payment_details[name]=name" \
-d "payment_details[type]=eps" \
-d "return_url=https://example.com"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'EUR',
'payment_details[name]': 'name',
'payment_details[type]': 'eps',
'return_url': 'https://example.com'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "EUR",
payment_details: {
name: "name",
type: "eps"
},
return_url: "https://example.com"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=EUR" \
-d "payment_details[name]=name" \
-d "payment_details[type]=giropay" \
-d "return_url=https://example.com"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'EUR',
'payment_details[name]': 'name',
'payment_details[type]': 'giropay',
'return_url': 'https://example.com'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "EUR",
payment_details: {
name: "name",
type: "giropay"
},
return_url: "https://example.com"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=EUR" \
-d "payment_details[name]=name" \
-d "payment_details[type]=ideal" \
-d "return_url=https://example.com"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'EUR',
'payment_details[name]': 'name',
'payment_details[type]': 'ideal',
'return_url': 'https://example.com'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "EUR",
payment_details: {
name: "name",
type: "ideal"
},
return_url: "https://example.com"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=EUR" \
-d "payment_details[name]=name" \
-d "payment_details[type]=multibanco" \
-d "return_url=https://example.com"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'EUR',
'payment_details[name]': 'name',
'payment_details[type]': 'multibanco',
'return_url': 'https://example.com'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "EUR",
payment_details: {
name: "name",
type: "multibanco"
},
return_url: "https://example.com"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=EUR" \
-d "payment_details[name]=name" \
-d "payment_details[type]=mybank" \
-d "return_url=https://example.com"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'EUR',
'payment_details[name]': 'name',
'payment_details[type]': 'mybank',
'return_url': 'https://example.com'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "EUR",
payment_details: {
name: "name",
type: "mybank"
},
return_url: "https://example.com"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=EUR" \
-d "payment_details[name]=name" \
-d "payment_details[type]=paysafe_card" \
-d "return_url=https://example.com"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'EUR',
'payment_details[name]': 'name',
'payment_details[type]': 'paysafe_card',
'return_url': 'https://example.com'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "EUR",
payment_details: {
name: "name",
type: "paysafe_card"
},
return_url: "https://example.com"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=EUR" \
-d "payment_details[type]=paysafe_cash" \
-d "payment_details[email]=test@example.com" \
-d "" \
-d "return_url=https://example.com"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'EUR',
'payment_details[type]': 'paysafe_cash',
'payment_details[email]': 'test@example.com',
'': '',
'return_url': 'https://example.com'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "EUR",
payment_details: {
type: "paysafe_cash",
email: "test@example.com"
},
return_url: "https://example.com"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=EUR" \
-d "payment_details[name]=name" \
-d "payment_details[type]=payu" \
-d "return_url=https://example.com"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'EUR',
'payment_details[name]': 'name',
'payment_details[type]': 'payu',
'return_url': 'https://example.com'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "EUR",
payment_details: {
name: "name",
type: "payu"
},
return_url: "https://example.com"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=EUR" \
-d "payment_details[name]=name" \
-d "payment_details[type]=przelewy24" \
-d "payment_details[email]=name@example.com" \
-d "return_url=https://example.com"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'EUR',
'payment_details[name]': 'name',
'payment_details[type]': 'przelewy24',
'payment_details[email]': 'name@example.com',
'return_url': 'https://example.com'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "EUR",
payment_details: {
name: "name",
type: "przelewy24",
email: "name@example.com"
},
return_url: "https://example.com"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=EUR" \
-d "payment_details[name]=name" \
-d "payment_details[type]=sofortbanking" \
-d "return_url=https://example.com"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'EUR',
'payment_details[name]': 'name',
'payment_details[type]': 'sofortbanking',
'return_url': 'https://example.com'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "EUR",
payment_details: {
name: "name",
type: "sofortbanking"
},
return_url: "https://example.com"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=EUR" \
-d "payment_details[name]=name" \
-d "payment_details[type]=unionpay" \
-d "return_url=https://example.com"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'EUR',
'payment_details[name]': 'name',
'payment_details[type]': 'unionpay',
'return_url': 'https://example.com'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "EUR",
payment_details: {
name: "name",
type: "unionpay"
},
return_url: "https://example.com"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=EUR" \
-d "payment_details[name]=name" \
-d "payment_details[type]=wechatpay" \
-d "return_url=https://example.com"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'EUR',
'payment_details[name]': 'name',
'payment_details[type]': 'wechatpay',
'return_url': 'https://example.com'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "EUR",
payment_details: {
name: "name",
type: "wechatpay"
},
return_url: "https://example.com"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=6000" \
-d "currency=PHP" \
-d "payment_details[name]=name" \
-d "payment_details[email]=test@example.com" \
-d "payment_details[phone]=01234567890" \
-d "payment_details[type]=dragonpay" \
-d "return_url=https://example.com"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '6000',
'currency': 'PHP',
'payment_details[name]': 'name',
'payment_details[email]': 'test@example.com',
'payment_details[phone]': '01234567890',
'payment_details[type]': 'dragonpay',
'return_url': 'https://example.com'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "6000",
currency: "PHP",
payment_details: {
name: "name",
email: "test@example.com",
phone: "01234567890",
type: "dragonpay"
},
return_url: "https://example.com"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=SGD" \
-d "payment_details[name]=name" \
-d "payment_details[email]=test@example.com" \
-d "payment_details[phone]=01234567890" \
-d "payment_details[type]=enets" \
-d "return_url=https://example.com"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'SGD',
'payment_details[name]': 'name',
'payment_details[email]': 'test@example.com',
'payment_details[phone]': '01234567890',
'payment_details[type]': 'enets',
'return_url': 'https://example.com'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "SGD",
payment_details: {
name: "name",
email: "test@example.com",
phone: "01234567890",
type: "enets"
},
return_url: "https://example.com"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=MYR" \
-d "payment_details[name]=name" \
-d "payment_details[email]=test@example.com" \
-d "payment_details[phone]=01234567890" \
-d "payment_details[type]=fpx" \
-d "return_url=https://example.com"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'MYR',
'payment_details[name]': 'name',
'payment_details[email]': 'test@example.com',
'payment_details[phone]': '01234567890',
'payment_details[type]': 'fpx',
'return_url': 'https://example.com'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "MYR",
payment_details: {
name: "name",
email: "test@example.com",
phone: "01234567890",
type: "fpx"
},
return_url: "https://example.com"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=SGD" \
-d "payment_details[name]=name" \
-d "payment_details[type]=grabpayotp" \
-d "return_url=https://example.com"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'SGD',
'payment_details[name]': 'name',
'payment_details[type]': 'grabpayotp',
'return_url': 'https://example.com'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "SGD",
payment_details: {
name: "name",
type: "grabpayotp"
},
return_url: "https://example.com"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=KRW" \
-d "payment_details[type]=payco" \
-d "return_url=https://example.com"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'KRW',
'payment_details[type]': 'payco',
'return_url': 'https://example.com'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "KRW",
payment_details: {
type: "payco"
},
return_url: "https://example.com"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/payments \
-u sk_123456: \
-d "amount=1000" \
-d "currency=JPY" \
-d "payment_details[shipping_address_city]=武蔵野市" \
-d "payment_details[shipping_address_line1]=いちご吉祥寺ビル 4F" \
-d "payment_details[shipping_address_line2]=吉祥寺本町 2 丁目 5 番 10 号" \
-d "payment_details[shipping_address_state]=東京都" \
-d "payment_details[shipping_address_zip]=1800004" \
-d "payment_details[shipping_address_country]=JPY" \
-d "payment_details[customer_name]=山田太郎" \
-d "payment_details[type]=paidy" \
-d "return_url=https://example.com" \
-d "cancel_url=https://example.com"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'amount': '1000',
'currency': 'JPY',
'payment_details[shipping_address_city]': '武蔵野市',
'payment_details[shipping_address_line1]': 'いちご吉祥寺ビル 4F',
'payment_details[shipping_address_line2]': '吉祥寺本町 2 丁目 5 番 10 号',
'payment_details[shipping_address_state]': '東京都',
'payment_details[shipping_address_zip]': '1800004',
'payment_details[shipping_address_country]': 'JPY',
'payment_details[customer_name]': '山田太郎',
'payment_details[type]': 'paidy',
'return_url': 'https://example.com',
'cancel_url': 'https://example.com'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/payments',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/payments')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
amount: "1000",
currency: "JPY",
payment_details: {
shipping_address_city: "武蔵野市",
shipping_address_line1: "いちご吉祥寺ビル 4F",
shipping_address_line2: "吉祥寺本町 2 丁目 5 番 10 号",
shipping_address_state: "東京都",
shipping_address_zip: "1800004",
shipping_address_country: "JPY",
customer_name: "山田太郎",
type: "paidy"
},
return_url: "https://example.com",
cancel_url: "https://example.com"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
{
"id": "bncg5974hoii95erwy2gqx7vz",
"resource": "payment",
"status": "authorized",
"amount": 1000,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "mobile",
"email": "foo@bar.com",
"redirect_url": "https://komoju.com/offsite/new?uuid=bncg5974hoii95erwy2gqx7vz"
},
"payment_method_fee": 0,
"total": 1000,
"currency": "KRW",
"description": null,
"captured_at": null,
"external_order_num": null,
"metadata": {
},
"created_at": "2020-06-09T07:41:50Z",
"amount_refunded": 0,
"locale": "ja",
"refunds": [
],
"refund_requests": [
]
}
{
"id": "73cf3349ch47rdbqjjp2c8oyy",
"resource": "payment",
"status": "captured",
"amount": 100,
"tax": 10,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "bit_cash",
"email": "test@example.com"
},
"payment_method_fee": 0,
"total": 110,
"currency": "JPY",
"description": null,
"captured_at": "2020-06-09T07:41:51Z",
"external_order_num": null,
"metadata": {
},
"created_at": "2020-06-09T07:41:51Z",
"amount_refunded": 0,
"locale": "ja",
"refunds": [
],
"refund_requests": [
]
}
{
"id": "87rh791klpxxv4rgshn3yu2hf",
"resource": "payment",
"status": "authorized",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "linepay",
"email": "test@example.com",
"redirect_url": "https://komoju.com/offsite/new?uuid=87rh791klpxxv4rgshn3yu2hf"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "JPY",
"description": null,
"captured_at": null,
"external_order_num": null,
"metadata": {
},
"created_at": "2020-06-09T07:41:59Z",
"amount_refunded": 0,
"locale": "ja",
"refunds": [
],
"refund_requests": [
]
}
{
"id": "5nnvwksll8q299v69i9jdpxzn",
"resource": "payment",
"status": "authorized",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "merpay",
"email": "test@example.com",
"redirect_url": "https://komoju.com/offsite/new?uuid=5nnvwksll8q299v69i9jdpxzn"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "JPY",
"description": null,
"captured_at": null,
"external_order_num": null,
"metadata": {
},
"created_at": "2020-06-09T07:42:00Z",
"amount_refunded": 0,
"locale": "ja",
"refunds": [
],
"refund_requests": [
]
}
{
"id": "87rh791klpxxv4rgshn3yu2hf",
"resource": "payment",
"status": "authorized",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "paypay",
"email": "test@example.com",
"redirect_url": "https://komoju.com/offsite/new?uuid=87rh791klpxxv4rgshn3yu2hf"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "JPY",
"description": null,
"captured_at": null,
"external_order_num": null,
"metadata": {
},
"created_at": "2020-06-09T07:41:59Z",
"amount_refunded": 0,
"locale": "ja",
"refunds": [
],
"refund_requests": [
]
}
{
"id": "5nnvwksll8q299v69i9jdpxzn",
"resource": "payment",
"status": "authorized",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "rakutenpay",
"email": "test@example.com",
"charge_key": "ch_5EUL0DB4RMB",
"redirect_url": "https://komoju.com/offsite/new?uuid=5nnvwksll8q299v69i9jdpxzn"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "JPY",
"description": null,
"captured_at": null,
"external_order_num": null,
"metadata": {
},
"created_at": "2020-06-09T07:42:00Z",
"amount_refunded": 0,
"locale": "ja",
"refunds": [
],
"refund_requests": [
]
}
{
"id": "9adne51m4l3fr498rd40o0xf9",
"resource": "payment",
"status": "authorized",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "japan_mobile",
"email": "test@example.com",
"provider": "docomo",
"redirect_url": "https://komoju.com/offsite/new?uuid=9adne51m4l3fr498rd40o0xf9"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "JPY",
"description": null,
"captured_at": null,
"external_order_num": null,
"metadata": {
},
"created_at": "2020-06-09T07:42:00Z",
"amount_refunded": 0,
"locale": "ja",
"refunds": [
],
"refund_requests": [
]
}
{
"id": "7h2ywj2xwzqm7g4e0s3ed9tmv",
"resource": "payment",
"status": "authorized",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": "2020-06-12T14:59:59Z",
"payment_details": {
"type": "konbini",
"email": "test@example.com",
"store": "lawson",
"confirmation_code": "2222",
"receipt": "90865708838",
"instructions_url": "https://komoju.com/ja/instructions/7h2ywj2xwzqm7g4e0s3ed9tmv"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "JPY",
"description": null,
"captured_at": null,
"external_order_num": "123",
"metadata": {
"foobar": "hoge"
},
"created_at": "2020-06-09T07:42:04Z",
"amount_refunded": 0,
"locale": "ja",
"refunds": [
],
"refund_requests": [
]
}
{
"id": "3pbcqcbd7m5b0ypy8c5lefczh",
"resource": "payment",
"status": "authorized",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": "2020-06-19T14:59:59Z",
"payment_details": {
"type": "pay_easy",
"email": "test@example.com",
"bank_id": "58191",
"customer_id": "20001900030947960025",
"confirmation_id": "288916",
"instructions_url": "https://komoju.com/ja/instructions/3pbcqcbd7m5b0ypy8c5lefczh"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "JPY",
"description": null,
"captured_at": null,
"external_order_num": "123",
"metadata": {
"foobar": "hoge"
},
"created_at": "2020-06-09T07:42:11Z",
"amount_refunded": 0,
"locale": "ja",
"refunds": [
],
"refund_requests": [
]
}
{
"id": "ena9brsze3ynkmhkfj5v2foig",
"resource": "payment",
"status": "captured",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": "2020-06-16T07:42:12Z",
"payment_details": {
"type": "net_cash",
"email": "test@example.com",
"short_amount": 0,
"prepaid_cards": [
{
"last_four_digits": "1111",
"points": 1100
}
]
},
"payment_method_fee": 0,
"total": 1100,
"currency": "JPY",
"description": null,
"captured_at": "2020-06-09T07:42:12Z",
"external_order_num": "123",
"metadata": {
"foobar": "hoge"
},
"created_at": "2020-06-09T07:42:12Z",
"amount_refunded": 0,
"locale": "ja",
"refunds": [
],
"refund_requests": [
]
}
{
"id": "c6l9g4murft6tnvig6zxf4q53",
"resource": "payment",
"status": "captured",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "happy_money",
"happy_money_id": "11111111"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "KRW",
"description": null,
"captured_at": "2020-06-09T07:42:12Z",
"external_order_num": "123",
"metadata": {
"foobar": "hoge"
},
"created_at": "2020-06-09T07:42:12Z",
"amount_refunded": 0,
"locale": "ja",
"refunds": [
],
"refund_requests": [
]
}
{
"id": "36mwqk77p2znfjnwgqci69buc",
"resource": "payment",
"status": "authorized",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": "2020-06-16T14:59:59Z",
"payment_details": {
"type": "bank_transfer",
"email": "test@example.com",
"order_id": "K6685338853",
"bank_name": "三井住友銀行",
"account_branch_name": "ひなぎく",
"account_number": "85",
"account_type": "普通預金",
"account_name": "株式会社DEGICA(カブシキガイシャ デジカ)",
"instructions_url": "https://komoju.com/ja/instructions/36mwqk77p2znfjnwgqci69buc"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "JPY",
"description": null,
"captured_at": null,
"external_order_num": "123",
"metadata": {
"foobar": "hoge"
},
"created_at": "2020-06-09T07:42:12Z",
"amount_refunded": 0,
"locale": "ja",
"refunds": [
],
"refund_requests": [
]
}
{
"id": "c2dkawkf0wzg4zl0908n4vuc4",
"resource": "payment",
"status": "captured",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "culture_voucher",
"culture_id": "11111111"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "KRW",
"description": null,
"captured_at": "2020-06-09T07:42:13Z",
"external_order_num": "123",
"metadata": {
"foobar": "hoge"
},
"created_at": "2020-06-09T07:42:13Z",
"amount_refunded": 0,
"locale": "ja",
"refunds": [
],
"refund_requests": [
]
}
{
"id": "dofcje84ldv0j94wa06ldw71c",
"resource": "payment",
"status": "captured",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": "2020-06-16T14:59:59Z",
"payment_details": {
"type": "credit_card",
"email": "test@example.com",
"brand": "visa",
"last_four_digits": "1111",
"month": 1,
"year": 2025
},
"payment_method_fee": 0,
"total": 1100,
"currency": "JPY",
"description": null,
"captured_at": "2020-06-09T07:42:14Z",
"external_order_num": "123",
"metadata": {
"foobar": "hoge"
},
"created_at": "2020-06-09T07:42:14Z",
"amount_refunded": 0,
"locale": "ja",
"refunds": [
],
"refund_requests": [
]
}
{
"id": "b2kjhznvxhu902067v2iu7rjg",
"resource": "payment",
"status": "captured",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "web_money",
"email": "test@example.com",
"short_amount": 0,
"prepaid_cards": [
{
"last_four_digits": "1111",
"points": 1100
}
]
},
"payment_method_fee": 0,
"total": 1100,
"currency": "JPY",
"description": null,
"captured_at": "2020-06-09T07:42:15Z",
"external_order_num": "123",
"metadata": {
"foobar": "hoge"
},
"created_at": "2020-06-09T07:42:15Z",
"amount_refunded": 0,
"locale": "ja",
"refunds": [
],
"refund_requests": [
]
}
{
"id": "2xo2org21jm66y4o51b18nirt",
"resource": "payment",
"status": "captured",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": "2020-06-16T07:42:16Z",
"payment_details": {
"type": "nanaco",
"email": "test@example.com",
"short_amount": 0,
"prepaid_cards": [
{
"last_four_digits": "1111",
"points": 1100
}
]
},
"payment_method_fee": 0,
"total": 1100,
"currency": "JPY",
"description": null,
"captured_at": "2020-06-09T07:42:16Z",
"external_order_num": "123",
"metadata": {
"foobar": "hoge"
},
"created_at": "2020-06-09T07:42:16Z",
"amount_refunded": 0,
"locale": "ja",
"refunds": [
],
"refund_requests": [
]
}
{
"id": "2qzbba5vvb7n8t4vubiapkkv5",
"resource": "payment",
"status": "pending",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "alipay",
"redirect_url": "https://komoju.com/offsite/new?uuid=4cv3ovhe3hgzkh4wtwaktoqwe"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "EUR",
"description": null,
"captured_at": null,
"external_order_num": null,
"metadata": {
},
"created_at": "2021-08-04T00:56:11Z",
"amount_refunded": 0,
"locale": "ja",
"session": null,
"refunds": [
],
"refund_requests": [
]
}
{
"id": "2qzbba5vvb7n8t4vubiapkkv5",
"resource": "payment",
"status": "pending",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "bancontact",
"redirect_url": "https://komoju.com/offsite/new?uuid=4cv3ovhe3hgzkh4wtwaktoqwe"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "EUR",
"description": null,
"captured_at": null,
"external_order_num": null,
"metadata": {
},
"created_at": "2021-08-04T00:56:11Z",
"amount_refunded": 0,
"locale": "ja",
"session": null,
"refunds": [
],
"refund_requests": [
]
}
{
"id": "2qzbba5vvb7n8t4vubiapkkv5",
"resource": "payment",
"status": "pending",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "blik",
"redirect_url": "https://komoju.com/offsite/new?uuid=4cv3ovhe3hgzkh4wtwaktoqwe"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "PLN",
"description": null,
"captured_at": null,
"external_order_num": null,
"metadata": {
},
"created_at": "2021-08-04T00:56:11Z",
"amount_refunded": 0,
"locale": "ja",
"session": null,
"refunds": [
],
"refund_requests": [
]
}
{
"id": "2qzbba5vvb7n8t4vubiapkkv5",
"resource": "payment",
"status": "pending",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "eps",
"redirect_url": "https://komoju.com/offsite/new?uuid=4cv3ovhe3hgzkh4wtwaktoqwe"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "EUR",
"description": null,
"captured_at": null,
"external_order_num": null,
"metadata": {
},
"created_at": "2021-08-04T00:56:11Z",
"amount_refunded": 0,
"locale": "ja",
"session": null,
"refunds": [
],
"refund_requests": [
]
}
{
"id": "2qzbba5vvb7n8t4vubiapkkv5",
"resource": "payment",
"status": "pending",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "giropay",
"redirect_url": "https://komoju.com/offsite/new?uuid=4cv3ovhe3hgzkh4wtwaktoqwe"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "EUR",
"description": null,
"captured_at": null,
"external_order_num": null,
"metadata": {
},
"created_at": "2021-08-04T00:56:11Z",
"amount_refunded": 0,
"locale": "ja",
"session": null,
"refunds": [
],
"refund_requests": [
]
}
{
"id": "2qzbba5vvb7n8t4vubiapkkv5",
"resource": "payment",
"status": "pending",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "ideal",
"redirect_url": "https://komoju.com/offsite/new?uuid=4cv3ovhe3hgzkh4wtwaktoqwe"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "EUR",
"description": null,
"captured_at": null,
"external_order_num": null,
"metadata": {
},
"created_at": "2021-08-04T00:56:11Z",
"amount_refunded": 0,
"locale": "ja",
"session": null,
"refunds": [
],
"refund_requests": [
]
}
{
"id": "2qzbba5vvb7n8t4vubiapkkv5",
"resource": "payment",
"status": "pending",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "multibanco",
"redirect_url": "https://komoju.com/offsite/new?uuid=4cv3ovhe3hgzkh4wtwaktoqwe"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "EUR",
"description": null,
"captured_at": null,
"external_order_num": null,
"metadata": {
},
"created_at": "2021-08-04T00:56:11Z",
"amount_refunded": 0,
"locale": "ja",
"session": null,
"refunds": [
],
"refund_requests": [
]
}
{
"id": "2qzbba5vvb7n8t4vubiapkkv5",
"resource": "payment",
"status": "pending",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "mybank",
"redirect_url": "https://komoju.com/offsite/new?uuid=4cv3ovhe3hgzkh4wtwaktoqwe"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "EUR",
"description": null,
"captured_at": null,
"external_order_num": null,
"metadata": {
},
"created_at": "2021-08-04T00:56:11Z",
"amount_refunded": 0,
"locale": "ja",
"session": null,
"refunds": [
],
"refund_requests": [
]
}
{
"id": "2qzbba5vvb7n8t4vubiapkkv5",
"resource": "payment",
"status": "pending",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "paysafe_card",
"redirect_url": "https://komoju.com/offsite/new?uuid=4cv3ovhe3hgzkh4wtwaktoqwe"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "EUR",
"description": null,
"captured_at": null,
"external_order_num": null,
"metadata": {
},
"created_at": "2021-08-04T00:56:11Z",
"amount_refunded": 0,
"locale": "ja",
"session": null,
"refunds": [
],
"refund_requests": [
]
}
{
"id": "2qzbba5vvb7n8t4vubiapkkv5",
"resource": "payment",
"status": "pending",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "paysafe_cash",
"redirect_url": "https://komoju.com/offsite/new?uuid=4cv3ovhe3hgzkh4wtwaktoqwe"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "EUR",
"description": null,
"captured_at": null,
"external_order_num": null,
"metadata": {
},
"created_at": "2021-08-04T00:56:11Z",
"amount_refunded": 0,
"locale": "ja",
"session": null,
"refunds": [
],
"refund_requests": [
]
}
{
"id": "2qzbba5vvb7n8t4vubiapkkv5",
"resource": "payment",
"status": "pending",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "payu",
"redirect_url": "https://komoju.com/offsite/new?uuid=4cv3ovhe3hgzkh4wtwaktoqwe"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "EUR",
"description": null,
"captured_at": null,
"external_order_num": null,
"metadata": {
},
"created_at": "2021-08-04T00:56:11Z",
"amount_refunded": 0,
"locale": "ja",
"session": null,
"refunds": [
],
"refund_requests": [
]
}
{
"id": "2qzbba5vvb7n8t4vubiapkkv5",
"resource": "payment",
"status": "pending",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "przelewy24",
"email": "name@example.com",
"redirect_url": "https://komoju.com/offsite/new?uuid=4cv3ovhe3hgzkh4wtwaktoqwe"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "EUR",
"description": null,
"captured_at": null,
"external_order_num": null,
"metadata": {
},
"created_at": "2021-08-04T00:56:11Z",
"amount_refunded": 0,
"locale": "ja",
"session": null,
"refunds": [
],
"refund_requests": [
]
}
{
"id": "2qzbba5vvb7n8t4vubiapkkv5",
"resource": "payment",
"status": "pending",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "sofortbanking",
"redirect_url": "https://komoju.com/offsite/new?uuid=4cv3ovhe3hgzkh4wtwaktoqwe"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "EUR",
"description": null,
"captured_at": null,
"external_order_num": null,
"metadata": {
},
"created_at": "2021-08-04T00:56:11Z",
"amount_refunded": 0,
"locale": "ja",
"session": null,
"refunds": [
],
"refund_requests": [
]
}
{
"id": "2qzbba5vvb7n8t4vubiapkkv5",
"resource": "payment",
"status": "pending",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "unionpay",
"redirect_url": "https://komoju.com/offsite/new?uuid=4cv3ovhe3hgzkh4wtwaktoqwe"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "EUR",
"description": null,
"captured_at": null,
"external_order_num": null,
"metadata": {
},
"created_at": "2021-08-04T00:56:11Z",
"amount_refunded": 0,
"locale": "ja",
"session": null,
"refunds": [
],
"refund_requests": [
]
}
{
"id": "2qzbba5vvb7n8t4vubiapkkv5",
"resource": "payment",
"status": "pending",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "wechatpay",
"redirect_url": "https://komoju.com/offsite/new?uuid=4cv3ovhe3hgzkh4wtwaktoqwe"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "EUR",
"description": null,
"captured_at": null,
"external_order_num": null,
"metadata": {
},
"created_at": "2021-08-04T00:56:11Z",
"amount_refunded": 0,
"locale": "ja",
"session": null,
"refunds": [
],
"refund_requests": [
]
}
{
"id": "2qzbba5vvb7n8t4vubiapkkv5",
"resource": "payment",
"status": "pending",
"amount": 6000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "dragonpay",
"redirect_url": "https://komoju.com/offsite/new?uuid=4cv3ovhe3hgzkh4wtwaktoqwe"
},
"payment_method_fee": 0,
"total": 6100,
"currency": "PHP",
"description": null,
"captured_at": null,
"external_order_num": null,
"metadata": {
},
"created_at": "2021-08-04T00:56:11Z",
"amount_refunded": 0,
"locale": "ja",
"session": null,
"refunds": [
],
"refund_requests": [
]
}
{
"id": "2qzbba5vvb7n8t4vubiapkkv5",
"resource": "payment",
"status": "pending",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "enets",
"redirect_url": "https://komoju.com/offsite/new?uuid=4cv3ovhe3hgzkh4wtwaktoqwe"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "SGD",
"description": null,
"captured_at": null,
"external_order_num": null,
"metadata": {
},
"created_at": "2021-08-04T00:56:11Z",
"amount_refunded": 0,
"locale": "ja",
"session": null,
"refunds": [
],
"refund_requests": [
]
}
{
"id": "2qzbba5vvb7n8t4vubiapkkv5",
"resource": "payment",
"status": "pending",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "fpx",
"redirect_url": "https://komoju.com/offsite/new?uuid=4cv3ovhe3hgzkh4wtwaktoqwe"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "MYR",
"description": null,
"captured_at": null,
"external_order_num": null,
"metadata": {
},
"created_at": "2021-08-04T00:56:11Z",
"amount_refunded": 0,
"locale": "ja",
"session": null,
"refunds": [
],
"refund_requests": [
]
}
{
"id": "2qzbba5vvb7n8t4vubiapkkv5",
"resource": "payment",
"status": "pending",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "grabpayotp",
"redirect_url": "https://komoju.com/offsite/new?uuid=4cv3ovhe3hgzkh4wtwaktoqwe"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "SGD",
"description": null,
"captured_at": null,
"external_order_num": null,
"metadata": {
},
"created_at": "2021-08-04T00:56:11Z",
"amount_refunded": 0,
"locale": "ja",
"session": null,
"refunds": [
],
"refund_requests": [
]
}
{
"id": "2qzbba5vvb7n8t4vubiapkkv5",
"resource": "payment",
"status": "pending",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "payco",
"order_sheet_url": "https://komoju.com/offsite/new?uuid=4cv3ovhe3hgzkh4wtwaktoqwe"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "KRW",
"description": null,
"captured_at": null,
"external_order_num": null,
"metadata": {
},
"created_at": "2021-08-04T00:56:11Z",
"amount_refunded": 0,
"locale": "ja",
"session": null,
"refunds": [
],
"refund_requests": [
]
}
{
"id": "09g4gqgy7r52aoun6y5jwjzs7",
"resource": "payment",
"status": "authorized",
"amount": 1000,
"tax": 100,
"customer": null,
"payment_deadline": null,
"payment_details": {
"type": "paidy",
"email": "test@example.com",
"redirect_url": "https://komoju.com/offsite/new?uuid=09g4gqgy7r52aoun6y5jwjzs7"
},
"payment_method_fee": 0,
"total": 1100,
"currency": "JPY",
"description": null,
"captured_at": null,
"external_order_num": null,
"metadata": {
},
"created_at": "2020-06-09T07:42:23Z",
"amount_refunded": 0,
"locale": "ja",
"refunds": [
],
"refund_requests": [
]
}
クレジットカード
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | credit_card の値 |
email |
文字列 | ペイメント受領時に送信するメールアドレス。オプションです。 |
number |
数値 | クレジットカード番号 |
month |
数値 | 有効期限月 |
year |
数値 | 有効期限年 |
verification_value |
数値 | CCV セキュリティ番号 |
name |
文字列 | 顧客の名前 |
以下のパラメータは、韓国のクレジットカード決済用です。
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
social_id |
数値 | お客様の6桁の生年月日(YYMMDD)、または10桁の法人番号(法人カードの場合) |
first_two_digits_of_pin |
数値 | 暗証番号の最初の二つの数字 |
corporate_card |
ブール値 | カードが法人かどうか。デフォルトはfalse 。 |
不正利用
クレジットカード不正利用防止のため、リクエストにfraud_details
ハッシュを使ってカスタマー情報を入れることができます。 customer_ip
以外のパラメータは必須ではありませんが、
情報が多ければ多いほど不正利用予防プロセスの成功率が上がります。
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
customer_ip |
文字列 | カスタマーのIPアドレス. ipv4とipv6に対応します。 |
customer_email |
文字列 | カスタマーのメイルアドレス。 |
customer_id |
文字列 | カスタマーID |
browser_language |
文字列 | カスタマーが利用しているブラウザの言語。 |
browser_user_agent |
文字列 | カスタマーが利用しているブラウザの情報。 |
レスポンスパラメータ | 詳細 |
---|---|
type |
credit_card の値 |
email |
ペイメント受領時に送信するメールアドレス |
brand |
visa 、mastercard などクレジットカード会社のブランド |
last_four_digits |
クレジットカード番号の末尾 4 桁 |
month |
クレジットカードの有効期限月 |
year |
クレジットカードの有効期限年 |
テストで使用するカード
注: ここで紹介しているカード番号は KOMOJU の Test モードでのみ利用可能です。Live モードでは利用できません。Live モードで購入の動作確認を行いたい場合は、お持ちの本物のクレジットカードをお使いください。
カード番号 | タイプ |
---|---|
3530111333300000 | JCB |
378282246310005 | American Express |
4111111111111111 | Visa |
5555555555554444 | MasterCard |
30569309025904 | Diners Club |
4123111111111000 | 残高不足 |
4123111111111018 | ご利用限度額を超過 |
4123111111111034 | セキュリティ番号が不正 |
4123111111111042 | 期限切れのカード |
4123111111111059 | クレジットカード使用不可 |
4123111111111067 | 無効なカード |
銀行振込
ペイメントが作成されると、bank_number
を返しますので、ユーザーは振込名義人に order_id
パラメータを入力して送金する必要があります。ペイメントを受領すると、 webhook を送信して支払い状況をお知らせいたします。
制限
- 銀行振込は日本で定められている営業時間内でのみ記録・保管されます。
- ペイメントは 14 日が経過すると無効となります。(有効期限が切れると webhook を送信してお知らせします。)
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | bank_transfer の値 |
email |
文字列 | ペイメント受領時にレシートおよびお支払方法を送信するメールアドレス。 |
given_name |
文字列 | 顧客の名前 |
family_name |
文字列 | 顧客の苗字 |
given_name_kana |
文字列 | 顧客のカタカナ名 |
family_name_kana |
文字列 | 顧客のカタカナ名 (苗字) |
phone |
文字列 | 顧客の電話番号 |
expiry_days |
整数 | ペイメントの有効期間の日数(最大 59 日)。オプションです。 |
レスポンスパラメータ | 詳細 |
---|---|
type |
bank_transfer の値 |
email |
ペイメント受領時にレシートおよびお支払方法を送信するメールアドレス |
order_id |
顧客が振込名義に含める振込番号 |
bank_name |
送金する銀行名 |
account_branch_name |
支店名 |
account_number |
送金する銀行口座番号 |
account_type |
口座種別 |
account_name |
口座名義 |
instructions_url |
お支払方法ページへの URL |
キャリア決済(日本)
キャリア決済では、docomo
、au
、softbank
のブランドに対応しております。
注: こちらの決済では、支払いを完了するためにお客様は各キャリアのWebサイトへリダイレクトされます。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | japan_mobile の値 |
email |
文字列 | ペイメント受領時にレシートおよびお支払方法を送信するメールアドレス |
brand |
文字列 | 決済するキャリアのブランド。au 、docomo 、softbank のいずれかの値 |
return_url |
文字列 | ユーザーが決済を完了した後にリダイレクトされるURL |
レスポンスパラメータ | 詳細 |
---|---|
type |
japan_mobile の値 |
email |
ペイメント受領時にレシートおよびお支払方法を送信するメールアドレス |
provider |
決済するキャリアのブランド。au 、docomo 、softbank のいずれかの値 |
redirect_url |
決済を完了させるためにお客様をリダイレクトする先のURL |
LINE Pay
注: こちらの決済では、支払いを完了するためにお客様はLINE PayのWebサイトへリダイレクトされます。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | linepay の値 |
email |
文字列 | ペイメント受領時にレシートおよびお支払方法を送信するメールアドレス |
return_url |
文字列 | ユーザーが決済を完了した後にリダイレクトされるURL |
cancel_url |
文字列 | ユーザーが決済をキャンセルした後にリダイレクトされるURL |
レスポンスパラメータ | 詳細 |
---|---|
type |
linepay の値 |
email |
ペイメント受領時にレシートおよびお支払方法を送信するメールアドレス |
redirect_url |
決済を完了させるためにお客様をリダイレクトする先のURL |
メルペイ
注: こちらの決済では、支払いを完了するためにお客様はメルペイのWebサイトへリダイレクトされます。
制限
- メルペイの支払い合計金額は最低 1円、最高 1,000,000円です。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | merpay の値 |
email |
文字列 | ペイメント受領時にレシートおよびお支払方法を送信するメールアドレス |
return_url |
文字列 | ユーザーが決済を完了した後にリダイレクトされるURL |
cancel_url |
文字列 | ユーザーが決済をキャンセルした後にリダイレクトされるURL |
レスポンスパラメータ | 詳細 |
---|---|
type |
merpay の値 |
email |
ペイメント受領時にレシートおよびお支払方法を送信するメールアドレス |
redirect_url |
決済を完了させるためにお客様をリダイレクトする先のURL |
PayPay
注: こちらの決済では、支払いを完了するためにお客様はPayPayのWebサイトへリダイレクトされます。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | paypay の値 |
email |
文字列 | ペイメント受領時にレシートおよびお支払方法を送信するメールアドレス |
return_url |
文字列 | ユーザーが決済を完了した後にリダイレクトされるURL |
レスポンスパラメータ | 詳細 |
---|---|
type |
paypay の値 |
email |
ペイメント受領時にレシートおよびお支払方法を送信するメールアドレス |
redirect_url |
決済を完了させるためにお客様をリダイレクトする先のURL |
楽天ペイ
注: こちらの決済では、支払いを完了するためにお客様は楽天ペイのWebサイトへリダイレクトされます。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | rakutenpay の値 |
email |
文字列 | ペイメント受領時にレシートおよびお支払方法を送信するメールアドレス |
return_url |
文字列 | ユーザーが決済を完了した後にリダイレクトされるURL |
レスポンスパラメータ | 詳細 |
---|---|
type |
rakutenpay の値 |
email |
ペイメント受領時にレシートおよびお支払方法を送信するメールアドレス |
charge_key |
Charge ObjectのID |
redirect_url |
決済を完了させるためにお客様をリダイレクトする先のURL |
Paidy
Paidyではオンライン決済を安全かつ手軽に行えます。コンシューマーはメールアドレスと電話番号だけで簡単に支払いを行えます
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | paidy の値 |
email |
文字列 | ペイメント受領時にレシートおよびお支払方法を送信するメールアドレス |
phone |
文字列 | コンシューマーの電話番号(例:09011112222)。コンシューマーがテキストメッセージを受信できる日本の携帯電番号です。 |
shipping_address_city |
文字列 | 市区町村。 |
shipping_address_line1 |
文字列 | 建物名と部屋番号(国内の住所の場合)。 |
shipping_address_line2 |
文字列 | 番地(国内の住所の場合)。 |
shipping_address_state |
文字列 | 都道府県。 |
shipping_address_zip |
文字列 | 郵便番号(NNN-NNNN形式)。 |
shipping_address_country |
文字列 | 国 |
customer_name |
string | コンシューマーの氏名(漢字表記)。 姓と名をスペースで区切る必要があります(例:山田 太郎)。 スペースは半角(Unicode U+0020)でも全角(U+3000)でも構いません。 |
return_url |
文字列 | ユーザーが決済を完了した後にリダイレクトされるURL |
cancel_url |
文字列 | ユーザーが決済をキャンセルした後にリダイレクトされるURL |
レスポンスパラメータ | 詳細 |
---|---|
type |
paidy の値 |
email |
ペイメント受領時にレシートおよびお支払方法を送信するメールアドレス |
redirect_url |
決済を完了させるためにお客様をリダイレクトする先のURL |
コンビニ決済
制限
- 支払い合計金額は、最高 300,000 円まで。この合計金額は、支払い金額 + 税 + 手数料すべてを合計した額です。
- 有効期限が切れると webhook を送信 してお知らせします。
コンビニ店舗種別
コンビニ決済を作成する時には、payment_details
ハッシュにある store
パラメータを渡す必要があります。この値は、顧客が実際に支払を行うコンビニの店舗種別です。
英語表記 | 日本語表記 | 店舗種別 | ロゴ |
---|---|---|---|
Daily Yamazaki | デイリーヤマザキ | daily-yamazaki |
|
Family Mart | ファミリーマート | family-mart |
|
Lawson | ローソン | lawson |
|
Ministop | ミニストップ | ministop |
|
Seicomart | セイコーマート | seicomart |
|
7-Eleven | セブンイレブン | seven-eleven |
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | konbini の値 |
email |
文字列 | ペイメント受領時にレシートおよび支払い方法を送信するメールアドレス。 |
store |
文字列 | 店舗種別。店舗種別は上記のコンビニ店舗種別をご覧ください。 |
phone |
文字列 | 顧客の電話番号。オプションです。 |
expiry_days |
整数 | ペイメントの有効期間の日数(最大 59 日)。オプションです。 |
レスポンスパラメータ | 詳細 |
---|---|
type |
konbini の値 |
email |
ペイメント受領時にレシートおよびお支払方法を送信するメールアドレス |
store |
lawson 、family_mart などの店舗種別 |
confirmation_code |
コンビニ支払時に必要となる番号 |
receipt |
コンビニ支払時に必要となる番号 |
instructions_url |
お支払方法ページへの URL |
WebMoney
WebMoney は日本で人気のプリペイドカードの1つです。複数枚のプリペイドカードを利用して支払いをすることができます。
ユーザーが使用した WebMoney プリペイドカードが残高不足だった場合、payment_details
ハッシュ内の prepaid_number
を更新するリクエストを行うことで決済を完了することができます。
複数のプリペイドカードを利用した支払い
プリペイドカードが残高不足だった場合 KOMOJU は 202 Accepted
ステータスを返却し、pending
ステータスのペイメントが作成されます。そのペイメントはPayment更新APIを使用し追加のプリペイドカードを追加することができます。例) payment_details[prepaid_number]=XXXXXXXXXXXX
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | web_money の値 |
email |
文字列 | ペイメント受領時に送信するメールアドレス。オプションです。 |
prepaid_number |
文字列 | 16 桁の WebMoney プリペイドカード番号 |
レスポンスパラメータ | 詳細 |
---|---|
type |
web_money の値 |
email |
ペイメント受領時に送信するメールアドレス |
short_amount |
お支払金額に不足している金額 |
prepaid_cards |
使用されたプリペイドカードの一覧 |
テストで使用するカード
カード番号 | タイプ |
---|---|
1111111111111111 | 2,000円 がチャージされた WebMoney プリペイドカード |
e111111111111112 | 不正なプリペイドカードナンバー |
e111111111111113 | 使用済みプリペイドカード |
e111111111111114 | 不明なエラー |
NET CASH
NET CASH は日本で提供されているプリペイドカードの1つです。 NTT カードソリューションが提供しています。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | net_cash の値 |
email |
文字列 | ペイメント受領時に送信するメールアドレス。オプションです。 |
prepaid_number |
文字列 | 16 桁の NET CASH プリペイドカード番号 |
レスポンスパラメータ | 詳細 |
---|---|
type |
net_cash の値 |
email |
ペイメント受領時に送信するメールアドレス |
short_amount |
お支払金額に不足している金額 |
prepaid_cards |
使用されたプリペイドカードの一覧 |
テストで使用するカード
カード番号 | タイプ |
---|---|
1111111111111111 | 2,000円 がチャージされた NET CASH プリペイドカード |
BitCash
ビットキャッシュはプリペイドカードの1つです。 KOMOJU では WebMoney とほぼ同じ API を提供していますが、ビットキャッシュの場合一度に複数枚のプリペイドカードを利用できません。 残高が不足している場合ユーザーはビットキャッシュ残高引継ページを利用する必要があります。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | bit_cash の値 |
email |
文字列 | ペイメント受領時に送信するメールアドレス。オプションです。 |
prepaid_number |
文字列 | 16 桁のビットキャッシュプリペイドカード番号 |
レスポンスパラメータ | 詳細 |
---|---|
type |
bit_cash の値 |
email |
ペイメント受領時に送信するメールアドレス |
テストで使用するカード
カード番号 | タイプ |
---|---|
1111111111111111 | 2,000円 がチャージされたビットキャッシュプリペイドカード |
e111111111111112 | 不正なプリペイドカードナンバー |
e111111111111113 | 不明なエラー |
PayEasy
顧客は PayEasy を利用してオンラインバンキングから支払うことができます。
PayEasy は後払い形式の支払方法であり、ペイメントが作成されたあと、一定の時間が経過してからペイメントが記録されます。KOMOJU は支払いが実行されると webhook を送信 してお知らせします。
制限
- PayEasy 支払い合計金額は、最高 999,999 円 です。
- ペイメントは 10 日が経過すると無効となります。(有効期限が切れると webhook を送信 してお知らせします。)
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | pay_easy の値 |
email |
文字列 | ペイメント受領時にレシートおよび支払い方法を送信するメールアドレス。 |
given_name |
文字列 | 顧客の名前 |
family_name |
文字列 | 顧客の苗字 |
given_name_kana |
文字列 | 顧客のカタカナ名 |
family_name_kana |
文字列 | 顧客のカタカナ名 (苗字) |
phone |
文字列 | 顧客の電話番号 |
レスポンスパラメータ | 詳細 |
---|---|
type |
pay_easy の値 |
email |
ペイメント受領時にレシートおよびお支払方法を送信するメールアドレス |
bank_id |
PayEasy支払い時に必要となるお客様番号 |
customer_id |
PayEasy支払い時に必要となるお客様番号 |
confirmation_id |
PayEasy支払い時に必要となるお客様番号 |
instructions_url |
支払方法ページへの URL |
Alipay
Alipayは中国で最も人気のあるオンラインウォレットです。そのスムーズなユーザーエクスペリエンスは、支払いにおける高いコンバージョン率を実現します。
注: こちらの決済では、支払いを完了するためにお客様はAlipayのWebサイトへリダイレクトされます。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | alipay の値 |
name |
文字列 | ユーザーの名前 |
return_url |
文字列 | ユーザーが決済を完了した後にリダイレクトされるURL |
レスポンスパラメータ | 詳細 |
---|---|
type |
alipay の値 |
redirect_url |
決済を完了させるためにお客様をリダイレクトする先のURL |
Bancontact
Bancontactは、ベルギーの電子決済サービスのマーケットリーダーであり、ベルギーの20の銀行がBancontactカードを発行しています。チェックアウト時に、消費者はカード情報を入力するか、QRコードをスキャンして、支払いを承認します。
注: こちらの決済では、支払いを完了するためにお客様はBancontactのWebサイトへリダイレクトされます。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | bancontact の値 |
name |
文字列 | ユーザーの名前 |
return_url |
文字列 | ユーザーが決済を完了した後にリダイレクトされるURL |
レスポンスパラメータ | 詳細 |
---|---|
type |
bancontact の値 |
redirect_url |
決済を完了させるためにお客様をリダイレクトする先のURL |
BLIK
2015年に導入され、ポーランドで作成・開発されたBLIKは、ポーランドのEコマースサイトにとって必須のローカル決済手段です。
注: こちらの決済では、支払いを完了するためにお客様はBLIKのWebサイトへリダイレクトされます。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | blik の値 |
name |
文字列 | ユーザーの名前 |
return_url |
文字列 | ユーザーが決済を完了した後にリダイレクトされるURL |
レスポンスパラメータ | 詳細 |
---|---|
type |
blik の値 |
redirect_url |
決済を完了させるためにお客様をリダイレクトする先のURL |
EPS
EPSはオーストリアの銀行と政府が共同で開発したオーストリアの主な銀行振り込み決済手段で、ユーザーは信頼できるオンラインバンクを使ってオンラインショッピングの安全な支払いができます。
注: こちらの決済では、支払いを完了するためにお客様はEPSのWebサイトへリダイレクトされます。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | eps の値 |
name |
文字列 | ユーザーの名前 |
return_url |
文字列 | ユーザーが決済を完了した後にリダイレクトされるURL |
レスポンスパラメータ | 詳細 |
---|---|
type |
eps の値 |
redirect_url |
決済を完了させるためにお客様をリダイレクトする先のURL |
Giropay
Giropayでは、ユーザーは銀行の安全なオンラインバンキングを利用しており、銀行口座情報や取引の詳細は完全に保護され、安全に保たれています。 ユーザーは、チェックアウトの際に追加の登録をすることなく直接giropayを利用することができます。
注: こちらの決済では、支払いを完了するためにお客様はGiropayのWebサイトへリダイレクトされます。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | giropay の値 |
name |
文字列 | ユーザーの名前 |
return_url |
文字列 | ユーザーが決済を完了した後にリダイレクトされるURL |
レスポンスパラメータ | 詳細 |
---|---|
type |
giropay の値 |
redirect_url |
決済を完了させるためにお客様をリダイレクトする先のURL |
iDEAL
2005年に登場したiDEALは、加盟店に支払い保証を提供するとともに、消費者はモバイルバンキングアプリやオンライン銀行口座を通じてオンラインでの支払いができます。 iDEALは、SEPAクレジット送信をベースとしており、銀行が提供するオンラインバンキングシステムとシームレスに統合されています。
注: こちらの決済では、支払いを完了するためにお客様はiDEALのWebサイトへリダイレクトされます。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | ideal の値 |
name |
文字列 | ユーザーの名前 |
return_url |
文字列 | ユーザーが決済を完了した後にリダイレクトされるURL |
レスポンスパラメータ | 詳細 |
---|---|
type |
ideal の値 |
redirect_url |
決済を完了させるためにお客様をリダイレクトする先のURL |
Multibanco
ポルトガルの消費者にとってMultibancoは主要な決済手段であり、電子商取引、ライセンス、税金など様々な商品/サービスの支払いにMultibancoを利用することができます。
注: こちらの決済では、支払いを完了するためにお客様はMultibancoのWebサイトへリダイレクトされます。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | multibanco の値 |
name |
文字列 | ユーザーの名前 |
return_url |
文字列 | ユーザーが決済を完了した後にリダイレクトされるURL |
レスポンスパラメータ | 詳細 |
---|---|
type |
multibanco の値 |
redirect_url |
決済を完了させるためにお客様をリダイレクトする先のURL |
MyBank
最高のセキュリティと透明性を備えた銀行送金により、ユーザーがオンラインバンキングから直接支払いを行うことを可能にし、商品やサービスの購入、公共機関への支払いなど、さまざまなサイトで利用できます。
注: こちらの決済では、支払いを完了するためにお客様はMyBankのWebサイトへリダイレクトされます。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | mybank の値 |
name |
文字列 | ユーザーの名前 |
return_url |
文字列 | ユーザーが決済を完了した後にリダイレクトされるURL |
レスポンスパラメータ | 詳細 |
---|---|
type |
mybank の値 |
redirect_url |
決済を完了させるためにお客様をリダイレクトする先のURL |
paysafecard
paysafecard は、銀行口座やクレジットカードなどの個人情報を必要としない、クーポンを利用したプリペイド式のオンライン決済手段です。paysafecard は、世界50カ国に 660,000 以上の販売拠点を持つ緻密な流通ネットワークを運営しています。
注: こちらの決済では、支払いを完了するためにお客様はpaysafecardのWebサイトへリダイレクトされます。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | paysafe_card の値 |
name |
文字列 | ユーザーの名前 |
return_url |
文字列 | ユーザーが決済を完了した後にリダイレクトされるURL |
レスポンスパラメータ | 詳細 |
---|---|
type |
paysafe_card の値 |
redirect_url |
決済を完了させるためにお客様をリダイレクトする先のURL |
paysafecash
Paysafecashではオンラインでの支払いを簡単かつ安全に行うことができます。
注: こちらの決済では、支払いを完了するためにお客様はpaysafecashのWebサイトへリダイレクトされます。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | paysafe_card の値 |
email |
文字列 | ユーザーのメールアドレス |
return_url |
文字列 | ユーザーが決済を完了した後にリダイレクトされるURL |
レスポンスパラメータ | 詳細 |
---|---|
type |
paysafe_card の値 |
redirect_url |
決済を完了させるためにお客様をリダイレクトする先のURL |
Przelewy24
2004年に設立されたPrzelewy24は、ポーランドを拠点とするリアルタイムのオンライン銀行送金決済手段で、P24と呼ばれることもあります。Przelewy24は、ポーランドのすべての銀行と提携して運営されています。
注: こちらの決済では、支払いを完了するためにお客様はPrzelewy24のWebサイトへリダイレクトされます。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | przelewy24 の値 |
name |
文字列 | ユーザーの名前 |
email |
文字列 | ユーザーのメールアドレス |
return_url |
文字列 | ユーザーが決済を完了した後にリダイレクトされるURL |
レスポンスパラメータ | 詳細 |
---|---|
type |
przelewy24 の値 |
email |
ユーザーのメールアドレス |
redirect_url |
決済を完了させるためにお客様をリダイレクトする先のURL |
Sofort
Sofortはセキュリティ意識の高い消費者に人気が高く、ユーザーはSofortの安全な決済ページから入力したオンラインバンキングの情報を使用し決済を行います。ユーザーはログイン後、ワンタイム確認コードを使って支払いを承認します。
注: こちらの決済では、支払いを完了するためにお客様はSofortのWebサイトへリダイレクトされます。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | sofortbanking の値 |
name |
文字列 | ユーザーの名前 |
return_url |
文字列 | ユーザーが決済を完了した後にリダイレクトされるURL |
レスポンスパラメータ | 詳細 |
---|---|
type |
sofortbanking の値 |
redirect_url |
The URL where customers must be redirected to complete payment. |
UnionPay
全世界で75億枚以上のカードが発行されているUnionPay(銀聯とその子会社である銀聯国際)は、世界最大のカードネットワークであり、中国本土では最も一般的に受け入れられている決済手段です。
注: こちらの決済では、支払いを完了するためにお客様はUnionPayのWebサイトへリダイレクトされます。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | unionpay の値 |
name |
文字列 | ユーザーの名前 |
return_url |
文字列 | ユーザーが決済を完了した後にリダイレクトされるURL |
レスポンスパラメータ | 詳細 |
---|---|
type |
unionpay の値 |
redirect_url |
The URL where customers must be redirected to complete payment. |
WeChat Pay
中国を代表するオンラインウォレットの一つであるWeChat Payは、中国のウォレットシェアの38%以上を占め(iResearch Group)、8億人以上のアクティブユーザーを抱えています(Tencent)。
注: こちらの決済では、支払いを完了するためにお客様はWeChat PayのWebサイトへリダイレクトされます。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | wechatpay の値 |
name |
文字列 | ユーザーの名前 |
return_url |
文字列 | ユーザーが決済を完了した後にリダイレクトされるURL |
レスポンスパラメータ | 詳細 |
---|---|
type |
wechatpay の値 |
redirect_url |
The URL where customers must be redirected to complete payment. |
Dragonpay
Dragonpayを通じて、利用者はオンラインで商品やサービスを購入し、実店舗の支払いカウンター、ATM、モバイルウォレット、またはオンライン口座振替で現金で支払うことができます。
注: こちらの決済では、支払いを完了するためにお客様はDragonpayのWebサイトへリダイレクトされます。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | dragonpay の値 |
name |
文字列 | ユーザーの名前 |
email |
文字列 | ユーザーのメールアドレス |
phone |
文字列 | ユーザーの有効な国際電話番号 |
return_url |
文字列 | ユーザーが決済を完了した後にリダイレクトされるURL |
|| レスポンスパラメータ | 詳細 |
| ------------------ | ----------- |
| type
| dragonpay
の値 |
| redirect_url
| 決済を完了させるためにお客様をリダイレクトする先のURL |
eNETs
eNETSを通じて、消費者はDBS(シンガポールと香港)、UOB、OCBC、シティバンク、BNUなど、シンガポールと中国の主要な銀行からダイレクトデビット(インターネットバンキングの支払い)に加え、すべての主要クレジットカードと通貨で支払うことが出来ます。
注: こちらの決済では、支払いを完了するためにお客様はeNETSのWebサイトへリダイレクトされます。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | enets の値 |
name |
文字列 | ユーザーの名前 |
email |
文字列 | ユーザーのRFCに準拠したメールアドレス |
phone |
文字列 | ユーザーの有効な国際電話番号 |
return_url |
文字列 | ユーザーが決済を完了した後にリダイレクトされるURL |
レスポンスパラメータ | 詳細 |
---|---|
type |
enets の値 |
redirect_url |
決済を完了させるためにお客様をリダイレクトする先のURL |
FPX Online Banking
FPX Online Bankingを通じて、利用者は、オンラインショッピングをする際に、銀行口座さえあればいつでも支払うことができます。チェックアウトの際、ユーザーはFPXのロゴを選択し、選択された銀行のポータルにログインし、決済を希望する口座を選択し、詳細を確認後、SMSで送信されるワンタイムパスコードを入力したら支払いが承認されます。 その後、ユーザーはショップのページに戻り、支払いと注文の確認を受け取ります。
注: こちらの決済では、支払いを完了するためにお客様はFPXのWebサイトへリダイレクトされます。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | fpx の値 |
name |
文字列 | ユーザーの名前 |
email |
文字列 | ユーザーのメールアドレス |
phone |
文字列 | ユーザーの電話番号 |
return_url |
文字列 | ユーザーが決済を完了した後にリダイレクトされるURL |
レスポンスパラメータ | 詳細 |
---|---|
type |
fpx の値 |
redirect_url |
決済を完了させるためにお客様をリダイレクトする先のURL |
GrabPay シンガポール
シンガポール4,000以上の加盟店ネットワークを持つGrabPayを通じて、消費者は小売店、屋台、オンラインショップ等で利用できるほか、QRコードを使って実店舗で送金や決済を行うこともできます。
注: こちらの決済では、支払いを完了するためにお客様はGrabPayのWebサイトへリダイレクトされます。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | grabpayotp の値 |
name |
文字列 | ユーザーの名前 |
return_url |
文字列 | ユーザーが決済を完了した後にリダイレクトされるURL |
レスポンスパラメータ | 詳細 |
---|---|
type |
grabpayotp の値 |
redirect_url |
決済を完了させるためにお客様をリダイレクトする先のURL |
PAYCO
韓国のモバイルウォレットです。QRコードをスキャンすることでリアルタイムで支払いを完了することができます。
注: こちらの決済では、支払いを完了するためにお客様はPAYCOのWebサイトへリダイレクトされます。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | payco の値 |
return_url |
文字列 | ユーザーが決済を完了した後にリダイレクトされるURL |
レスポンスパラメータ | 詳細 |
---|---|
type |
payco の値 |
order_sheet_url |
決済を完了させるためにお客様をリダイレクトする先のURL |
Happy Money
Happy Moneyは、Culture Voucherと同様に、お客様がプリペイド式のクーポン券を購入し、それを使ってオンラインで買い物をする方式の決済方法です。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | happy_money の値 |
happy_money_id |
文字列 | Happy MoneyのID |
happy_money_password |
文字列 | Happy Moneyのパスワード |
レスポンスパラメータ | 詳細 |
---|---|
type |
happy_money の値 |
happy_money_id |
Happy MoneyのID |
Culture Voucher
デジタル商品のオンライン決済に人気の韓国の決済方法です。決済の前にアカウントを登録し、カードのポイントをチャージする必要があります。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | culture_voucher の値 |
culture_id |
文字列 | Culture LandのID |
culture_password |
文字列 | Culture Landのパスワード |
レスポンスパラメータ | 詳細 |
---|---|
type |
culture_voucher の値 |
culture_id |
Culture LandのID |
キャリア決済
キャリア決済は、お客様の携帯電話の請求書を利用して支払いを行う方法です。キャリア決済は、韓国の主要な通信事業者で利用することができ、代替の決済手段として利用することができます。
ペイメントの詳細
リクエストパラメータ | タイプ | 詳細 |
---|---|---|
type |
文字列 | mobile の値 |
email |
文字列 | ユーザーのメールアドレス |
return_url |
文字列 | ユーザーが決済を完了した後にリダイレクトされるURL |
レスポンスパラメータ | 詳細 |
---|---|
type |
mobile の値 |
email |
ユーザーのメールアドレス |
redirect_url |
決済を完了させるためにお客様をリダイレクトする先のURL |
トークン
セキュリティ上の理由から、重要な顧客情報をクライアントは関与せずに KOMOJU に扱ってもらう必要がある場合があります。これを行うために、顧客の決済情報を収集し、それをトークンに変換します。このトークンを使うことで、顧客の情報があなたのサーバーを通過することなく、決済を行えるようになります。
KOMOJU はTokens APIを公開しています。クライアントアプリケーションは公開キーを使ってこの API を直接実行することでトークンを作成できます。
注: トークンは1度使用するか、30日経過すると使用できなくなります。決済情報を永続的に保持したい場合は、永久保存のセクションをご確認ください。
トークンの作成
トークンは KOMOJU MultiPay のようなクライアント側のライブラリを使って作成できます。また、Tokens APIを使って、直接作成することもできます。
- クレジットカード
- コンビニ
- 銀行振込
- PayEasy
- WebMoney
- ビットキャッシュ
- NET CASH
- キャリア決済(日本)
- LINE Pay
- メルペイ
- PayPay
- Paidy
- 楽天ペイ
- Alipay
- Bancontact
- BLIK
- EPS
- Giropay
- iDEAL
- Multibanco
- MyBank
- paysafecard
- paysafecash
- Przelewy24
- SOFORT Banking
- UnionPay
- Wechat Pay
- Dragonpay
- GrabPay シンガポール
- eNETS
- FPX Online Banking
- PAYCO
- Happy Money
- Culture Voucher
- キャリア決済
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "currency=KRW" \
-d "payment_details[email]=foo@bar.com" \
-d "payment_details[type]=mobile"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'currency': 'KRW',
'payment_details[email]': 'foo@bar.com',
'payment_details[type]': 'mobile'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
currency: "KRW",
payment_details: {
email: "foo@bar.com",
type: "mobile"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[expiry_days]=3" \
-d "payment_details[phone]=090-1111-2222" \
-d "payment_details[store]=lawson" \
-d "payment_details[type]=konbini"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[expiry_days]': '3',
'payment_details[phone]': '090-1111-2222',
'payment_details[store]': 'lawson',
'payment_details[type]': 'konbini'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
expiry_days: "3",
phone: "090-1111-2222",
store: "lawson",
type: "konbini"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[family_name]=山田" \
-d "payment_details[family_name_kana]=ヤマダ" \
-d "payment_details[given_name]=太郎" \
-d "payment_details[given_name_kana]=タロウ" \
-d "payment_details[phone]=080-1111-2222" \
-d "payment_details[type]=pay_easy"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[family_name]': '山田',
'payment_details[family_name_kana]': 'ヤマダ',
'payment_details[given_name]': '太郎',
'payment_details[given_name_kana]': 'タロウ',
'payment_details[phone]': '080-1111-2222',
'payment_details[type]': 'pay_easy'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
family_name: "山田",
family_name_kana: "ヤマダ",
given_name: "太郎",
given_name_kana: "タロウ",
phone: "080-1111-2222",
type: "pay_easy"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[prepaid_number]=1111111111111111" \
-d "payment_details[type]=bit_cash"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[prepaid_number]': '1111111111111111',
'payment_details[type]': 'bit_cash'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
prepaid_number: "1111111111111111",
type: "bit_cash"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[prepaid_number]=1111111111111111" \
-d "payment_details[type]=net_cash"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[prepaid_number]': '1111111111111111',
'payment_details[type]': 'net_cash'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
prepaid_number: "1111111111111111",
type: "net_cash"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[expiry_days]=14" \
-d "payment_details[family_name]=山田" \
-d "payment_details[family_name_kana]=ヤマダ" \
-d "payment_details[given_name]=太郎" \
-d "payment_details[given_name_kana]=タロウ" \
-d "payment_details[phone]=080-1111-2222" \
-d "payment_details[type]=bank_transfer"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[expiry_days]': '14',
'payment_details[family_name]': '山田',
'payment_details[family_name_kana]': 'ヤマダ',
'payment_details[given_name]': '太郎',
'payment_details[given_name_kana]': 'タロウ',
'payment_details[phone]': '080-1111-2222',
'payment_details[type]': 'bank_transfer'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
expiry_days: "14",
family_name: "山田",
family_name_kana: "ヤマダ",
given_name: "太郎",
given_name_kana: "タロウ",
phone: "080-1111-2222",
type: "bank_transfer"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=foo@bar.com" \
-d "payment_details[type]=paysafe_cash"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'foo@bar.com',
'payment_details[type]': 'paysafe_cash'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "foo@bar.com",
type: "paysafe_cash"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[type]=dospara" \
-d "payment_details[user_no]=12345" \
-d "payment_details[user_password]=password"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[type]': 'dospara',
'payment_details[user_no]': '12345',
'payment_details[user_password]': 'password'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
type: "dospara",
user_no: "12345",
user_password: "password"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[brand]=au" \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=japan_mobile"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[brand]': 'au',
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'japan_mobile'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
brand: "au",
email: "test@example.com",
type: "japan_mobile"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=foo@bar.com" \
-d "payment_details[return_url]=http://example.com" \
-d "payment_details[type]=zgold"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'foo@bar.com',
'payment_details[return_url]': 'http://example.com',
'payment_details[type]': 'zgold'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "foo@bar.com",
return_url: "http://example.com",
type: "zgold"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[prepaid_number]=1111111111111111" \
-d "payment_details[type]=web_money"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[prepaid_number]': '1111111111111111',
'payment_details[type]': 'web_money'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
prepaid_number: "1111111111111111",
type: "web_money"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[prepaid_number]=1111111111111111" \
-d "payment_details[type]=nanaco"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[prepaid_number]': '1111111111111111',
'payment_details[type]': 'nanaco'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
prepaid_number: "1111111111111111",
type: "nanaco"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=foo@bar.com" \
-d "payment_details[type]=paysafe_card"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'foo@bar.com',
'payment_details[type]': 'paysafe_card'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "foo@bar.com",
type: "paysafe_card"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=merpay"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'merpay'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
type: "merpay"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=rakutenpay"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'rakutenpay'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
type: "rakutenpay"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[culture_id]=11111111" \
-d "payment_details[culture_password]=11111111" \
-d "payment_details[type]=culture_voucher"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[culture_id]': '11111111',
'payment_details[culture_password]': '11111111',
'payment_details[type]': 'culture_voucher'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
culture_id: "11111111",
culture_password: "11111111",
type: "culture_voucher"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[birthday]=111111" \
-d "payment_details[type]=toss"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[birthday]': '111111',
'payment_details[type]': 'toss'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
birthday: "111111",
type: "toss"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[happy_money_id]=11111111" \
-d "payment_details[happy_money_password]=11111111" \
-d "payment_details[type]=happy_money"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[happy_money_id]': '11111111',
'payment_details[happy_money_password]': '11111111',
'payment_details[type]': 'happy_money'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
happy_money_id: "11111111",
happy_money_password: "11111111",
type: "happy_money"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[month]=01" \
-d "payment_details[name]=Taro Yamada" \
-d "payment_details[number]=4111111111111111" \
-d "payment_details[type]=credit_card" \
-d "payment_details[verification_value]=123" \
-d "payment_details[year]=2025"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[month]': '01',
'payment_details[name]': 'Taro Yamada',
'payment_details[number]': '4111111111111111',
'payment_details[type]': 'credit_card',
'payment_details[verification_value]': '123',
'payment_details[year]': '2025'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
month: "01",
name: "Taro Yamada",
number: "4111111111111111",
type: "credit_card",
verification_value: "123",
year: "2025"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=foo@bar.com" \
-d "payment_details[type]=cvs"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'foo@bar.com',
'payment_details[type]': 'cvs'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "foo@bar.com",
type: "cvs"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[prepaid_number]=1111111111111111" \
-d "payment_details[type]=steam_prepaid_card"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[prepaid_number]': '1111111111111111',
'payment_details[type]': 'steam_prepaid_card'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
prepaid_number: "1111111111111111",
type: "steam_prepaid_card"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=linepay"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'linepay'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
type: "linepay"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[provider]=mega-shark" \
-d "payment_details[type]=nexus_transfer"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[provider]': 'mega-shark',
'payment_details[type]': 'nexus_transfer'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
provider: "mega-shark",
type: "nexus_transfer"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=paypay"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'paypay'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
type: "paypay"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=paidy" \
-d "payment_details[customer_name]=山田太郎" \
-d "payment_details[shipping_address_city]=武蔵野市" \
-d "payment_details[shipping_address_line1]=いちご吉祥寺ビル 4F" \
-d "payment_details[shipping_address_line2]=吉祥寺本町 2 丁目 5 番 10 号" \
-d "payment_details[shipping_address_state]=東京都" \
-d "payment_details[shipping_address_zip]=1800004" \
-d "payment_details[shipping_address_country]=JPY"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'paidy',
'payment_details[customer_name]': '山田太郎',
'payment_details[shipping_address_city]': '武蔵野市',
'payment_details[shipping_address_line1]': 'いちご吉祥寺ビル 4F',
'payment_details[shipping_address_line2]': '吉祥寺本町 2 丁目 5 番 10 号',
'payment_details[shipping_address_state]': '東京都',
'payment_details[shipping_address_zip]': '1800004',
'payment_details[shipping_address_country]': 'JPY'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
type: "paidy",
customer_name: "山田太郎",
shipping_address_city: "武蔵野市",
shipping_address_line1: "いちご吉祥寺ビル 4F",
shipping_address_line2: "吉祥寺本町 2 丁目 5 番 10 号",
shipping_address_state: "東京都",
shipping_address_zip: "1800004",
shipping_address_country: "JPY"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=alipay" \
-d "payment_details[name]=name"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'alipay',
'payment_details[name]': 'name'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
type: "alipay",
name: "name"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=bancontact" \
-d "payment_details[name]=name"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'bancontact',
'payment_details[name]': 'name'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
type: "bancontact",
name: "name"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=blik" \
-d "payment_details[name]=name"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'blik',
'payment_details[name]': 'name'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
type: "blik",
name: "name"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=eps" \
-d "payment_details[name]=name"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'eps',
'payment_details[name]': 'name'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
type: "eps",
name: "name"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=giropay" \
-d "payment_details[name]=name"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'giropay',
'payment_details[name]': 'name'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
type: "giropay",
name: "name"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=ideal" \
-d "payment_details[name]=name"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'ideal',
'payment_details[name]': 'name'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
type: "ideal",
name: "name"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=multibanco" \
-d "payment_details[name]=name"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'multibanco',
'payment_details[name]': 'name'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
type: "multibanco",
name: "name"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=mybank" \
-d "payment_details[name]=name"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'mybank',
'payment_details[name]': 'name'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
type: "mybank",
name: "name"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=przelewy24" \
-d "payment_details[name]=name"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'przelewy24',
'payment_details[name]': 'name'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
type: "przelewy24",
name: "name"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=sofortbanking" \
-d "payment_details[name]=name"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'sofortbanking',
'payment_details[name]': 'name'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
type: "sofortbanking",
name: "name"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=unionpay" \
-d "payment_details[name]=name"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'unionpay',
'payment_details[name]': 'name'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
type: "unionpay",
name: "name"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=wechatpay" \
-d "payment_details[name]=name"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'wechatpay',
'payment_details[name]': 'name'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
type: "wechatpay",
name: "name"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=dragonpay" \
-d "payment_details[phone]=01234567890" \
-d "payment_details[name]=name"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'dragonpay',
'payment_details[phone]': '01234567890',
'payment_details[name]': 'name'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
type: "dragonpay",
phone: "01234567890",
name: "name"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=grabpayotp" \
-d "payment_details[name]=name"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'grabpayotp',
'payment_details[name]': 'name'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
type: "grabpayotp",
name: "name"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=enets" \
-d "payment_details[phone]=01234567890" \
-d "payment_details[name]=name"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'enets',
'payment_details[phone]': '01234567890',
'payment_details[name]': 'name'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
type: "enets",
phone: "01234567890",
name: "name"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=fpx" \
-d "payment_details[phone]=01234567890" \
-d "payment_details[name]=name"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'fpx',
'payment_details[phone]': '01234567890',
'payment_details[name]': 'name'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
type: "fpx",
phone: "01234567890",
name: "name"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/tokens \
-u sk_123456: \
-d "payment_details[email]=test@example.com" \
-d "payment_details[type]=payco"
var querystring = require('querystring');
var https = require('https');
var secret_key = 'sk_123456'
var auth = 'Basic ' + Buffer.from(secret_key + ':').toString('base64');
var post_data = querystring.stringify({
'payment_details[email]': 'test@example.com',
'payment_details[type]': 'payco'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/tokens',
method: 'POST',
headers: {
'Authorization': auth,
'Content-Length': Buffer.byteLength(post_data)
}
};
var post_req = https.request(post_options, function(res) {
res.setEncoding('utf8');
res.on('data', function (chunk) {
console.log(chunk);
});
});
post_req.write(post_data);
post_req.end();
require 'uri'
require 'net/https'
require 'json'
require 'base64'
require 'pp'
uri = URI.parse('https://komoju.com/api/v1/tokens')
https = Net::HTTP.new(uri.host, uri.port)
https.use_ssl = true
secret_key = 'sk_123456'
auth = Base64.encode64("#{secret_key}:")
headers = {
'Content-Type' => 'application/json',
'Authorization' => "Basic #{auth}"
}
body = {
payment_details: {
email: "test@example.com",
type: "payco"
}
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
{
"id": "tok_5r33l5ghtndrpm4gys7amg3e7",
"resource": "token",
"created_at": "2020-06-09T07:41:53Z",
"payment_details": {
"type": "mobile",
"email": "foo@bar.com"
}
}
{
"id": "tok_d88v4ikpu9rovtcmawbvm4c3o",
"resource": "token",
"created_at": "2020-06-09T07:41:53Z",
"payment_details": {
"type": "konbini",
"store": "lawson",
"email": "test@example.com",
"phone": "090-1111-2222"
}
}
{
"id": "tok_eyqjai9x8ev74cyjm45h78b14",
"resource": "token",
"created_at": "2020-06-09T07:41:54Z",
"payment_details": {
"type": "pay_easy",
"given_name": "太郎",
"family_name": "山田",
"given_name_kana": "タロウ",
"family_name_kana": "ヤマダ",
"phone": "080-1111-2222",
"email": "test@example.com"
}
}
{
"id": "tok_ed0lhhez670qq99jotxf6o1bp",
"resource": "token",
"created_at": "2020-06-09T07:41:54Z",
"payment_details": {
"type": "bit_cash",
"email": "test@example.com"
}
}
{
"id": "tok_1zz7p1bvvyru4mjr6d51z5p9r",
"resource": "token",
"created_at": "2020-06-09T07:41:54Z",
"payment_details": {
"type": "net_cash",
"email": "test@example.com"
}
}
{
"id": "tok_9l670rtg9qn7m30e4e2ny8g8n",
"resource": "token",
"created_at": "2020-06-09T07:41:55Z",
"payment_details": {
"type": "bank_transfer",
"given_name": "太郎",
"family_name": "山田",
"given_name_kana": "タロウ",
"family_name_kana": "ヤマダ",
"phone": "080-1111-2222",
"email": "test@example.com"
}
}
{
"id": "tok_d7cwkj2of6as6h7vjc0wzqcah",
"resource": "token",
"created_at": "2020-06-09T07:41:55Z",
"payment_details": {
"type": "paysafe_cash",
"email": "foo@bar.com"
}
}
{
"id": "tok_ci48yrk7v9z390c7xlakdbm91",
"resource": "token",
"created_at": "2020-06-09T07:41:55Z",
"payment_details": {
"type": "dospara"
}
}
{
"id": "tok_djhm3kf4d9zsvs85cxh0suwoj",
"resource": "token",
"created_at": "2020-06-09T07:41:55Z",
"payment_details": {
"type": "japan_mobile",
"email": "test@example.com"
}
}
{
"id": "tok_2zfo99po34f8qjhdq826xhjec",
"resource": "token",
"created_at": "2020-06-09T07:41:55Z",
"payment_details": {
"type": "zgold",
"email": "foo@bar.com"
}
}
{
"id": "tok_4fgro2k86q3ppi30rb4edwmci",
"resource": "token",
"created_at": "2020-06-09T07:41:55Z",
"payment_details": {
"type": "web_money",
"email": "test@example.com"
}
}
{
"id": "tok_f45b5921cd21wc5anjk9t4uyd",
"resource": "token",
"created_at": "2020-06-09T07:41:56Z",
"payment_details": {
"type": "nanaco",
"email": "test@example.com"
}
}
{
"id": "tok_443oz6yruz1u92lxikbmcxi43",
"resource": "token",
"created_at": "2020-06-09T07:41:56Z",
"payment_details": {
"type": "paysafe_card",
"email": "foo@bar.com"
}
}
{
"id": "tok_2v5gzkkemvgpp58bymr51sreq",
"resource": "token",
"created_at": "2020-06-09T07:41:56Z",
"payment_details": {
"type": "merpay",
"email": "test@example.com"
}
}
{
"id": "tok_2v5gzkkemvgpp58bymr51sreq",
"resource": "token",
"created_at": "2020-06-09T07:41:56Z",
"payment_details": {
"type": "rakutenpay",
"email": "test@example.com"
}
}
{
"id": "tok_7ejp2dq8ei93j0ckbt4va82kb",
"resource": "token",
"created_at": "2020-06-09T07:41:56Z",
"payment_details": {
"type": "culture_voucher"
}
}
{
"id": "tok_6jtgptn0oyc0tfsos19o8wtn3",
"resource": "token",
"created_at": "2020-06-09T07:41:57Z",
"payment_details": {
"type": "toss"
}
}
{
"id": "tok_3swi993oq8w13ebxkz5yszsgv",
"resource": "token",
"created_at": "2020-06-09T07:41:57Z",
"payment_details": {
"type": "happy_money"
}
}
{
"id": "tok_donqjgn5pzgaeepqztogwdjdu",
"resource": "token",
"created_at": "2020-06-09T07:41:57Z",
"payment_details": {
"type": "credit_card",
"email": "test@example.com"
}
}
{
"id": "tok_632przb9tkxnlhfrqpk666wrr",
"resource": "token",
"created_at": "2020-06-09T07:41:57Z",
"payment_details": {
"type": "cvs",
"email": "foo@bar.com"
}
}
{
"id": "tok_dj2gfn1nrtd5apvglzrtz3zvk",
"resource": "token",
"created_at": "2020-06-09T07:41:57Z",
"payment_details": {
"type": "steam_prepaid_card",
"email": "test@example.com"
}
}
{
"id": "tok_0e2k3bbhjlcdg4q08bx2zns4r",
"resource": "token",
"created_at": "2020-06-09T07:41:58Z",
"payment_details": {
"type": "linepay",
"email": "test@example.com"
}
}
{
"id": "tok_6ivp5ygiqmyh136utf0mqaogg",
"resource": "token",
"created_at": "2020-06-09T07:41:58Z",
"payment_details": {
"type": "nexus_transfer"
}
}
{
"id": "tok_7dc82thzz1eeujm00nei4zb9f",
"resource": "token",
"created_at": "2022-12-21T02:36:39Z",
"payment_details": {
"email": "test@example.com",
"type": "paypay"
}
}
{
"id": "tok_0vfd872iptbdc3oakn3pqwdat",
"resource": "token",
"created_at": "2022-12-21T03:06:42Z",
"payment_details": {
"email": "test@example.com",
"type": "paidy"
}
}
{
"id": "tok_a8rypyjy4dsjpfa2be67i7ieu",
"resource": "token",
"created_at": "2022-12-21T03:15:43Z",
"payment_details": {
"email": "test@example.com",
"type": "alipay"
}
}
{
"id": "tok_bxvdc2707pwomd76cvrcf3338",
"resource": "token",
"created_at": "2022-12-21T03:31:04Z",
"payment_details": {
"email": "test@example.com",
"type": "bancontact"
}
}
{
"id": "tok_5re7oabc278yd9ow7ddbbyhar",
"resource": "token",
"created_at": "2022-12-21T03:34:28Z",
"payment_details": {
"email": "test@example.com",
"type": "blik"
}
}
{
"id": "tok_8lddcb23dbqqamf1wi6qbw2rg",
"resource": "token",
"created_at": "2022-12-21T03:43:34Z",
"payment_details": {
"email": "test@example.com",
"type": "eps"
}
}
{
"id": "tok_2fforzg9sz3ewnd8qdj0s2tfg",
"resource": "token",
"created_at": "2022-12-21T03:46:48Z",
"payment_details": {
"email": "test@example.com",
"type": "giropay"
}
}
{
"id": "tok_5klorzg9sz7eund9qdj0s2t69",
"resource": "token",
"created_at": "2022-12-21T03:47:48Z",
"payment_details": {
"email": "test@example.com",
"type": "ideal"
}
}
{
"id": "tok_asm0r0njfe9sylnq4lp1xx5kg",
"resource": "token",
"created_at": "2022-12-21T03:48:48Z",
"payment_details": {
"email": "test@example.com",
"type": "multibanco"
}
}
{
"id": "tok_8hxszonl9dk6fjoc1jpqqte4w",
"resource": "token",
"created_at": "2022-12-21T03:49:48Z",
"payment_details": {
"email": "test@example.com",
"type": "mybank"
}
}
{
"id": "tok_3ot3c5einkrdpa0rsekls4zyg",
"resource": "token",
"created_at": "2022-12-21T03:50:48Z",
"payment_details": {
"email": "test@example.com",
"type": "przelewy24"
}
}
{
"id": "tok_8y8ujz8ru56ggzw6r5njav8hs",
"resource": "token",
"created_at": "2022-12-21T03:51:48Z",
"payment_details": {
"email": "test@example.com",
"type": "sofortbanking"
}
}
{
"id": "tok_c44ofq5hid6a8kcte5tticqur",
"resource": "token",
"created_at": "2022-12-21T03:53:48Z",
"payment_details": {
"email": "test@example.com",
"type": "unionpay"
}
}
{
"id": "tok_2ujcfk6ev4mzntzq75d53qc8v",
"resource": "token",
"created_at": "2022-12-21T03:53:48Z",
"payment_details": {
"email": "test@example.com",
"type": "wechatpay"
}
}
{
"id": "tok_ekokewuqoigz7xn4cun92054e",
"resource": "token",
"created_at": "2022-12-21T04:07:54Z",
"payment_details": {
"email": "test@example.com",
"type": "dragonpay",
"phone": "01234567890"
}
}
{
"id": "tok_ajiljzq85ys8wf1zr582vmemz",
"resource": "token",
"created_at": "2022-12-21T04:13:03Z",
"payment_details": {
"email": "test@example.com",
"type": "grabpayotp"
}
}
{
"id": "tok_cygfm681qko1ro8h0dxwpt3cf",
"resource": "token",
"created_at": "2022-12-21T04:15:54Z",
"payment_details": {
"email": "test@example.com",
"type": "enets",
"phone": "01234567890"
}
}
{
"id": "tok_346ue5o2rtu97neodxlt4qt25",
"resource": "token",
"created_at": "2022-12-21T04:18:54Z",
"payment_details": {
"email": "test@example.com",
"type": "fpx",
"phone": "01234567890"
}
}
{
"id": "tok_caa8ivrmj9rk05hkwnxoy3rlw",
"resource": "token",
"created_at": "2022-12-21T04:23:03Z",
"payment_details": {
"email": "test@example.com",
"type": "payco"
}
}
トークンの利用
トークン作成後は payment_details
パラメーターを指定できる全ての API で利用できます。
以下のように決済作成時に payment_details
に JSON を指定する代わりに、トークンを指定できます。
curl -X POST https://komoju.com/api/v1/payments \
-u komoju-mart: \
-d "amount=1000" \
-d "currency=JPY" \
-d "payment_details=tok_d7d3b7ea7a6910f1076bf025ad3276dac9360c9b3307cb92d77c93b62556077f3ifq39h3wnrlgkttrjm8c6g2e"
永久保存
カスタマーリソースを作成すると、決済情報を永続的に保存できるようになります。カスタマー作成時に、payment_details
にトークンを指定できます。以下がその例になります。
curl -X POST https://komoju.com/api/v1/customers \
-u komoju-mart: \
-d "payment_details=tok_d7d3b7ea7a6910f1076bf025ad3276dac9360c9b3307cb92d77c93b62556077f3ifq39h3wnrlgkttrjm8c6g2e"
カスタマーリソースが作成済みの場合、以下のように Payments APIに customer
パラメーターを指定できます。そうすることで、保存済みの決済情報をもとに、決済を作成できます。
curl -X POST https://komoju.com/api/v1/payments \
-u komoju-mart: \
-d "amount=1000" \
-d "currency=JPY" \
-d "customer=3lz38k1d12sr5e4ggchnhxdgk" \
カスタマー情報の更新や削除についてはカスタマーリソースをご確認ください。
3D Secure 2.0の対応
KOMOJU APIを用いた決済において3D Secure 2.0へ対応する場合、Secure Token API を用いて決済を行う必要があります。Secure Token APIは既存のToken APIに加えて二段階認証の仕組みを導入したAPIです。
詳しくは該当のドキュメントをご参照ください。