Callbacks Server
Receive an Event
Receive a JSON object representing an event.
Receive an Event
curl --request POST \
--url https://callback.business-server.exampleanchor.com/event \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"payload": {
"transaction": {
"id": "<string>",
"sep": "24",
"amount_expected": {
"amount": "<string>",
"asset": "<string>"
},
"started_at": "2023-11-07T05:31:56Z",
"destination_account": "<string>",
"type": "<string>",
"quote_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"transfer_received_at": "2023-11-07T05:31:56Z",
"user_action_required_by": "2023-11-07T05:31:56Z",
"message": "<string>",
"refunds": {
"payments": [
{
"id": "<string>",
"requested_at": "2023-11-07T05:31:56Z",
"refunded_at": "2023-11-07T05:31:56Z"
}
]
},
"stellar_transactions": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"envelope": "<string>",
"payments": [
{
"id": "<string>",
"payment_type": "payment",
"source_account": "<string>",
"destination_account": "<string>",
"amount": {
"amount": "<string>",
"asset": "<string>"
}
}
],
"memo": "<string>"
}
],
"source_account": "<string>",
"external_transaction_id": "<string>",
"memo": "<string>",
"memo_type": "text id hash",
"refund_memo": "<string>",
"refund_memo_type": "text id hash",
"client_domain": "<string>",
"client_name": "<string>",
"customers": {
"sender": {
"id": "<string>",
"account": "<string>",
"memo": "<string>"
},
"receiver": {
"id": "<string>",
"account": "<string>",
"memo": "<string>"
}
},
"creator": {
"id": "<string>",
"account": "<string>",
"memo": "<string>"
}
},
"quote": {
"id": "<string>",
"sell_amount": "<string>",
"sell_asset": "<string>",
"buy_amount": "<string>",
"buy_asset": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"price": "<string>",
"total_price": "<string>",
"creator": {
"id": "<string>",
"account": "<string>",
"memo": "<string>"
},
"transaction_id": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"customer": {
"id": "<string>"
}
}
}
'import requests
url = "https://callback.business-server.exampleanchor.com/event"
payload = {
"id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"payload": {
"transaction": {
"id": "<string>",
"sep": "24",
"amount_expected": {
"amount": "<string>",
"asset": "<string>"
},
"started_at": "2023-11-07T05:31:56Z",
"destination_account": "<string>",
"type": "<string>",
"quote_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"transfer_received_at": "2023-11-07T05:31:56Z",
"user_action_required_by": "2023-11-07T05:31:56Z",
"message": "<string>",
"refunds": { "payments": [
{
"id": "<string>",
"requested_at": "2023-11-07T05:31:56Z",
"refunded_at": "2023-11-07T05:31:56Z"
}
] },
"stellar_transactions": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"envelope": "<string>",
"payments": [
{
"id": "<string>",
"payment_type": "payment",
"source_account": "<string>",
"destination_account": "<string>",
"amount": {
"amount": "<string>",
"asset": "<string>"
}
}
],
"memo": "<string>"
}
],
"source_account": "<string>",
"external_transaction_id": "<string>",
"memo": "<string>",
"memo_type": "text id hash",
"refund_memo": "<string>",
"refund_memo_type": "text id hash",
"client_domain": "<string>",
"client_name": "<string>",
"customers": {
"sender": {
"id": "<string>",
"account": "<string>",
"memo": "<string>"
},
"receiver": {
"id": "<string>",
"account": "<string>",
"memo": "<string>"
}
},
"creator": {
"id": "<string>",
"account": "<string>",
"memo": "<string>"
}
},
"quote": {
"id": "<string>",
"sell_amount": "<string>",
"sell_asset": "<string>",
"buy_amount": "<string>",
"buy_asset": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"price": "<string>",
"total_price": "<string>",
"creator": {
"id": "<string>",
"account": "<string>",
"memo": "<string>"
},
"transaction_id": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"customer": { "id": "<string>" }
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
timestamp: '2023-11-07T05:31:56Z',
payload: {
transaction: {
id: '<string>',
sep: '24',
amount_expected: {amount: '<string>', asset: '<string>'},
started_at: '2023-11-07T05:31:56Z',
destination_account: '<string>',
type: '<string>',
quote_id: '<string>',
updated_at: '2023-11-07T05:31:56Z',
completed_at: '2023-11-07T05:31:56Z',
transfer_received_at: '2023-11-07T05:31:56Z',
user_action_required_by: '2023-11-07T05:31:56Z',
message: '<string>',
refunds: {
payments: [
{
id: '<string>',
requested_at: '2023-11-07T05:31:56Z',
refunded_at: '2023-11-07T05:31:56Z'
}
]
},
stellar_transactions: [
{
id: '<string>',
created_at: '2023-11-07T05:31:56Z',
envelope: '<string>',
payments: [
{
id: '<string>',
payment_type: 'payment',
source_account: '<string>',
destination_account: '<string>',
amount: {amount: '<string>', asset: '<string>'}
}
],
memo: '<string>'
}
],
source_account: '<string>',
external_transaction_id: '<string>',
memo: '<string>',
memo_type: 'text id hash',
refund_memo: '<string>',
refund_memo_type: 'text id hash',
client_domain: '<string>',
client_name: '<string>',
customers: {
sender: {id: '<string>', account: '<string>', memo: '<string>'},
receiver: {id: '<string>', account: '<string>', memo: '<string>'}
},
creator: {id: '<string>', account: '<string>', memo: '<string>'}
},
quote: {
id: '<string>',
sell_amount: '<string>',
sell_asset: '<string>',
buy_amount: '<string>',
buy_asset: '<string>',
expires_at: '2023-11-07T05:31:56Z',
price: '<string>',
total_price: '<string>',
creator: {id: '<string>', account: '<string>', memo: '<string>'},
transaction_id: '<string>',
created_at: '2023-11-07T05:31:56Z'
},
customer: {id: '<string>'}
}
})
};
fetch('https://callback.business-server.exampleanchor.com/event', 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://callback.business-server.exampleanchor.com/event",
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([
'id' => '<string>',
'timestamp' => '2023-11-07T05:31:56Z',
'payload' => [
'transaction' => [
'id' => '<string>',
'sep' => '24',
'amount_expected' => [
'amount' => '<string>',
'asset' => '<string>'
],
'started_at' => '2023-11-07T05:31:56Z',
'destination_account' => '<string>',
'type' => '<string>',
'quote_id' => '<string>',
'updated_at' => '2023-11-07T05:31:56Z',
'completed_at' => '2023-11-07T05:31:56Z',
'transfer_received_at' => '2023-11-07T05:31:56Z',
'user_action_required_by' => '2023-11-07T05:31:56Z',
'message' => '<string>',
'refunds' => [
'payments' => [
[
'id' => '<string>',
'requested_at' => '2023-11-07T05:31:56Z',
'refunded_at' => '2023-11-07T05:31:56Z'
]
]
],
'stellar_transactions' => [
[
'id' => '<string>',
'created_at' => '2023-11-07T05:31:56Z',
'envelope' => '<string>',
'payments' => [
[
'id' => '<string>',
'payment_type' => 'payment',
'source_account' => '<string>',
'destination_account' => '<string>',
'amount' => [
'amount' => '<string>',
'asset' => '<string>'
]
]
],
'memo' => '<string>'
]
],
'source_account' => '<string>',
'external_transaction_id' => '<string>',
'memo' => '<string>',
'memo_type' => 'text id hash',
'refund_memo' => '<string>',
'refund_memo_type' => 'text id hash',
'client_domain' => '<string>',
'client_name' => '<string>',
'customers' => [
'sender' => [
'id' => '<string>',
'account' => '<string>',
'memo' => '<string>'
],
'receiver' => [
'id' => '<string>',
'account' => '<string>',
'memo' => '<string>'
]
],
'creator' => [
'id' => '<string>',
'account' => '<string>',
'memo' => '<string>'
]
],
'quote' => [
'id' => '<string>',
'sell_amount' => '<string>',
'sell_asset' => '<string>',
'buy_amount' => '<string>',
'buy_asset' => '<string>',
'expires_at' => '2023-11-07T05:31:56Z',
'price' => '<string>',
'total_price' => '<string>',
'creator' => [
'id' => '<string>',
'account' => '<string>',
'memo' => '<string>'
],
'transaction_id' => '<string>',
'created_at' => '2023-11-07T05:31:56Z'
],
'customer' => [
'id' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"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://callback.business-server.exampleanchor.com/event"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"payload\": {\n \"transaction\": {\n \"id\": \"<string>\",\n \"sep\": \"24\",\n \"amount_expected\": {\n \"amount\": \"<string>\",\n \"asset\": \"<string>\"\n },\n \"started_at\": \"2023-11-07T05:31:56Z\",\n \"destination_account\": \"<string>\",\n \"type\": \"<string>\",\n \"quote_id\": \"<string>\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"completed_at\": \"2023-11-07T05:31:56Z\",\n \"transfer_received_at\": \"2023-11-07T05:31:56Z\",\n \"user_action_required_by\": \"2023-11-07T05:31:56Z\",\n \"message\": \"<string>\",\n \"refunds\": {\n \"payments\": [\n {\n \"id\": \"<string>\",\n \"requested_at\": \"2023-11-07T05:31:56Z\",\n \"refunded_at\": \"2023-11-07T05:31:56Z\"\n }\n ]\n },\n \"stellar_transactions\": [\n {\n \"id\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"envelope\": \"<string>\",\n \"payments\": [\n {\n \"id\": \"<string>\",\n \"payment_type\": \"payment\",\n \"source_account\": \"<string>\",\n \"destination_account\": \"<string>\",\n \"amount\": {\n \"amount\": \"<string>\",\n \"asset\": \"<string>\"\n }\n }\n ],\n \"memo\": \"<string>\"\n }\n ],\n \"source_account\": \"<string>\",\n \"external_transaction_id\": \"<string>\",\n \"memo\": \"<string>\",\n \"memo_type\": \"text id hash\",\n \"refund_memo\": \"<string>\",\n \"refund_memo_type\": \"text id hash\",\n \"client_domain\": \"<string>\",\n \"client_name\": \"<string>\",\n \"customers\": {\n \"sender\": {\n \"id\": \"<string>\",\n \"account\": \"<string>\",\n \"memo\": \"<string>\"\n },\n \"receiver\": {\n \"id\": \"<string>\",\n \"account\": \"<string>\",\n \"memo\": \"<string>\"\n }\n },\n \"creator\": {\n \"id\": \"<string>\",\n \"account\": \"<string>\",\n \"memo\": \"<string>\"\n }\n },\n \"quote\": {\n \"id\": \"<string>\",\n \"sell_amount\": \"<string>\",\n \"sell_asset\": \"<string>\",\n \"buy_amount\": \"<string>\",\n \"buy_asset\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"price\": \"<string>\",\n \"total_price\": \"<string>\",\n \"creator\": {\n \"id\": \"<string>\",\n \"account\": \"<string>\",\n \"memo\": \"<string>\"\n },\n \"transaction_id\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\"\n },\n \"customer\": {\n \"id\": \"<string>\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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://callback.business-server.exampleanchor.com/event")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"payload\": {\n \"transaction\": {\n \"id\": \"<string>\",\n \"sep\": \"24\",\n \"amount_expected\": {\n \"amount\": \"<string>\",\n \"asset\": \"<string>\"\n },\n \"started_at\": \"2023-11-07T05:31:56Z\",\n \"destination_account\": \"<string>\",\n \"type\": \"<string>\",\n \"quote_id\": \"<string>\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"completed_at\": \"2023-11-07T05:31:56Z\",\n \"transfer_received_at\": \"2023-11-07T05:31:56Z\",\n \"user_action_required_by\": \"2023-11-07T05:31:56Z\",\n \"message\": \"<string>\",\n \"refunds\": {\n \"payments\": [\n {\n \"id\": \"<string>\",\n \"requested_at\": \"2023-11-07T05:31:56Z\",\n \"refunded_at\": \"2023-11-07T05:31:56Z\"\n }\n ]\n },\n \"stellar_transactions\": [\n {\n \"id\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"envelope\": \"<string>\",\n \"payments\": [\n {\n \"id\": \"<string>\",\n \"payment_type\": \"payment\",\n \"source_account\": \"<string>\",\n \"destination_account\": \"<string>\",\n \"amount\": {\n \"amount\": \"<string>\",\n \"asset\": \"<string>\"\n }\n }\n ],\n \"memo\": \"<string>\"\n }\n ],\n \"source_account\": \"<string>\",\n \"external_transaction_id\": \"<string>\",\n \"memo\": \"<string>\",\n \"memo_type\": \"text id hash\",\n \"refund_memo\": \"<string>\",\n \"refund_memo_type\": \"text id hash\",\n \"client_domain\": \"<string>\",\n \"client_name\": \"<string>\",\n \"customers\": {\n \"sender\": {\n \"id\": \"<string>\",\n \"account\": \"<string>\",\n \"memo\": \"<string>\"\n },\n \"receiver\": {\n \"id\": \"<string>\",\n \"account\": \"<string>\",\n \"memo\": \"<string>\"\n }\n },\n \"creator\": {\n \"id\": \"<string>\",\n \"account\": \"<string>\",\n \"memo\": \"<string>\"\n }\n },\n \"quote\": {\n \"id\": \"<string>\",\n \"sell_amount\": \"<string>\",\n \"sell_asset\": \"<string>\",\n \"buy_amount\": \"<string>\",\n \"buy_asset\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"price\": \"<string>\",\n \"total_price\": \"<string>\",\n \"creator\": {\n \"id\": \"<string>\",\n \"account\": \"<string>\",\n \"memo\": \"<string>\"\n },\n \"transaction_id\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\"\n },\n \"customer\": {\n \"id\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://callback.business-server.exampleanchor.com/event")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"payload\": {\n \"transaction\": {\n \"id\": \"<string>\",\n \"sep\": \"24\",\n \"amount_expected\": {\n \"amount\": \"<string>\",\n \"asset\": \"<string>\"\n },\n \"started_at\": \"2023-11-07T05:31:56Z\",\n \"destination_account\": \"<string>\",\n \"type\": \"<string>\",\n \"quote_id\": \"<string>\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"completed_at\": \"2023-11-07T05:31:56Z\",\n \"transfer_received_at\": \"2023-11-07T05:31:56Z\",\n \"user_action_required_by\": \"2023-11-07T05:31:56Z\",\n \"message\": \"<string>\",\n \"refunds\": {\n \"payments\": [\n {\n \"id\": \"<string>\",\n \"requested_at\": \"2023-11-07T05:31:56Z\",\n \"refunded_at\": \"2023-11-07T05:31:56Z\"\n }\n ]\n },\n \"stellar_transactions\": [\n {\n \"id\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"envelope\": \"<string>\",\n \"payments\": [\n {\n \"id\": \"<string>\",\n \"payment_type\": \"payment\",\n \"source_account\": \"<string>\",\n \"destination_account\": \"<string>\",\n \"amount\": {\n \"amount\": \"<string>\",\n \"asset\": \"<string>\"\n }\n }\n ],\n \"memo\": \"<string>\"\n }\n ],\n \"source_account\": \"<string>\",\n \"external_transaction_id\": \"<string>\",\n \"memo\": \"<string>\",\n \"memo_type\": \"text id hash\",\n \"refund_memo\": \"<string>\",\n \"refund_memo_type\": \"text id hash\",\n \"client_domain\": \"<string>\",\n \"client_name\": \"<string>\",\n \"customers\": {\n \"sender\": {\n \"id\": \"<string>\",\n \"account\": \"<string>\",\n \"memo\": \"<string>\"\n },\n \"receiver\": {\n \"id\": \"<string>\",\n \"account\": \"<string>\",\n \"memo\": \"<string>\"\n }\n },\n \"creator\": {\n \"id\": \"<string>\",\n \"account\": \"<string>\",\n \"memo\": \"<string>\"\n }\n },\n \"quote\": {\n \"id\": \"<string>\",\n \"sell_amount\": \"<string>\",\n \"sell_asset\": \"<string>\",\n \"buy_amount\": \"<string>\",\n \"buy_asset\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"price\": \"<string>\",\n \"total_price\": \"<string>\",\n \"creator\": {\n \"id\": \"<string>\",\n \"account\": \"<string>\",\n \"memo\": \"<string>\"\n },\n \"transaction_id\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\"\n },\n \"customer\": {\n \"id\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_bodySEP-6
SEP-24
SEP-31
Body
application/json
The transaction event type. Can be one of the following:
transaction_created- a transaction was created through the SEP endpoints. The payload is in thetransactionfield.transaction_status_changed- the status of a transaction has changed. The payload is in thetransactionfield.quote_created- a quote was created via the SEP38 API. The payload is in thequotefield.
Available options:
transaction_created, transaction_status_changed, quote_created, customer_updated Response
The event is successfully processed and ready to receive next event. The response body is empty.
Receive an Event
curl --request POST \
--url https://callback.business-server.exampleanchor.com/event \
--header 'Content-Type: application/json' \
--data '
{
"id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"payload": {
"transaction": {
"id": "<string>",
"sep": "24",
"amount_expected": {
"amount": "<string>",
"asset": "<string>"
},
"started_at": "2023-11-07T05:31:56Z",
"destination_account": "<string>",
"type": "<string>",
"quote_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"transfer_received_at": "2023-11-07T05:31:56Z",
"user_action_required_by": "2023-11-07T05:31:56Z",
"message": "<string>",
"refunds": {
"payments": [
{
"id": "<string>",
"requested_at": "2023-11-07T05:31:56Z",
"refunded_at": "2023-11-07T05:31:56Z"
}
]
},
"stellar_transactions": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"envelope": "<string>",
"payments": [
{
"id": "<string>",
"payment_type": "payment",
"source_account": "<string>",
"destination_account": "<string>",
"amount": {
"amount": "<string>",
"asset": "<string>"
}
}
],
"memo": "<string>"
}
],
"source_account": "<string>",
"external_transaction_id": "<string>",
"memo": "<string>",
"memo_type": "text id hash",
"refund_memo": "<string>",
"refund_memo_type": "text id hash",
"client_domain": "<string>",
"client_name": "<string>",
"customers": {
"sender": {
"id": "<string>",
"account": "<string>",
"memo": "<string>"
},
"receiver": {
"id": "<string>",
"account": "<string>",
"memo": "<string>"
}
},
"creator": {
"id": "<string>",
"account": "<string>",
"memo": "<string>"
}
},
"quote": {
"id": "<string>",
"sell_amount": "<string>",
"sell_asset": "<string>",
"buy_amount": "<string>",
"buy_asset": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"price": "<string>",
"total_price": "<string>",
"creator": {
"id": "<string>",
"account": "<string>",
"memo": "<string>"
},
"transaction_id": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"customer": {
"id": "<string>"
}
}
}
'import requests
url = "https://callback.business-server.exampleanchor.com/event"
payload = {
"id": "<string>",
"timestamp": "2023-11-07T05:31:56Z",
"payload": {
"transaction": {
"id": "<string>",
"sep": "24",
"amount_expected": {
"amount": "<string>",
"asset": "<string>"
},
"started_at": "2023-11-07T05:31:56Z",
"destination_account": "<string>",
"type": "<string>",
"quote_id": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"completed_at": "2023-11-07T05:31:56Z",
"transfer_received_at": "2023-11-07T05:31:56Z",
"user_action_required_by": "2023-11-07T05:31:56Z",
"message": "<string>",
"refunds": { "payments": [
{
"id": "<string>",
"requested_at": "2023-11-07T05:31:56Z",
"refunded_at": "2023-11-07T05:31:56Z"
}
] },
"stellar_transactions": [
{
"id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"envelope": "<string>",
"payments": [
{
"id": "<string>",
"payment_type": "payment",
"source_account": "<string>",
"destination_account": "<string>",
"amount": {
"amount": "<string>",
"asset": "<string>"
}
}
],
"memo": "<string>"
}
],
"source_account": "<string>",
"external_transaction_id": "<string>",
"memo": "<string>",
"memo_type": "text id hash",
"refund_memo": "<string>",
"refund_memo_type": "text id hash",
"client_domain": "<string>",
"client_name": "<string>",
"customers": {
"sender": {
"id": "<string>",
"account": "<string>",
"memo": "<string>"
},
"receiver": {
"id": "<string>",
"account": "<string>",
"memo": "<string>"
}
},
"creator": {
"id": "<string>",
"account": "<string>",
"memo": "<string>"
}
},
"quote": {
"id": "<string>",
"sell_amount": "<string>",
"sell_asset": "<string>",
"buy_amount": "<string>",
"buy_asset": "<string>",
"expires_at": "2023-11-07T05:31:56Z",
"price": "<string>",
"total_price": "<string>",
"creator": {
"id": "<string>",
"account": "<string>",
"memo": "<string>"
},
"transaction_id": "<string>",
"created_at": "2023-11-07T05:31:56Z"
},
"customer": { "id": "<string>" }
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
id: '<string>',
timestamp: '2023-11-07T05:31:56Z',
payload: {
transaction: {
id: '<string>',
sep: '24',
amount_expected: {amount: '<string>', asset: '<string>'},
started_at: '2023-11-07T05:31:56Z',
destination_account: '<string>',
type: '<string>',
quote_id: '<string>',
updated_at: '2023-11-07T05:31:56Z',
completed_at: '2023-11-07T05:31:56Z',
transfer_received_at: '2023-11-07T05:31:56Z',
user_action_required_by: '2023-11-07T05:31:56Z',
message: '<string>',
refunds: {
payments: [
{
id: '<string>',
requested_at: '2023-11-07T05:31:56Z',
refunded_at: '2023-11-07T05:31:56Z'
}
]
},
stellar_transactions: [
{
id: '<string>',
created_at: '2023-11-07T05:31:56Z',
envelope: '<string>',
payments: [
{
id: '<string>',
payment_type: 'payment',
source_account: '<string>',
destination_account: '<string>',
amount: {amount: '<string>', asset: '<string>'}
}
],
memo: '<string>'
}
],
source_account: '<string>',
external_transaction_id: '<string>',
memo: '<string>',
memo_type: 'text id hash',
refund_memo: '<string>',
refund_memo_type: 'text id hash',
client_domain: '<string>',
client_name: '<string>',
customers: {
sender: {id: '<string>', account: '<string>', memo: '<string>'},
receiver: {id: '<string>', account: '<string>', memo: '<string>'}
},
creator: {id: '<string>', account: '<string>', memo: '<string>'}
},
quote: {
id: '<string>',
sell_amount: '<string>',
sell_asset: '<string>',
buy_amount: '<string>',
buy_asset: '<string>',
expires_at: '2023-11-07T05:31:56Z',
price: '<string>',
total_price: '<string>',
creator: {id: '<string>', account: '<string>', memo: '<string>'},
transaction_id: '<string>',
created_at: '2023-11-07T05:31:56Z'
},
customer: {id: '<string>'}
}
})
};
fetch('https://callback.business-server.exampleanchor.com/event', 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://callback.business-server.exampleanchor.com/event",
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([
'id' => '<string>',
'timestamp' => '2023-11-07T05:31:56Z',
'payload' => [
'transaction' => [
'id' => '<string>',
'sep' => '24',
'amount_expected' => [
'amount' => '<string>',
'asset' => '<string>'
],
'started_at' => '2023-11-07T05:31:56Z',
'destination_account' => '<string>',
'type' => '<string>',
'quote_id' => '<string>',
'updated_at' => '2023-11-07T05:31:56Z',
'completed_at' => '2023-11-07T05:31:56Z',
'transfer_received_at' => '2023-11-07T05:31:56Z',
'user_action_required_by' => '2023-11-07T05:31:56Z',
'message' => '<string>',
'refunds' => [
'payments' => [
[
'id' => '<string>',
'requested_at' => '2023-11-07T05:31:56Z',
'refunded_at' => '2023-11-07T05:31:56Z'
]
]
],
'stellar_transactions' => [
[
'id' => '<string>',
'created_at' => '2023-11-07T05:31:56Z',
'envelope' => '<string>',
'payments' => [
[
'id' => '<string>',
'payment_type' => 'payment',
'source_account' => '<string>',
'destination_account' => '<string>',
'amount' => [
'amount' => '<string>',
'asset' => '<string>'
]
]
],
'memo' => '<string>'
]
],
'source_account' => '<string>',
'external_transaction_id' => '<string>',
'memo' => '<string>',
'memo_type' => 'text id hash',
'refund_memo' => '<string>',
'refund_memo_type' => 'text id hash',
'client_domain' => '<string>',
'client_name' => '<string>',
'customers' => [
'sender' => [
'id' => '<string>',
'account' => '<string>',
'memo' => '<string>'
],
'receiver' => [
'id' => '<string>',
'account' => '<string>',
'memo' => '<string>'
]
],
'creator' => [
'id' => '<string>',
'account' => '<string>',
'memo' => '<string>'
]
],
'quote' => [
'id' => '<string>',
'sell_amount' => '<string>',
'sell_asset' => '<string>',
'buy_amount' => '<string>',
'buy_asset' => '<string>',
'expires_at' => '2023-11-07T05:31:56Z',
'price' => '<string>',
'total_price' => '<string>',
'creator' => [
'id' => '<string>',
'account' => '<string>',
'memo' => '<string>'
],
'transaction_id' => '<string>',
'created_at' => '2023-11-07T05:31:56Z'
],
'customer' => [
'id' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"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://callback.business-server.exampleanchor.com/event"
payload := strings.NewReader("{\n \"id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"payload\": {\n \"transaction\": {\n \"id\": \"<string>\",\n \"sep\": \"24\",\n \"amount_expected\": {\n \"amount\": \"<string>\",\n \"asset\": \"<string>\"\n },\n \"started_at\": \"2023-11-07T05:31:56Z\",\n \"destination_account\": \"<string>\",\n \"type\": \"<string>\",\n \"quote_id\": \"<string>\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"completed_at\": \"2023-11-07T05:31:56Z\",\n \"transfer_received_at\": \"2023-11-07T05:31:56Z\",\n \"user_action_required_by\": \"2023-11-07T05:31:56Z\",\n \"message\": \"<string>\",\n \"refunds\": {\n \"payments\": [\n {\n \"id\": \"<string>\",\n \"requested_at\": \"2023-11-07T05:31:56Z\",\n \"refunded_at\": \"2023-11-07T05:31:56Z\"\n }\n ]\n },\n \"stellar_transactions\": [\n {\n \"id\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"envelope\": \"<string>\",\n \"payments\": [\n {\n \"id\": \"<string>\",\n \"payment_type\": \"payment\",\n \"source_account\": \"<string>\",\n \"destination_account\": \"<string>\",\n \"amount\": {\n \"amount\": \"<string>\",\n \"asset\": \"<string>\"\n }\n }\n ],\n \"memo\": \"<string>\"\n }\n ],\n \"source_account\": \"<string>\",\n \"external_transaction_id\": \"<string>\",\n \"memo\": \"<string>\",\n \"memo_type\": \"text id hash\",\n \"refund_memo\": \"<string>\",\n \"refund_memo_type\": \"text id hash\",\n \"client_domain\": \"<string>\",\n \"client_name\": \"<string>\",\n \"customers\": {\n \"sender\": {\n \"id\": \"<string>\",\n \"account\": \"<string>\",\n \"memo\": \"<string>\"\n },\n \"receiver\": {\n \"id\": \"<string>\",\n \"account\": \"<string>\",\n \"memo\": \"<string>\"\n }\n },\n \"creator\": {\n \"id\": \"<string>\",\n \"account\": \"<string>\",\n \"memo\": \"<string>\"\n }\n },\n \"quote\": {\n \"id\": \"<string>\",\n \"sell_amount\": \"<string>\",\n \"sell_asset\": \"<string>\",\n \"buy_amount\": \"<string>\",\n \"buy_asset\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"price\": \"<string>\",\n \"total_price\": \"<string>\",\n \"creator\": {\n \"id\": \"<string>\",\n \"account\": \"<string>\",\n \"memo\": \"<string>\"\n },\n \"transaction_id\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\"\n },\n \"customer\": {\n \"id\": \"<string>\"\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
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://callback.business-server.exampleanchor.com/event")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"payload\": {\n \"transaction\": {\n \"id\": \"<string>\",\n \"sep\": \"24\",\n \"amount_expected\": {\n \"amount\": \"<string>\",\n \"asset\": \"<string>\"\n },\n \"started_at\": \"2023-11-07T05:31:56Z\",\n \"destination_account\": \"<string>\",\n \"type\": \"<string>\",\n \"quote_id\": \"<string>\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"completed_at\": \"2023-11-07T05:31:56Z\",\n \"transfer_received_at\": \"2023-11-07T05:31:56Z\",\n \"user_action_required_by\": \"2023-11-07T05:31:56Z\",\n \"message\": \"<string>\",\n \"refunds\": {\n \"payments\": [\n {\n \"id\": \"<string>\",\n \"requested_at\": \"2023-11-07T05:31:56Z\",\n \"refunded_at\": \"2023-11-07T05:31:56Z\"\n }\n ]\n },\n \"stellar_transactions\": [\n {\n \"id\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"envelope\": \"<string>\",\n \"payments\": [\n {\n \"id\": \"<string>\",\n \"payment_type\": \"payment\",\n \"source_account\": \"<string>\",\n \"destination_account\": \"<string>\",\n \"amount\": {\n \"amount\": \"<string>\",\n \"asset\": \"<string>\"\n }\n }\n ],\n \"memo\": \"<string>\"\n }\n ],\n \"source_account\": \"<string>\",\n \"external_transaction_id\": \"<string>\",\n \"memo\": \"<string>\",\n \"memo_type\": \"text id hash\",\n \"refund_memo\": \"<string>\",\n \"refund_memo_type\": \"text id hash\",\n \"client_domain\": \"<string>\",\n \"client_name\": \"<string>\",\n \"customers\": {\n \"sender\": {\n \"id\": \"<string>\",\n \"account\": \"<string>\",\n \"memo\": \"<string>\"\n },\n \"receiver\": {\n \"id\": \"<string>\",\n \"account\": \"<string>\",\n \"memo\": \"<string>\"\n }\n },\n \"creator\": {\n \"id\": \"<string>\",\n \"account\": \"<string>\",\n \"memo\": \"<string>\"\n }\n },\n \"quote\": {\n \"id\": \"<string>\",\n \"sell_amount\": \"<string>\",\n \"sell_asset\": \"<string>\",\n \"buy_amount\": \"<string>\",\n \"buy_asset\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"price\": \"<string>\",\n \"total_price\": \"<string>\",\n \"creator\": {\n \"id\": \"<string>\",\n \"account\": \"<string>\",\n \"memo\": \"<string>\"\n },\n \"transaction_id\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\"\n },\n \"customer\": {\n \"id\": \"<string>\"\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://callback.business-server.exampleanchor.com/event")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"<string>\",\n \"timestamp\": \"2023-11-07T05:31:56Z\",\n \"payload\": {\n \"transaction\": {\n \"id\": \"<string>\",\n \"sep\": \"24\",\n \"amount_expected\": {\n \"amount\": \"<string>\",\n \"asset\": \"<string>\"\n },\n \"started_at\": \"2023-11-07T05:31:56Z\",\n \"destination_account\": \"<string>\",\n \"type\": \"<string>\",\n \"quote_id\": \"<string>\",\n \"updated_at\": \"2023-11-07T05:31:56Z\",\n \"completed_at\": \"2023-11-07T05:31:56Z\",\n \"transfer_received_at\": \"2023-11-07T05:31:56Z\",\n \"user_action_required_by\": \"2023-11-07T05:31:56Z\",\n \"message\": \"<string>\",\n \"refunds\": {\n \"payments\": [\n {\n \"id\": \"<string>\",\n \"requested_at\": \"2023-11-07T05:31:56Z\",\n \"refunded_at\": \"2023-11-07T05:31:56Z\"\n }\n ]\n },\n \"stellar_transactions\": [\n {\n \"id\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\",\n \"envelope\": \"<string>\",\n \"payments\": [\n {\n \"id\": \"<string>\",\n \"payment_type\": \"payment\",\n \"source_account\": \"<string>\",\n \"destination_account\": \"<string>\",\n \"amount\": {\n \"amount\": \"<string>\",\n \"asset\": \"<string>\"\n }\n }\n ],\n \"memo\": \"<string>\"\n }\n ],\n \"source_account\": \"<string>\",\n \"external_transaction_id\": \"<string>\",\n \"memo\": \"<string>\",\n \"memo_type\": \"text id hash\",\n \"refund_memo\": \"<string>\",\n \"refund_memo_type\": \"text id hash\",\n \"client_domain\": \"<string>\",\n \"client_name\": \"<string>\",\n \"customers\": {\n \"sender\": {\n \"id\": \"<string>\",\n \"account\": \"<string>\",\n \"memo\": \"<string>\"\n },\n \"receiver\": {\n \"id\": \"<string>\",\n \"account\": \"<string>\",\n \"memo\": \"<string>\"\n }\n },\n \"creator\": {\n \"id\": \"<string>\",\n \"account\": \"<string>\",\n \"memo\": \"<string>\"\n }\n },\n \"quote\": {\n \"id\": \"<string>\",\n \"sell_amount\": \"<string>\",\n \"sell_asset\": \"<string>\",\n \"buy_amount\": \"<string>\",\n \"buy_asset\": \"<string>\",\n \"expires_at\": \"2023-11-07T05:31:56Z\",\n \"price\": \"<string>\",\n \"total_price\": \"<string>\",\n \"creator\": {\n \"id\": \"<string>\",\n \"account\": \"<string>\",\n \"memo\": \"<string>\"\n },\n \"transaction_id\": \"<string>\",\n \"created_at\": \"2023-11-07T05:31:56Z\"\n },\n \"customer\": {\n \"id\": \"<string>\"\n }\n }\n}"
response = http.request(request)
puts response.read_body