Create pre-transaction
curl --request POST \
--url https://qa-api.endl.xyz/api/v0/transactions/{userId}/pre-txn \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--header 'X-API-SECRET: <api-key>' \
--data '
{
"quoteId": "e5f6a7b8-9c0d-4e1f-2a3b-4c5d6e7f8091",
"fromAddress": "0xa0b1c2d3e4f5060708090a0b1c2d3e4f50607080",
"recipientId": "d4e5f6a7-8b9c-4d0e-1f2a-3b4c5d6e7f80",
"transferPurposeCode": "IR001"
}
'import requests
url = "https://qa-api.endl.xyz/api/v0/transactions/{userId}/pre-txn"
payload = {
"quoteId": "e5f6a7b8-9c0d-4e1f-2a3b-4c5d6e7f8091",
"fromAddress": "0xa0b1c2d3e4f5060708090a0b1c2d3e4f50607080",
"recipientId": "d4e5f6a7-8b9c-4d0e-1f2a-3b4c5d6e7f80",
"transferPurposeCode": "IR001"
}
headers = {
"X-API-KEY": "<api-key>",
"X-API-SECRET": "<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>',
'X-API-SECRET': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
quoteId: 'e5f6a7b8-9c0d-4e1f-2a3b-4c5d6e7f8091',
fromAddress: '0xa0b1c2d3e4f5060708090a0b1c2d3e4f50607080',
recipientId: 'd4e5f6a7-8b9c-4d0e-1f2a-3b4c5d6e7f80',
transferPurposeCode: 'IR001'
})
};
fetch('https://qa-api.endl.xyz/api/v0/transactions/{userId}/pre-txn', 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://qa-api.endl.xyz/api/v0/transactions/{userId}/pre-txn",
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([
'quoteId' => 'e5f6a7b8-9c0d-4e1f-2a3b-4c5d6e7f8091',
'fromAddress' => '0xa0b1c2d3e4f5060708090a0b1c2d3e4f50607080',
'recipientId' => 'd4e5f6a7-8b9c-4d0e-1f2a-3b4c5d6e7f80',
'transferPurposeCode' => 'IR001'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>",
"X-API-SECRET: <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://qa-api.endl.xyz/api/v0/transactions/{userId}/pre-txn"
payload := strings.NewReader("{\n \"quoteId\": \"e5f6a7b8-9c0d-4e1f-2a3b-4c5d6e7f8091\",\n \"fromAddress\": \"0xa0b1c2d3e4f5060708090a0b1c2d3e4f50607080\",\n \"recipientId\": \"d4e5f6a7-8b9c-4d0e-1f2a-3b4c5d6e7f80\",\n \"transferPurposeCode\": \"IR001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("X-API-SECRET", "<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://qa-api.endl.xyz/api/v0/transactions/{userId}/pre-txn")
.header("X-API-KEY", "<api-key>")
.header("X-API-SECRET", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"quoteId\": \"e5f6a7b8-9c0d-4e1f-2a3b-4c5d6e7f8091\",\n \"fromAddress\": \"0xa0b1c2d3e4f5060708090a0b1c2d3e4f50607080\",\n \"recipientId\": \"d4e5f6a7-8b9c-4d0e-1f2a-3b4c5d6e7f80\",\n \"transferPurposeCode\": \"IR001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://qa-api.endl.xyz/api/v0/transactions/{userId}/pre-txn")
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["X-API-SECRET"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"quoteId\": \"e5f6a7b8-9c0d-4e1f-2a3b-4c5d6e7f8091\",\n \"fromAddress\": \"0xa0b1c2d3e4f5060708090a0b1c2d3e4f50607080\",\n \"recipientId\": \"d4e5f6a7-8b9c-4d0e-1f2a-3b4c5d6e7f80\",\n \"transferPurposeCode\": \"IR001\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "Success",
"status": "SUCCESS",
"data": {},
"errors": []
}{
"code": 400,
"message": "Validation failed",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "VALIDATION_ERROR",
"message": "must not be blank",
"field": "sourceAmount"
}
]
}{
"code": 400,
"message": "Validation failed",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "VALIDATION_ERROR",
"message": "must not be blank",
"field": "sourceAmount"
}
]
}{
"code": 400,
"message": "Validation failed",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "VALIDATION_ERROR",
"message": "must not be blank",
"field": "sourceAmount"
}
]
}{
"code": 400,
"message": "Validation failed",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "VALIDATION_ERROR",
"message": "must not be blank",
"field": "sourceAmount"
}
]
}{
"code": 400,
"message": "Validation failed",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "VALIDATION_ERROR",
"message": "must not be blank",
"field": "sourceAmount"
}
]
}{
"code": 400,
"message": "Validation failed",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "VALIDATION_ERROR",
"message": "must not be blank",
"field": "sourceAmount"
}
]
}Transactions
Create pre-transaction
Confirms a quote and returns the deposit instructions for funding the transfer. Call this after Generate quote and before Submit transaction.
POST
/
api
/
v0
/
transactions
/
{userId}
/
pre-txn
Create pre-transaction
curl --request POST \
--url https://qa-api.endl.xyz/api/v0/transactions/{userId}/pre-txn \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--header 'X-API-SECRET: <api-key>' \
--data '
{
"quoteId": "e5f6a7b8-9c0d-4e1f-2a3b-4c5d6e7f8091",
"fromAddress": "0xa0b1c2d3e4f5060708090a0b1c2d3e4f50607080",
"recipientId": "d4e5f6a7-8b9c-4d0e-1f2a-3b4c5d6e7f80",
"transferPurposeCode": "IR001"
}
'import requests
url = "https://qa-api.endl.xyz/api/v0/transactions/{userId}/pre-txn"
payload = {
"quoteId": "e5f6a7b8-9c0d-4e1f-2a3b-4c5d6e7f8091",
"fromAddress": "0xa0b1c2d3e4f5060708090a0b1c2d3e4f50607080",
"recipientId": "d4e5f6a7-8b9c-4d0e-1f2a-3b4c5d6e7f80",
"transferPurposeCode": "IR001"
}
headers = {
"X-API-KEY": "<api-key>",
"X-API-SECRET": "<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>',
'X-API-SECRET': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
quoteId: 'e5f6a7b8-9c0d-4e1f-2a3b-4c5d6e7f8091',
fromAddress: '0xa0b1c2d3e4f5060708090a0b1c2d3e4f50607080',
recipientId: 'd4e5f6a7-8b9c-4d0e-1f2a-3b4c5d6e7f80',
transferPurposeCode: 'IR001'
})
};
fetch('https://qa-api.endl.xyz/api/v0/transactions/{userId}/pre-txn', 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://qa-api.endl.xyz/api/v0/transactions/{userId}/pre-txn",
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([
'quoteId' => 'e5f6a7b8-9c0d-4e1f-2a3b-4c5d6e7f8091',
'fromAddress' => '0xa0b1c2d3e4f5060708090a0b1c2d3e4f50607080',
'recipientId' => 'd4e5f6a7-8b9c-4d0e-1f2a-3b4c5d6e7f80',
'transferPurposeCode' => 'IR001'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>",
"X-API-SECRET: <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://qa-api.endl.xyz/api/v0/transactions/{userId}/pre-txn"
payload := strings.NewReader("{\n \"quoteId\": \"e5f6a7b8-9c0d-4e1f-2a3b-4c5d6e7f8091\",\n \"fromAddress\": \"0xa0b1c2d3e4f5060708090a0b1c2d3e4f50607080\",\n \"recipientId\": \"d4e5f6a7-8b9c-4d0e-1f2a-3b4c5d6e7f80\",\n \"transferPurposeCode\": \"IR001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
req.Header.Add("X-API-SECRET", "<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://qa-api.endl.xyz/api/v0/transactions/{userId}/pre-txn")
.header("X-API-KEY", "<api-key>")
.header("X-API-SECRET", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"quoteId\": \"e5f6a7b8-9c0d-4e1f-2a3b-4c5d6e7f8091\",\n \"fromAddress\": \"0xa0b1c2d3e4f5060708090a0b1c2d3e4f50607080\",\n \"recipientId\": \"d4e5f6a7-8b9c-4d0e-1f2a-3b4c5d6e7f80\",\n \"transferPurposeCode\": \"IR001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://qa-api.endl.xyz/api/v0/transactions/{userId}/pre-txn")
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["X-API-SECRET"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"quoteId\": \"e5f6a7b8-9c0d-4e1f-2a3b-4c5d6e7f8091\",\n \"fromAddress\": \"0xa0b1c2d3e4f5060708090a0b1c2d3e4f50607080\",\n \"recipientId\": \"d4e5f6a7-8b9c-4d0e-1f2a-3b4c5d6e7f80\",\n \"transferPurposeCode\": \"IR001\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"message": "Success",
"status": "SUCCESS",
"data": {},
"errors": []
}{
"code": 400,
"message": "Validation failed",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "VALIDATION_ERROR",
"message": "must not be blank",
"field": "sourceAmount"
}
]
}{
"code": 400,
"message": "Validation failed",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "VALIDATION_ERROR",
"message": "must not be blank",
"field": "sourceAmount"
}
]
}{
"code": 400,
"message": "Validation failed",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "VALIDATION_ERROR",
"message": "must not be blank",
"field": "sourceAmount"
}
]
}{
"code": 400,
"message": "Validation failed",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "VALIDATION_ERROR",
"message": "must not be blank",
"field": "sourceAmount"
}
]
}{
"code": 400,
"message": "Validation failed",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "VALIDATION_ERROR",
"message": "must not be blank",
"field": "sourceAmount"
}
]
}{
"code": 400,
"message": "Validation failed",
"status": "ERROR",
"data": null,
"errors": [
{
"code": "VALIDATION_ERROR",
"message": "must not be blank",
"field": "sourceAmount"
}
]
}Authorizations
Your partner API key.
Your partner API secret.
Path Parameters
Identifier of the end user the resource belongs to.
Example:
"8f14e45f-ceea-467a-9a3f-1b2c0d4e5f60"
Body
application/json
Quote being confirmed.
Recipient the funds are destined for.
Wallet address the funds are sent from.
Purpose-of-transfer code — see Purpose codes.
Response
Success
Example:
200
Example:
"Success"
Available options:
SUCCESS, ERROR Example:
"SUCCESS"
Successful responses share the standard envelope. The shape of data for this endpoint is not yet captured in this specification — see the note on the API reference overview.
Show child attributes
Show child attributes
Example:
[]