VA Bank Transfer
Authorising OTP transaction
After submitting a request to create a PayIn using the kr_bank_va_kyc_krw PayIn method, if the stage field is authorize_otp, it means an OTP has been generated and it has been sent to the owner’s bank account. You need to collect the OTP to authorize the PayIn. Retrieve the OTP sent to the customer’s bank account and send a request to our authorization endpoint. If the OTP verification is successful, the payment details, including a virtual bank account, will be sent to the webhook you provided.
POST
/
v2
/
payins
/
bank
/
confirm_otp
Authorising OTP transaction
curl --request POST \
--url https://api.cleverhub.co/api/v2/payins/bank/confirm_otp \
--header 'Content-Type: application/json' \
--header 'app-id: <api-key>' \
--header 'secret-key: <api-key>' \
--data '
{
"uuid": "APU221YS",
"code": "123"
}
'import requests
url = "https://api.cleverhub.co/api/v2/payins/bank/confirm_otp"
payload = {
"uuid": "APU221YS",
"code": "123"
}
headers = {
"app-id": "<api-key>",
"secret-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'app-id': '<api-key>',
'secret-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({uuid: 'APU221YS', code: '123'})
};
fetch('https://api.cleverhub.co/api/v2/payins/bank/confirm_otp', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cleverhub.co/api/v2/payins/bank/confirm_otp",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'uuid' => 'APU221YS',
'code' => '123'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"app-id: <api-key>",
"secret-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cleverhub.co/api/v2/payins/bank/confirm_otp"
payload := strings.NewReader("{\n \"uuid\": \"APU221YS\",\n \"code\": \"123\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("app-id", "<api-key>")
req.Header.Add("secret-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cleverhub.co/api/v2/payins/bank/confirm_otp")
.header("app-id", "<api-key>")
.header("secret-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"uuid\": \"APU221YS\",\n \"code\": \"123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cleverhub.co/api/v2/payins/bank/confirm_otp")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["app-id"] = '<api-key>'
request["secret-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"uuid\": \"APU221YS\",\n \"code\": \"123\"\n}"
response = http.request(request)
puts response.read_body{
"pay_code": {
"virtual_account_number": "1234567890242",
"virtual_bank_code": "035",
"virtual_bank_name": "Shinhan Bank"
}
}{
"errors": {
"code": "REQUIRE_LOGIN",
"message": "Not Authorised"
}
}Authorizations
A unique identifier assigned to each application.
A secure token associated with the app-id.
Response
Verify OTP successful
Show child attributes
Show child attributes
⌘I
Authorising OTP transaction
curl --request POST \
--url https://api.cleverhub.co/api/v2/payins/bank/confirm_otp \
--header 'Content-Type: application/json' \
--header 'app-id: <api-key>' \
--header 'secret-key: <api-key>' \
--data '
{
"uuid": "APU221YS",
"code": "123"
}
'import requests
url = "https://api.cleverhub.co/api/v2/payins/bank/confirm_otp"
payload = {
"uuid": "APU221YS",
"code": "123"
}
headers = {
"app-id": "<api-key>",
"secret-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
'app-id': '<api-key>',
'secret-key': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({uuid: 'APU221YS', code: '123'})
};
fetch('https://api.cleverhub.co/api/v2/payins/bank/confirm_otp', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cleverhub.co/api/v2/payins/bank/confirm_otp",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'uuid' => 'APU221YS',
'code' => '123'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"app-id: <api-key>",
"secret-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cleverhub.co/api/v2/payins/bank/confirm_otp"
payload := strings.NewReader("{\n \"uuid\": \"APU221YS\",\n \"code\": \"123\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("app-id", "<api-key>")
req.Header.Add("secret-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cleverhub.co/api/v2/payins/bank/confirm_otp")
.header("app-id", "<api-key>")
.header("secret-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"uuid\": \"APU221YS\",\n \"code\": \"123\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cleverhub.co/api/v2/payins/bank/confirm_otp")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["app-id"] = '<api-key>'
request["secret-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"uuid\": \"APU221YS\",\n \"code\": \"123\"\n}"
response = http.request(request)
puts response.read_body{
"pay_code": {
"virtual_account_number": "1234567890242",
"virtual_bank_code": "035",
"virtual_bank_name": "Shinhan Bank"
}
}{
"errors": {
"code": "REQUIRE_LOGIN",
"message": "Not Authorised"
}
}