curl --request POST \
--url https://doc-api.oppiwallet.com/api/v3/createTransactionRequest \
--header 'signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
--header 'Content-Type: application/json' \
--data '{
"currency": "6698aec7f188ae24c673da1c",
"amount": "0.01",
"orderId": "ORDER_1",
"isCheckBalance": true,
"description": "Payment for order #1",
"callbackUrl": "https://yourdomain.com/callback",
"success_url": "https://yourdomain.com/success",
"cancel_url": "https://yourdomain.com/cancel"
}'
const axios = require('axios');
let data = JSON.stringify({
"currency": "6698aec7f188ae24c673da1c",
"amount": "0.01",
"orderId": "ORDER_1",
"isCheckBalance": true,
"description": "Payment for order #1",
"callbackUrl": "https://yourdomain.com/callback",
"success_url": "https://yourdomain.com/success",
"cancel_url": "https://yourdomain.com/cancel"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://doc-api.oppiwallet.com/api/v3/createTransactionRequest',
headers: {
'signatureToken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmkiOiJjcmVhdGVUcmFuc2FjdGlvblJlcXVlc3QiLCJpYXQiOjE3MTUxNTM2NTQsImV4cCI6MTcxNTE1MzcwOSwia2V5Ijoicmh0TmJELU9yTFQteFp3M3QtMkpFWnR4Iiwic2lnbmF0dXJlU3RyaW5nIjoiMWVjY2M1NDc0YWZiMzU4NDExNDEzNjBkOGQ0MDBlMWYxOWIzNRjYzVkM2YxNTRjNmQ5YjViNSJ9.JuF7d8Oc4EyMvm7s5g3CN9L9Wbl_TFI_yO8jt20dvHw',
'Content-Type': 'application/json'
},
data: data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
import requests
url = "https://doc-api.oppiwallet.com/api/v3/createTransactionRequest"
headers = {
"signatureToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type": "application/json"
}
data = {
"currency": "6698aec7f188ae24c673da1c",
"amount": "0.01",
"orderId": "ORDER_1",
"isCheckBalance": True,
"description": "Payment for order #1",
"callbackUrl": "https://yourdomain.com/callback",
"success_url": "https://yourdomain.com/success",
"cancel_url": "https://yourdomain.com/cancel"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://doc-api.oppiwallet.com/api/v3/createTransactionRequest"
data := map[string]interface{}{
"currency": "6698aec7f188ae24c673da1c",
"amount": "0.01",
"orderId": "ORDER_1",
"isCheckBalance": true,
"description": "Payment for order #1",
"callbackUrl": "https://yourdomain.com/callback",
"success_url": "https://yourdomain.com/success",
"cancel_url": "https://yourdomain.com/cancel",
}
jsonData, _ := json.Marshal(data)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Add("signatureToken", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
<?php
$curl = curl_init();
$data = [
"currency" => "6698aec7f188ae24c673da1c",
"amount" => "0.01",
"orderId" => "ORDER_1",
"isCheckBalance" => true,
"description" => "Payment for order #1",
"callbackUrl" => "https://yourdomain.com/callback",
"success_url" => "https://yourdomain.com/success",
"cancel_url" => "https://yourdomain.com/cancel"
];
curl_setopt_array($curl, [
CURLOPT_URL => "https://doc-api.oppiwallet.com/api/v3/createTransactionRequest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type: application/json"
],
CURLOPT_POSTFIELDS => json_encode($data),
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
{
"address": "0x6648C29C6FD8........eD9Eb964c6F838bF",
"amount": "0.0001",
"tag": "2165464",
"transactionId": "0866f8-4a53-4579-9274-351ec868a627",
"link": "https://demo.oppipayment.com/0866f8-4a53-4579-9274-351ec868a627"
}
{
"message": "Error message"
}
Endpoints
Deposit
This API is used to create a transaction request for deposit.
POST
/
createTransactionRequest
curl --request POST \
--url https://doc-api.oppiwallet.com/api/v3/createTransactionRequest \
--header 'signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
--header 'Content-Type: application/json' \
--data '{
"currency": "6698aec7f188ae24c673da1c",
"amount": "0.01",
"orderId": "ORDER_1",
"isCheckBalance": true,
"description": "Payment for order #1",
"callbackUrl": "https://yourdomain.com/callback",
"success_url": "https://yourdomain.com/success",
"cancel_url": "https://yourdomain.com/cancel"
}'
const axios = require('axios');
let data = JSON.stringify({
"currency": "6698aec7f188ae24c673da1c",
"amount": "0.01",
"orderId": "ORDER_1",
"isCheckBalance": true,
"description": "Payment for order #1",
"callbackUrl": "https://yourdomain.com/callback",
"success_url": "https://yourdomain.com/success",
"cancel_url": "https://yourdomain.com/cancel"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://doc-api.oppiwallet.com/api/v3/createTransactionRequest',
headers: {
'signatureToken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmkiOiJjcmVhdGVUcmFuc2FjdGlvblJlcXVlc3QiLCJpYXQiOjE3MTUxNTM2NTQsImV4cCI6MTcxNTE1MzcwOSwia2V5Ijoicmh0TmJELU9yTFQteFp3M3QtMkpFWnR4Iiwic2lnbmF0dXJlU3RyaW5nIjoiMWVjY2M1NDc0YWZiMzU4NDExNDEzNjBkOGQ0MDBlMWYxOWIzNRjYzVkM2YxNTRjNmQ5YjViNSJ9.JuF7d8Oc4EyMvm7s5g3CN9L9Wbl_TFI_yO8jt20dvHw',
'Content-Type': 'application/json'
},
data: data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
import requests
url = "https://doc-api.oppiwallet.com/api/v3/createTransactionRequest"
headers = {
"signatureToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type": "application/json"
}
data = {
"currency": "6698aec7f188ae24c673da1c",
"amount": "0.01",
"orderId": "ORDER_1",
"isCheckBalance": True,
"description": "Payment for order #1",
"callbackUrl": "https://yourdomain.com/callback",
"success_url": "https://yourdomain.com/success",
"cancel_url": "https://yourdomain.com/cancel"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://doc-api.oppiwallet.com/api/v3/createTransactionRequest"
data := map[string]interface{}{
"currency": "6698aec7f188ae24c673da1c",
"amount": "0.01",
"orderId": "ORDER_1",
"isCheckBalance": true,
"description": "Payment for order #1",
"callbackUrl": "https://yourdomain.com/callback",
"success_url": "https://yourdomain.com/success",
"cancel_url": "https://yourdomain.com/cancel",
}
jsonData, _ := json.Marshal(data)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Add("signatureToken", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
<?php
$curl = curl_init();
$data = [
"currency" => "6698aec7f188ae24c673da1c",
"amount" => "0.01",
"orderId" => "ORDER_1",
"isCheckBalance" => true,
"description" => "Payment for order #1",
"callbackUrl" => "https://yourdomain.com/callback",
"success_url" => "https://yourdomain.com/success",
"cancel_url" => "https://yourdomain.com/cancel"
];
curl_setopt_array($curl, [
CURLOPT_URL => "https://doc-api.oppiwallet.com/api/v3/createTransactionRequest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type: application/json"
],
CURLOPT_POSTFIELDS => json_encode($data),
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
{
"address": "0x6648C29C6FD8........eD9Eb964c6F838bF",
"amount": "0.0001",
"tag": "2165464",
"transactionId": "0866f8-4a53-4579-9274-351ec868a627",
"link": "https://demo.oppipayment.com/0866f8-4a53-4579-9274-351ec868a627"
}
{
"message": "Error message"
}
Authentication
A JWT token required for API authentication.
Generate JWT token as explained in section Generate JWT Token using following
${currency}#${amount}#${address}#${orderId}.Headers
Must be set to
application/json.Request Body
Assets Currency id.
Provide amount for transaction.
Pass orderId for your reference.
If
true, the request will be accepted only if the sent amount equals the entered amount. If false, the request will be accepted even if the amount exceeds the available balance.Description of the transaction.
The URL to send callback notifications to upon transaction status updates.
The URL to redirect the user to after a successful transaction.
The URL to redirect the user to if the transaction is cancelled.
curl --request POST \
--url https://doc-api.oppiwallet.com/api/v3/createTransactionRequest \
--header 'signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...' \
--header 'Content-Type: application/json' \
--data '{
"currency": "6698aec7f188ae24c673da1c",
"amount": "0.01",
"orderId": "ORDER_1",
"isCheckBalance": true,
"description": "Payment for order #1",
"callbackUrl": "https://yourdomain.com/callback",
"success_url": "https://yourdomain.com/success",
"cancel_url": "https://yourdomain.com/cancel"
}'
const axios = require('axios');
let data = JSON.stringify({
"currency": "6698aec7f188ae24c673da1c",
"amount": "0.01",
"orderId": "ORDER_1",
"isCheckBalance": true,
"description": "Payment for order #1",
"callbackUrl": "https://yourdomain.com/callback",
"success_url": "https://yourdomain.com/success",
"cancel_url": "https://yourdomain.com/cancel"
});
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://doc-api.oppiwallet.com/api/v3/createTransactionRequest',
headers: {
'signatureToken': 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ1cmkiOiJjcmVhdGVUcmFuc2FjdGlvblJlcXVlc3QiLCJpYXQiOjE3MTUxNTM2NTQsImV4cCI6MTcxNTE1MzcwOSwia2V5Ijoicmh0TmJELU9yTFQteFp3M3QtMkpFWnR4Iiwic2lnbmF0dXJlU3RyaW5nIjoiMWVjY2M1NDc0YWZiMzU4NDExNDEzNjBkOGQ0MDBlMWYxOWIzNRjYzVkM2YxNTRjNmQ5YjViNSJ9.JuF7d8Oc4EyMvm7s5g3CN9L9Wbl_TFI_yO8jt20dvHw',
'Content-Type': 'application/json'
},
data: data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
import requests
url = "https://doc-api.oppiwallet.com/api/v3/createTransactionRequest"
headers = {
"signatureToken": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type": "application/json"
}
data = {
"currency": "6698aec7f188ae24c673da1c",
"amount": "0.01",
"orderId": "ORDER_1",
"isCheckBalance": True,
"description": "Payment for order #1",
"callbackUrl": "https://yourdomain.com/callback",
"success_url": "https://yourdomain.com/success",
"cancel_url": "https://yourdomain.com/cancel"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())
package main
import (
"bytes"
"encoding/json"
"fmt"
"net/http"
"io/ioutil"
)
func main() {
url := "https://doc-api.oppiwallet.com/api/v3/createTransactionRequest"
data := map[string]interface{}{
"currency": "6698aec7f188ae24c673da1c",
"amount": "0.01",
"orderId": "ORDER_1",
"isCheckBalance": true,
"description": "Payment for order #1",
"callbackUrl": "https://yourdomain.com/callback",
"success_url": "https://yourdomain.com/success",
"cancel_url": "https://yourdomain.com/cancel",
}
jsonData, _ := json.Marshal(data)
req, _ := http.NewRequest("POST", url, bytes.NewBuffer(jsonData))
req.Header.Add("signatureToken", "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := ioutil.ReadAll(res.Body)
fmt.Println(string(body))
}
<?php
$curl = curl_init();
$data = [
"currency" => "6698aec7f188ae24c673da1c",
"amount" => "0.01",
"orderId" => "ORDER_1",
"isCheckBalance" => true,
"description" => "Payment for order #1",
"callbackUrl" => "https://yourdomain.com/callback",
"success_url" => "https://yourdomain.com/success",
"cancel_url" => "https://yourdomain.com/cancel"
];
curl_setopt_array($curl, [
CURLOPT_URL => "https://doc-api.oppiwallet.com/api/v3/createTransactionRequest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"signatureToken: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...",
"Content-Type: application/json"
],
CURLOPT_POSTFIELDS => json_encode($data),
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
?>
Response
Returns the transaction details upon successful request.The address for the deposit.
The amount that was deposited.
The tag associated with the transaction.
Unique identifier for the transaction.
The URL to redirect the user to complete the payment.
{
"address": "0x6648C29C6FD8........eD9Eb964c6F838bF",
"amount": "0.0001",
"tag": "2165464",
"transactionId": "0866f8-4a53-4579-9274-351ec868a627",
"link": "https://demo.oppipayment.com/0866f8-4a53-4579-9274-351ec868a627"
}
{
"message": "Error message"
}
⌘I