POST /api/v1/payments
Create Payments

Creates a payment for a given amount and currency.

*Must specify exactly one of payment_details or customer.

Examples

  • Credit Card
  • Konbini
  • Bank transfer
  • PayEasy
  • WebMoney
  • BitCash
  • NET CASH
  • Japan Mobile
  • LINE Pay
  • Merpay
  • PayPay
  • Alipay
  • Bancontact
  • BLIK
  • EPS
  • Giropay
  • iDEAL
  • Multibanco
  • MyBank
  • paysafecard
  • paysafecash
  • Przelewy24
  • SOFORT Banking
  • UnionPay
  • Wechat Pay
  • PAYCO
  • Happy Money
  • Culture Voucher
  • Carrier Billing

  • 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[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=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
            {
  "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": "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": 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": [

  ]
}
          

Params

Param name Description
amount
required

The amount to be charged before tax. Must be equal or greater than 0. Use a ‘.’ as a decimal separator, and no thousands separator.

currency
required

3 letter ISO currency code used to pay.

payment_details
required*

A hash or token describing the payment method used to make the payment. This or customer must be present when creating a payment.

customer
required*

The ID of an existing customer in which to provide payment details for the payment. This or payment_details must be present.

platform_amount
optional

The amount that will be routed to the platform merchant. Required when the payment is split. See also Introduction to the Platform API.

platform_merchant
optional

The ID identifying the paltform merchant to which the fund is routed. Required when the payment is split. See also Introduction to the Platform API.

capture
optional

If false, the payment will be authorized but not be captured. This option is ignored if a payment type is not credit_card.

description
optional

Plaintext description for annotating a resource.

tax
optional

The amount of tax to be charged. Defaults to the highest consumption tax rate in Japan if omitted or set to 'auto'. Use a ‘.’ as a decimal separator, and no thousands separator. If the tax is more precise than the currency allows, it will be rounded using a round half up algorithm.

external_order_num
optional

A unique ID from your application used to track this payment.

locale
optional

Sets language of instruction page for supported payment methods. Valid options are 'en', 'ja', and 'ko'.

metadata
optional

A set of key-value pairs.