Create a whitelabel payment invoice
curl --request POST \
--url https://payvra.com/api/v1/merchants/whitelabel/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 1,
"payCurrency": "<string>",
"amountCurrency": "USD",
"underPaidCover": 25,
"feePaidByPayer": true,
"lifeTime": 1440,
"network": "<string>"
}
'import requests
url = "https://payvra.com/api/v1/merchants/whitelabel/create"
payload = {
"amount": 1,
"payCurrency": "<string>",
"amountCurrency": "USD",
"underPaidCover": 25,
"feePaidByPayer": True,
"lifeTime": 1440,
"network": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 1,
payCurrency: '<string>',
amountCurrency: 'USD',
underPaidCover: 25,
feePaidByPayer: true,
lifeTime: 1440,
network: '<string>'
})
};
fetch('https://payvra.com/api/v1/merchants/whitelabel/create', 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://payvra.com/api/v1/merchants/whitelabel/create",
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([
'amount' => 1,
'payCurrency' => '<string>',
'amountCurrency' => 'USD',
'underPaidCover' => 25,
'feePaidByPayer' => true,
'lifeTime' => 1440,
'network' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://payvra.com/api/v1/merchants/whitelabel/create"
payload := strings.NewReader("{\n \"amount\": 1,\n \"payCurrency\": \"<string>\",\n \"amountCurrency\": \"USD\",\n \"underPaidCover\": 25,\n \"feePaidByPayer\": true,\n \"lifeTime\": 1440,\n \"network\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://payvra.com/api/v1/merchants/whitelabel/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 1,\n \"payCurrency\": \"<string>\",\n \"amountCurrency\": \"USD\",\n \"underPaidCover\": 25,\n \"feePaidByPayer\": true,\n \"lifeTime\": 1440,\n \"network\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://payvra.com/api/v1/merchants/whitelabel/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 1,\n \"payCurrency\": \"<string>\",\n \"amountCurrency\": \"USD\",\n \"underPaidCover\": 25,\n \"feePaidByPayer\": true,\n \"lifeTime\": 1440,\n \"network\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"merchantId": "<string>",
"paymentUrl": "<string>",
"address": "<string>",
"txHash": "<string>",
"amount": 123,
"amountCurrency": "<string>",
"rate": 123,
"payAmount": 123,
"cryptoCurrency": {
"symbol": "<string>"
},
"network": {
"network": "<string>"
},
"feePaidByPayer": true,
"underPaidCover": 123,
"isWhiteLabel": true,
"returnUrl": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Invoices
Create Whitelabel Payment Invoice
Creates a new whitelabel payment invoice for the authenticated merchant with specific cryptocurrency and network
POST
/
api
/
v1
/
merchants
/
whitelabel
/
create
Create a whitelabel payment invoice
curl --request POST \
--url https://payvra.com/api/v1/merchants/whitelabel/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 1,
"payCurrency": "<string>",
"amountCurrency": "USD",
"underPaidCover": 25,
"feePaidByPayer": true,
"lifeTime": 1440,
"network": "<string>"
}
'import requests
url = "https://payvra.com/api/v1/merchants/whitelabel/create"
payload = {
"amount": 1,
"payCurrency": "<string>",
"amountCurrency": "USD",
"underPaidCover": 25,
"feePaidByPayer": True,
"lifeTime": 1440,
"network": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 1,
payCurrency: '<string>',
amountCurrency: 'USD',
underPaidCover: 25,
feePaidByPayer: true,
lifeTime: 1440,
network: '<string>'
})
};
fetch('https://payvra.com/api/v1/merchants/whitelabel/create', 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://payvra.com/api/v1/merchants/whitelabel/create",
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([
'amount' => 1,
'payCurrency' => '<string>',
'amountCurrency' => 'USD',
'underPaidCover' => 25,
'feePaidByPayer' => true,
'lifeTime' => 1440,
'network' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$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://payvra.com/api/v1/merchants/whitelabel/create"
payload := strings.NewReader("{\n \"amount\": 1,\n \"payCurrency\": \"<string>\",\n \"amountCurrency\": \"USD\",\n \"underPaidCover\": 25,\n \"feePaidByPayer\": true,\n \"lifeTime\": 1440,\n \"network\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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://payvra.com/api/v1/merchants/whitelabel/create")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 1,\n \"payCurrency\": \"<string>\",\n \"amountCurrency\": \"USD\",\n \"underPaidCover\": 25,\n \"feePaidByPayer\": true,\n \"lifeTime\": 1440,\n \"network\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://payvra.com/api/v1/merchants/whitelabel/create")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 1,\n \"payCurrency\": \"<string>\",\n \"amountCurrency\": \"USD\",\n \"underPaidCover\": 25,\n \"feePaidByPayer\": true,\n \"lifeTime\": 1440,\n \"network\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"merchantId": "<string>",
"paymentUrl": "<string>",
"address": "<string>",
"txHash": "<string>",
"amount": 123,
"amountCurrency": "<string>",
"rate": 123,
"payAmount": 123,
"cryptoCurrency": {
"symbol": "<string>"
},
"network": {
"network": "<string>"
},
"feePaidByPayer": true,
"underPaidCover": 123,
"isWhiteLabel": true,
"returnUrl": "<string>",
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z"
}{
"error": 123,
"message": "<string>"
}{
"error": 123,
"message": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Amount for the payment invoice
Required range:
x >= 0Cryptocurrency symbol to be used for payment
Currency of the amount
Percentage of underpayment that will be accepted
Required range:
0 <= x <= 50Must be a multiple of 0.1Whether the fee should be paid by the payer
Invoice lifetime in minutes
Required range:
1 <= x <= 1440Network to be used for the cryptocurrency
Response
Whitelabel payment invoice created successfully
Available options:
PENDING, CONFIRMING, UNDER_PAID, PAID, FAILED, EXPIRED Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I

