SEP-24SEP-31SEP-6
Receive an Event
POSThttps://callback.business-server.exampleanchor.com/event
Receive a JSON object representing an event.
Request​
- application/json
Body
transaction_created
- a transaction was created through the SEP endpoints. The payload is in thetransaction
field.transaction_status_changed
- the status of a transaction has changed. The payload is in thetransaction
field.quote_created
- a quote was created via the SEP38 API. The payload is in thequote
field.
idstringrequired
typestringrequired
The transaction event type. Can be one of the following:
Possible values: [transaction_created
, transaction_status_changed
, quote_created
, customer_updated
]
timestampdate-timerequired
payload
object
required
Responses​
- 200
- 400
The event is successfully processed and ready to receive next event. The response body is empty.
The event is invalid or rejected. The response body contains the error message.
- csharp
- curl
- dart
- go
- http
- java
- javascript
- kotlin
- c
- nodejs
- objective-c
- ocaml
- php
- powershell
- python
- r
- ruby
- rust
- shell
- swift
- HTTPCLIENT
- RESTSHARP
var client = new HttpClient();
var request = new HttpRequestMessage(HttpMethod.Post, "https://callback.business-server.exampleanchor.com/event");
var content = new StringContent("{\n \"id\": \"string\",\n \"type\": \"transaction_created\",\n \"timestamp\": \"2024-10-29T17:23:12.164Z\",\n \"payload\": {\n \"transaction\": {\n \"id\": \"string\",\n \"sep\": \"24\",\n \"kind\": \"deposit\",\n \"status\": \"incomplete\",\n \"type\": \"string\",\n \"amount_expected\": {\n \"amount\": \"string\",\n \"asset\": \"string\"\n },\n \"amount_in\": {\n \"amount\": \"string\",\n \"asset\": \"string\"\n },\n \"amount_out\": {\n \"amount\": \"string\",\n \"asset\": \"string\"\n },\n \"fee_details\": {\n \"total\": \"string\",\n \"asset\": \"string\",\n \"details\": [\n {\n \"name\": \"string\",\n \"amount\": \"string\",\n \"description\": \"string\"\n }\n ]\n },\n \"quote_id\": \"string\",\n \"started_at\": \"2024-10-29T17:23:12.164Z\",\n \"updated_at\": \"2024-10-29T17:23:12.164Z\",\n \"completed_at\": \"2024-10-29T17:23:12.164Z\",\n \"transfer_received_at\": \"2024-10-29T17:23:12.164Z\",\n \"user_action_required_by\": \"2024-10-29T17:23:12.164Z\",\n \"message\": \"string\",\n \"refunds\": {\n \"amount_refunded\": {\n \"amount\": \"string\",\n \"asset\": \"string\"\n },\n \"amount_fee\": {\n \"amount\": \"string\",\n \"asset\": \"string\"\n },\n \"payments\": [\n {\n \"id\": \"string\",\n \"id_type\": \"stellar\",\n \"amount\": {\n \"amount\": \"string\",\n \"asset\": \"string\"\n },\n \"fee\": {\n \"amount\": \"string\",\n \"asset\": \"string\"\n },\n \"requested_at\": \"2024-10-29T17:23:12.164Z\",\n \"refunded_at\": \"2024-10-29T17:23:12.164Z\"\n }\n ]\n },\n \"stellar_transactions\": [\n {\n \"id\": \"string\",\n \"memo\": \"string\",\n \"memo_type\": \"text\",\n \"created_at\": \"2024-10-29T17:23:12.164Z\",\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 }\n ],\n \"source_account\": \"string\",\n \"destination_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\": \"2024-10-29T17:23:12.165Z\",\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\": \"2024-10-29T17:23:12.165Z\"\n },\n \"customer\": {\n \"id\": \"string\"\n }\n }\n}", null, "application/json");
request.Content = content;
var response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
Console.WriteLine(await response.Content.ReadAsStringAsync());
Did you find this page helpful?