Authorize pay-in
curl --request POST \
--url https://sandbox.api.payvehq.com/v1/payins/{id}/authorize \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"pin": "1234",
"otp": "123456",
"birthday": "01/01/1990"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({pin: '1234', otp: '123456', birthday: '01/01/1990'})
};
fetch('https://sandbox.api.payvehq.com/v1/payins/{id}/authorize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox.api.payvehq.com/v1/payins/{id}/authorize"
payload = {
"pin": "1234",
"otp": "123456",
"birthday": "01/01/1990"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.api.payvehq.com/v1/payins/{id}/authorize",
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([
'pin' => '1234',
'otp' => '123456',
'birthday' => '01/01/1990'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}Collections
Authorize pay-in
Submit the PIN or one-time code the customer received, to approve a pay-in.
POST
/
v1
/
payins
/
{id}
/
authorize
Authorize pay-in
curl --request POST \
--url https://sandbox.api.payvehq.com/v1/payins/{id}/authorize \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"pin": "1234",
"otp": "123456",
"birthday": "01/01/1990"
}
'const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({pin: '1234', otp: '123456', birthday: '01/01/1990'})
};
fetch('https://sandbox.api.payvehq.com/v1/payins/{id}/authorize', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://sandbox.api.payvehq.com/v1/payins/{id}/authorize"
payload = {
"pin": "1234",
"otp": "123456",
"birthday": "01/01/1990"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox.api.payvehq.com/v1/payins/{id}/authorize",
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([
'pin' => '1234',
'otp' => '123456',
'birthday' => '01/01/1990'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}Body
application/json
Response
Authorization step processed

