Register or update a receiving account for the application
1 min
accounts
Register a receiving account for the application
POST
https://api-sandbox.klavi.ai/payment/management/v1/merchants/{appId}/accounts
Path Parameters
- appIdstringrequiredDescription
Header Parameters
- AuthorizationstringrequiredDescription
Body Parameters
- ispbstringrequiredDescription
- issuerstringDescription
- numberstringrequiredDescription
- accountTypestringrequiredDescription
- proxystringrequiredDescription
- holderobjectrequired
- identifierstringrequired
- namestringrequired
- identifierTypestringrequired
curl
curl --location --globoff 'https://api-sandbox.klavi.ai/payment/management/v1/merchants/{appId}/accounts/{appId}' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data '{
"ispb": "String",
"issuer": "String",
"number": "String",
"accountType": "String",
"proxy": "String",
"holder": {
"identifier": "",
"name": "",
"identifierType": ""
}
}'nodejs
var request = require('request');
var options = {
'method': 'POST',
'url': 'https://api-sandbox.klavi.ai/payment/management/v1/merchants/{appId}/accounts/{appId}',
'headers': {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: JSON.stringify({
"ispb": "String",
"issuer": "String",
"number": "String",
"accountType": "String",
"proxy": "String",
"holder": {
"identifier": "",
"name": "",
"identifierType": ""
}
})
};
request(options, function (error, response) {
if (error) throw new Error(error);
console.log(response.body);
});
javascript
var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Content-Type", "application/json");
var raw = JSON.stringify({
"ispb": "String",
"issuer": "String",
"number": "String",
"accountType": "String",
"proxy": "String",
"holder": {
"identifier": "",
"name": "",
"identifierType": ""
}
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api-sandbox.klavi.ai/payment/management/v1/merchants/{appId}/accounts/{appId}", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));python
import requests
import json
url = "https://api-sandbox.klavi.ai/payment/management/v1/merchants/{appId}/accounts/{appId}"
payload = json.dumps({
"ispb": "String",
"issuer": "String",
"number": "String",
"accountType": "String",
"proxy": "String",
"holder": {
"identifier": "",
"name": "",
"identifierType": ""
}
})
headers = {
'Accept': 'application/json',
'Content-Type': 'application/json'
}
response = requests.request("POST", url, headers=headers, data=payload)
print(response.text)
ruby
require "uri"
require "json"
require "net/http"
url = URI("https://api-sandbox.klavi.ai/payment/management/v1/merchants/{appId}/accounts/{appId}")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Accept"] = "application/json"
request["Content-Type"] = "application/json"
request.body = JSON.dump({
"ispb": "String",
"issuer": "String",
"number": "String",
"accountType": "String",
"proxy": "String",
"holder": {
"identifier": "",
"name": "",
"identifierType": ""
}
})
response = https.request(request)
puts response.read_body
201