Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 88 additions & 22 deletions docs/build/guides/transactions/send-and-receive-c-accounts.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -29,44 +29,110 @@ That's the main difference between receiving from customers using G or Contract

**Receiving from a G address**

Using Horizon's `accounts/{acc_id}/transactions` endpoint ([example](https://horizon-testnet.stellar.org/accounts/GBLVHX33XGOBDOXK7ERDL34NVH6WW7VTT2OBAHPJ7G3D423HBG5NOMY7/transactions))

The memo field will be present in the response.
The memo field will be present in the response of Horizon's [accounts/:account_id/transactions](https://developers.stellar.org/docs/data/apis/horizon/api-reference/get-transactions-by-account-id) endpoint

**Example response from a G address:**

```json
...
{
"memo": "123456789",
"memo_bytes": "MTIzNDU2Nzg5",
"source_account": "GCNG5JXJY3LNRMXCX23RIGKTURQACTSV5LL6NKL535BYRGOGWUX6J45Y",
"memo_type": "text"
}
"memo":"12345",
"memo_bytes":"MTIzNDU=",
Comment on lines +39 to +40
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The guide’s earlier example memo ID is 123456789, but this sample response uses "memo": "12345" (and matching memo_bytes). To avoid confusion, consider keeping the memo value consistent with the memo ID used in the surrounding explanation (or update the earlier example values accordingly).

Suggested change
"memo":"12345",
"memo_bytes":"MTIzNDU=",
"memo":"123456789",
"memo_bytes":"MTIzNDU2Nzg5",

Copilot uses AI. Check for mistakes.
"_links":{
"self":{
"..."
Comment on lines 36 to +43
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code block is tagged as json but includes ... placeholders, which makes it invalid JSON and can be confusing for readers (and may break any JSON-aware rendering/linting). Consider either making the snippet valid JSON (e.g., replace placeholders with string values like "..." / include minimal required fields) or switch the fence language to something non-JSON (e.g., text) if you intend it to be illustrative/pseudocode.

Copilot uses AI. Check for mistakes.
},
"id":"05e11abd0d70776d62f1e3c7c2ba6a08f88641bb226d6be783b8e850bc70b345",
"paging_token":"4097295721172992",
"successful":true,
"hash":"05e11abd0d70776d62f1e3c7c2ba6a08f88641bb226d6be783b8e850bc70b345",
"ledger":953976,
"created_at":"2026-02-10T23:49:33Z",
"source_account":"GB5FM5GICRYGBFMEGPMYEFDZQHGUYF75Z7WNB2JL5A3A57HIB4CP3TCL",
"source_account_sequence":"4021081526501377",
"fee_account":"GB5FM5GICRYGBFMEGPMYEFDZQHGUYF75Z7WNB2JL5A3A57HIB4CP3TCL",
"fee_charged":"100",
"max_fee":"100",
"operation_count":1,
"envelope_xdr":"AAAAAgAAAAB6...sKa6KzAKWP/BabMM",
"result_xdr":"AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAA=",
"fee_meta_xdr":"AAAAAgAAAAMAD...AAAAQAAAAAAAAAAAAAAAAAAAA==",
"memo_type":"text",
"signatures":[
"7pD5p6H9ivnGNj1WO4CVW9HWQx2uPAv0xwpIDqsdXMALO4pqb2GwwBFXNc3+dZb0+9n5YrCmuiswClj/wWmzDA=="
],
"preconditions":{
"timebounds":{
"min_time":"0",
"max_time":"1770767550"
}
}
Comment on lines +44 to +69
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this example, fields like id, paging_token, successful, hash, etc. are shown nested under _links, but in Horizon’s transaction representation these are top-level transaction fields and _links only contains link objects (self/account/ledger/etc.). This structure mismatch could mislead readers; consider restructuring the snippet to match the documented Transaction object shape (see docs/data/apis/horizon/api-reference/resources/transactions/object.mdx for an example).

Suggested change
},
"id":"05e11abd0d70776d62f1e3c7c2ba6a08f88641bb226d6be783b8e850bc70b345",
"paging_token":"4097295721172992",
"successful":true,
"hash":"05e11abd0d70776d62f1e3c7c2ba6a08f88641bb226d6be783b8e850bc70b345",
"ledger":953976,
"created_at":"2026-02-10T23:49:33Z",
"source_account":"GB5FM5GICRYGBFMEGPMYEFDZQHGUYF75Z7WNB2JL5A3A57HIB4CP3TCL",
"source_account_sequence":"4021081526501377",
"fee_account":"GB5FM5GICRYGBFMEGPMYEFDZQHGUYF75Z7WNB2JL5A3A57HIB4CP3TCL",
"fee_charged":"100",
"max_fee":"100",
"operation_count":1,
"envelope_xdr":"AAAAAgAAAAB6...sKa6KzAKWP/BabMM",
"result_xdr":"AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAA=",
"fee_meta_xdr":"AAAAAgAAAAMAD...AAAAQAAAAAAAAAAAAAAAAAAAA==",
"memo_type":"text",
"signatures":[
"7pD5p6H9ivnGNj1WO4CVW9HWQx2uPAv0xwpIDqsdXMALO4pqb2GwwBFXNc3+dZb0+9n5YrCmuiswClj/wWmzDA=="
],
"preconditions":{
"timebounds":{
"min_time":"0",
"max_time":"1770767550"
}
}
}
},
"id":"05e11abd0d70776d62f1e3c7c2ba6a08f88641bb226d6be783b8e850bc70b345",
"paging_token":"4097295721172992",
"successful":true,
"hash":"05e11abd0d70776d62f1e3c7c2ba6a08f88641bb226d6be783b8e850bc70b345",
"ledger":953976,
"created_at":"2026-02-10T23:49:33Z",
"source_account":"GB5FM5GICRYGBFMEGPMYEFDZQHGUYF75Z7WNB2JL5A3A57HIB4CP3TCL",
"source_account_sequence":"4021081526501377",
"fee_account":"GB5FM5GICRYGBFMEGPMYEFDZQHGUYF75Z7WNB2JL5A3A57HIB4CP3TCL",
"fee_charged":"100",
"max_fee":"100",
"operation_count":1,
"envelope_xdr":"AAAAAgAAAAB6...sKa6KzAKWP/BabMM",
"result_xdr":"AAAAAAAAAGQAAAAAAAAAAQAAAAAAAAABAAAAAAAAAAA=",
"fee_meta_xdr":"AAAAAgAAAAMAD...AAAAQAAAAAAAAAAAAAAAAAAAA==",
"memo_type":"text",
"signatures":[
"7pD5p6H9ivnGNj1WO4CVW9HWQx2uPAv0xwpIDqsdXMALO4pqb2GwwBFXNc3+dZb0+9n5YrCmuiswClj/wWmzDA=="
],
"preconditions":{
"timebounds":{
"min_time":"0",
"max_time":"1770767550"
}

Copilot uses AI. Check for mistakes.
}
},
...
```

**Receiving from a Contract Account**

Using Horizon's `accounts/{acc_id}/payments` endpoint ([example](https://horizon-testnet.stellar.org/accounts/GBLVHX33XGOBDOXK7ERDL34NVH6WW7VTT2OBAHPJ7G3D423HBG5NOMY7/payments))

After the transaction is processed, this payment detail will be present in the '/payments' endpoint, under a section called 'asset_balance_changes', which will present the encoded ID and the underlying G-address separately.
The payment details will be present in Horizon's [accounts/:account_id/payments](https://developers.stellar.org/docs/data/apis/horizon/api-reference/get-payments-by-account-id) endpoint, under 'asset_balance_changes', which will present the encoded ID and the underlying G address separately.

It is important to note the 'asset_balance_changes' section only supports Stellar assets and transactions that make use of the `transfer` function in the [Stellar Asset Contract (SAC)](../../../tokens/stellar-asset-contract.mdx).

**Example response from a Contract Account:**

```json
...,
{
"asset_balance_changes": [
{
"asset_type": "native",
"type": "transfer",
"from": "CBP4GFAK4GDKCMVLNIHRZPEAPT7CFYTBKICOXCVMP2FEN3QFKCRZ27KS",
"to": "GBLVHX33XGOBDOXK7ERDL34NVH6WW7VTT2OBAHPJ7G3D423HBG5NOMY7",
"amount": "1.0000000",
"destination_muxed_id": "123456789"
}
]
}
"_links":{
...
},
Comment on lines 83 to +88
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code block is also labeled json but contains ..., and ... placeholders, which makes it invalid JSON. Consider either providing a valid (possibly truncated) JSON object (e.g., keep placeholders as quoted strings / remove the leading ...,) or changing the fence language away from json if it’s not meant to be copy-pastable.

Copilot uses AI. Check for mistakes.
"id":"258816945460609125",
"paging_token":"258816945460609025",
"transaction_successful":true,
"source_account":"GBFB3VVWWJUOS2WPIXLKEPK2B5LNIA6UY43FARXY4H3LCFCT2KESVS6A",
"type":"invoke_host_function",
"type_i":24,
"created_at":"2025-12-12T02:48:28Z",
"transaction_hash":"5fcb052da40a6570e983ebf48d11e037b159964d27d7a77111e241ff82a7e58",
"function":"HostFunctionTypeHostFunctionTypeInvokeContract",
"parameters":[
{
"value":"AAAAEgAAAAGt785ZruUpaPdgYdSUwlJbdWWfpClqZfSZ7ynlZHfklg==",
"type":"Address"
},
{
"value":"AAAADwAAAAh0cmFuc2Zlcg==",
"type":"Sym"
},
{
"value":"AAAAEgAAAAE9m2qWxXmeXBEUPeloYrEu8eZsK1yvbKfUgWuBEu+IYw==",
"type":"Address"
},
{
"value":"AAAAEgAAAAIAAAAAAAAAezLeBRB7Xvlp9tNUC1vK3+K4158NprSAUc3gng6hBtBY",
"type":"Address"
},
{
"value":"AAAACgAAAAAAAAAAAAAAAAABhqA=",
"type":"I128"
}
],
"address":"",
"salt":"",
"asset_balance_changes":[
{
"asset_type":"credit_alphanum4",
"asset_code":"USDC",
"asset_issuer":"GA5ZSEJYB37JRC5AVCIA5MOP4RHTM335X2KGX3IHOJAPP5RE34K4KZVN",
"type":"transfer",
"from":"CA6ZW2UWYV4Z4XARCQ66S2DCWEXPDZTMFNOK63FH2SAWXAIS56EGHGH5",
"to":"GB5FM5GICRYGBFMEGPMYEFDZQHGUYF75Z7WNB2JL5A3A57HIB4CP3TCL",
"amount":"0.0100000",
"destination_muxed_id":"123"
}
]
},
...
```

For a detailed code example, see the section 'Monitoring Payments -> Using the Horizon API' of [this repository's examples](https://github.com/fazzatti/c-address-payment-examples#monitoring-payments).
Expand Down
Loading