Initiate payment order
curl --request POST \
--url https://api.paycrest.io/v1/sender/orders \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 123,
"token": "<string>",
"rate": 123,
"recipient": {
"institution": "<string>",
"accountIdentifier": "<string>",
"accountName": "<string>",
"memo": "<string>",
"providerId": "<string>",
"metadata": {},
"currency": "<string>"
},
"reference": "<string>",
"returnAddress": "<string>"
}
'import requests
url = "https://api.paycrest.io/v1/sender/orders"
payload = {
"amount": 123,
"token": "<string>",
"rate": 123,
"recipient": {
"institution": "<string>",
"accountIdentifier": "<string>",
"accountName": "<string>",
"memo": "<string>",
"providerId": "<string>",
"metadata": {},
"currency": "<string>"
},
"reference": "<string>",
"returnAddress": "<string>"
}
headers = {
"API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 123,
token: '<string>',
rate: 123,
recipient: {
institution: '<string>',
accountIdentifier: '<string>',
accountName: '<string>',
memo: '<string>',
providerId: '<string>',
metadata: {},
currency: '<string>'
},
reference: '<string>',
returnAddress: '<string>'
})
};
fetch('https://api.paycrest.io/v1/sender/orders', 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.paycrest.io/v1/sender/orders",
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' => 123,
'token' => '<string>',
'rate' => 123,
'recipient' => [
'institution' => '<string>',
'accountIdentifier' => '<string>',
'accountName' => '<string>',
'memo' => '<string>',
'providerId' => '<string>',
'metadata' => [
],
'currency' => '<string>'
],
'reference' => '<string>',
'returnAddress' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>",
"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://api.paycrest.io/v1/sender/orders"
payload := strings.NewReader("{\n \"amount\": 123,\n \"token\": \"<string>\",\n \"rate\": 123,\n \"recipient\": {\n \"institution\": \"<string>\",\n \"accountIdentifier\": \"<string>\",\n \"accountName\": \"<string>\",\n \"memo\": \"<string>\",\n \"providerId\": \"<string>\",\n \"metadata\": {},\n \"currency\": \"<string>\"\n },\n \"reference\": \"<string>\",\n \"returnAddress\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("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.paycrest.io/v1/sender/orders")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 123,\n \"token\": \"<string>\",\n \"rate\": 123,\n \"recipient\": {\n \"institution\": \"<string>\",\n \"accountIdentifier\": \"<string>\",\n \"accountName\": \"<string>\",\n \"memo\": \"<string>\",\n \"providerId\": \"<string>\",\n \"metadata\": {},\n \"currency\": \"<string>\"\n },\n \"reference\": \"<string>\",\n \"returnAddress\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paycrest.io/v1/sender/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 123,\n \"token\": \"<string>\",\n \"rate\": 123,\n \"recipient\": {\n \"institution\": \"<string>\",\n \"accountIdentifier\": \"<string>\",\n \"accountName\": \"<string>\",\n \"memo\": \"<string>\",\n \"providerId\": \"<string>\",\n \"metadata\": {},\n \"currency\": \"<string>\"\n },\n \"reference\": \"<string>\",\n \"returnAddress\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Operation successful",
"data": {
"id": "<string>",
"amount": "<string>",
"token": "<string>",
"receiveAddress": "<string>",
"validUntil": "2023-11-07T05:31:56Z",
"senderFee": "<string>",
"transactionFee": "<string>",
"reference": "<string>",
"orderType": "<string>"
}
}{
"status": "error",
"message": "Error message",
"data": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"status": "error",
"message": "Error message",
"data": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"status": "error",
"message": "Error message",
"data": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"status": "error",
"message": "Error message",
"data": [
{
"field": "<string>",
"message": "<string>"
}
]
}Sender
Initiate Order
POST
/
sender
/
orders
Initiate payment order
curl --request POST \
--url https://api.paycrest.io/v1/sender/orders \
--header 'API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 123,
"token": "<string>",
"rate": 123,
"recipient": {
"institution": "<string>",
"accountIdentifier": "<string>",
"accountName": "<string>",
"memo": "<string>",
"providerId": "<string>",
"metadata": {},
"currency": "<string>"
},
"reference": "<string>",
"returnAddress": "<string>"
}
'import requests
url = "https://api.paycrest.io/v1/sender/orders"
payload = {
"amount": 123,
"token": "<string>",
"rate": 123,
"recipient": {
"institution": "<string>",
"accountIdentifier": "<string>",
"accountName": "<string>",
"memo": "<string>",
"providerId": "<string>",
"metadata": {},
"currency": "<string>"
},
"reference": "<string>",
"returnAddress": "<string>"
}
headers = {
"API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
amount: 123,
token: '<string>',
rate: 123,
recipient: {
institution: '<string>',
accountIdentifier: '<string>',
accountName: '<string>',
memo: '<string>',
providerId: '<string>',
metadata: {},
currency: '<string>'
},
reference: '<string>',
returnAddress: '<string>'
})
};
fetch('https://api.paycrest.io/v1/sender/orders', 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.paycrest.io/v1/sender/orders",
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' => 123,
'token' => '<string>',
'rate' => 123,
'recipient' => [
'institution' => '<string>',
'accountIdentifier' => '<string>',
'accountName' => '<string>',
'memo' => '<string>',
'providerId' => '<string>',
'metadata' => [
],
'currency' => '<string>'
],
'reference' => '<string>',
'returnAddress' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"API-Key: <api-key>",
"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://api.paycrest.io/v1/sender/orders"
payload := strings.NewReader("{\n \"amount\": 123,\n \"token\": \"<string>\",\n \"rate\": 123,\n \"recipient\": {\n \"institution\": \"<string>\",\n \"accountIdentifier\": \"<string>\",\n \"accountName\": \"<string>\",\n \"memo\": \"<string>\",\n \"providerId\": \"<string>\",\n \"metadata\": {},\n \"currency\": \"<string>\"\n },\n \"reference\": \"<string>\",\n \"returnAddress\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("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.paycrest.io/v1/sender/orders")
.header("API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 123,\n \"token\": \"<string>\",\n \"rate\": 123,\n \"recipient\": {\n \"institution\": \"<string>\",\n \"accountIdentifier\": \"<string>\",\n \"accountName\": \"<string>\",\n \"memo\": \"<string>\",\n \"providerId\": \"<string>\",\n \"metadata\": {},\n \"currency\": \"<string>\"\n },\n \"reference\": \"<string>\",\n \"returnAddress\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paycrest.io/v1/sender/orders")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 123,\n \"token\": \"<string>\",\n \"rate\": 123,\n \"recipient\": {\n \"institution\": \"<string>\",\n \"accountIdentifier\": \"<string>\",\n \"accountName\": \"<string>\",\n \"memo\": \"<string>\",\n \"providerId\": \"<string>\",\n \"metadata\": {},\n \"currency\": \"<string>\"\n },\n \"reference\": \"<string>\",\n \"returnAddress\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"status": "success",
"message": "Operation successful",
"data": {
"id": "<string>",
"amount": "<string>",
"token": "<string>",
"receiveAddress": "<string>",
"validUntil": "2023-11-07T05:31:56Z",
"senderFee": "<string>",
"transactionFee": "<string>",
"reference": "<string>",
"orderType": "<string>"
}
}{
"status": "error",
"message": "Error message",
"data": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"status": "error",
"message": "Error message",
"data": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"status": "error",
"message": "Error message",
"data": [
{
"field": "<string>",
"message": "<string>"
}
]
}{
"status": "error",
"message": "Error message",
"data": [
{
"field": "<string>",
"message": "<string>"
}
]
}Initiate a new order as a sender.
Authorizations
Body
application/json
Token symbol (USDT, USDC, cNGN). See Supported Stablecoins for available options.
Network identifier for the blockchain
Available options:
ethereum, base, bnb-smart-chain, lisk, celo, arbitrum-one, polygon, starknet, tron Show child attributes
Show child attributes
⌘I