Заявки
Создать заявку
Создаёт одну заявку. Передайте ключ в заголовке x-api-key и JSON в теле. Обязательны requestId, amount и exchangeRateKey. Остальные поля — реквизиты получателя. В ответе подтверждение.
POST
/
me
/
applications
Создать заявку
curl --request POST \
--url https://api.bitrangers.space/me/applications \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"requestId": "bid-1",
"amount": "10000",
"exchangeRateKey": "rub:sber:0-10000",
"email": "user@example.com",
"phoneNumber": "+79990000000",
"cardNumber": "4276000000000000",
"cardHolder": "IVAN IVANOV",
"externalBankName": "Sber",
"iban": "DE89370400440532013000",
"other": "comment"
}
'import requests
url = "https://api.bitrangers.space/me/applications"
payload = {
"requestId": "bid-1",
"amount": "10000",
"exchangeRateKey": "rub:sber:0-10000",
"email": "user@example.com",
"phoneNumber": "+79990000000",
"cardNumber": "4276000000000000",
"cardHolder": "IVAN IVANOV",
"externalBankName": "Sber",
"iban": "DE89370400440532013000",
"other": "comment"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
requestId: 'bid-1',
amount: '10000',
exchangeRateKey: 'rub:sber:0-10000',
email: 'user@example.com',
phoneNumber: '+79990000000',
cardNumber: '4276000000000000',
cardHolder: 'IVAN IVANOV',
externalBankName: 'Sber',
iban: 'DE89370400440532013000',
other: 'comment'
})
};
fetch('https://api.bitrangers.space/me/applications', 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.bitrangers.space/me/applications",
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([
'requestId' => 'bid-1',
'amount' => '10000',
'exchangeRateKey' => 'rub:sber:0-10000',
'email' => 'user@example.com',
'phoneNumber' => '+79990000000',
'cardNumber' => '4276000000000000',
'cardHolder' => 'IVAN IVANOV',
'externalBankName' => 'Sber',
'iban' => 'DE89370400440532013000',
'other' => 'comment'
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bitrangers.space/me/applications"
payload := strings.NewReader("{\n \"requestId\": \"bid-1\",\n \"amount\": \"10000\",\n \"exchangeRateKey\": \"rub:sber:0-10000\",\n \"email\": \"user@example.com\",\n \"phoneNumber\": \"+79990000000\",\n \"cardNumber\": \"4276000000000000\",\n \"cardHolder\": \"IVAN IVANOV\",\n \"externalBankName\": \"Sber\",\n \"iban\": \"DE89370400440532013000\",\n \"other\": \"comment\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-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.bitrangers.space/me/applications")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"requestId\": \"bid-1\",\n \"amount\": \"10000\",\n \"exchangeRateKey\": \"rub:sber:0-10000\",\n \"email\": \"user@example.com\",\n \"phoneNumber\": \"+79990000000\",\n \"cardNumber\": \"4276000000000000\",\n \"cardHolder\": \"IVAN IVANOV\",\n \"externalBankName\": \"Sber\",\n \"iban\": \"DE89370400440532013000\",\n \"other\": \"comment\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bitrangers.space/me/applications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"requestId\": \"bid-1\",\n \"amount\": \"10000\",\n \"exchangeRateKey\": \"rub:sber:0-10000\",\n \"email\": \"user@example.com\",\n \"phoneNumber\": \"+79990000000\",\n \"cardNumber\": \"4276000000000000\",\n \"cardHolder\": \"IVAN IVANOV\",\n \"externalBankName\": \"Sber\",\n \"iban\": \"DE89370400440532013000\",\n \"other\": \"comment\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Application created successfully"
}Authorizations
Body
application/json
⌘I
Создать заявку
curl --request POST \
--url https://api.bitrangers.space/me/applications \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"requestId": "bid-1",
"amount": "10000",
"exchangeRateKey": "rub:sber:0-10000",
"email": "user@example.com",
"phoneNumber": "+79990000000",
"cardNumber": "4276000000000000",
"cardHolder": "IVAN IVANOV",
"externalBankName": "Sber",
"iban": "DE89370400440532013000",
"other": "comment"
}
'import requests
url = "https://api.bitrangers.space/me/applications"
payload = {
"requestId": "bid-1",
"amount": "10000",
"exchangeRateKey": "rub:sber:0-10000",
"email": "user@example.com",
"phoneNumber": "+79990000000",
"cardNumber": "4276000000000000",
"cardHolder": "IVAN IVANOV",
"externalBankName": "Sber",
"iban": "DE89370400440532013000",
"other": "comment"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
requestId: 'bid-1',
amount: '10000',
exchangeRateKey: 'rub:sber:0-10000',
email: 'user@example.com',
phoneNumber: '+79990000000',
cardNumber: '4276000000000000',
cardHolder: 'IVAN IVANOV',
externalBankName: 'Sber',
iban: 'DE89370400440532013000',
other: 'comment'
})
};
fetch('https://api.bitrangers.space/me/applications', 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.bitrangers.space/me/applications",
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([
'requestId' => 'bid-1',
'amount' => '10000',
'exchangeRateKey' => 'rub:sber:0-10000',
'email' => 'user@example.com',
'phoneNumber' => '+79990000000',
'cardNumber' => '4276000000000000',
'cardHolder' => 'IVAN IVANOV',
'externalBankName' => 'Sber',
'iban' => 'DE89370400440532013000',
'other' => 'comment'
]),
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;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bitrangers.space/me/applications"
payload := strings.NewReader("{\n \"requestId\": \"bid-1\",\n \"amount\": \"10000\",\n \"exchangeRateKey\": \"rub:sber:0-10000\",\n \"email\": \"user@example.com\",\n \"phoneNumber\": \"+79990000000\",\n \"cardNumber\": \"4276000000000000\",\n \"cardHolder\": \"IVAN IVANOV\",\n \"externalBankName\": \"Sber\",\n \"iban\": \"DE89370400440532013000\",\n \"other\": \"comment\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-api-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.bitrangers.space/me/applications")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"requestId\": \"bid-1\",\n \"amount\": \"10000\",\n \"exchangeRateKey\": \"rub:sber:0-10000\",\n \"email\": \"user@example.com\",\n \"phoneNumber\": \"+79990000000\",\n \"cardNumber\": \"4276000000000000\",\n \"cardHolder\": \"IVAN IVANOV\",\n \"externalBankName\": \"Sber\",\n \"iban\": \"DE89370400440532013000\",\n \"other\": \"comment\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bitrangers.space/me/applications")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"requestId\": \"bid-1\",\n \"amount\": \"10000\",\n \"exchangeRateKey\": \"rub:sber:0-10000\",\n \"email\": \"user@example.com\",\n \"phoneNumber\": \"+79990000000\",\n \"cardNumber\": \"4276000000000000\",\n \"cardHolder\": \"IVAN IVANOV\",\n \"externalBankName\": \"Sber\",\n \"iban\": \"DE89370400440532013000\",\n \"other\": \"comment\"\n}"
response = http.request(request)
puts response.read_body{
"message": "Application created successfully"
}