Skip to main content
Version: 3.0
SEP-24SEP-31SEP-6

Receive an Event

POST 

https://callback.business-server.exampleanchor.com/event

Receive a JSON object representing an event.

Request​

Body

    idstringrequired
    typestringrequired

    The transaction event type. Can be one of the following:

    • transaction_created - a transaction was created through the SEP endpoints. The payload is in the transaction field.
    • transaction_status_changed - the status of a transaction has changed. The payload is in the transaction field.
    • quote_created - a quote was created via the SEP38 API. The payload is in the quote field.

    Possible values: [transaction_created, transaction_status_changed, quote_created, customer_updated]

    timestampdate-timerequired

    payload

    object

    required

    transaction

    object

    oneOf

    idstringrequired
    sepstringrequired

    Possible values: [24]

    kindstringrequired

    Possible values: [deposit, withdrawal]

    statusStatusSEP24 (string)required

    Possible status value for SEP-24 transactions

    Possible values: [incomplete, completed, refunded, expired, error, pending_stellar, pending_external, pending_user_transfer_start, pending_user_transfer_complete, pending_anchor, pending_trust, pending_user, no_market, too_small, too_large]

    typestring

    This field is always empty for SEP-24 transactions.

    amount_expected

    object

    required

    amountstringrequired
    assetstringrequired

    amount_in

    object

    amountstringrequired
    assetstringrequired

    amount_out

    object

    amountstringrequired
    assetstringrequired

    fee_details

    object

    totalstringrequired
    assetstringrequired

    details

    object[]

  • Array [

  • namestringrequired
    amountstringrequired
    descriptionstring
  • ]

  • quote_idstring
    started_atdate-timerequired
    updated_atdate-time
    completed_atdate-time
    transfer_received_atdate-time
    user_action_required_bydate-time
    messagestring

    refunds

    object

    amount_refunded

    object

    amountstringrequired
    assetstringrequired

    amount_fee

    object

    amountstringrequired
    assetstringrequired

    payments

    object[]

  • Array [

  • idstring
    id_typestring

    Possible values: [stellar, external]

    amount

    object

    amountstringrequired
    assetstringrequired

    fee

    object

    amountstringrequired
    assetstringrequired
    requested_atdate-time
    refunded_atdate-time
  • ]

  • stellar_transactions

    object[]

  • Array [

  • idstringrequired

    The ID of the transaction in the Stellar network.

    memostring

    The memo of the transaction in the Stellar network.

    memo_typestring

    The memo type of the transaction in the Stellar network. Should be present if memo is not null.

    Possible values: [text, hash, id]

    created_atdate-timerequired

    The time the transaction was registered in the Stellar network.

    envelopestringrequired

    The transaction envelope, containing all the transaction information.

    payments

    object[]

    required

  • Array [

  • idstringrequired

    The ID of the payment in the Stellar Network.

    payment_typestringrequired

    The type of payment in the Stellar Network.

    Possible values: [payment, path_payment]

    Default value: payment
    source_accountstringrequired

    The account being debited in the Stellar Network.

    destination_accountstringrequired

    The account being credited in the Stellar Network.

    amount

    object

    required

    amountstringrequired
    assetstringrequired
  • ]

  • ]

  • source_accountstring
    destination_accountstringrequired
    external_transaction_idstring
    memostring
    memo_typeMemoType (string)

    The memo type of the transaction in the Stellar network. Should be present if memo is not null.

    Possible values: [text id hash]

    refund_memostring

    If provided, this memo should be used for refund transactions.

    refund_memo_typeMemoType (string)

    The memo type of the transaction in the Stellar network. Should be present if memo is not null.

    Possible values: [text id hash]

    client_domainstring
    client_namestring

    customers

    object

    The user that initiated the transaction is both the sender and receiver.

    sender

    object

    StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.

    For a SEP-12 customer, the id field should be sufficient to fully identify the customer in the business' Backend.

    For a SEP-31 Sending Anchor, the account and memo fields should be used.

    For a SEP-6 or SEP-24 Anchor, the account and memo fields should be used.

    idstring

    The id of the customer registered through SEP-12.

    accountstring

    Either the Stellar account or Muxed account address of the on-chain entity.

    memostring

    The memo value identifying a customer with a shared account, where the shared account is account.

    receiver

    object

    StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.

    For a SEP-12 customer, the id field should be sufficient to fully identify the customer in the business' Backend.

    For a SEP-31 Sending Anchor, the account and memo fields should be used.

    For a SEP-6 or SEP-24 Anchor, the account and memo fields should be used.

    idstring

    The id of the customer registered through SEP-12.

    accountstring

    Either the Stellar account or Muxed account address of the on-chain entity.

    memostring

    The memo value identifying a customer with a shared account, where the shared account is account.

    creator

    object

    StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.

    For a SEP-12 customer, the id field should be sufficient to fully identify the customer in the business' Backend.

    For a SEP-31 Sending Anchor, the account and memo fields should be used.

    For a SEP-6 or SEP-24 Anchor, the account and memo fields should be used.

    idstring

    The id of the customer registered through SEP-12.

    accountstring

    Either the Stellar account or Muxed account address of the on-chain entity.

    memostring

    The memo value identifying a customer with a shared account, where the shared account is account.

    quote

    object

    idstring
    sell_amountstring
    sell_assetstring
    buy_amountstring
    buy_assetstring
    expires_atdate-time
    pricestring
    total_pricestring

    creator

    object

    StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.

    For a SEP-12 customer, the id field should be sufficient to fully identify the customer in the business' Backend.

    For a SEP-31 Sending Anchor, the account and memo fields should be used.

    For a SEP-6 or SEP-24 Anchor, the account and memo fields should be used.

    idstring

    The id of the customer registered through SEP-12.

    accountstring

    Either the Stellar account or Muxed account address of the on-chain entity.

    memostring

    The memo value identifying a customer with a shared account, where the shared account is account.

    transaction_idstring
    created_atdate-time

    customer

    object

    idstring

Responses​

The event is successfully processed and ready to receive next event. The response body is empty.

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());
Request Collapse all
Base URL
https://callback.business-server.exampleanchor.com
Body
{
  "id": "string",
  "type": "transaction_created",
  "timestamp": "2024-10-29T17:23:12.164Z",
  "payload": {
    "transaction": {
      "id": "string",
      "sep": "24",
      "kind": "deposit",
      "status": "incomplete",
      "type": "string",
      "amount_expected": {
        "amount": "string",
        "asset": "string"
      },
      "amount_in": {
        "amount": "string",
        "asset": "string"
      },
      "amount_out": {
        "amount": "string",
        "asset": "string"
      },
      "fee_details": {
        "total": "string",
        "asset": "string",
        "details": [
          {
            "name": "string",
            "amount": "string",
            "description": "string"
          }
        ]
      },
      "quote_id": "string",
      "started_at": "2024-10-29T17:23:12.164Z",
      "updated_at": "2024-10-29T17:23:12.164Z",
      "completed_at": "2024-10-29T17:23:12.164Z",
      "transfer_received_at": "2024-10-29T17:23:12.164Z",
      "user_action_required_by": "2024-10-29T17:23:12.164Z",
      "message": "string",
      "refunds": {
        "amount_refunded": {
          "amount": "string",
          "asset": "string"
        },
        "amount_fee": {
          "amount": "string",
          "asset": "string"
        },
        "payments": [
          {
            "id": "string",
            "id_type": "stellar",
            "amount": {
              "amount": "string",
              "asset": "string"
            },
            "fee": {
              "amount": "string",
              "asset": "string"
            },
            "requested_at": "2024-10-29T17:23:12.164Z",
            "refunded_at": "2024-10-29T17:23:12.164Z"
          }
        ]
      },
      "stellar_transactions": [
        {
          "id": "string",
          "memo": "string",
          "memo_type": "text",
          "created_at": "2024-10-29T17:23:12.164Z",
          "envelope": "string",
          "payments": [
            {
              "id": "string",
              "payment_type": "payment",
              "source_account": "string",
              "destination_account": "string",
              "amount": {
                "amount": "string",
                "asset": "string"
              }
            }
          ]
        }
      ],
      "source_account": "string",
      "destination_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": "2024-10-29T17:23:12.165Z",
      "price": "string",
      "total_price": "string",
      "creator": {
        "id": "string",
        "account": "string",
        "memo": "string"
      },
      "transaction_id": "string",
      "created_at": "2024-10-29T17:23:12.165Z"
    },
    "customer": {
      "id": "string"
    }
  }
}
Did you find this page helpful?