Update examples in the send/receive from C accounts guide#2240
Update examples in the send/receive from C accounts guide#2240
Conversation
…onse examples, removing broken testnet horizon links
There was a problem hiding this comment.
Pull request overview
Updates the “Send to and receive payments from Contract Accounts” guide to remove broken testnet Horizon deep-links and instead inline illustrative Horizon response examples.
Changes:
- Removed direct Horizon testnet “example” links from the
accounts/{acc_id}/transactionsandaccounts/{acc_id}/paymentssections. - Replaced the previous short JSON snippets with longer, inline example response bodies for G-address transactions and Contract Account payments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ```json | ||
| ..., | ||
| { | ||
| "asset_balance_changes": [ | ||
| { | ||
| "asset_type": "native", | ||
| "type": "transfer", | ||
| "from": "CBP4GFAK4GDKCMVLNIHRZPEAPT7CFYTBKICOXCVMP2FEN3QFKCRZ27KS", | ||
| "to": "GBLVHX33XGOBDOXK7ERDL34NVH6WW7VTT2OBAHPJ7G3D423HBG5NOMY7", | ||
| "amount": "1.0000000", | ||
| "destination_muxed_id": "123456789" | ||
| } | ||
| ] | ||
| } | ||
| "_links":{ | ||
| ... | ||
| }, |
There was a problem hiding this comment.
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.
| ```json | ||
| ... | ||
| { | ||
| "memo": "123456789", | ||
| "memo_bytes": "MTIzNDU2Nzg5", | ||
| "source_account": "GCNG5JXJY3LNRMXCX23RIGKTURQACTSV5LL6NKL535BYRGOGWUX6J45Y", | ||
| "memo_type": "text" | ||
| } | ||
| "memo":"12345", | ||
| "memo_bytes":"MTIzNDU=", | ||
| "_links":{ | ||
| "self":{ | ||
| "..." |
There was a problem hiding this comment.
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.
| }, | ||
| "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" | ||
| } | ||
| } |
There was a problem hiding this comment.
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).
| }, | |
| "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" | |
| } |
| "memo":"12345", | ||
| "memo_bytes":"MTIzNDU=", |
There was a problem hiding this comment.
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).
| "memo":"12345", | |
| "memo_bytes":"MTIzNDU=", | |
| "memo":"123456789", | |
| "memo_bytes":"MTIzNDU2Nzg5", |
|
Preview is available here: |
With the testnet reset, links to Horizon were broken. Removed the direct link and added a more detailed example of responses in the page content itself.