From 617d899bd0b42df832b988dd30b90806039a9b9d Mon Sep 17 00:00:00 2001 From: Gleb Date: Mon, 24 Apr 2023 13:26:00 -0700 Subject: [PATCH] [ANCHOR-251] OpenAPI SEP-31 updates (#125) * OpenAPI SEP-31 updates * English... * Address comments --- ap_api/callbacks/customer/index.mdx | 7 +- ap_api/callbacks/del-customer.api.mdx | 8 +- ap_api/callbacks/fee/index.mdx | 6 +- ap_api/callbacks/gen-address.api.mdx | 4 +- ap_api/callbacks/get-customer.api.mdx | 5 +- ap_api/callbacks/get-fee.api.mdx | 4 +- .../{gen-rates.api.mdx => get-rates.api.mdx} | 6 +- .../callbacks/put-customer-callback.api.mdx | 55 ------------- ap_api/callbacks/put-customer.api.mdx | 6 +- ap_api/callbacks/rate/index.mdx | 6 +- ap_api/callbacks/sidebar.js | 2 +- ap_api/callbacks/unique-address/index.mdx | 9 +- ap_api/resources/get-quote.api.mdx | 2 +- ap_api/resources/get-quotes.api.mdx | 2 +- ap_api/resources/get-transaction.api.mdx | 2 +- ap_api/resources/patch-transactions.api.mdx | 4 +- openapi/ap/Callbacks API.yml | 60 +++----------- openapi/ap/bundled_callback.yml | 82 +++---------------- 18 files changed, 67 insertions(+), 203 deletions(-) rename ap_api/callbacks/{gen-rates.api.mdx => get-rates.api.mdx} (99%) delete mode 100644 ap_api/callbacks/put-customer-callback.api.mdx diff --git a/ap_api/callbacks/customer/index.mdx b/ap_api/callbacks/customer/index.mdx index e77289af0..1dc782321 100644 --- a/ap_api/callbacks/customer/index.mdx +++ b/ap_api/callbacks/customer/index.mdx @@ -5,16 +5,19 @@ order: 0 import {EndpointsTable} from "@site/src/components/EndpointsTable"; +The Anchor Platform does not store customer KYC data. Instead, the Anchor Platform forwards this data to and requests it from the business. + +The customer callbacks are designed for this purpose. Currently, requests & responses for these endpoints are almost identical to the [SEP-12 KYC API specification][sep-12]. + | | | | --- | --------------------- | | GET | [/customer](../get-customer.api.mdx) | | PUT | [/customer](../put-customer.api.mdx) | -| PUT | [/customer/callback](../put-customer-callback.api.mdx) | | DELETE | [/customer/:id](../del-customer.api.mdx) | -[sep-38]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md \ No newline at end of file +[sep-12]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md \ No newline at end of file diff --git a/ap_api/callbacks/del-customer.api.mdx b/ap_api/callbacks/del-customer.api.mdx index 93cae479a..f5724e1b4 100644 --- a/ap_api/callbacks/del-customer.api.mdx +++ b/ap_api/callbacks/del-customer.api.mdx @@ -1,11 +1,11 @@ --- id: del-customer title: "Delete Customer Data" -description: "The request for this endpoint is identical to the `PUT /customer/callback` request defined in SEP-12." +description: "The request for this endpoint is identical to the" sidebar_label: "Delete Customer Data" hide_title: true hide_table_of_contents: true -api: {"tags":["Customers"],"description":"The request for this endpoint is identical to the `PUT /customer/callback` request defined in SEP-12.\n\nDelete the customer's data or queue the customers data for deletion.\n","operationId":"delCustomer","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"204":{"description":"Success."},"404":{"description":"Customer not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}}},"method":"delete","path":"/customer/{id}","info":{"version":"2.0.0","description":"The Synchronous Callbacks API specification for the Stellar Anchor Platform project.\n\nThe Synchronous Callbacks API defines requests made by the Platform while it is processing a request from a client application. The \nanchor's responses to these requests affect the Platform responses to the client application.\n","title":"Synchronous Callbacks API"},"postman":{"name":"Delete Customer Data","description":{"content":"The request for this endpoint is identical to the `PUT /customer/callback` request defined in SEP-12.\n\nDelete the customer's data or queue the customers data for deletion.\n","type":"text/plain"},"url":{"path":["customer",":id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"DELETE"}} +api: {"tags":["Customers"],"description":"The request for this endpoint is identical to the \n[`DELETE /customer`](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-delete) \nrequest defined in SEP-12.\n\nDelete the customer's data or queue the customers data for deletion.\n","operationId":"delCustomer","parameters":[{"in":"path","name":"id","schema":{"type":"string"},"required":true}],"responses":{"204":{"description":"Success."},"404":{"description":"Customer not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}}},"method":"delete","path":"/customer/{id}","info":{"version":"2.0.0","description":"The Synchronous Callbacks API specification for the Stellar Anchor Platform project.\n\nThe Synchronous Callbacks API defines requests made by the Platform while it is processing a request from a client application. The \nanchor's responses to these requests affect the Platform responses to the client application.\n","title":"Synchronous Callbacks API"},"postman":{"name":"Delete Customer Data","description":{"content":"The request for this endpoint is identical to the \n[`DELETE /customer`](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-delete) \nrequest defined in SEP-12.\n\nDelete the customer's data or queue the customers data for deletion.\n","type":"text/plain"},"url":{"path":["customer",":id"],"host":["{{baseUrl}}"],"query":[],"variable":[{"disabled":false,"description":{"content":"(Required) ","type":"text/plain"},"type":"any","value":"","key":"id"}]},"header":[{"key":"Accept","value":"application/json"}],"method":"DELETE"}} sidebar_class_name: "delete api-method" info_path: api/callbacks/synchronous-callbacks-api custom_edit_url: null @@ -24,7 +24,9 @@ import TabItem from "@theme/TabItem"; -The request for this endpoint is identical to the `PUT /customer/callback` request defined in SEP-12. +The request for this endpoint is identical to the +[`DELETE /customer`](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-delete) +request defined in SEP-12. Delete the customer's data or queue the customers data for deletion. diff --git a/ap_api/callbacks/fee/index.mdx b/ap_api/callbacks/fee/index.mdx index 064bab15e..e1a2044fc 100644 --- a/ap_api/callbacks/fee/index.mdx +++ b/ap_api/callbacks/fee/index.mdx @@ -5,6 +5,10 @@ order: 0 import {EndpointsTable} from "@site/src/components/EndpointsTable"; +The `/fee` is a special endpoint, that is called to fetch fee information for a transaction without a quote. + +For example, if your business supports clients who want to skip the quote creation process and will be using the businesses' market rate. + | | | @@ -13,5 +17,3 @@ import {EndpointsTable} from "@site/src/components/EndpointsTable"; - -[sep-38]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md \ No newline at end of file diff --git a/ap_api/callbacks/gen-address.api.mdx b/ap_api/callbacks/gen-address.api.mdx index 741112cca..f269a7fb1 100644 --- a/ap_api/callbacks/gen-address.api.mdx +++ b/ap_api/callbacks/gen-address.api.mdx @@ -5,7 +5,7 @@ description: "If the platform is configured with `depositInfoGeneratorType: api` sidebar_label: "Generate Unique Address" hide_title: true hide_table_of_contents: true -api: {"description":"If the platform is configured with `depositInfoGeneratorType: api`, the Platform will be executing this request to \nthe Anchor backend every time a transaction is initiated by a client application.\n\nThe Anchor must guarantee that the memo returned in this request is unique, so it can be mapped 1-to-1 to a Platform\nresource such as a [SEP-31](https://stellar.org/protocol/sep-31) transaction.\n\nIt is possible that these memos are never used by the client who initiated the transaction though.\n\nHere is how this flow would be used for Receiving Anchors that need to create their unique `stellar_address:memo` pairs\noutside the platform, using Circle:\n\n[![](https://mermaid.ink/img/pako:eNqlVctu2zAQ_JUFTy1iOwhyE9AUhuu0ORQ1YvdmIKDJVUSYIlWSihEY_veuRMuPhHaTVCc9VjPD4exyzYSVyDLm8U-NRuA3xR8dL-cG6AoqaMxgOp70r69g5rjxXARlDdxqu4KVCgXM2VpwrRdcLIeTu81lbRQhPXApHXo_ZxGp4i4ooSpuAkwDas1d4gMaqcwjDI0obOL7p3sUqJ6o5DNMNA-5deX5qlNII-WExvj-mLV_c3OR4slg8ms6g7XH6vpqcxn2XvgIYyuCJSPgnB2w4B4lkIGhQKi22CCsydVj7XiDF-GaK6WD9KXlTfkTwoGsf8JcvDYqg-_j2dkFfD1geFDyS5plb2U0mnDRIC0PgcNCW7EUBVcGtqCDPUqs79Ov_ZS8ewy1Mx4MriAKo_z5mKdOYlZiaeeM9lu5wVl9L1n2Zn6Qh5IUb5KWn9y6W2WUL5DSUSvdZrFJx7brDgyPDdd8e4emU1L6x7nfrznNPTjRLNtmzuAnX2LX2sT_XKIJ3U_xbf9Mb3WdIDGgCJ5i8gIKCl5VFCIJte8c-l8Xjvej82GnxdNaGyUHc2_81EjZbcPhRLwzuU2Q7YxKUjkrEIlkh0jyA9i8vc9pxvZaFd2COy-CbR93iDDSam93uhNPGD-cjX7AuptEbcenE1dJal-ZSqUPPNR-8JHk_25RW4KTiG-dz-3oSozny0zJxjFRoFi2VBG-s_l1yN_ZMq_kK9P80Q7zAeuxEulBSTpk1w3-nFF9iXOW0a3EnNc6NMfkhkqjy2OpgnUsy7n22GO8Dnb6bATLgquxK9oe1NuqzV8v2LI1)](https://mermaid.live/edit#pako:eNqlVctu2zAQ_JUFTy1iOwhyE9AUhuu0ORQ1YvdmIKDJVUSYIlWSihEY_veuRMuPhHaTVCc9VjPD4exyzYSVyDLm8U-NRuA3xR8dL-cG6AoqaMxgOp70r69g5rjxXARlDdxqu4KVCgXM2VpwrRdcLIeTu81lbRQhPXApHXo_ZxGp4i4ooSpuAkwDas1d4gMaqcwjDI0obOL7p3sUqJ6o5DNMNA-5deX5qlNII-WExvj-mLV_c3OR4slg8ms6g7XH6vpqcxn2XvgIYyuCJSPgnB2w4B4lkIGhQKi22CCsydVj7XiDF-GaK6WD9KXlTfkTwoGsf8JcvDYqg-_j2dkFfD1geFDyS5plb2U0mnDRIC0PgcNCW7EUBVcGtqCDPUqs79Ov_ZS8ewy1Mx4MriAKo_z5mKdOYlZiaeeM9lu5wVl9L1n2Zn6Qh5IUb5KWn9y6W2WUL5DSUSvdZrFJx7brDgyPDdd8e4emU1L6x7nfrznNPTjRLNtmzuAnX2LX2sT_XKIJ3U_xbf9Mb3WdIDGgCJ5i8gIKCl5VFCIJte8c-l8Xjvej82GnxdNaGyUHc2_81EjZbcPhRLwzuU2Q7YxKUjkrEIlkh0jyA9i8vc9pxvZaFd2COy-CbR93iDDSam93uhNPGD-cjX7AuptEbcenE1dJal-ZSqUPPNR-8JHk_25RW4KTiG-dz-3oSozny0zJxjFRoFi2VBG-s_l1yN_ZMq_kK9P80Q7zAeuxEulBSTpk1w3-nFF9iXOW0a3EnNc6NMfkhkqjy2OpgnUsy7n22GO8Dnb6bATLgquxK9oe1NuqzV8v2LI1)\n","operationId":"genAddress","tags":["Unique Address"],"parameters":[{"in":"query","name":"transaction_id","description":"The platform server will save the posted transaction and pass the `transaction_id` through this endpoint. \nIf the anchor wishes to return transaction-dependent unique_address, the anchor may query the [`GET /transactions` endpoint of the Platform API](https://github.com/stellar/java-stellar-anchor-sdk/blob/main/docs/03%20-%20Implementing%20the%20Anchor%20Server/Communication/Platform%20API.yml).\n","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"unique_address":{"description":"An object containing the unique `stellar_address:memo` pair used to identify a destination.","type":"object","properties":{"stellar_address":{"description":"A `G...` stellar address or a `M...` [muxed stellar address](https://developers.stellar.org/docs/glossary/muxed-accounts/) of an **existing** account in the Stellar network.","type":"string"},"memo":{"description":"The memo to attach to the Stellar payment.","type":"string"},"memo_type":{"description":"The type of memo to attach to the Stellar payment (text, hash, or id).","type":"string","enum":["text","hash","id"]}},"required":["stellar_address"]}}}}}},"500":{"description":"Error. The Platform will respond to the client application with the same response code and body.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}}},"method":"get","path":"/unique_address","info":{"version":"2.0.0","description":"The Synchronous Callbacks API specification for the Stellar Anchor Platform project.\n\nThe Synchronous Callbacks API defines requests made by the Platform while it is processing a request from a client application. The \nanchor's responses to these requests affect the Platform responses to the client application.\n","title":"Synchronous Callbacks API"},"postman":{"name":"Generate Unique Address","description":{"content":"If the platform is configured with `depositInfoGeneratorType: api`, the Platform will be executing this request to \nthe Anchor backend every time a transaction is initiated by a client application.\n\nThe Anchor must guarantee that the memo returned in this request is unique, so it can be mapped 1-to-1 to a Platform\nresource such as a [SEP-31](https://stellar.org/protocol/sep-31) transaction.\n\nIt is possible that these memos are never used by the client who initiated the transaction though.\n\nHere is how this flow would be used for Receiving Anchors that need to create their unique `stellar_address:memo` pairs\noutside the platform, using Circle:\n\n[![](https://mermaid.ink/img/pako:eNqlVctu2zAQ_JUFTy1iOwhyE9AUhuu0ORQ1YvdmIKDJVUSYIlWSihEY_veuRMuPhHaTVCc9VjPD4exyzYSVyDLm8U-NRuA3xR8dL-cG6AoqaMxgOp70r69g5rjxXARlDdxqu4KVCgXM2VpwrRdcLIeTu81lbRQhPXApHXo_ZxGp4i4ooSpuAkwDas1d4gMaqcwjDI0obOL7p3sUqJ6o5DNMNA-5deX5qlNII-WExvj-mLV_c3OR4slg8ms6g7XH6vpqcxn2XvgIYyuCJSPgnB2w4B4lkIGhQKi22CCsydVj7XiDF-GaK6WD9KXlTfkTwoGsf8JcvDYqg-_j2dkFfD1geFDyS5plb2U0mnDRIC0PgcNCW7EUBVcGtqCDPUqs79Ov_ZS8ewy1Mx4MriAKo_z5mKdOYlZiaeeM9lu5wVl9L1n2Zn6Qh5IUb5KWn9y6W2WUL5DSUSvdZrFJx7brDgyPDdd8e4emU1L6x7nfrznNPTjRLNtmzuAnX2LX2sT_XKIJ3U_xbf9Mb3WdIDGgCJ5i8gIKCl5VFCIJte8c-l8Xjvej82GnxdNaGyUHc2_81EjZbcPhRLwzuU2Q7YxKUjkrEIlkh0jyA9i8vc9pxvZaFd2COy-CbR93iDDSam93uhNPGD-cjX7AuptEbcenE1dJal-ZSqUPPNR-8JHk_25RW4KTiG-dz-3oSozny0zJxjFRoFi2VBG-s_l1yN_ZMq_kK9P80Q7zAeuxEulBSTpk1w3-nFF9iXOW0a3EnNc6NMfkhkqjy2OpgnUsy7n22GO8Dnb6bATLgquxK9oe1NuqzV8v2LI1)](https://mermaid.live/edit#pako:eNqlVctu2zAQ_JUFTy1iOwhyE9AUhuu0ORQ1YvdmIKDJVUSYIlWSihEY_veuRMuPhHaTVCc9VjPD4exyzYSVyDLm8U-NRuA3xR8dL-cG6AoqaMxgOp70r69g5rjxXARlDdxqu4KVCgXM2VpwrRdcLIeTu81lbRQhPXApHXo_ZxGp4i4ooSpuAkwDas1d4gMaqcwjDI0obOL7p3sUqJ6o5DNMNA-5deX5qlNII-WExvj-mLV_c3OR4slg8ms6g7XH6vpqcxn2XvgIYyuCJSPgnB2w4B4lkIGhQKi22CCsydVj7XiDF-GaK6WD9KXlTfkTwoGsf8JcvDYqg-_j2dkFfD1geFDyS5plb2U0mnDRIC0PgcNCW7EUBVcGtqCDPUqs79Ov_ZS8ewy1Mx4MriAKo_z5mKdOYlZiaeeM9lu5wVl9L1n2Zn6Qh5IUb5KWn9y6W2WUL5DSUSvdZrFJx7brDgyPDdd8e4emU1L6x7nfrznNPTjRLNtmzuAnX2LX2sT_XKIJ3U_xbf9Mb3WdIDGgCJ5i8gIKCl5VFCIJte8c-l8Xjvej82GnxdNaGyUHc2_81EjZbcPhRLwzuU2Q7YxKUjkrEIlkh0jyA9i8vc9pxvZaFd2COy-CbR93iDDSam93uhNPGD-cjX7AuptEbcenE1dJal-ZSqUPPNR-8JHk_25RW4KTiG-dz-3oSozny0zJxjFRoFi2VBG-s_l1yN_ZMq_kK9P80Q7zAeuxEulBSTpk1w3-nFF9iXOW0a3EnNc6NMfkhkqjy2OpgnUsy7n22GO8Dnb6bATLgquxK9oe1NuqzV8v2LI1)\n","type":"text/plain"},"url":{"path":["unique_address"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) The platform server will save the posted transaction and pass the `transaction_id` through this endpoint. \nIf the anchor wishes to return transaction-dependent unique_address, the anchor may query the [`GET /transactions` endpoint of the Platform API](https://github.com/stellar/java-stellar-anchor-sdk/blob/main/docs/03%20-%20Implementing%20the%20Anchor%20Server/Communication/Platform%20API.yml).\n","type":"text/plain"},"key":"transaction_id","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"description":"If the platform is configured with `depositInfoGeneratorType: api`, the Platform will be executing this request to \nthe Anchor backend every time a transaction is initiated by a client application.\n\nThe Anchor must guarantee that the memo returned in this request is unique, so it can be mapped 1-to-1 to a Platform\nresource such as a [SEP-31](https://stellar.org/protocol/sep-31) transaction.\n\nIt is possible that these memos are never used by the client who initiated the transaction though.\n\nHere is how this flow would be used for Receiving Anchors that need to create their unique `stellar_address:memo` pairs\noutside the platform, using Circle:\n\n[![](https://mermaid.ink/img/pako:eNqlVctu2zAQ_JUFTy1iOwhyE9AUhuu0ORQ1YvdmIKDJVUSYIlWSihEY_veuRMuPhHaTVCc9VjPD4exyzYSVyDLm8U-NRuA3xR8dL-cG6AoqaMxgOp70r69g5rjxXARlDdxqu4KVCgXM2VpwrRdcLIeTu81lbRQhPXApHXo_ZxGp4i4ooSpuAkwDas1d4gMaqcwjDI0obOL7p3sUqJ6o5DNMNA-5deX5qlNII-WExvj-mLV_c3OR4slg8ms6g7XH6vpqcxn2XvgIYyuCJSPgnB2w4B4lkIGhQKi22CCsydVj7XiDF-GaK6WD9KXlTfkTwoGsf8JcvDYqg-_j2dkFfD1geFDyS5plb2U0mnDRIC0PgcNCW7EUBVcGtqCDPUqs79Ov_ZS8ewy1Mx4MriAKo_z5mKdOYlZiaeeM9lu5wVl9L1n2Zn6Qh5IUb5KWn9y6W2WUL5DSUSvdZrFJx7brDgyPDdd8e4emU1L6x7nfrznNPTjRLNtmzuAnX2LX2sT_XKIJ3U_xbf9Mb3WdIDGgCJ5i8gIKCl5VFCIJte8c-l8Xjvej82GnxdNaGyUHc2_81EjZbcPhRLwzuU2Q7YxKUjkrEIlkh0jyA9i8vc9pxvZaFd2COy-CbR93iDDSam93uhNPGD-cjX7AuptEbcenE1dJal-ZSqUPPNR-8JHk_25RW4KTiG-dz-3oSozny0zJxjFRoFi2VBG-s_l1yN_ZMq_kK9P80Q7zAeuxEulBSTpk1w3-nFF9iXOW0a3EnNc6NMfkhkqjy2OpgnUsy7n22GO8Dnb6bATLgquxK9oe1NuqzV8v2LI1)](https://mermaid.live/edit#pako:eNqlVctu2zAQ_JUFTy1iOwhyE9AUhuu0ORQ1YvdmIKDJVUSYIlWSihEY_veuRMuPhHaTVCc9VjPD4exyzYSVyDLm8U-NRuA3xR8dL-cG6AoqaMxgOp70r69g5rjxXARlDdxqu4KVCgXM2VpwrRdcLIeTu81lbRQhPXApHXo_ZxGp4i4ooSpuAkwDas1d4gMaqcwjDI0obOL7p3sUqJ6o5DNMNA-5deX5qlNII-WExvj-mLV_c3OR4slg8ms6g7XH6vpqcxn2XvgIYyuCJSPgnB2w4B4lkIGhQKi22CCsydVj7XiDF-GaK6WD9KXlTfkTwoGsf8JcvDYqg-_j2dkFfD1geFDyS5plb2U0mnDRIC0PgcNCW7EUBVcGtqCDPUqs79Ov_ZS8ewy1Mx4MriAKo_z5mKdOYlZiaeeM9lu5wVl9L1n2Zn6Qh5IUb5KWn9y6W2WUL5DSUSvdZrFJx7brDgyPDdd8e4emU1L6x7nfrznNPTjRLNtmzuAnX2LX2sT_XKIJ3U_xbf9Mb3WdIDGgCJ5i8gIKCl5VFCIJte8c-l8Xjvej82GnxdNaGyUHc2_81EjZbcPhRLwzuU2Q7YxKUjkrEIlkh0jyA9i8vc9pxvZaFd2COy-CbR93iDDSam93uhNPGD-cjX7AuptEbcenE1dJal-ZSqUPPNR-8JHk_25RW4KTiG-dz-3oSozny0zJxjFRoFi2VBG-s_l1yN_ZMq_kK9P80Q7zAeuxEulBSTpk1w3-nFF9iXOW0a3EnNc6NMfkhkqjy2OpgnUsy7n22GO8Dnb6bATLgquxK9oe1NuqzV8v2LI1)\n","operationId":"genAddress","tags":["Unique Address"],"parameters":[{"in":"query","name":"transaction_id","description":"The platform server will save the posted transaction and pass the `transaction_id` through this endpoint. \nIf the anchor wishes to return transaction-dependent unique_address, the anchor may query the [`GET /transactions` endpoint of the Platform API](/ap_api/resources/get-transaction).\n","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"unique_address":{"description":"An object containing the unique `stellar_address:memo` pair used to identify a destination.","type":"object","properties":{"stellar_address":{"description":"A `G...` stellar address or a `M...` [muxed stellar address](https://developers.stellar.org/docs/glossary/muxed-accounts/) of an **existing** account in the Stellar network.","type":"string"},"memo":{"description":"The memo to attach to the Stellar payment.","type":"string"},"memo_type":{"description":"The type of memo to attach to the Stellar payment (text, hash, or id).","type":"string","enum":["text","hash","id"]}},"required":["stellar_address"]}}}}}},"500":{"description":"Error. The Platform will respond to the client application with the same response code and body.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}}},"method":"get","path":"/unique_address","info":{"version":"2.0.0","description":"The Synchronous Callbacks API specification for the Stellar Anchor Platform project.\n\nThe Synchronous Callbacks API defines requests made by the Platform while it is processing a request from a client application. The \nanchor's responses to these requests affect the Platform responses to the client application.\n","title":"Synchronous Callbacks API"},"postman":{"name":"Generate Unique Address","description":{"content":"If the platform is configured with `depositInfoGeneratorType: api`, the Platform will be executing this request to \nthe Anchor backend every time a transaction is initiated by a client application.\n\nThe Anchor must guarantee that the memo returned in this request is unique, so it can be mapped 1-to-1 to a Platform\nresource such as a [SEP-31](https://stellar.org/protocol/sep-31) transaction.\n\nIt is possible that these memos are never used by the client who initiated the transaction though.\n\nHere is how this flow would be used for Receiving Anchors that need to create their unique `stellar_address:memo` pairs\noutside the platform, using Circle:\n\n[![](https://mermaid.ink/img/pako:eNqlVctu2zAQ_JUFTy1iOwhyE9AUhuu0ORQ1YvdmIKDJVUSYIlWSihEY_veuRMuPhHaTVCc9VjPD4exyzYSVyDLm8U-NRuA3xR8dL-cG6AoqaMxgOp70r69g5rjxXARlDdxqu4KVCgXM2VpwrRdcLIeTu81lbRQhPXApHXo_ZxGp4i4ooSpuAkwDas1d4gMaqcwjDI0obOL7p3sUqJ6o5DNMNA-5deX5qlNII-WExvj-mLV_c3OR4slg8ms6g7XH6vpqcxn2XvgIYyuCJSPgnB2w4B4lkIGhQKi22CCsydVj7XiDF-GaK6WD9KXlTfkTwoGsf8JcvDYqg-_j2dkFfD1geFDyS5plb2U0mnDRIC0PgcNCW7EUBVcGtqCDPUqs79Ov_ZS8ewy1Mx4MriAKo_z5mKdOYlZiaeeM9lu5wVl9L1n2Zn6Qh5IUb5KWn9y6W2WUL5DSUSvdZrFJx7brDgyPDdd8e4emU1L6x7nfrznNPTjRLNtmzuAnX2LX2sT_XKIJ3U_xbf9Mb3WdIDGgCJ5i8gIKCl5VFCIJte8c-l8Xjvej82GnxdNaGyUHc2_81EjZbcPhRLwzuU2Q7YxKUjkrEIlkh0jyA9i8vc9pxvZaFd2COy-CbR93iDDSam93uhNPGD-cjX7AuptEbcenE1dJal-ZSqUPPNR-8JHk_25RW4KTiG-dz-3oSozny0zJxjFRoFi2VBG-s_l1yN_ZMq_kK9P80Q7zAeuxEulBSTpk1w3-nFF9iXOW0a3EnNc6NMfkhkqjy2OpgnUsy7n22GO8Dnb6bATLgquxK9oe1NuqzV8v2LI1)](https://mermaid.live/edit#pako:eNqlVctu2zAQ_JUFTy1iOwhyE9AUhuu0ORQ1YvdmIKDJVUSYIlWSihEY_veuRMuPhHaTVCc9VjPD4exyzYSVyDLm8U-NRuA3xR8dL-cG6AoqaMxgOp70r69g5rjxXARlDdxqu4KVCgXM2VpwrRdcLIeTu81lbRQhPXApHXo_ZxGp4i4ooSpuAkwDas1d4gMaqcwjDI0obOL7p3sUqJ6o5DNMNA-5deX5qlNII-WExvj-mLV_c3OR4slg8ms6g7XH6vpqcxn2XvgIYyuCJSPgnB2w4B4lkIGhQKi22CCsydVj7XiDF-GaK6WD9KXlTfkTwoGsf8JcvDYqg-_j2dkFfD1geFDyS5plb2U0mnDRIC0PgcNCW7EUBVcGtqCDPUqs79Ov_ZS8ewy1Mx4MriAKo_z5mKdOYlZiaeeM9lu5wVl9L1n2Zn6Qh5IUb5KWn9y6W2WUL5DSUSvdZrFJx7brDgyPDdd8e4emU1L6x7nfrznNPTjRLNtmzuAnX2LX2sT_XKIJ3U_xbf9Mb3WdIDGgCJ5i8gIKCl5VFCIJte8c-l8Xjvej82GnxdNaGyUHc2_81EjZbcPhRLwzuU2Q7YxKUjkrEIlkh0jyA9i8vc9pxvZaFd2COy-CbR93iDDSam93uhNPGD-cjX7AuptEbcenE1dJal-ZSqUPPNR-8JHk_25RW4KTiG-dz-3oSozny0zJxjFRoFi2VBG-s_l1yN_ZMq_kK9P80Q7zAeuxEulBSTpk1w3-nFF9iXOW0a3EnNc6NMfkhkqjy2OpgnUsy7n22GO8Dnb6bATLgquxK9oe1NuqzV8v2LI1)\n","type":"text/plain"},"url":{"path":["unique_address"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) The platform server will save the posted transaction and pass the `transaction_id` through this endpoint. \nIf the anchor wishes to return transaction-dependent unique_address, the anchor may query the [`GET /transactions` endpoint of the Platform API](/ap_api/resources/get-transaction).\n","type":"text/plain"},"key":"transaction_id","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: api/callbacks/synchronous-callbacks-api custom_edit_url: null @@ -38,7 +38,7 @@ outside the platform, using Circle: [![](https://mermaid.ink/img/pako:eNqlVctu2zAQ_JUFTy1iOwhyE9AUhuu0ORQ1YvdmIKDJVUSYIlWSihEY_veuRMuPhHaTVCc9VjPD4exyzYSVyDLm8U-NRuA3xR8dL-cG6AoqaMxgOp70r69g5rjxXARlDdxqu4KVCgXM2VpwrRdcLIeTu81lbRQhPXApHXo_ZxGp4i4ooSpuAkwDas1d4gMaqcwjDI0obOL7p3sUqJ6o5DNMNA-5deX5qlNII-WExvj-mLV_c3OR4slg8ms6g7XH6vpqcxn2XvgIYyuCJSPgnB2w4B4lkIGhQKi22CCsydVj7XiDF-GaK6WD9KXlTfkTwoGsf8JcvDYqg-_j2dkFfD1geFDyS5plb2U0mnDRIC0PgcNCW7EUBVcGtqCDPUqs79Ov_ZS8ewy1Mx4MriAKo_z5mKdOYlZiaeeM9lu5wVl9L1n2Zn6Qh5IUb5KWn9y6W2WUL5DSUSvdZrFJx7brDgyPDdd8e4emU1L6x7nfrznNPTjRLNtmzuAnX2LX2sT_XKIJ3U_xbf9Mb3WdIDGgCJ5i8gIKCl5VFCIJte8c-l8Xjvej82GnxdNaGyUHc2_81EjZbcPhRLwzuU2Q7YxKUjkrEIlkh0jyA9i8vc9pxvZaFd2COy-CbR93iDDSam93uhNPGD-cjX7AuptEbcenE1dJal-ZSqUPPNR-8JHk_25RW4KTiG-dz-3oSozny0zJxjFRoFi2VBG-s_l1yN_ZMq_kK9P80Q7zAeuxEulBSTpk1w3-nFF9iXOW0a3EnNc6NMfkhkqjy2OpgnUsy7n22GO8Dnb6bATLgquxK9oe1NuqzV8v2LI1)](https://mermaid.live/edit#pako:eNqlVctu2zAQ_JUFTy1iOwhyE9AUhuu0ORQ1YvdmIKDJVUSYIlWSihEY_veuRMuPhHaTVCc9VjPD4exyzYSVyDLm8U-NRuA3xR8dL-cG6AoqaMxgOp70r69g5rjxXARlDdxqu4KVCgXM2VpwrRdcLIeTu81lbRQhPXApHXo_ZxGp4i4ooSpuAkwDas1d4gMaqcwjDI0obOL7p3sUqJ6o5DNMNA-5deX5qlNII-WExvj-mLV_c3OR4slg8ms6g7XH6vpqcxn2XvgIYyuCJSPgnB2w4B4lkIGhQKi22CCsydVj7XiDF-GaK6WD9KXlTfkTwoGsf8JcvDYqg-_j2dkFfD1geFDyS5plb2U0mnDRIC0PgcNCW7EUBVcGtqCDPUqs79Ov_ZS8ewy1Mx4MriAKo_z5mKdOYlZiaeeM9lu5wVl9L1n2Zn6Qh5IUb5KWn9y6W2WUL5DSUSvdZrFJx7brDgyPDdd8e4emU1L6x7nfrznNPTjRLNtmzuAnX2LX2sT_XKIJ3U_xbf9Mb3WdIDGgCJ5i8gIKCl5VFCIJte8c-l8Xjvej82GnxdNaGyUHc2_81EjZbcPhRLwzuU2Q7YxKUjkrEIlkh0jyA9i8vc9pxvZaFd2COy-CbR93iDDSam93uhNPGD-cjX7AuptEbcenE1dJal-ZSqUPPNR-8JHk_25RW4KTiG-dz-3oSozny0zJxjFRoFi2VBG-s_l1yN_ZMq_kK9P80Q7zAeuxEulBSTpk1w3-nFF9iXOW0a3EnNc6NMfkhkqjy2OpgnUsy7n22GO8Dnb6bATLgquxK9oe1NuqzV8v2LI1) -
Query Parameters
+
Query Parameters
Success. diff --git a/ap_api/callbacks/get-customer.api.mdx b/ap_api/callbacks/get-customer.api.mdx index a772c7e11..dd0210acc 100644 --- a/ap_api/callbacks/get-customer.api.mdx +++ b/ap_api/callbacks/get-customer.api.mdx @@ -5,7 +5,7 @@ description: "The request and response for this endpoint is identical to the" sidebar_label: "Retrieve Customer's Info" hide_title: true hide_table_of_contents: true -api: {"description":"The request and response for this endpoint is identical to the \n[`GET /customer`](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-get) \nrequest and response defined in SEP-12.\n\nThis endpoint allows clients to:\n\n 1. Fetch the fields the server requires in order to register a new customer via a SEP-12 `PUT /customer` request\n\nIf the server does not have a customer registered for the parameters sent in the request, it should return the \nfields required in the response. The same response should be returned when no parameters are sent.\n\n 2. Check the status of a customer that may already be registered\n\nThis allows clients to check whether the customers information was accepted, rejected, or still needs more info. \nIf the server still needs more info, or the server needs updated information, it should return the fields required.\n","tags":["Customers"],"operationId":"getCustomer","parameters":[{"in":"query","name":"id","description":"The ID of the customer as returned in the response of a previous PUT request.","schema":{"type":"string"}},{"in":"query","name":"account","description":"The Stellar or Muxed Account authenticated with the Platform via SEP-10.","schema":{"type":"string"}},{"in":"query","name":"memo","description":"The memo value identifying a customer with a shared account, where the shared account is `account`.","schema":{"type":"string"}},{"in":"query","name":"memo_type","description":"The type of memo used to identify a customer with a shared account.","schema":{"type":"string","enum":["id","hash","text"]}},{"in":"query","name":"type","description":"The type of action the customer is being KYCd for. See the \n[Type Specification](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#type-specification)\ndocumented in SEP-12.\n","schema":{"type":"string"}},{"in":"query","name":"lang","description":"Defaults to `en`. Language code specified using ISO 639-1. Human readable descriptions, choices, and \nmessages should be in this language.\n","schema":{"type":"string"}}],"responses":{"200":{"description":"Valid request. Customer either already exists or the customer identified by the parameters is new and must \nprovide the field values described in the repsonse body. Response bodies are identical to the schema defined \nin SEP-12.\n"},"400":{"description":"Error.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}},"404":{"description":"Not Found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}}},"method":"get","path":"/customer","info":{"version":"2.0.0","description":"The Synchronous Callbacks API specification for the Stellar Anchor Platform project.\n\nThe Synchronous Callbacks API defines requests made by the Platform while it is processing a request from a client application. The \nanchor's responses to these requests affect the Platform responses to the client application.\n","title":"Synchronous Callbacks API"},"postman":{"name":"Retrieve Customer's Info","description":{"content":"The request and response for this endpoint is identical to the \n[`GET /customer`](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-get) \nrequest and response defined in SEP-12.\n\nThis endpoint allows clients to:\n\n 1. Fetch the fields the server requires in order to register a new customer via a SEP-12 `PUT /customer` request\n\nIf the server does not have a customer registered for the parameters sent in the request, it should return the \nfields required in the response. The same response should be returned when no parameters are sent.\n\n 2. Check the status of a customer that may already be registered\n\nThis allows clients to check whether the customers information was accepted, rejected, or still needs more info. \nIf the server still needs more info, or the server needs updated information, it should return the fields required.\n","type":"text/plain"},"url":{"path":["customer"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"The ID of the customer as returned in the response of a previous PUT request.","type":"text/plain"},"key":"id","value":""},{"disabled":false,"description":{"content":"The Stellar or Muxed Account authenticated with the Platform via SEP-10.","type":"text/plain"},"key":"account","value":""},{"disabled":false,"description":{"content":"The memo value identifying a customer with a shared account, where the shared account is `account`.","type":"text/plain"},"key":"memo","value":""},{"disabled":false,"description":{"content":"The type of memo used to identify a customer with a shared account.","type":"text/plain"},"key":"memo_type","value":""},{"disabled":false,"description":{"content":"The type of action the customer is being KYCd for. See the \n[Type Specification](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#type-specification)\ndocumented in SEP-12.\n","type":"text/plain"},"key":"type","value":""},{"disabled":false,"description":{"content":"Defaults to `en`. Language code specified using ISO 639-1. Human readable descriptions, choices, and \nmessages should be in this language.\n","type":"text/plain"},"key":"lang","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"description":"The request and response for this endpoint is identical to the \n[`GET /customer`](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-get) \nrequest and response defined in SEP-12.\n\nThis endpoint allows clients to:\n\n 1. Fetch the fields the server requires in order to register a new customer via a SEP-12 \n[`PUT /customer`](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-put) request\n\nIf the server does not have a customer registered for the parameters sent in the request, it should return the \nfields required in the response. The same response should be returned when no parameters are sent.\n\n 2. Check the status of a customer that may already be registered\n\nThis allows clients to check whether the customers information was accepted, rejected, or still needs more info. \nIf the server still needs more info, or the server needs updated information, it should return the fields required.\n","tags":["Customers"],"operationId":"getCustomer","parameters":[{"in":"query","name":"id","description":"The ID of the customer as returned in the response of a previous PUT request.","schema":{"type":"string"}},{"in":"query","name":"account","description":"The Stellar or Muxed Account authenticated with the Platform via SEP-10.","schema":{"type":"string"}},{"in":"query","name":"memo","description":"The memo value identifying a customer with a shared account, where the shared account is `account`.","schema":{"type":"string"}},{"in":"query","name":"memo_type","description":"The type of memo used to identify a customer with a shared account.","schema":{"type":"string","enum":["id","hash","text"]}},{"in":"query","name":"type","description":"The type of action the customer is being KYCd for. See the \n[Type Specification](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#type-specification)\ndocumented in SEP-12.\n","schema":{"type":"string"}},{"in":"query","name":"lang","description":"Defaults to `en`. Language code specified using ISO 639-1. Human readable descriptions, choices, and \nmessages should be in this language.\n","schema":{"type":"string"}}],"responses":{"200":{"description":"Valid request. Customer either already exists or the customer identified by the parameters is new and must \nprovide the field values described in the repsonse body. Response bodies are identical to the schema defined \nin SEP-12.\n"},"400":{"description":"Error.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}},"404":{"description":"Not Found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}}},"method":"get","path":"/customer","info":{"version":"2.0.0","description":"The Synchronous Callbacks API specification for the Stellar Anchor Platform project.\n\nThe Synchronous Callbacks API defines requests made by the Platform while it is processing a request from a client application. The \nanchor's responses to these requests affect the Platform responses to the client application.\n","title":"Synchronous Callbacks API"},"postman":{"name":"Retrieve Customer's Info","description":{"content":"The request and response for this endpoint is identical to the \n[`GET /customer`](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-get) \nrequest and response defined in SEP-12.\n\nThis endpoint allows clients to:\n\n 1. Fetch the fields the server requires in order to register a new customer via a SEP-12 \n[`PUT /customer`](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-put) request\n\nIf the server does not have a customer registered for the parameters sent in the request, it should return the \nfields required in the response. The same response should be returned when no parameters are sent.\n\n 2. Check the status of a customer that may already be registered\n\nThis allows clients to check whether the customers information was accepted, rejected, or still needs more info. \nIf the server still needs more info, or the server needs updated information, it should return the fields required.\n","type":"text/plain"},"url":{"path":["customer"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"The ID of the customer as returned in the response of a previous PUT request.","type":"text/plain"},"key":"id","value":""},{"disabled":false,"description":{"content":"The Stellar or Muxed Account authenticated with the Platform via SEP-10.","type":"text/plain"},"key":"account","value":""},{"disabled":false,"description":{"content":"The memo value identifying a customer with a shared account, where the shared account is `account`.","type":"text/plain"},"key":"memo","value":""},{"disabled":false,"description":{"content":"The type of memo used to identify a customer with a shared account.","type":"text/plain"},"key":"memo_type","value":""},{"disabled":false,"description":{"content":"The type of action the customer is being KYCd for. See the \n[Type Specification](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#type-specification)\ndocumented in SEP-12.\n","type":"text/plain"},"key":"type","value":""},{"disabled":false,"description":{"content":"Defaults to `en`. Language code specified using ISO 639-1. Human readable descriptions, choices, and \nmessages should be in this language.\n","type":"text/plain"},"key":"lang","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: api/callbacks/synchronous-callbacks-api custom_edit_url: null @@ -30,7 +30,8 @@ request and response defined in SEP-12. This endpoint allows clients to: - 1. Fetch the fields the server requires in order to register a new customer via a SEP-12 `PUT /customer` request + 1. Fetch the fields the server requires in order to register a new customer via a SEP-12 +[`PUT /customer`](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-put) request If the server does not have a customer registered for the parameters sent in the request, it should return the fields required in the response. The same response should be returned when no parameters are sent. diff --git a/ap_api/callbacks/get-fee.api.mdx b/ap_api/callbacks/get-fee.api.mdx index 370b74da0..7624e30c5 100644 --- a/ap_api/callbacks/get-fee.api.mdx +++ b/ap_api/callbacks/get-fee.api.mdx @@ -5,7 +5,7 @@ description: "The Platform will make this request to the anchor every time a tra sidebar_label: "Retrieve Fees" hide_title: true hide_table_of_contents: true -api: {"description":"The Platform will make this request to the anchor every time a transaction is initiated by a client application\nwithout a `quote_id`.\n\nThe Anchor must ensure that the sending and receiving customers specified in the request meet the KYC requirements\nnecessary to partake in the transaction described in the request.\n\nThe anchor must return the fee it will charge for the transaction.\n\nIn the future, this endpoint may be used to provide estimated fees to client applications prior to initiating transactions.\nWhen this change is made, the request schema will be adapted to support the use case.\n","tags":["Fees"],"operationId":"getFee","parameters":[{"in":"query","name":"send_asset","description":"The asset the client application will send to the anchor in exchange for `receive_asset` in \n[Asset Identification Format](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#asset-identification-format).\n","schema":{"type":"string"},"required":true},{"in":"query","name":"receive_asset","description":"The asset the that the anchor will send in exchange for `send_asset` in \n[Asset Identification Format](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#asset-identification-format).\n","schema":{"type":"string"},"required":true},{"in":"query","name":"send_amount","description":"The amount of `send_asset` the client application will send in exchange for `receive_asset`. One of `send_amount` \nor `receive_amount` will always be included in the request. If the client application specified a `quote_id` in \nits transaction creation request, both amounts specified in the referenced quote will be passed.\n","schema":{"type":"string"}},{"in":"query","name":"receive_amount","description":"The amount of `receive_asset` the anchor will send in exchange for `send_asset`. One of `send_amount` or \n`receive_amount` will always be included in the request. If the client application specified a `quote_id` in its \ntransaction creation request, both amounts specified in the referenced quote will be passed.\n","schema":{"type":"string"}},{"in":"query","name":"client_id","description":"An identifier for the client application making the request. This ID can be used to offer different fees to different clients.\nA client ID can be one of the following:\n1. the `client_domain`: In SEP-24, if the transaction is initiated from a non-custodial wallet, the `client_id` must match the `client_domain` if wallet attribution is required. \n2. the Stellar custodial/omnibus account: In SEP-24, if the transaction is initiated from a custodian, such as Wyre, the `client_id` should match a known pooled/omnibus account configured in the [`omnibusAccountList`] of the YAML file](https://github.com/stellar/java-stellar-anchor-sdk/blob/main/platform/src/main/resources/anchor-config-defaults.yaml). \n3. The Stellar account of a sending anchor: In SEP-31, the `client_id` should match the account of a known SEP-31 sending anchor match the one used to authenticate via SEP-10.\n","schema":{"type":"string"},"required":true},{"in":"query","name":"sender_id","description":"The SEP-12 customer ID of the sending user.\n","schema":{"type":"string"},"required":true},{"in":"query","name":"receiver_id","description":"The SEP-12 customer ID of the receiving user.\n","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"}},"title":"FeeResponse"}}}},"422":{"description":"Unprocessable Entity. This status should be returned when the anchor understood the request but cannot \nreturn a success response. An example for when this response code would be appropriate is if the sender \nand/or receiver is not permitted to initiate a transaction with the specified amounts. In these cases, \nthe Platform will respond to the client application's request with a `400 Bad Request` and include the \nerror message provided by the anchor in the response body.\n","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}},"500":{"description":"Error. The Platform will respond to the client application with the same response code and body.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}}},"method":"get","path":"/fee","info":{"version":"2.0.0","description":"The Synchronous Callbacks API specification for the Stellar Anchor Platform project.\n\nThe Synchronous Callbacks API defines requests made by the Platform while it is processing a request from a client application. The \nanchor's responses to these requests affect the Platform responses to the client application.\n","title":"Synchronous Callbacks API"},"postman":{"name":"Retrieve Fees","description":{"content":"The Platform will make this request to the anchor every time a transaction is initiated by a client application\nwithout a `quote_id`.\n\nThe Anchor must ensure that the sending and receiving customers specified in the request meet the KYC requirements\nnecessary to partake in the transaction described in the request.\n\nThe anchor must return the fee it will charge for the transaction.\n\nIn the future, this endpoint may be used to provide estimated fees to client applications prior to initiating transactions.\nWhen this change is made, the request schema will be adapted to support the use case.\n","type":"text/plain"},"url":{"path":["fee"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) The asset the client application will send to the anchor in exchange for `receive_asset` in \n[Asset Identification Format](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#asset-identification-format).\n","type":"text/plain"},"key":"send_asset","value":""},{"disabled":false,"description":{"content":"(Required) The asset the that the anchor will send in exchange for `send_asset` in \n[Asset Identification Format](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#asset-identification-format).\n","type":"text/plain"},"key":"receive_asset","value":""},{"disabled":false,"description":{"content":"The amount of `send_asset` the client application will send in exchange for `receive_asset`. One of `send_amount` \nor `receive_amount` will always be included in the request. If the client application specified a `quote_id` in \nits transaction creation request, both amounts specified in the referenced quote will be passed.\n","type":"text/plain"},"key":"send_amount","value":""},{"disabled":false,"description":{"content":"The amount of `receive_asset` the anchor will send in exchange for `send_asset`. One of `send_amount` or \n`receive_amount` will always be included in the request. If the client application specified a `quote_id` in its \ntransaction creation request, both amounts specified in the referenced quote will be passed.\n","type":"text/plain"},"key":"receive_amount","value":""},{"disabled":false,"description":{"content":"(Required) An identifier for the client application making the request. This ID can be used to offer different fees to different clients.\nA client ID can be one of the following:\n1. the `client_domain`: In SEP-24, if the transaction is initiated from a non-custodial wallet, the `client_id` must match the `client_domain` if wallet attribution is required. \n2. the Stellar custodial/omnibus account: In SEP-24, if the transaction is initiated from a custodian, such as Wyre, the `client_id` should match a known pooled/omnibus account configured in the [`omnibusAccountList`] of the YAML file](https://github.com/stellar/java-stellar-anchor-sdk/blob/main/platform/src/main/resources/anchor-config-defaults.yaml). \n3. The Stellar account of a sending anchor: In SEP-31, the `client_id` should match the account of a known SEP-31 sending anchor match the one used to authenticate via SEP-10.\n","type":"text/plain"},"key":"client_id","value":""},{"disabled":false,"description":{"content":"(Required) The SEP-12 customer ID of the sending user.\n","type":"text/plain"},"key":"sender_id","value":""},{"disabled":false,"description":{"content":"(Required) The SEP-12 customer ID of the receiving user.\n","type":"text/plain"},"key":"receiver_id","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"description":"The Platform will make this request to the anchor every time a transaction is initiated by a client application\nwithout a `quote_id`.\n\nThe Anchor must ensure that the sending and receiving customers specified in the request meet the KYC requirements\nnecessary to partake in the transaction described in the request.\n\nThe anchor must return the fee it will charge for the transaction.\n\nIn the future, this endpoint may be used to provide estimated fees to client applications prior to initiating transactions.\nWhen this change is made, the request schema will be adapted to support the use case.\n","tags":["Fees"],"operationId":"getFee","parameters":[{"in":"query","name":"send_asset","description":"The asset the client application will send to the anchor in exchange for `receive_asset` in \n[Asset Identification Format](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#asset-identification-format).\n","schema":{"type":"string"},"required":true},{"in":"query","name":"receive_asset","description":"The asset the that the anchor will send in exchange for `send_asset` in \n[Asset Identification Format](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#asset-identification-format).\n","schema":{"type":"string"},"required":true},{"in":"query","name":"send_amount","description":"The amount of `send_asset` the client application will send in exchange for `receive_asset`. One of `send_amount` \nor `receive_amount` will always be included in the request. If the client application specified a `quote_id` in \nits transaction creation request, both amounts specified in the referenced quote will be passed.\n","schema":{"type":"string"}},{"in":"query","name":"receive_amount","description":"The amount of `receive_asset` the anchor will send in exchange for `send_asset`. One of `send_amount` or \n`receive_amount` will always be included in the request. If the client application specified a `quote_id` in its \ntransaction creation request, both amounts specified in the referenced quote will be passed.\n","schema":{"type":"string"}},{"in":"query","name":"client_id","description":"An identifier for the client application making the request. This ID can be used to offer different fees to different clients.\nA client ID it the Stellar account of a sending anchor: In SEP-31, the `client_id` should match the account of a known SEP-31 sending anchor match the one used to authenticate via SEP-10.\n","schema":{"type":"string"},"required":true},{"in":"query","name":"sender_id","description":"The SEP-12 customer ID of the sending user.\n","schema":{"type":"string"},"required":true},{"in":"query","name":"receiver_id","description":"The SEP-12 customer ID of the receiving user.\n","schema":{"type":"string"},"required":true}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"}},"title":"FeeResponse"}}}},"422":{"description":"Unprocessable Entity. This status should be returned when the anchor understood the request but cannot \nreturn a success response. An example for when this response code would be appropriate is if the sender \nand/or receiver is not permitted to initiate a transaction with the specified amounts. In these cases, \nthe Platform will respond to the client application's request with a `400 Bad Request` and include the \nerror message provided by the anchor in the response body.\n","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}},"500":{"description":"Error. The Platform will respond to the client application with the same response code and body.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}}},"method":"get","path":"/fee","info":{"version":"2.0.0","description":"The Synchronous Callbacks API specification for the Stellar Anchor Platform project.\n\nThe Synchronous Callbacks API defines requests made by the Platform while it is processing a request from a client application. The \nanchor's responses to these requests affect the Platform responses to the client application.\n","title":"Synchronous Callbacks API"},"postman":{"name":"Retrieve Fees","description":{"content":"The Platform will make this request to the anchor every time a transaction is initiated by a client application\nwithout a `quote_id`.\n\nThe Anchor must ensure that the sending and receiving customers specified in the request meet the KYC requirements\nnecessary to partake in the transaction described in the request.\n\nThe anchor must return the fee it will charge for the transaction.\n\nIn the future, this endpoint may be used to provide estimated fees to client applications prior to initiating transactions.\nWhen this change is made, the request schema will be adapted to support the use case.\n","type":"text/plain"},"url":{"path":["fee"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) The asset the client application will send to the anchor in exchange for `receive_asset` in \n[Asset Identification Format](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#asset-identification-format).\n","type":"text/plain"},"key":"send_asset","value":""},{"disabled":false,"description":{"content":"(Required) The asset the that the anchor will send in exchange for `send_asset` in \n[Asset Identification Format](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#asset-identification-format).\n","type":"text/plain"},"key":"receive_asset","value":""},{"disabled":false,"description":{"content":"The amount of `send_asset` the client application will send in exchange for `receive_asset`. One of `send_amount` \nor `receive_amount` will always be included in the request. If the client application specified a `quote_id` in \nits transaction creation request, both amounts specified in the referenced quote will be passed.\n","type":"text/plain"},"key":"send_amount","value":""},{"disabled":false,"description":{"content":"The amount of `receive_asset` the anchor will send in exchange for `send_asset`. One of `send_amount` or \n`receive_amount` will always be included in the request. If the client application specified a `quote_id` in its \ntransaction creation request, both amounts specified in the referenced quote will be passed.\n","type":"text/plain"},"key":"receive_amount","value":""},{"disabled":false,"description":{"content":"(Required) An identifier for the client application making the request. This ID can be used to offer different fees to different clients.\nA client ID it the Stellar account of a sending anchor: In SEP-31, the `client_id` should match the account of a known SEP-31 sending anchor match the one used to authenticate via SEP-10.\n","type":"text/plain"},"key":"client_id","value":""},{"disabled":false,"description":{"content":"(Required) The SEP-12 customer ID of the sending user.\n","type":"text/plain"},"key":"sender_id","value":""},{"disabled":false,"description":{"content":"(Required) The SEP-12 customer ID of the receiving user.\n","type":"text/plain"},"key":"receiver_id","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: api/callbacks/synchronous-callbacks-api custom_edit_url: null @@ -36,7 +36,7 @@ In the future, this endpoint may be used to provide estimated fees to client app When this change is made, the request schema will be adapted to support the use case. -
Query Parameters
+
Query Parameters
Success. diff --git a/ap_api/callbacks/gen-rates.api.mdx b/ap_api/callbacks/get-rates.api.mdx similarity index 99% rename from ap_api/callbacks/gen-rates.api.mdx rename to ap_api/callbacks/get-rates.api.mdx index e734be25d..45225fa40 100644 --- a/ap_api/callbacks/gen-rates.api.mdx +++ b/ap_api/callbacks/get-rates.api.mdx @@ -1,11 +1,11 @@ --- -id: gen-rates +id: get-rates title: "Retrieve Rates" description: "Transactions that involve two non-equivalent on & off-chain assets (such as USDC on Stellar and fiat EUR) must" sidebar_label: "Retrieve Rates" hide_title: true hide_table_of_contents: true -api: {"description":"Transactions that involve two non-equivalent on & off-chain assets (such as USDC on Stellar and fiat EUR) must \nuse exchange rates that are communicated to the client application requesting the transaction. When clients make\nrequests to the Platform for these exchange rates, the Platform sends this request to the anchor to fetch it.\n\nRates can be [indicative](https://www.investopedia.com/terms/i/indicativequote.asp) or \n[firm](https://www.investopedia.com/terms/f/firmquote.asp). The anchor must provide an expiration if the client\nrequests a firm rate.\n\nAnchors can provide discounted rates specific client applications. The Platform includes the `client_id` parameter \nfor this reason.\n\nEither `sell_amount` or `buy_amount` will be included in requests as parameters, but never both. In the same way,\neither `sell_delivery_method` and `buy_delivery_method` may be included in requests, but never both, since either\n`sell_asset` or `buy_asset` is a Stellar asset.\n\nIn the future, we may add headers to the response that informs the Platform on whether or not it can cache the\nresponse returned, and if so, for how long.\n","tags":["Rates"],"operationId":"genRates","parameters":[{"in":"query","name":"type","description":"The type of rate requested. `firm` and `indicative_price` rates need to return a \"fee\" and \"total_price\" fields, while `indicative_prices` doesn't.","schema":{"type":"string","enum":["indicative_price","indicative_prices","firm"]},"required":true},{"in":"query","name":"context","description":"The context it will be used for. It is mandatory for the types `indicative_price` and `firm`.","schema":{"type":"string","enum":["sep6","sep31"]}},{"in":"query","name":"client_id","description":"An identifier for the client application making the request. This ID can be used to offer different fees to different clients.\n\nClient IDs will be the Stellar public key the public key used to authenticate via SEP-10. Anchors must ensure\nthat the public key specified in the request matches a public key known to belong to the sending anchor.\n\nThis parameter will only be specified if the client is authenticated via SEP-10. Anchors can define whether or not \nauthentication is required for fetching indicative rates. Firm rates always require authentication.\n","schema":{"type":"string"}},{"in":"query","name":"sell_asset","description":"The asset the client application will send to the anchor in exchange for `buy_asset` in \n[Asset Identification Format](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#asset-identification-format).\n","schema":{"type":"string"},"required":true},{"in":"query","name":"buy_asset","description":"The asset the that the anchor will send in exchange for `sell_asset` in \n[Asset Identification Format](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#asset-identification-format).\n","schema":{"type":"string"},"required":true},{"in":"query","name":"sell_amount","description":"The amount of `sell_asset` the client application will send in exchange for `buy_asset`. Will not be used in\nconjuction with `buy_amount`.\n","schema":{"type":"string"}},{"in":"query","name":"buy_amount","description":"The amount of `buy_asset` the anchor will send in exchange for `sell_asset`. Will not be used in conjuction\nwith `sell_amount`.\n","schema":{"type":"string"}},{"in":"query","name":"country_code","description":"The [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) code of the user's current address.\nAnchors should expect this parameter to be provided if one of the assets of the buy/sell pair is fiat and it \nis available in two or more countries.\n","schema":{"type":"string"}},{"in":"query","name":"expire_after","description":"The client's desired `expires_at` date and time for the quote that can be used if this is a firm quote. This should\nbe a [UTC ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) string. Anchors should return `400 Bad\nRequest` if an expiration date on or after the requested value cannot be provided.\n","schema":{"type":"string"}},{"in":"query","name":"sell_delivery_method","description":"The method the client or user will use to deliver `sell_asset` to the Anchor. This value may affect the \nexpiration and price provided. The values used for this parameter is defined in the application's configuration.\nWill not be used in conjuction with `buy_delivery_method`.\n","schema":{"type":"string"}},{"in":"query","name":"buy_delivery_method","description":"The method the client or user wants used to receive `buy_asset` from the Anchor. This value may affect the \nexpiration and price provided. The values used for this parameter is defined in the application's configuration.\nWill not be used in conjuction with `sell_delivery_method`.\n","schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"rate":{"type":"object","properties":{"id":{"type":"string","description":"Id of the firm quote. NOT USED when `type=indicative*`."},"expires_at":{"type":"string","format":"date-time","description":"Expirations are NOT USED when `type=indicative*`."},"price":{"type":"string","description":"The conversion price offered by the anchor for one unit of `buy_asset` in terms of `sell_asset`, without including fees. In traditional finance, `buy_asset` would be referred to as the base asset and `sell_asset` as the counter asset. The formula `sell_amount - fee = price * buy_amount` must hold true ([ref](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#price-formulas))."},"total_price":{"type":"string","description":"The total conversion price offered by the anchor for one unit of `buy_asset` in terms of `sell_asset`, including fees. In traditional finance, `buy_asset` would be referred to as the base asset and `sell_asset` as the counter asset. NOT USED when `type=indicative_prices`. The formula `sell_amount = total_price * buy_amount` must hold true ([ref](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#price-formulas))."},"sell_amount":{"type":"string","description":"The amount of `sell_asset` the anchor will exchange for `buy_asset`. It could be different from the `sell_amount` provided in the request, depending on how fees are applied by the Anchor."},"buy_amount":{"type":"string","description":"The amount of `buy_asset` the anchor will provide with `sell_asset`. It could be different from the `buy_amount` provided in the request, depending on how fees are applied by the Anchor."},"fee":{"type":"object","description":"Fees are NOT USED when `type=indicative_prices`.","properties":{"total":{"type":"string","description":"The total fee to be applied."},"asset":{"type":"string","description":"The asset the fee will be charged in. Must be represented in [Asset Identification Format](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#asset-identification-format)."},"details":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the fee, for example `ACH fee`, `Brazilian conciliation fee`, `Service fee`, etc."},"description":{"type":"string","description":"A text describing the fee."},"amount":{"type":"string","description":"The amount of asset applied. If `fee.details` is provided, `sum(fee.details.amount)` should be equals `fee.total`."}},"required":["name","amount"],"title":"RateFeeDetailResponse"}}},"required":["total","asset"],"title":"RateFeeResponse"}},"required":["price","sell_amount","buy_amount"]}},"title":"RateResponse"}}}},"422":{"description":"Unprocessable Entity. This status should be returned when the anchor understood the request but cannot \nreturn a success response.\nIn these cases, the Platform will respond to the client application's request with a `400 Bad Request` \nand include the error message provided by the anchor in the response body.\n","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}},"500":{"description":"Error. The Platform will respond to the client application with the same response code and body.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}}},"method":"get","path":"/rate","info":{"version":"2.0.0","description":"The Synchronous Callbacks API specification for the Stellar Anchor Platform project.\n\nThe Synchronous Callbacks API defines requests made by the Platform while it is processing a request from a client application. The \nanchor's responses to these requests affect the Platform responses to the client application.\n","title":"Synchronous Callbacks API"},"postman":{"name":"Retrieve Rates","description":{"content":"Transactions that involve two non-equivalent on & off-chain assets (such as USDC on Stellar and fiat EUR) must \nuse exchange rates that are communicated to the client application requesting the transaction. When clients make\nrequests to the Platform for these exchange rates, the Platform sends this request to the anchor to fetch it.\n\nRates can be [indicative](https://www.investopedia.com/terms/i/indicativequote.asp) or \n[firm](https://www.investopedia.com/terms/f/firmquote.asp). The anchor must provide an expiration if the client\nrequests a firm rate.\n\nAnchors can provide discounted rates specific client applications. The Platform includes the `client_id` parameter \nfor this reason.\n\nEither `sell_amount` or `buy_amount` will be included in requests as parameters, but never both. In the same way,\neither `sell_delivery_method` and `buy_delivery_method` may be included in requests, but never both, since either\n`sell_asset` or `buy_asset` is a Stellar asset.\n\nIn the future, we may add headers to the response that informs the Platform on whether or not it can cache the\nresponse returned, and if so, for how long.\n","type":"text/plain"},"url":{"path":["rate"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) The type of rate requested. `firm` and `indicative_price` rates need to return a \"fee\" and \"total_price\" fields, while `indicative_prices` doesn't.","type":"text/plain"},"key":"type","value":""},{"disabled":false,"description":{"content":"The context it will be used for. It is mandatory for the types `indicative_price` and `firm`.","type":"text/plain"},"key":"context","value":""},{"disabled":false,"description":{"content":"An identifier for the client application making the request. This ID can be used to offer different fees to different clients.\n\nClient IDs will be the Stellar public key the public key used to authenticate via SEP-10. Anchors must ensure\nthat the public key specified in the request matches a public key known to belong to the sending anchor.\n\nThis parameter will only be specified if the client is authenticated via SEP-10. Anchors can define whether or not \nauthentication is required for fetching indicative rates. Firm rates always require authentication.\n","type":"text/plain"},"key":"client_id","value":""},{"disabled":false,"description":{"content":"(Required) The asset the client application will send to the anchor in exchange for `buy_asset` in \n[Asset Identification Format](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#asset-identification-format).\n","type":"text/plain"},"key":"sell_asset","value":""},{"disabled":false,"description":{"content":"(Required) The asset the that the anchor will send in exchange for `sell_asset` in \n[Asset Identification Format](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#asset-identification-format).\n","type":"text/plain"},"key":"buy_asset","value":""},{"disabled":false,"description":{"content":"The amount of `sell_asset` the client application will send in exchange for `buy_asset`. Will not be used in\nconjuction with `buy_amount`.\n","type":"text/plain"},"key":"sell_amount","value":""},{"disabled":false,"description":{"content":"The amount of `buy_asset` the anchor will send in exchange for `sell_asset`. Will not be used in conjuction\nwith `sell_amount`.\n","type":"text/plain"},"key":"buy_amount","value":""},{"disabled":false,"description":{"content":"The [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) code of the user's current address.\nAnchors should expect this parameter to be provided if one of the assets of the buy/sell pair is fiat and it \nis available in two or more countries.\n","type":"text/plain"},"key":"country_code","value":""},{"disabled":false,"description":{"content":"The client's desired `expires_at` date and time for the quote that can be used if this is a firm quote. This should\nbe a [UTC ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) string. Anchors should return `400 Bad\nRequest` if an expiration date on or after the requested value cannot be provided.\n","type":"text/plain"},"key":"expire_after","value":""},{"disabled":false,"description":{"content":"The method the client or user will use to deliver `sell_asset` to the Anchor. This value may affect the \nexpiration and price provided. The values used for this parameter is defined in the application's configuration.\nWill not be used in conjuction with `buy_delivery_method`.\n","type":"text/plain"},"key":"sell_delivery_method","value":""},{"disabled":false,"description":{"content":"The method the client or user wants used to receive `buy_asset` from the Anchor. This value may affect the \nexpiration and price provided. The values used for this parameter is defined in the application's configuration.\nWill not be used in conjuction with `sell_delivery_method`.\n","type":"text/plain"},"key":"buy_delivery_method","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} +api: {"description":"Transactions that involve two non-equivalent on & off-chain assets (such as USDC on Stellar and fiat EUR) must \nuse exchange rates that are communicated to the client application requesting the transaction. When clients make\nrequests to the Platform for these exchange rates, the Platform sends this request to the anchor to fetch it.\n\nRates can be [indicative](https://www.investopedia.com/terms/i/indicativequote.asp) or \n[firm](https://www.investopedia.com/terms/f/firmquote.asp). The anchor must provide an expiration if the client\nrequests a firm rate.\n\nAnchors can provide discounted rates specific client applications. The Platform includes the `client_id` parameter \nfor this reason.\n\nEither `sell_amount` or `buy_amount` will be included in requests as parameters, but never both. In the same way,\neither `sell_delivery_method` and `buy_delivery_method` may be included in requests, but never both, since either\n`sell_asset` or `buy_asset` is a Stellar asset.\n\nIn the future, we may add headers to the response that informs the Platform on whether or not it can cache the\nresponse returned, and if so, for how long.\n","tags":["Rates"],"operationId":"getRates","parameters":[{"in":"query","name":"type","description":"The type of rate requested. `firm` and `indicative_price` rates need to return a \"fee\" and \"total_price\" fields, while `indicative_prices` doesn't.","schema":{"type":"string","enum":["indicative_price","indicative_prices","firm"]},"required":true},{"in":"query","name":"context","description":"The context it will be used for. It is mandatory for the types `indicative_price` and `firm`.","schema":{"type":"string","enum":["sep6","sep31"]}},{"in":"query","name":"client_id","description":"An identifier for the client application making the request. This ID can be used to offer different fees to different clients.\n\nClient IDs will be the Stellar public key the public key used to authenticate via SEP-10. Anchors must ensure\nthat the public key specified in the request matches a public key known to belong to the sending anchor.\n\nThis parameter will only be specified if the client is authenticated via SEP-10. Anchors can define whether or not \nauthentication is required for fetching indicative rates. Firm rates always require authentication.\n","schema":{"type":"string"}},{"in":"query","name":"sell_asset","description":"The asset the client application will send to the anchor in exchange for `buy_asset` in \n[Asset Identification Format](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#asset-identification-format).\n","schema":{"type":"string"},"required":true},{"in":"query","name":"buy_asset","description":"The asset the that the anchor will send in exchange for `sell_asset` in \n[Asset Identification Format](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#asset-identification-format).\n","schema":{"type":"string"},"required":true},{"in":"query","name":"sell_amount","description":"The amount of `sell_asset` the client application will send in exchange for `buy_asset`. Will not be used in\nconjuction with `buy_amount`.\n","schema":{"type":"string"}},{"in":"query","name":"buy_amount","description":"The amount of `buy_asset` the anchor will send in exchange for `sell_asset`. Will not be used in conjuction\nwith `sell_amount`.\n","schema":{"type":"string"}},{"in":"query","name":"country_code","description":"The [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) code of the user's current address.\nAnchors should expect this parameter to be provided if one of the assets of the buy/sell pair is fiat and it \nis available in two or more countries.\n","schema":{"type":"string"}},{"in":"query","name":"expire_after","description":"The client's desired `expires_at` date and time for the quote that can be used if this is a firm quote. This should\nbe a [UTC ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) string. Anchors should return `400 Bad\nRequest` if an expiration date on or after the requested value cannot be provided.\n","schema":{"type":"string"}},{"in":"query","name":"sell_delivery_method","description":"The method the client or user will use to deliver `sell_asset` to the Anchor. This value may affect the \nexpiration and price provided. The values used for this parameter is defined in the application's configuration.\nWill not be used in conjuction with `buy_delivery_method`.\n","schema":{"type":"string"}},{"in":"query","name":"buy_delivery_method","description":"The method the client or user wants used to receive `buy_asset` from the Anchor. This value may affect the \nexpiration and price provided. The values used for this parameter is defined in the application's configuration.\nWill not be used in conjuction with `sell_delivery_method`.\n","schema":{"type":"string"}}],"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"rate":{"type":"object","properties":{"id":{"type":"string","description":"Id of the firm quote. NOT USED when `type=indicative*`."},"expires_at":{"type":"string","format":"date-time","description":"Expirations are NOT USED when `type=indicative*`."},"price":{"type":"string","description":"The conversion price offered by the anchor for one unit of `buy_asset` in terms of `sell_asset`, without including fees. In traditional finance, `buy_asset` would be referred to as the base asset and `sell_asset` as the counter asset. The formula `sell_amount - fee = price * buy_amount` must hold true ([ref](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#price-formulas))."},"total_price":{"type":"string","description":"The total conversion price offered by the anchor for one unit of `buy_asset` in terms of `sell_asset`, including fees. In traditional finance, `buy_asset` would be referred to as the base asset and `sell_asset` as the counter asset. NOT USED when `type=indicative_prices`. The formula `sell_amount = total_price * buy_amount` must hold true ([ref](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#price-formulas))."},"sell_amount":{"type":"string","description":"The amount of `sell_asset` the anchor will exchange for `buy_asset`. It could be different from the `sell_amount` provided in the request, depending on how fees are applied by the Anchor."},"buy_amount":{"type":"string","description":"The amount of `buy_asset` the anchor will provide with `sell_asset`. It could be different from the `buy_amount` provided in the request, depending on how fees are applied by the Anchor."},"fee":{"type":"object","description":"Fees are NOT USED when `type=indicative_prices`.","properties":{"total":{"type":"string","description":"The total fee to be applied."},"asset":{"type":"string","description":"The asset the fee will be charged in. Must be represented in [Asset Identification Format](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#asset-identification-format)."},"details":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the fee, for example `ACH fee`, `Brazilian conciliation fee`, `Service fee`, etc."},"description":{"type":"string","description":"A text describing the fee."},"amount":{"type":"string","description":"The amount of asset applied. If `fee.details` is provided, `sum(fee.details.amount)` should be equals `fee.total`."}},"required":["name","amount"],"title":"RateFeeDetailResponse"}}},"required":["total","asset"],"title":"RateFeeResponse"}},"required":["price","sell_amount","buy_amount"]}},"title":"RateResponse"}}}},"422":{"description":"Unprocessable Entity. This status should be returned when the anchor understood the request but cannot \nreturn a success response.\nIn these cases, the Platform will respond to the client application's request with a `400 Bad Request` \nand include the error message provided by the anchor in the response body.\n","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}},"500":{"description":"Error. The Platform will respond to the client application with the same response code and body.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}}},"method":"get","path":"/rate","info":{"version":"2.0.0","description":"The Synchronous Callbacks API specification for the Stellar Anchor Platform project.\n\nThe Synchronous Callbacks API defines requests made by the Platform while it is processing a request from a client application. The \nanchor's responses to these requests affect the Platform responses to the client application.\n","title":"Synchronous Callbacks API"},"postman":{"name":"Retrieve Rates","description":{"content":"Transactions that involve two non-equivalent on & off-chain assets (such as USDC on Stellar and fiat EUR) must \nuse exchange rates that are communicated to the client application requesting the transaction. When clients make\nrequests to the Platform for these exchange rates, the Platform sends this request to the anchor to fetch it.\n\nRates can be [indicative](https://www.investopedia.com/terms/i/indicativequote.asp) or \n[firm](https://www.investopedia.com/terms/f/firmquote.asp). The anchor must provide an expiration if the client\nrequests a firm rate.\n\nAnchors can provide discounted rates specific client applications. The Platform includes the `client_id` parameter \nfor this reason.\n\nEither `sell_amount` or `buy_amount` will be included in requests as parameters, but never both. In the same way,\neither `sell_delivery_method` and `buy_delivery_method` may be included in requests, but never both, since either\n`sell_asset` or `buy_asset` is a Stellar asset.\n\nIn the future, we may add headers to the response that informs the Platform on whether or not it can cache the\nresponse returned, and if so, for how long.\n","type":"text/plain"},"url":{"path":["rate"],"host":["{{baseUrl}}"],"query":[{"disabled":false,"description":{"content":"(Required) The type of rate requested. `firm` and `indicative_price` rates need to return a \"fee\" and \"total_price\" fields, while `indicative_prices` doesn't.","type":"text/plain"},"key":"type","value":""},{"disabled":false,"description":{"content":"The context it will be used for. It is mandatory for the types `indicative_price` and `firm`.","type":"text/plain"},"key":"context","value":""},{"disabled":false,"description":{"content":"An identifier for the client application making the request. This ID can be used to offer different fees to different clients.\n\nClient IDs will be the Stellar public key the public key used to authenticate via SEP-10. Anchors must ensure\nthat the public key specified in the request matches a public key known to belong to the sending anchor.\n\nThis parameter will only be specified if the client is authenticated via SEP-10. Anchors can define whether or not \nauthentication is required for fetching indicative rates. Firm rates always require authentication.\n","type":"text/plain"},"key":"client_id","value":""},{"disabled":false,"description":{"content":"(Required) The asset the client application will send to the anchor in exchange for `buy_asset` in \n[Asset Identification Format](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#asset-identification-format).\n","type":"text/plain"},"key":"sell_asset","value":""},{"disabled":false,"description":{"content":"(Required) The asset the that the anchor will send in exchange for `sell_asset` in \n[Asset Identification Format](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md#asset-identification-format).\n","type":"text/plain"},"key":"buy_asset","value":""},{"disabled":false,"description":{"content":"The amount of `sell_asset` the client application will send in exchange for `buy_asset`. Will not be used in\nconjuction with `buy_amount`.\n","type":"text/plain"},"key":"sell_amount","value":""},{"disabled":false,"description":{"content":"The amount of `buy_asset` the anchor will send in exchange for `sell_asset`. Will not be used in conjuction\nwith `sell_amount`.\n","type":"text/plain"},"key":"buy_amount","value":""},{"disabled":false,"description":{"content":"The [ISO 3166-1 alpha-3](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3) code of the user's current address.\nAnchors should expect this parameter to be provided if one of the assets of the buy/sell pair is fiat and it \nis available in two or more countries.\n","type":"text/plain"},"key":"country_code","value":""},{"disabled":false,"description":{"content":"The client's desired `expires_at` date and time for the quote that can be used if this is a firm quote. This should\nbe a [UTC ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) string. Anchors should return `400 Bad\nRequest` if an expiration date on or after the requested value cannot be provided.\n","type":"text/plain"},"key":"expire_after","value":""},{"disabled":false,"description":{"content":"The method the client or user will use to deliver `sell_asset` to the Anchor. This value may affect the \nexpiration and price provided. The values used for this parameter is defined in the application's configuration.\nWill not be used in conjuction with `buy_delivery_method`.\n","type":"text/plain"},"key":"sell_delivery_method","value":""},{"disabled":false,"description":{"content":"The method the client or user wants used to receive `buy_asset` from the Anchor. This value may affect the \nexpiration and price provided. The values used for this parameter is defined in the application's configuration.\nWill not be used in conjuction with `sell_delivery_method`.\n","type":"text/plain"},"key":"buy_delivery_method","value":""}],"variable":[]},"header":[{"key":"Accept","value":"application/json"}],"method":"GET"}} sidebar_class_name: "get api-method" info_path: api/callbacks/synchronous-callbacks-api custom_edit_url: null @@ -51,7 +51,7 @@ Success. Fees are NOT USED when `type=indicative_prices`. -
details object[]
  • Array [
  • ]
  • +
    details object[]
  • Array [
  • ]
  • Unprocessable Entity. This status should be returned when the anchor understood the request but cannot return a success response. diff --git a/ap_api/callbacks/put-customer-callback.api.mdx b/ap_api/callbacks/put-customer-callback.api.mdx deleted file mode 100644 index 6e4ed2910..000000000 --- a/ap_api/callbacks/put-customer-callback.api.mdx +++ /dev/null @@ -1,55 +0,0 @@ ---- -id: put-customer-callback -title: "Create or Update Callback Url" -description: "The request for this endpoint is identical to the `PUT /customer/callback` request defined in SEP-12." -sidebar_label: "Create or Update Callback Url" -hide_title: true -hide_table_of_contents: true -api: {"tags":["Customers"],"description":"The request for this endpoint is identical to the `PUT /customer/callback` request defined in SEP-12.\n\nAllows the wallet to provide a callback URL to the anchor. The provided callback URL will replace (and supercede)\nany previously-set callback URL for this customer.\n\nWhenever the customer's `status` changes, the anchor must make a POST request to the callback URL. The payload \nof the POST request will be the same as the response of SEP-12's `GET /customer`. **The Anchor Platform does not \nmake these callback requests to clients**.\n\nIt's the wallet's responsibility to send a working callback URL to the anchor.\n\nAnchors will make POST requests until the customer's status changes to ACCEPTED or REJECTED. If a wallet needs \nto watch a user's KYC status after that, it will need to set a callback again.\n","operationId":"putCustomerCallback","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"The ID of the customer as returned in the response of a previous PUT request.","type":"string"},"account":{"description":"The Stellar or Muxed Account authenticated with the Platform via SEP-10.","type":"string"},"memo":{"description":"The memo value identifying a customer with a shared account, where the shared account is `account`.","type":"string"},"memo_type":{"description":"The type of memo used to identify a customer with a shared account.","type":"string","enum":["id","hash","text"]},"url":{"description":"A callback URL that the SEP-12 server will POST to when the status of the customer changes.","type":"string"}},"title":"PutCustomerCallbackRequest"}}}},"responses":{"204":{"description":"Success"},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}},"404":{"description":"Customer not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}}},"method":"put","path":"/customer/callback","jsonRequestBodyExample":{"id":"string","account":"string","memo":"string","memo_type":"id","url":"string"},"info":{"version":"2.0.0","description":"The Synchronous Callbacks API specification for the Stellar Anchor Platform project.\n\nThe Synchronous Callbacks API defines requests made by the Platform while it is processing a request from a client application. The \nanchor's responses to these requests affect the Platform responses to the client application.\n","title":"Synchronous Callbacks API"},"postman":{"name":"Create or Update Callback Url","description":{"content":"The request for this endpoint is identical to the `PUT /customer/callback` request defined in SEP-12.\n\nAllows the wallet to provide a callback URL to the anchor. The provided callback URL will replace (and supercede)\nany previously-set callback URL for this customer.\n\nWhenever the customer's `status` changes, the anchor must make a POST request to the callback URL. The payload \nof the POST request will be the same as the response of SEP-12's `GET /customer`. **The Anchor Platform does not \nmake these callback requests to clients**.\n\nIt's the wallet's responsibility to send a working callback URL to the anchor.\n\nAnchors will make POST requests until the customer's status changes to ACCEPTED or REJECTED. If a wallet needs \nto watch a user's KYC status after that, it will need to set a callback again.\n","type":"text/plain"},"url":{"path":["customer","callback"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} -sidebar_class_name: "put api-method" -info_path: api/callbacks/synchronous-callbacks-api -custom_edit_url: null ---- - -import ApiTabs from "@theme/ApiTabs"; -import MimeTabs from "@theme/MimeTabs"; -import ParamsItem from "@theme/ParamsItem"; -import ResponseSamples from "@theme/ResponseSamples"; -import SchemaItem from "@theme/SchemaItem"; -import SchemaTabs from "@theme/SchemaTabs"; -import DiscriminatorTabs from "@theme/DiscriminatorTabs"; -import TabItem from "@theme/TabItem"; - -## Create or Update Callback Url - - - -The request for this endpoint is identical to the `PUT /customer/callback` request defined in SEP-12. - -Allows the wallet to provide a callback URL to the anchor. The provided callback URL will replace (and supercede) -any previously-set callback URL for this customer. - -Whenever the customer's `status` changes, the anchor must make a POST request to the callback URL. The payload -of the POST request will be the same as the response of SEP-12's `GET /customer`. **The Anchor Platform does not -make these callback requests to clients**. - -It's the wallet's responsibility to send a working callback URL to the anchor. - -Anchors will make POST requests until the customer's status changes to ACCEPTED or REJECTED. If a wallet needs -to watch a user's KYC status after that, it will need to set a callback again. - - -
    Request Body
    - -Success - -
    - -Invalid request. - -
    Schema
    - -Customer not found. - -
    Schema
    - \ No newline at end of file diff --git a/ap_api/callbacks/put-customer.api.mdx b/ap_api/callbacks/put-customer.api.mdx index a43687047..ef335af74 100644 --- a/ap_api/callbacks/put-customer.api.mdx +++ b/ap_api/callbacks/put-customer.api.mdx @@ -5,7 +5,7 @@ description: "**The Anchor Platform does not persist any customer KYC data.**" sidebar_label: "Create or Update Customer info" hide_title: true hide_table_of_contents: true -api: {"tags":["Customers"],"description":"**The Anchor Platform does not persist any customer KYC data.**\n\nThe request and response for this endpoint are identical to the `PUT /customer` request and response defined in SEP-12.\n\nClient applications make requests with the following request body, which is forwarded to the anchor. Anchors \nmust validate and persist the data passed, and return the customer's `id`.\n","operationId":"putCustomer","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"The ID of the customer as returned in the response of a previous PUT request.","type":"string"},"account":{"description":"The Stellar or Muxed Account authenticated with the Platform via SEP-10.","type":"string"},"memo":{"description":"The memo value identifying a customer with a shared account, where the shared account is `account`.","type":"string"},"memo_type":{"description":"The type of memo used to identify a customer with a shared account.","type":"string","enum":["id","hash","text"]},"type":{"description":"The type of action the customer is being KYCd for. See the \n[Type Specification](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#type-specification) \ndocumented in SEP-12.\n","type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"additional_name":{"type":"string"},"address_country_code":{"type":"string"},"state_or_province":{"type":"string"},"city":{"type":"string"},"postal_code":{"type":"string"},"address":{"type":"string"},"mobile_number":{"type":"string"},"email_address":{"type":"string"},"birth_date":{"type":"string","format":"date"},"birth_place":{"type":"string"},"birth_country_code":{"type":"string"},"bank_account_number":{"type":"string"},"bank_account_type":{"type":"string"},"bank_number":{"type":"string"},"bank_phone_number":{"type":"string"},"bank_branch_number":{"type":"string"},"tax_id":{"type":"string"},"tax_id_name":{"type":"string"},"occupation":{"type":"string"},"employer_name":{"type":"string"},"employer_address":{"type":"string"},"language_code":{"type":"string"},"id_type":{"type":"string"},"id_country_code":{"type":"string"},"id_issue_date":{"type":"string","format":"date"},"id_expiration_date":{"type":"string","format":"date"},"id_number":{"type":"string"},"ip_address":{"type":"string"},"sex":{"type":"string"}},"title":"PutCustomerRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"title":"PutCustomerResponse"}}}},"400":{"description":"Invalid data.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}},"404":{"description":"Not Found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}}},"method":"put","path":"/customer","jsonRequestBodyExample":{"id":"string","account":"string","memo":"string","memo_type":"id","type":"string","first_name":"string","last_name":"string","additional_name":"string","address_country_code":"string","state_or_province":"string","city":"string","postal_code":"string","address":"string","mobile_number":"string","email_address":"string","birth_date":"2023-04-21","birth_place":"string","birth_country_code":"string","bank_account_number":"string","bank_account_type":"string","bank_number":"string","bank_phone_number":"string","bank_branch_number":"string","tax_id":"string","tax_id_name":"string","occupation":"string","employer_name":"string","employer_address":"string","language_code":"string","id_type":"string","id_country_code":"string","id_issue_date":"2023-04-21","id_expiration_date":"2023-04-21","id_number":"string","ip_address":"string","sex":"string"},"info":{"version":"2.0.0","description":"The Synchronous Callbacks API specification for the Stellar Anchor Platform project.\n\nThe Synchronous Callbacks API defines requests made by the Platform while it is processing a request from a client application. The \nanchor's responses to these requests affect the Platform responses to the client application.\n","title":"Synchronous Callbacks API"},"postman":{"name":"Create or Update Customer info","description":{"content":"**The Anchor Platform does not persist any customer KYC data.**\n\nThe request and response for this endpoint are identical to the `PUT /customer` request and response defined in SEP-12.\n\nClient applications make requests with the following request body, which is forwarded to the anchor. Anchors \nmust validate and persist the data passed, and return the customer's `id`.\n","type":"text/plain"},"url":{"path":["customer"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +api: {"tags":["Customers"],"description":"**The Anchor Platform does not persist any customer KYC data.**\n\nThe request and response for this endpoint are identical to the \n[`PUT /customer`](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-put) \nrequest and response defined in SEP-12.\n\nClient applications make requests with the following request body, which is forwarded to the anchor. Anchors \nmust validate and persist the data passed, and return the customer's `id`.\n","operationId":"putCustomer","requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"description":"The ID of the customer as returned in the response of a previous PUT request.","type":"string"},"account":{"description":"The Stellar or Muxed Account authenticated with the Platform via SEP-10.","type":"string"},"memo":{"description":"The memo value identifying a customer with a shared account, where the shared account is `account`.","type":"string"},"memo_type":{"description":"The type of memo used to identify a customer with a shared account.","type":"string","enum":["id","hash","text"]},"type":{"description":"The type of action the customer is being KYCd for. See the \n[Type Specification](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#type-specification) \ndocumented in SEP-12.\n","type":"string"},"first_name":{"type":"string"},"last_name":{"type":"string"},"additional_name":{"type":"string"},"address_country_code":{"type":"string"},"state_or_province":{"type":"string"},"city":{"type":"string"},"postal_code":{"type":"string"},"address":{"type":"string"},"mobile_number":{"type":"string"},"email_address":{"type":"string"},"birth_date":{"type":"string","format":"date"},"birth_place":{"type":"string"},"birth_country_code":{"type":"string"},"bank_account_number":{"type":"string"},"bank_account_type":{"type":"string"},"bank_number":{"type":"string"},"bank_phone_number":{"type":"string"},"bank_branch_number":{"type":"string"},"tax_id":{"type":"string"},"tax_id_name":{"type":"string"},"occupation":{"type":"string"},"employer_name":{"type":"string"},"employer_address":{"type":"string"},"language_code":{"type":"string"},"id_type":{"type":"string"},"id_country_code":{"type":"string"},"id_issue_date":{"type":"string","format":"date"},"id_expiration_date":{"type":"string","format":"date"},"id_number":{"type":"string"},"ip_address":{"type":"string"},"sex":{"type":"string"}},"title":"PutCustomerRequest"}}}},"responses":{"200":{"description":"Success.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"}},"title":"PutCustomerResponse"}}}},"400":{"description":"Invalid data.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}},"404":{"description":"Not Found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string"}},"required":["error"],"title":"Error"}}}}},"method":"put","path":"/customer","jsonRequestBodyExample":{"id":"string","account":"string","memo":"string","memo_type":"id","type":"string","first_name":"string","last_name":"string","additional_name":"string","address_country_code":"string","state_or_province":"string","city":"string","postal_code":"string","address":"string","mobile_number":"string","email_address":"string","birth_date":"2023-04-24","birth_place":"string","birth_country_code":"string","bank_account_number":"string","bank_account_type":"string","bank_number":"string","bank_phone_number":"string","bank_branch_number":"string","tax_id":"string","tax_id_name":"string","occupation":"string","employer_name":"string","employer_address":"string","language_code":"string","id_type":"string","id_country_code":"string","id_issue_date":"2023-04-24","id_expiration_date":"2023-04-24","id_number":"string","ip_address":"string","sex":"string"},"info":{"version":"2.0.0","description":"The Synchronous Callbacks API specification for the Stellar Anchor Platform project.\n\nThe Synchronous Callbacks API defines requests made by the Platform while it is processing a request from a client application. The \nanchor's responses to these requests affect the Platform responses to the client application.\n","title":"Synchronous Callbacks API"},"postman":{"name":"Create or Update Customer info","description":{"content":"**The Anchor Platform does not persist any customer KYC data.**\n\nThe request and response for this endpoint are identical to the \n[`PUT /customer`](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-put) \nrequest and response defined in SEP-12.\n\nClient applications make requests with the following request body, which is forwarded to the anchor. Anchors \nmust validate and persist the data passed, and return the customer's `id`.\n","type":"text/plain"},"url":{"path":["customer"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PUT","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "put api-method" info_path: api/callbacks/synchronous-callbacks-api custom_edit_url: null @@ -26,7 +26,9 @@ import TabItem from "@theme/TabItem"; **The Anchor Platform does not persist any customer KYC data.** -The request and response for this endpoint are identical to the `PUT /customer` request and response defined in SEP-12. +The request and response for this endpoint are identical to the +[`PUT /customer`](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-put) +request and response defined in SEP-12. Client applications make requests with the following request body, which is forwarded to the anchor. Anchors must validate and persist the data passed, and return the customer's `id`. diff --git a/ap_api/callbacks/rate/index.mdx b/ap_api/callbacks/rate/index.mdx index 4bf15259e..26d9052d4 100644 --- a/ap_api/callbacks/rate/index.mdx +++ b/ap_api/callbacks/rate/index.mdx @@ -5,13 +5,13 @@ order: 0 import {EndpointsTable} from "@site/src/components/EndpointsTable"; +Rates endpoint is used to fetch the latest quote for the user request. After the quote is known, the Anchor Platform will forward it to the user in the SEP format. + | | | | --- | --------------------- | -| GET | [/fee](../get-fee.api.mdx) | +| GET | [/rate](../get-rates.api.mdx) | - -[sep-38]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md \ No newline at end of file diff --git a/ap_api/callbacks/sidebar.js b/ap_api/callbacks/sidebar.js index 8b576c24f..66b818f12 100644 --- a/ap_api/callbacks/sidebar.js +++ b/ap_api/callbacks/sidebar.js @@ -1 +1 @@ -module.exports = [{"type":"doc","id":"callbacks/synchronous-callbacks-api"},{"type":"category","label":"Unique Address","link":{"type":"generated-index","title":"Unique Address","slug":"/category/callbacks/unique-address"},"items":[{"type":"doc","id":"callbacks/gen-address","label":"Generate Unique Address","className":"api-method get"}]},{"type":"category","label":"Fees","link":{"type":"generated-index","title":"Fees","slug":"/category/callbacks/fees"},"items":[{"type":"doc","id":"callbacks/get-fee","label":"Retrieve Fees","className":"api-method get"}]},{"type":"category","label":"Rates","link":{"type":"generated-index","title":"Rates","slug":"/category/callbacks/rates"},"items":[{"type":"doc","id":"callbacks/gen-rates","label":"Retrieve Rates","className":"api-method get"}]},{"type":"category","label":"Customers","link":{"type":"generated-index","title":"Customers","slug":"/category/callbacks/customers"},"items":[{"type":"doc","id":"callbacks/get-customer","label":"Retrieve Customer's Info","className":"api-method get"},{"type":"doc","id":"callbacks/put-customer","label":"Create or Update Customer info","className":"api-method put"},{"type":"doc","id":"callbacks/put-customer-callback","label":"Create or Update Callback Url","className":"api-method put"},{"type":"doc","id":"callbacks/del-customer","label":"Delete Customer Data","className":"api-method delete"}]}]; \ No newline at end of file +module.exports = [{"type":"doc","id":"callbacks/synchronous-callbacks-api"},{"type":"category","label":"Unique Address","link":{"type":"generated-index","title":"Unique Address","slug":"/category/callbacks/unique-address"},"items":[{"type":"doc","id":"callbacks/gen-address","label":"Generate Unique Address","className":"api-method get"}]},{"type":"category","label":"Fees","link":{"type":"generated-index","title":"Fees","slug":"/category/callbacks/fees"},"items":[{"type":"doc","id":"callbacks/get-fee","label":"Retrieve Fees","className":"api-method get"}]},{"type":"category","label":"Rates","link":{"type":"generated-index","title":"Rates","slug":"/category/callbacks/rates"},"items":[{"type":"doc","id":"callbacks/get-rates","label":"Retrieve Rates","className":"api-method get"}]},{"type":"category","label":"Customers","link":{"type":"generated-index","title":"Customers","slug":"/category/callbacks/customers"},"items":[{"type":"doc","id":"callbacks/get-customer","label":"Retrieve Customer's Info","className":"api-method get"},{"type":"doc","id":"callbacks/put-customer","label":"Create or Update Customer info","className":"api-method put"},{"type":"doc","id":"callbacks/del-customer","label":"Delete Customer Data","className":"api-method delete"}]}]; \ No newline at end of file diff --git a/ap_api/callbacks/unique-address/index.mdx b/ap_api/callbacks/unique-address/index.mdx index 93fea4ff1..ab18b6ecb 100644 --- a/ap_api/callbacks/unique-address/index.mdx +++ b/ap_api/callbacks/unique-address/index.mdx @@ -5,6 +5,13 @@ order: 0 import {EndpointsTable} from "@site/src/components/EndpointsTable"; + +Unique Address is a unique Stellar address + memo pair that is assigned to a new [SEP-31] transaction. + +When creating SEP-31 transaction, a destination address/memo pair is generated automatically by the Anchor Platform. When monitoring Stellar chain (e.g. via Payment Observer), this unique address is used to map on-chain transfers to the SEP transaction. + +In addition, it's possible to define your own address generator (e.g. you can delegate it to your custodial service). This callback is used to generate such addresses. + | | | @@ -14,4 +21,4 @@ import {EndpointsTable} from "@site/src/components/EndpointsTable"; -[sep-38]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0038.md \ No newline at end of file +[sep-31]: https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0031.md \ No newline at end of file diff --git a/ap_api/resources/get-quote.api.mdx b/ap_api/resources/get-quote.api.mdx index 90656a1b2..2c51a1e06 100644 --- a/ap_api/resources/get-quote.api.mdx +++ b/ap_api/resources/get-quote.api.mdx @@ -39,7 +39,7 @@ For a SEP-12 customer, the `id` field should be sufficient to fully identify the For a SEP-31 Sending Anchor, the `account` field should be used. -
    +
    Not Found. diff --git a/ap_api/resources/get-quotes.api.mdx b/ap_api/resources/get-quotes.api.mdx index 5fdc5f163..e76a6f458 100644 --- a/ap_api/resources/get-quotes.api.mdx +++ b/ap_api/resources/get-quotes.api.mdx @@ -39,7 +39,7 @@ For a SEP-12 customer, the `id` field should be sufficient to fully identify the For a SEP-31 Sending Anchor, the `account` field should be used. -
  • ]
  • +
  • ]
  • Bad Request diff --git a/ap_api/resources/get-transaction.api.mdx b/ap_api/resources/get-transaction.api.mdx index b45d4f457..ac4eb76fe 100644 --- a/ap_api/resources/get-transaction.api.mdx +++ b/ap_api/resources/get-transaction.api.mdx @@ -63,7 +63,7 @@ For a SEP-12 customer, the `id` field should be sufficient to fully identify the For a SEP-31 Sending Anchor, the `account` field should be used. -
    +
    Bad Request diff --git a/ap_api/resources/patch-transactions.api.mdx b/ap_api/resources/patch-transactions.api.mdx index b8a9dfa21..2fa649fdc 100644 --- a/ap_api/resources/patch-transactions.api.mdx +++ b/ap_api/resources/patch-transactions.api.mdx @@ -5,7 +5,7 @@ description: "Accepts one or more objects containing updated information on tran sidebar_label: "Accept updated information on transactions" hide_title: true hide_table_of_contents: true -api: {"tags":["Transactions"],"operationId":"patchTransactions","description":"Accepts one or more objects containing updated information on transactions. Note that requests containing invalid data for any transaction will result in a 400 Bad Request and no transactions will be updated. Importantly, this operation is NOT atomic. If one update fails, all previous updates would be applied, all subsequent updates would be discarded, and an error would be raised. Note that this endpoint accepts a subset of transaction information defined in the `MutableTransaction` schema.","responses":{"200":{"description":"Transaction(s) updated.","content":{"application/json":{"schema":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sep":{"type":"string","enum":["24","31","38"]},"kind":{"type":"string","enum":["deposit","withdrawal","receive"]},"status":{"type":"string","enum":["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","pending_sender","pending_receiver","pending_transaction_info_update","pending_customer_info_update"]},"amount_expected":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_in":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_out":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"kyc_verified":{"type":"boolean"},"quote_id":{"type":"string"},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"transfer_received_at":{"type":"string","format":"date-time"},"message":{"type":"string"},"refunds":{"type":"object","properties":{"amount_refunded":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"id_type":{"type":"string","enum":["stellar","external"]},"amount":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"requested_at":{"type":"string","format":"date-time"},"refunded_at":{"type":"string","format":"date-time"}}}}},"title":"Refunds"},"stellar_transactions":{"type":"array","items":{"type":"object","required":["id","created_at","envelope","payments"],"properties":{"id":{"type":"string","description":"The ID of the transaction in the Stellar network."},"memo":{"type":"string","description":"The memo of the transaction in the Stellar network."},"memo_type":{"type":"string","description":"The memo type of the transaction in the Stellar network. Should be present if memo is not null.","enum":["text","hash","id"]},"created_at":{"type":"string","format":"date-time","description":"The time the transaction was registered in the Stellar network."},"envelope":{"type":"string","description":"The transaction envelope, containing all the transaction information."},"payments":{"type":"array","items":{"type":"object","required":["id","payment_type","source_account","destination_account","amount"],"properties":{"id":{"type":"string","description":"The ID of the payment in the Stellar Network."},"payment_type":{"type":"string","description":"The type of payment in the Stellar Network.","enum":["payment","path_payment"],"default":"payment"},"source_account":{"type":"string","description":"The account being debited in the Stellar Network."},"destination_account":{"type":"string","description":"The account being credited in the Stellar Network."},"amount":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"}}}}},"title":"StellarTransaction"}},"source_account":{"type":"string"},"destination_account":{"type":"string"},"external_transaction_id":{"type":"string"},"custodial_transaction_id":{"type":"string"},"memo":{"type":"string"},"memo_type":{"type":"string"},"customers":{"type":"object","description":"The Identification info of the sending and receiving customers. If they were created through [SEP-12](https://stellar.org/protocol/sep-12),\nthis object should contain the SEP-12 customer `id`. Otherwise, the `account` address of the customer.\n","properties":{"sender":{"type":"object","description":"StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.\n\nFor a SEP-12 customer, the `id` field should be sufficient to fully identify the customer in the business' Backend.\n\nFor a SEP-31 Sending Anchor, the `account` field should be used.\n","properties":{"id":{"type":"string","description":"The `id` of the customer registered through SEP-12."},"account":{"type":"string","description":"Either the Stellar account or Muxed account address of the on-chain entity."}},"title":"StellarId"},"receiver":{"type":"object","description":"StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.\n\nFor a SEP-12 customer, the `id` field should be sufficient to fully identify the customer in the business' Backend.\n\nFor a SEP-31 Sending Anchor, the `account` field should be used.\n","properties":{"id":{"type":"string","description":"The `id` of the customer registered through SEP-12."},"account":{"type":"string","description":"Either the Stellar account or Muxed account address of the on-chain entity."}},"title":"StellarId"}}},"creator":{"type":"object","description":"StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.\n\nFor a SEP-12 customer, the `id` field should be sufficient to fully identify the customer in the business' Backend.\n\nFor a SEP-31 Sending Anchor, the `account` field should be used.\n","properties":{"id":{"type":"string","description":"The `id` of the customer registered through SEP-12."},"account":{"type":"string","description":"Either the Stellar account or Muxed account address of the on-chain entity."}},"title":"StellarId"}},"title":"MutableTransaction"}}}}}}},"400":{"description":"Invalid request body. The error returned pertains to the transaction first determined to be invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string","description":"The `id` of the transaction first determined to be invalid."}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"transaction":{"type":"object","properties":{"id":{"type":"string"},"sep":{"type":"string","enum":["24","31","38"]},"kind":{"type":"string","enum":["deposit","withdrawal","receive"]},"status":{"type":"string","enum":["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","pending_sender","pending_receiver","pending_transaction_info_update","pending_customer_info_update"]},"amount_expected":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_in":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_out":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"kyc_verified":{"type":"boolean"},"quote_id":{"type":"string"},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"transfer_received_at":{"type":"string","format":"date-time"},"message":{"type":"string"},"refunds":{"type":"object","properties":{"amount_refunded":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"id_type":{"type":"string","enum":["stellar","external"]},"amount":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"requested_at":{"type":"string","format":"date-time"},"refunded_at":{"type":"string","format":"date-time"}}}}},"title":"Refunds"},"stellar_transactions":{"type":"array","items":{"type":"object","required":["id","created_at","envelope","payments"],"properties":{"id":{"type":"string","description":"The ID of the transaction in the Stellar network."},"memo":{"type":"string","description":"The memo of the transaction in the Stellar network."},"memo_type":{"type":"string","description":"The memo type of the transaction in the Stellar network. Should be present if memo is not null.","enum":["text","hash","id"]},"created_at":{"type":"string","format":"date-time","description":"The time the transaction was registered in the Stellar network."},"envelope":{"type":"string","description":"The transaction envelope, containing all the transaction information."},"payments":{"type":"array","items":{"type":"object","required":["id","payment_type","source_account","destination_account","amount"],"properties":{"id":{"type":"string","description":"The ID of the payment in the Stellar Network."},"payment_type":{"type":"string","description":"The type of payment in the Stellar Network.","enum":["payment","path_payment"],"default":"payment"},"source_account":{"type":"string","description":"The account being debited in the Stellar Network."},"destination_account":{"type":"string","description":"The account being credited in the Stellar Network."},"amount":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"}}}}},"title":"StellarTransaction"}},"source_account":{"type":"string"},"destination_account":{"type":"string"},"external_transaction_id":{"type":"string"},"custodial_transaction_id":{"type":"string"},"memo":{"type":"string"},"memo_type":{"type":"string"},"customers":{"type":"object","description":"The Identification info of the sending and receiving customers. If they were created through [SEP-12](https://stellar.org/protocol/sep-12),\nthis object should contain the SEP-12 customer `id`. Otherwise, the `account` address of the customer.\n","properties":{"sender":{"type":"object","description":"StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.\n\nFor a SEP-12 customer, the `id` field should be sufficient to fully identify the customer in the business' Backend.\n\nFor a SEP-31 Sending Anchor, the `account` field should be used.\n","properties":{"id":{"type":"string","description":"The `id` of the customer registered through SEP-12."},"account":{"type":"string","description":"Either the Stellar account or Muxed account address of the on-chain entity."}},"title":"StellarId"},"receiver":{"type":"object","description":"StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.\n\nFor a SEP-12 customer, the `id` field should be sufficient to fully identify the customer in the business' Backend.\n\nFor a SEP-31 Sending Anchor, the `account` field should be used.\n","properties":{"id":{"type":"string","description":"The `id` of the customer registered through SEP-12."},"account":{"type":"string","description":"Either the Stellar account or Muxed account address of the on-chain entity."}},"title":"StellarId"}}},"creator":{"type":"object","description":"StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.\n\nFor a SEP-12 customer, the `id` field should be sufficient to fully identify the customer in the business' Backend.\n\nFor a SEP-31 Sending Anchor, the `account` field should be used.\n","properties":{"id":{"type":"string","description":"The `id` of the customer registered through SEP-12."},"account":{"type":"string","description":"Either the Stellar account or Muxed account address of the on-chain entity."}},"title":"StellarId"}},"title":"MutableTransaction"}},"title":"PatchTransactionRequest"}}}}}}},"method":"patch","path":"/transactions","jsonRequestBodyExample":{"records":[{"transaction":{"id":"string","sep":"24","kind":"deposit","status":"incomplete","amount_expected":{"amount":"string","asset":"string"},"amount_in":{"amount":"string","asset":"string"},"amount_out":{"amount":"string","asset":"string"},"amount_fee":{"amount":"string","asset":"string"},"kyc_verified":true,"quote_id":"string","started_at":"2023-04-21T19:52:21.470Z","updated_at":"2023-04-21T19:52:21.470Z","completed_at":"2023-04-21T19:52:21.470Z","transfer_received_at":"2023-04-21T19:52:21.470Z","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":"2023-04-21T19:52:21.470Z","refunded_at":"2023-04-21T19:52:21.470Z"}]},"stellar_transactions":[{"id":"string","memo":"string","memo_type":"text","created_at":"2023-04-21T19:52:21.470Z","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","custodial_transaction_id":"string","memo":"string","memo_type":"string","customers":{"sender":{"id":"string","account":"string"},"receiver":{"id":"string","account":"string"}},"creator":{"id":"string","account":"string"}}}]},"info":{"version":"2.0.0","title":"Platform API"},"postman":{"name":"Accept updated information on transactions","description":{"content":"Accepts one or more objects containing updated information on transactions. Note that requests containing invalid data for any transaction will result in a 400 Bad Request and no transactions will be updated. Importantly, this operation is NOT atomic. If one update fails, all previous updates would be applied, all subsequent updates would be discarded, and an error would be raised. Note that this endpoint accepts a subset of transaction information defined in the `MutableTransaction` schema.","type":"text/plain"},"url":{"path":["transactions"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PATCH","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} +api: {"tags":["Transactions"],"operationId":"patchTransactions","description":"Accepts one or more objects containing updated information on transactions. Note that requests containing invalid data for any transaction will result in a 400 Bad Request and no transactions will be updated. Importantly, this operation is NOT atomic. If one update fails, all previous updates would be applied, all subsequent updates would be discarded, and an error would be raised. Note that this endpoint accepts a subset of transaction information defined in the `MutableTransaction` schema.","responses":{"200":{"description":"Transaction(s) updated.","content":{"application/json":{"schema":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"sep":{"type":"string","enum":["24","31","38"]},"kind":{"type":"string","enum":["deposit","withdrawal","receive"]},"status":{"type":"string","enum":["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","pending_sender","pending_receiver","pending_transaction_info_update","pending_customer_info_update"]},"amount_expected":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_in":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_out":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"kyc_verified":{"type":"boolean"},"quote_id":{"type":"string"},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"transfer_received_at":{"type":"string","format":"date-time"},"message":{"type":"string"},"refunds":{"type":"object","properties":{"amount_refunded":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"id_type":{"type":"string","enum":["stellar","external"]},"amount":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"requested_at":{"type":"string","format":"date-time"},"refunded_at":{"type":"string","format":"date-time"}}}}},"title":"Refunds"},"stellar_transactions":{"type":"array","items":{"type":"object","required":["id","created_at","envelope","payments"],"properties":{"id":{"type":"string","description":"The ID of the transaction in the Stellar network."},"memo":{"type":"string","description":"The memo of the transaction in the Stellar network."},"memo_type":{"type":"string","description":"The memo type of the transaction in the Stellar network. Should be present if memo is not null.","enum":["text","hash","id"]},"created_at":{"type":"string","format":"date-time","description":"The time the transaction was registered in the Stellar network."},"envelope":{"type":"string","description":"The transaction envelope, containing all the transaction information."},"payments":{"type":"array","items":{"type":"object","required":["id","payment_type","source_account","destination_account","amount"],"properties":{"id":{"type":"string","description":"The ID of the payment in the Stellar Network."},"payment_type":{"type":"string","description":"The type of payment in the Stellar Network.","enum":["payment","path_payment"],"default":"payment"},"source_account":{"type":"string","description":"The account being debited in the Stellar Network."},"destination_account":{"type":"string","description":"The account being credited in the Stellar Network."},"amount":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"}}}}},"title":"StellarTransaction"}},"source_account":{"type":"string"},"destination_account":{"type":"string"},"external_transaction_id":{"type":"string"},"custodial_transaction_id":{"type":"string"},"memo":{"type":"string"},"memo_type":{"type":"string"},"customers":{"type":"object","description":"The Identification info of the sending and receiving customers. If they were created through [SEP-12](https://stellar.org/protocol/sep-12),\nthis object should contain the SEP-12 customer `id`. Otherwise, the `account` address of the customer.\n","properties":{"sender":{"type":"object","description":"StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.\n\nFor a SEP-12 customer, the `id` field should be sufficient to fully identify the customer in the business' Backend.\n\nFor a SEP-31 Sending Anchor, the `account` field should be used.\n","properties":{"id":{"type":"string","description":"The `id` of the customer registered through SEP-12."},"account":{"type":"string","description":"Either the Stellar account or Muxed account address of the on-chain entity."}},"title":"StellarId"},"receiver":{"type":"object","description":"StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.\n\nFor a SEP-12 customer, the `id` field should be sufficient to fully identify the customer in the business' Backend.\n\nFor a SEP-31 Sending Anchor, the `account` field should be used.\n","properties":{"id":{"type":"string","description":"The `id` of the customer registered through SEP-12."},"account":{"type":"string","description":"Either the Stellar account or Muxed account address of the on-chain entity."}},"title":"StellarId"}}},"creator":{"type":"object","description":"StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.\n\nFor a SEP-12 customer, the `id` field should be sufficient to fully identify the customer in the business' Backend.\n\nFor a SEP-31 Sending Anchor, the `account` field should be used.\n","properties":{"id":{"type":"string","description":"The `id` of the customer registered through SEP-12."},"account":{"type":"string","description":"Either the Stellar account or Muxed account address of the on-chain entity."}},"title":"StellarId"}},"title":"MutableTransaction"}}}}}}},"400":{"description":"Invalid request body. The error returned pertains to the transaction first determined to be invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"id":{"type":"string","description":"The `id` of the transaction first determined to be invalid."}}}}}}},"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"records":{"type":"array","items":{"type":"object","properties":{"transaction":{"type":"object","properties":{"id":{"type":"string"},"sep":{"type":"string","enum":["24","31","38"]},"kind":{"type":"string","enum":["deposit","withdrawal","receive"]},"status":{"type":"string","enum":["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","pending_sender","pending_receiver","pending_transaction_info_update","pending_customer_info_update"]},"amount_expected":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_in":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_out":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"kyc_verified":{"type":"boolean"},"quote_id":{"type":"string"},"started_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"completed_at":{"type":"string","format":"date-time"},"transfer_received_at":{"type":"string","format":"date-time"},"message":{"type":"string"},"refunds":{"type":"object","properties":{"amount_refunded":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"amount_fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"payments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"id_type":{"type":"string","enum":["stellar","external"]},"amount":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"fee":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"},"requested_at":{"type":"string","format":"date-time"},"refunded_at":{"type":"string","format":"date-time"}}}}},"title":"Refunds"},"stellar_transactions":{"type":"array","items":{"type":"object","required":["id","created_at","envelope","payments"],"properties":{"id":{"type":"string","description":"The ID of the transaction in the Stellar network."},"memo":{"type":"string","description":"The memo of the transaction in the Stellar network."},"memo_type":{"type":"string","description":"The memo type of the transaction in the Stellar network. Should be present if memo is not null.","enum":["text","hash","id"]},"created_at":{"type":"string","format":"date-time","description":"The time the transaction was registered in the Stellar network."},"envelope":{"type":"string","description":"The transaction envelope, containing all the transaction information."},"payments":{"type":"array","items":{"type":"object","required":["id","payment_type","source_account","destination_account","amount"],"properties":{"id":{"type":"string","description":"The ID of the payment in the Stellar Network."},"payment_type":{"type":"string","description":"The type of payment in the Stellar Network.","enum":["payment","path_payment"],"default":"payment"},"source_account":{"type":"string","description":"The account being debited in the Stellar Network."},"destination_account":{"type":"string","description":"The account being credited in the Stellar Network."},"amount":{"type":"object","required":["amount","asset"],"properties":{"amount":{"type":"string"},"asset":{"type":"string"}},"title":"Amount"}}}}},"title":"StellarTransaction"}},"source_account":{"type":"string"},"destination_account":{"type":"string"},"external_transaction_id":{"type":"string"},"custodial_transaction_id":{"type":"string"},"memo":{"type":"string"},"memo_type":{"type":"string"},"customers":{"type":"object","description":"The Identification info of the sending and receiving customers. If they were created through [SEP-12](https://stellar.org/protocol/sep-12),\nthis object should contain the SEP-12 customer `id`. Otherwise, the `account` address of the customer.\n","properties":{"sender":{"type":"object","description":"StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.\n\nFor a SEP-12 customer, the `id` field should be sufficient to fully identify the customer in the business' Backend.\n\nFor a SEP-31 Sending Anchor, the `account` field should be used.\n","properties":{"id":{"type":"string","description":"The `id` of the customer registered through SEP-12."},"account":{"type":"string","description":"Either the Stellar account or Muxed account address of the on-chain entity."}},"title":"StellarId"},"receiver":{"type":"object","description":"StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.\n\nFor a SEP-12 customer, the `id` field should be sufficient to fully identify the customer in the business' Backend.\n\nFor a SEP-31 Sending Anchor, the `account` field should be used.\n","properties":{"id":{"type":"string","description":"The `id` of the customer registered through SEP-12."},"account":{"type":"string","description":"Either the Stellar account or Muxed account address of the on-chain entity."}},"title":"StellarId"}}},"creator":{"type":"object","description":"StellarId's are objects that identify end-users and SEP-31 Sending Anchors, but not SEP-31 Receiving Anchors.\n\nFor a SEP-12 customer, the `id` field should be sufficient to fully identify the customer in the business' Backend.\n\nFor a SEP-31 Sending Anchor, the `account` field should be used.\n","properties":{"id":{"type":"string","description":"The `id` of the customer registered through SEP-12."},"account":{"type":"string","description":"Either the Stellar account or Muxed account address of the on-chain entity."}},"title":"StellarId"}},"title":"MutableTransaction"}},"title":"PatchTransactionRequest"}}}}}}},"method":"patch","path":"/transactions","jsonRequestBodyExample":{"records":[{"transaction":{"id":"string","sep":"24","kind":"deposit","status":"incomplete","amount_expected":{"amount":"string","asset":"string"},"amount_in":{"amount":"string","asset":"string"},"amount_out":{"amount":"string","asset":"string"},"amount_fee":{"amount":"string","asset":"string"},"kyc_verified":true,"quote_id":"string","started_at":"2023-04-24T18:31:43.925Z","updated_at":"2023-04-24T18:31:43.925Z","completed_at":"2023-04-24T18:31:43.925Z","transfer_received_at":"2023-04-24T18:31:43.925Z","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":"2023-04-24T18:31:43.925Z","refunded_at":"2023-04-24T18:31:43.925Z"}]},"stellar_transactions":[{"id":"string","memo":"string","memo_type":"text","created_at":"2023-04-24T18:31:43.925Z","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","custodial_transaction_id":"string","memo":"string","memo_type":"string","customers":{"sender":{"id":"string","account":"string"},"receiver":{"id":"string","account":"string"}},"creator":{"id":"string","account":"string"}}}]},"info":{"version":"2.0.0","title":"Platform API"},"postman":{"name":"Accept updated information on transactions","description":{"content":"Accepts one or more objects containing updated information on transactions. Note that requests containing invalid data for any transaction will result in a 400 Bad Request and no transactions will be updated. Importantly, this operation is NOT atomic. If one update fails, all previous updates would be applied, all subsequent updates would be discarded, and an error would be raised. Note that this endpoint accepts a subset of transaction information defined in the `MutableTransaction` schema.","type":"text/plain"},"url":{"path":["transactions"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"PATCH","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} sidebar_class_name: "patch api-method" info_path: api/resources/platform-api custom_edit_url: null @@ -96,7 +96,7 @@ For a SEP-12 customer, the `id` field should be sufficient to fully identify the For a SEP-31 Sending Anchor, the `account` field should be used. -
  • ]
  • +
  • ]
  • Invalid request body. The error returned pertains to the transaction first determined to be invalid. diff --git a/openapi/ap/Callbacks API.yml b/openapi/ap/Callbacks API.yml index c740438ce..44a679c69 100644 --- a/openapi/ap/Callbacks API.yml +++ b/openapi/ap/Callbacks API.yml @@ -43,7 +43,7 @@ paths: name: transaction_id description: | The platform server will save the posted transaction and pass the `transaction_id` through this endpoint. - If the anchor wishes to return transaction-dependent unique_address, the anchor may query the [`GET /transactions` endpoint of the Platform API](https://github.com/stellar/java-stellar-anchor-sdk/blob/main/docs/03%20-%20Implementing%20the%20Anchor%20Server/Communication/Platform%20API.yml). + If the anchor wishes to return transaction-dependent unique_address, the anchor may query the [`GET /transactions` endpoint of the Platform API](/ap_api/resources/get-transaction). schema: type: string required: true @@ -135,10 +135,7 @@ paths: name: client_id description: | An identifier for the client application making the request. This ID can be used to offer different fees to different clients. - A client ID can be one of the following: - 1. the `client_domain`: In SEP-24, if the transaction is initiated from a non-custodial wallet, the `client_id` must match the `client_domain` if wallet attribution is required. - 2. the Stellar custodial/omnibus account: In SEP-24, if the transaction is initiated from a custodian, such as Wyre, the `client_id` should match a known pooled/omnibus account configured in the [`omnibusAccountList`] of the YAML file](https://github.com/stellar/java-stellar-anchor-sdk/blob/main/platform/src/main/resources/anchor-config-defaults.yaml). - 3. The Stellar account of a sending anchor: In SEP-31, the `client_id` should match the account of a known SEP-31 sending anchor match the one used to authenticate via SEP-10. + A client ID it the Stellar account of a sending anchor: In SEP-31, the `client_id` should match the account of a known SEP-31 sending anchor match the one used to authenticate via SEP-10. schema: type: string required: true @@ -203,7 +200,7 @@ paths: tags: - Rates summary: Retrieve Rates - operationId: genRates + operationId: getRates parameters: - in: query name: type @@ -329,7 +326,8 @@ paths: This endpoint allows clients to: - 1. Fetch the fields the server requires in order to register a new customer via a SEP-12 `PUT /customer` request + 1. Fetch the fields the server requires in order to register a new customer via a SEP-12 + [`PUT /customer`](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-put) request If the server does not have a customer registered for the parameters sent in the request, it should return the fields required in the response. The same response should be returned when no parameters are sent. @@ -406,7 +404,9 @@ paths: description: | **The Anchor Platform does not persist any customer KYC data.** - The request and response for this endpoint are identical to the `PUT /customer` request and response defined in SEP-12. + The request and response for this endpoint are identical to the + [`PUT /customer`](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-put) + request and response defined in SEP-12. Client applications make requests with the following request body, which is forwarded to the anchor. Anchors must validate and persist the data passed, and return the customer's `id`. @@ -436,52 +436,14 @@ paths: application/json: schema: $ref: './schemas.yml#/components/schemas/Error' - /customer/callback: - put: - tags: - - Customers - description: | - The request for this endpoint is identical to the `PUT /customer/callback` request defined in SEP-12. - - Allows the wallet to provide a callback URL to the anchor. The provided callback URL will replace (and supercede) - any previously-set callback URL for this customer. - - Whenever the customer's `status` changes, the anchor must make a POST request to the callback URL. The payload - of the POST request will be the same as the response of SEP-12's `GET /customer`. **The Anchor Platform does not - make these callback requests to clients**. - - It's the wallet's responsibility to send a working callback URL to the anchor. - - Anchors will make POST requests until the customer's status changes to ACCEPTED or REJECTED. If a wallet needs - to watch a user's KYC status after that, it will need to set a callback again. - summary: Create or Update Callback Url - operationId: putCustomerCallback - requestBody: - content: - application/json: - schema: - $ref: './schemas.yml#/components/schemas/PutCustomerCallbackRequest' - responses: - '204': - description: "Success" - '400': - description: Invalid request. - content: - application/json: - schema: - $ref: './schemas.yml#/components/schemas/Error' - '404': - description: Customer not found. - content: - application/json: - schema: - $ref: './schemas.yml#/components/schemas/Error' /customer/{id}: delete: tags: - Customers description: | - The request for this endpoint is identical to the `PUT /customer/callback` request defined in SEP-12. + The request for this endpoint is identical to the + [`DELETE /customer`](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-delete) + request defined in SEP-12. Delete the customer's data or queue the customers data for deletion. summary: Delete Customer Data diff --git a/openapi/ap/bundled_callback.yml b/openapi/ap/bundled_callback.yml index b53c95178..6003be8f8 100644 --- a/openapi/ap/bundled_callback.yml +++ b/openapi/ap/bundled_callback.yml @@ -43,7 +43,7 @@ paths: name: transaction_id description: | The platform server will save the posted transaction and pass the `transaction_id` through this endpoint. - If the anchor wishes to return transaction-dependent unique_address, the anchor may query the [`GET /transactions` endpoint of the Platform API](https://github.com/stellar/java-stellar-anchor-sdk/blob/main/docs/03%20-%20Implementing%20the%20Anchor%20Server/Communication/Platform%20API.yml). + If the anchor wishes to return transaction-dependent unique_address, the anchor may query the [`GET /transactions` endpoint of the Platform API](/ap_api/resources/get-transaction). schema: type: string required: true @@ -134,10 +134,7 @@ paths: name: client_id description: | An identifier for the client application making the request. This ID can be used to offer different fees to different clients. - A client ID can be one of the following: - 1. the `client_domain`: In SEP-24, if the transaction is initiated from a non-custodial wallet, the `client_id` must match the `client_domain` if wallet attribution is required. - 2. the Stellar custodial/omnibus account: In SEP-24, if the transaction is initiated from a custodian, such as Wyre, the `client_id` should match a known pooled/omnibus account configured in the [`omnibusAccountList`] of the YAML file](https://github.com/stellar/java-stellar-anchor-sdk/blob/main/platform/src/main/resources/anchor-config-defaults.yaml). - 3. The Stellar account of a sending anchor: In SEP-31, the `client_id` should match the account of a known SEP-31 sending anchor match the one used to authenticate via SEP-10. + A client ID it the Stellar account of a sending anchor: In SEP-31, the `client_id` should match the account of a known SEP-31 sending anchor match the one used to authenticate via SEP-10. schema: type: string required: true @@ -202,7 +199,7 @@ paths: tags: - Rates summary: Retrieve Rates - operationId: genRates + operationId: getRates parameters: - in: query name: type @@ -328,7 +325,8 @@ paths: This endpoint allows clients to: - 1. Fetch the fields the server requires in order to register a new customer via a SEP-12 `PUT /customer` request + 1. Fetch the fields the server requires in order to register a new customer via a SEP-12 + [`PUT /customer`](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-put) request If the server does not have a customer registered for the parameters sent in the request, it should return the fields required in the response. The same response should be returned when no parameters are sent. @@ -405,7 +403,9 @@ paths: description: | **The Anchor Platform does not persist any customer KYC data.** - The request and response for this endpoint are identical to the `PUT /customer` request and response defined in SEP-12. + The request and response for this endpoint are identical to the + [`PUT /customer`](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-put) + request and response defined in SEP-12. Client applications make requests with the following request body, which is forwarded to the anchor. Anchors must validate and persist the data passed, and return the customer's `id`. @@ -435,52 +435,14 @@ paths: application/json: schema: $ref: '#/components/schemas/Error' - /customer/callback: - put: - tags: - - Customers - description: | - The request for this endpoint is identical to the `PUT /customer/callback` request defined in SEP-12. - - Allows the wallet to provide a callback URL to the anchor. The provided callback URL will replace (and supercede) - any previously-set callback URL for this customer. - - Whenever the customer's `status` changes, the anchor must make a POST request to the callback URL. The payload - of the POST request will be the same as the response of SEP-12's `GET /customer`. **The Anchor Platform does not - make these callback requests to clients**. - - It's the wallet's responsibility to send a working callback URL to the anchor. - - Anchors will make POST requests until the customer's status changes to ACCEPTED or REJECTED. If a wallet needs - to watch a user's KYC status after that, it will need to set a callback again. - summary: Create or Update Callback Url - operationId: putCustomerCallback - requestBody: - content: - application/json: - schema: - $ref: '#/components/schemas/PutCustomerCallbackRequest' - responses: - '204': - description: Success - '400': - description: Invalid request. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' - '404': - description: Customer not found. - content: - application/json: - schema: - $ref: '#/components/schemas/Error' /customer/{id}: delete: tags: - Customers description: | - The request for this endpoint is identical to the `PUT /customer/callback` request defined in SEP-12. + The request for this endpoint is identical to the + [`DELETE /customer`](https://github.com/stellar/stellar-protocol/blob/master/ecosystem/sep-0012.md#customer-delete) + request defined in SEP-12. Delete the customer's data or queue the customers data for deletion. summary: Delete Customer Data @@ -684,25 +646,3 @@ components: properties: id: type: string - PutCustomerCallbackRequest: - type: object - properties: - id: - description: The ID of the customer as returned in the response of a previous PUT request. - type: string - account: - description: The Stellar or Muxed Account authenticated with the Platform via SEP-10. - type: string - memo: - description: The memo value identifying a customer with a shared account, where the shared account is `account`. - type: string - memo_type: - description: The type of memo used to identify a customer with a shared account. - type: string - enum: - - id - - hash - - text - url: - description: A callback URL that the SEP-12 server will POST to when the status of the customer changes. - type: string