POST /api/v1/payment_methods/linepay
Create the LINE Pay Payment Methods

Creates a new LINE Pay payment method record for the onboarding live application of the currently authenticated merchant.

betaThis API is a pre-release. Please contact KOMOJU to obtain more usage instructions before using it.

サンプル

  • cURL
  • Node.js
  • Ruby
curl -X POST https://komoju.com/api/v1/live_application/payment_methods/linepay \
  -u sk_123456: \
  -d "accepted_line_tos=true" 
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({
  'accepted_line_tos': 'true'
});

var post_options = {
  host: 'komoju.com',
  port: '443',
  path: '/api/v1/live_application/payment_methods/linepay',
  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/live_application/payment_methods/linepay')
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 = {
  accepted_line_tos: "true"
}

res = https.post(
  uri.path,
  body.to_json,
  headers
)

puts res.body
{
  "accepted_line_tos": "true"
}

パラメータ

名前 説明
accepted_line_tos
必須

I've read and agree with LINEPay's terms of service