POST /api/v1/payment_methods/convenience_store
Create the Convenience Store Payment Methods
Creates a new Convenience Store 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.
Examples
- cURL
- Node.js
- Ruby
curl -X POST https://komoju.com/api/v1/live_application/payment_methods/convenience_store \
-u sk_123456: \
-d "open_time=06%3A00" \
-d "close_time=21%3A00" \
-d "expected_number_of_payments=100"
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({
'open_time': '06:00',
'close_time': '21:00',
'expected_number_of_payments': '100'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/live_application/payment_methods/convenience_store',
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/convenience_store')
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 = {
open_time: "06:00",
close_time: "21:00",
expected_number_of_payments: "100"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
{
"open_time": "06:00",
"close_time": "21:00",
"expected_number_of_payments": "100"
}
Params
Param name | Description |
---|---|
open_time optional |
The open time of your customer service operating hours |
close_time optional |
The close time of your customer service operating hours |
expected_number_of_payments optional |
Expected number of transactions (per month) |