POST /api/v1/payment_methods/credit_card
Create the Credit Card Payment Methods
Creates a new Credit Card 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/credit_card \
-u sk_123456: \
-d "has_processed_cc_before=false" \
-d "conducts_door_to_door_sales=false" \
-d "conducts_telemarketing=false" \
-d "conducts_mlm_scheme=false" \
-d "conducts_business_opportunity_scheme=false" \
-d "violated_consumer_contract_act=false" \
-d "pci_compliance_proofs=7estyza4j4a5s1wdqhhe0r4f7"
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({
'has_processed_cc_before': 'false',
'conducts_door_to_door_sales': 'false',
'conducts_telemarketing': 'false',
'conducts_mlm_scheme': 'false',
'conducts_business_opportunity_scheme': 'false',
'violated_consumer_contract_act': 'false',
'pci_compliance_proofs': '7estyza4j4a5s1wdqhhe0r4f7'
});
var post_options = {
host: 'komoju.com',
port: '443',
path: '/api/v1/live_application/payment_methods/credit_card',
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/credit_card')
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 = {
has_processed_cc_before: "false",
conducts_door_to_door_sales: "false",
conducts_telemarketing: "false",
conducts_mlm_scheme: "false",
conducts_business_opportunity_scheme: "false",
violated_consumer_contract_act: "false",
pci_compliance_proofs: "7estyza4j4a5s1wdqhhe0r4f7"
}
res = https.post(
uri.path,
body.to_json,
headers
)
puts res.body
{
"has_processed_cc_before": false,
"conducts_door_to_door_sales": false,
"conducts_telemarketing": false,
"conducts_mlm_scheme": false,
"conducts_business_opportunity_scheme": false,
"violated_consumer_contract_act": false,
"pci_compliance_proofs": [
"7estyza4j4a5s1wdqhhe0r4f7"
]
}
パラメータ
名前 | 説明 |
---|---|
has_processed_cc_before 任意 |
Has your business processed credit card transactions before? |
conducts_door_to_door_sales 任意 |
Does your company operate Door-to-Door sales? |
conducts_telemarketing 任意 |
Does your company operate Telemarketing Sales? |
conducts_mlm_scheme 任意 |
Does your company operate Network Marketing? |
conducts_business_opportunity_scheme 任意 |
Does your company operate Business Opportunity (Biz-Opp)? |
violated_consumer_contract_act 任意 |
Has your business violated either the Specified Commercial Transaction Act (特定商取引法) in the past five years or the Consumer Contract Act (消費者契約法) and lost a lawsuit due to these violations in the past? |
pci_compliance_proofs 任意 |
An arrary of file ID. Please upload your PCI Compliance Proof via the File API. After uploading, please provide the ID of file returned by the File API. |