From 823fab848e8b1261f4c22752560f2f6f44afe9d5 Mon Sep 17 00:00:00 2001 From: philipliu Date: Mon, 14 Aug 2023 16:26:24 -0400 Subject: [PATCH 01/13] Add support for asynchronous deposit instructions --- ecosystem/sep-0006.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/ecosystem/sep-0006.md b/ecosystem/sep-0006.md index a0008a9aa..798ff6aca 100644 --- a/ecosystem/sep-0006.md +++ b/ecosystem/sep-0006.md @@ -6,8 +6,8 @@ Title: Deposit and Withdrawal API Author: SDF Status: Active (Interactive components are deprecated in favor of SEP-24) Created: 2017-10-30 -Updated: 2023-01-13 -Version 3.18.1 +Updated: 2023-08-10 +Version 3.19.0 ``` ## Simple Summary @@ -358,7 +358,7 @@ The response body should be a JSON object with the following fields: Name | Type | Description -----|------|------------ -`how` | string | Terse but complete instructions for how to deposit the asset. In the case of most cryptocurrencies it is just an address to which the deposit should be sent. +`how` | string | Terse but complete instructions for how to deposit the asset. In the case of most cryptocurrencies it is just an address to which the deposit should be sent. If the anchor cannot provide the instructions in the response, the wallet should query the [`/transaction`](#single-historical-transaction) endpoint to get this asynchonously. `id` | string | (optional) The anchor's ID for this deposit. The wallet will use this ID to query the [`/transaction`](#single-historical-transaction) endpoint to check status of the request. `eta` | int | (optional) Estimate of how long the deposit will take to credit in seconds. `min_amount` | float | (optional) Minimum amount of an asset that a user can deposit. @@ -1121,6 +1121,8 @@ Name | Type | Description `refunds` | object | (optional) An object describing any on or off-chain refund associated with this transaction. The schema for this object is defined in the [Refunds Object Schema](#refunds-object-schema) section below. `required_info_message` | string | (optional) A human-readable message indicating any errors that require updated information from the user. `required_info_updates` | object | (optional) A set of fields that require update from the user described in the same format as [/info](#info). This field is only relevant when `status` is `pending_transaction_info_update`. +`customer_info_type` | string | (optional) The [SEP-12 type](sep-0012.md#type-specification) of customer information that is required to complete the transaction. This field is only relevant when `status` is `pending_customer_info_update`. Wallets should use this field to determine which fields to request from the user. +`how` | string | (optional) A human-readable message indicating how the user should complete the transaction. This field is only required if `how` was not included in the response of a `deposit` request. `claimable_balance_id` | string | (optional) ID of the Claimable Balance used to send the asset initially requested. Only relevant for deposit transactions. `status` should be one of: @@ -1361,7 +1363,7 @@ Every HTTP status code other than `200 OK` will be considered an error and in th ## Pending Customer Info Update -In certain cases the anchor may need updated customer information from the user. For example, the bank could tell the anchor that the account address does not match the user's name or other identifying information. Since this information was sent via SEP-12, the transaction should go into the `pending_customer_info_update` status until the sender makes another `PUT /customer` request to update. The sending anchor can check which fields need to be updated by making a `GET /customer` request including the `id` or `account` & `memo` parameters. The anchor should respond with a `NEEDS_INFO` status and include the fields that need to be updated. +In certain cases the anchor may need updated customer information from the user. For example, the bank could tell the anchor that the account address does not match the user's name or other identifying information. Since this information was sent via SEP-12, the transaction should go into the `pending_customer_info_update` status until the sender makes another `PUT /customer` request to update. The anchor can check which fields need to be updated by making a `GET /customer` request including the `id` or `account` & `memo` with the `customer_info_type` associated with the transaction. The anchor should respond with a `NEEDS_INFO` status and include the fields that need to be updated. ## Pending Transaction Info Update @@ -1420,6 +1422,7 @@ If the information was malformed, or if the sender tried to update data that isn ## Changelog +* `v3.19.0` Add support for asynchronous deposit instructions. ([#1379](https://github.com/stellar/stellar-protocol/pull/1379/)) * `v3.18.1`: Fix the missing types of the `withdraw` request parameters and some typo. ([#1365](https://github.com/stellar/stellar-protocol/pull/1365)) * `v3.18.0`: Added `refunded` status and `updated_at` transaction fields to match other SEPs (24, 31) ([#1336](https://github.com/stellar/stellar-protocol/pull/1336)) * `v3.17.1`: Allow anchors to omit the deprecated `X-Stellar-Signature` header ([#1335](https://github.com/stellar/stellar-protocol/pull/1335)) From 9ce35ba5b20ab53dc014069254657f43cac649d8 Mon Sep 17 00:00:00 2001 From: philipliu Date: Tue, 15 Aug 2023 16:10:25 -0400 Subject: [PATCH 02/13] Deprecate `fields` --- ecosystem/sep-0006.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecosystem/sep-0006.md b/ecosystem/sep-0006.md index 798ff6aca..191cce1de 100644 --- a/ecosystem/sep-0006.md +++ b/ecosystem/sep-0006.md @@ -943,7 +943,7 @@ All assets listed in a `deposit` and `deposit-exchange` can contain these attrib * `enabled`: `true` if SEP-6 deposit for this asset is supported * `authentication_required`: Optional. `true` if client must be [authenticated](#authentication) before accessing the deposit endpoint for this asset. `false` if not specified. -* `fields` object as explained below. +* `fields` **Deprecated**. KYC information should be supplied to the Anchor via SEP-12. `fields` object is explained below. Deposit assets listed in the `deposit` object can also contain the attributes: From 2647a7c4c091fbbfe217562a795fb672a3308f4d Mon Sep 17 00:00:00 2001 From: philipliu Date: Wed, 16 Aug 2023 11:44:39 -0400 Subject: [PATCH 03/13] Address PR comments --- ecosystem/sep-0006.md | 43 +++++++++++++++++++++++++++++++++++-------- 1 file changed, 35 insertions(+), 8 deletions(-) diff --git a/ecosystem/sep-0006.md b/ecosystem/sep-0006.md index 191cce1de..1d9641f22 100644 --- a/ecosystem/sep-0006.md +++ b/ecosystem/sep-0006.md @@ -358,7 +358,8 @@ The response body should be a JSON object with the following fields: Name | Type | Description -----|------|------------ -`how` | string | Terse but complete instructions for how to deposit the asset. In the case of most cryptocurrencies it is just an address to which the deposit should be sent. If the anchor cannot provide the instructions in the response, the wallet should query the [`/transaction`](#single-historical-transaction) endpoint to get this asynchonously. +`how` | string | (**Deprecated**, use `instructions` instead) Terse but complete instructions for how to deposit the asset. In the case of most cryptocurrencies it is just an address to which the deposit should be sent. +`instructions` | object | (optional) JSON object containing the [SEP-9 financial account fields](sep-0009.md#financial-account-fields) that describe how to complete the off-chain deposit. If the anchor cannot provide this information in the response, the wallet should query the [`/transaction`](#single-historical-transaction) endpoint to get this asynchonously. `id` | string | (optional) The anchor's ID for this deposit. The wallet will use this ID to query the [`/transaction`](#single-historical-transaction) endpoint to check status of the request. `eta` | int | (optional) Estimate of how long the deposit will take to credit in seconds. `min_amount` | float | (optional) Minimum amount of an asset that a user can deposit. @@ -367,13 +368,38 @@ Name | Type | Description `fee_percent` | float | (optional) Percentage fee (if any). In units of percentage points. `extra_info` | object | (optional) JSON object with additional information about the deposit process. +`instructions` fields: + +An object with SEP-9 financial account fields as keys and its values are objects with the following fields: + +Name | Type | Description +-----|------|------------ +`description` | string | A human-readable description of the field. This can be used to provide any additional information about fields that are not defined in the SEP-9 standard. + `extra_info` fields: Name | Type | Description -----|------|------------ `message` | string | (optional) Additional details about the deposit process. -Bitcoin response example: +##### Examples + +Bank payment example: +```json +{ + "instructions": { + "bank_number": { + "description": "Bank number", + }, + "bank_branch_number": { + "description": "Bank branch number", + } + }, + "id": "9421871e-0623-4356-b7b5-5996da122f3e", +} +``` + +Bitcoin response example (using deprecated `how` field): ```json { @@ -383,7 +409,7 @@ Bitcoin response example: } ``` -Ripple response example: +Ripple response example (using deprecated `how` field): ```json { @@ -397,7 +423,7 @@ Ripple response example: } ``` -Mexican peso (MXN) response example: +Mexican peso (MXN) response example (using deprecated `how` field): ```json { @@ -457,7 +483,7 @@ Using this feature, anchors will no longer have to wait until the user's Stellar 1. Make a request to `/deposit` and provide the `claimable_balance_supported=true` request parameter. 2. Register the user's KYC information with the anchor via [SEP-12](sep-0012.md) if requested and resubmit the deposit request. -3. Once a successful deposit request has been made and the transaction's status is `pending_user_transfer_start`, the user must send the required payment as described by the `how` attribute in the deposit success response, using the `amount_in` returned from the `GET [SEP-6]/transaction?id=` request. +3. Once a successful deposit request has been made and the transaction's status is `pending_user_transfer_start`, the user must send the required payment as described by the `instructions` attribute in the deposit success response, using the `amount_in` returned from the `GET [SEP-6]/transaction?id=` request. 4. If the anchor doesn't support claimable balances, the anchor's `/transaction(s)` endpoint will contain the `pending_trust` status. In this case, use the flow described [above](#stellar-account-doesnt-trust-asset). 5. Otherwise, detect the `claimable_balance_id` value populated in the anchor's `/transaction(s)` endpoint or poll Horizon's [/claimable_balances](https://developers.stellar.org/api/resources/claimablebalances/) endpoint for outstanding claimable balances. When a claimable balance is detected using either method, the transaction status should be `completed`. 6. Claim the balance using the value via the `ClaimClaimableBalance` operation. See the ["Claiming Claimable Balances"](#claiming-claimable-balances) section to learn more about how to claim a balance. @@ -943,7 +969,7 @@ All assets listed in a `deposit` and `deposit-exchange` can contain these attrib * `enabled`: `true` if SEP-6 deposit for this asset is supported * `authentication_required`: Optional. `true` if client must be [authenticated](#authentication) before accessing the deposit endpoint for this asset. `false` if not specified. -* `fields` **Deprecated**. KYC information should be supplied to the Anchor via SEP-12. `fields` object is explained below. +* `fields` (**Deprecated**, KYC information should be supplied to the Anchor via SEP-12) `fields` object is explained below. Deposit assets listed in the `deposit` object can also contain the attributes: @@ -1121,8 +1147,9 @@ Name | Type | Description `refunds` | object | (optional) An object describing any on or off-chain refund associated with this transaction. The schema for this object is defined in the [Refunds Object Schema](#refunds-object-schema) section below. `required_info_message` | string | (optional) A human-readable message indicating any errors that require updated information from the user. `required_info_updates` | object | (optional) A set of fields that require update from the user described in the same format as [/info](#info). This field is only relevant when `status` is `pending_transaction_info_update`. -`customer_info_type` | string | (optional) The [SEP-12 type](sep-0012.md#type-specification) of customer information that is required to complete the transaction. This field is only relevant when `status` is `pending_customer_info_update`. Wallets should use this field to determine which fields to request from the user. -`how` | string | (optional) A human-readable message indicating how the user should complete the transaction. This field is only required if `how` was not included in the response of a `deposit` request. +`required_customer_info_message` | string | (optional) A human-readable message indicating any errors that require updated information from the user. +`required_customer_info_updates` | string | (optional) A set of SEP-9 fields that require update from the user via SEP-12. This field is only relevant when `status` is `pending_customer_info_update`. +`instructions` | string | (optional) JSON object containing the [SEP-9 financial account fields](sep-0009.md#financial-account-fields) that describe how to complete the off-chain deposit in the same format as the [/deposit](#deposit) response. This field is only required if `instructions` was not included in the response of a `deposit` request. Only relevant for deposit transactions. `claimable_balance_id` | string | (optional) ID of the Claimable Balance used to send the asset initially requested. Only relevant for deposit transactions. `status` should be one of: From 72255fce366202f54cf1a9ee5fa8af1db55f5be8 Mon Sep 17 00:00:00 2001 From: philipliu Date: Wed, 16 Aug 2023 11:54:26 -0400 Subject: [PATCH 04/13] Missed customer_info_type --- ecosystem/sep-0006.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecosystem/sep-0006.md b/ecosystem/sep-0006.md index 1d9641f22..9db3992e6 100644 --- a/ecosystem/sep-0006.md +++ b/ecosystem/sep-0006.md @@ -1390,7 +1390,7 @@ Every HTTP status code other than `200 OK` will be considered an error and in th ## Pending Customer Info Update -In certain cases the anchor may need updated customer information from the user. For example, the bank could tell the anchor that the account address does not match the user's name or other identifying information. Since this information was sent via SEP-12, the transaction should go into the `pending_customer_info_update` status until the sender makes another `PUT /customer` request to update. The anchor can check which fields need to be updated by making a `GET /customer` request including the `id` or `account` & `memo` with the `customer_info_type` associated with the transaction. The anchor should respond with a `NEEDS_INFO` status and include the fields that need to be updated. +In certain cases the anchor may need updated customer information from the user. For example, the bank could tell the anchor that the account address does not match the user's name or other identifying information. Since this information was sent via SEP-12, the transaction should go into the `pending_customer_info_update` status until the sender makes another `PUT /customer` request to update. The anchor can check which fields need to be updated by making a `GET /customer` request including the `id` or `account` & `memo` with the `required_customer_info_updates` fields associated with the transaction. The anchor should respond with a `NEEDS_INFO` status and include the fields that need to be updated. ## Pending Transaction Info Update From 13926950d87fbd35a1a932cfcb0f3c9071da6931 Mon Sep 17 00:00:00 2001 From: philipliu Date: Wed, 16 Aug 2023 11:55:05 -0400 Subject: [PATCH 05/13] Fix changelog --- ecosystem/sep-0006.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecosystem/sep-0006.md b/ecosystem/sep-0006.md index 9db3992e6..b9e7aff23 100644 --- a/ecosystem/sep-0006.md +++ b/ecosystem/sep-0006.md @@ -1449,7 +1449,7 @@ If the information was malformed, or if the sender tried to update data that isn ## Changelog -* `v3.19.0` Add support for asynchronous deposit instructions. ([#1379](https://github.com/stellar/stellar-protocol/pull/1379/)) +* `v3.19.0`: Add support for asynchronous deposit instructions. ([#1379](https://github.com/stellar/stellar-protocol/pull/1379/)) * `v3.18.1`: Fix the missing types of the `withdraw` request parameters and some typo. ([#1365](https://github.com/stellar/stellar-protocol/pull/1365)) * `v3.18.0`: Added `refunded` status and `updated_at` transaction fields to match other SEPs (24, 31) ([#1336](https://github.com/stellar/stellar-protocol/pull/1336)) * `v3.17.1`: Allow anchors to omit the deprecated `X-Stellar-Signature` header ([#1335](https://github.com/stellar/stellar-protocol/pull/1335)) From e30edabc81d40f170130e4171f45d858d03e4d14 Mon Sep 17 00:00:00 2001 From: philipliu Date: Wed, 16 Aug 2023 13:44:43 -0400 Subject: [PATCH 06/13] Fix instructions field --- ecosystem/sep-0006.md | 55 ++++++++++++++++++++++++++++++++----------- 1 file changed, 41 insertions(+), 14 deletions(-) diff --git a/ecosystem/sep-0006.md b/ecosystem/sep-0006.md index 28f200c12..395283faf 100644 --- a/ecosystem/sep-0006.md +++ b/ecosystem/sep-0006.md @@ -387,44 +387,71 @@ Name | Type | Description Bank payment example: ```json { + "id": "9421871e-0623-4356-b7b5-5996da122f3e", "instructions": { - "bank_number": { - "description": "Bank number", + "organization.bank_number": { + "value": "121122676", + "description": "US bank routing number" }, - "bank_branch_number": { - "description": "Bank branch number", + "organization.bank_account_number": { + "value": "13719713158835300", + "description": "US bank account number" } - }, - "id": "9421871e-0623-4356-b7b5-5996da122f3e", + } } ``` -Bitcoin response example (using deprecated `how` field): +Bitcoin response example: ```json { - "how" : "1Nh7uHdvY6fNwtQtM1G5EZAFPLC33B59rB", "id": "9421871e-0623-4356-b7b5-5996da122f3e", + "instructions": { + "organization.crypto_address": { + "value": "1Nh7uHdvY6fNwtQtM1G5EZAFPLC33B59rB", + "description": "Bitcoin address" + } + }, "fee_fixed" : 0.0002 } -``` - -Ripple response example (using deprecated `how` field): +Ripple response example: ```json { - "how" : "Ripple address: rNXEkKCxvfLcM1h4HJkaj2FtmYuAWrHGbf tag: 88", "id": "9421871e-0623-4356-b7b5-5996da122f3e", + "instructions": { + "organization.crypto_address": { + "value": "1Nh7uHdvY6fNwtQtM1G5EZAFPLC33B59rB", + "description": "Ripple address" + }, + "organization.crypto_memo": { + "value": "88", + "description": "Ripple tag" + } + }, "eta": 60, - "fee_percent" : 0.1, + "fee_percent": 0.1, "extra_info": { "message": "You must include the tag. If the amount is more than 1000 XRP, deposit will take 24h to complete." } } ``` -Mexican peso (MXN) response example (using deprecated `how` field): +Mexican peso (MXN) response example +```json +{ + "id": "9421871e-0623-4356-b7b5-5996da122f3e", + "instructions": { + "organization.clabe_number": { + "value": "646180111803859359", + "description": "CLABE number" + } + }, + "eta": 1800 +} +``` +Mexican peso (MXN) response example (using deprecated `how` field) ```json { "how" : "Make a payment to Bank: STP Account: 646180111803859359", From 0d08afb3f5bfceac2e16ae1e5b76eb715a46329a Mon Sep 17 00:00:00 2001 From: philipliu Date: Wed, 16 Aug 2023 14:04:35 -0400 Subject: [PATCH 07/13] Fix formatting --- ecosystem/sep-0006.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ecosystem/sep-0006.md b/ecosystem/sep-0006.md index 395283faf..72795f595 100644 --- a/ecosystem/sep-0006.md +++ b/ecosystem/sep-0006.md @@ -414,8 +414,10 @@ Bitcoin response example: }, "fee_fixed" : 0.0002 } +``` + +Ripple response example: -Ripple response example: ```json { "id": "9421871e-0623-4356-b7b5-5996da122f3e", @@ -437,7 +439,8 @@ Ripple response example: } ``` -Mexican peso (MXN) response example +Mexican peso (MXN) response example: + ```json { "id": "9421871e-0623-4356-b7b5-5996da122f3e", @@ -451,7 +454,8 @@ Mexican peso (MXN) response example } ``` -Mexican peso (MXN) response example (using deprecated `how` field) +Mexican peso (MXN) response example (using deprecated `how` field): + ```json { "how" : "Make a payment to Bank: STP Account: 646180111803859359", From 0888b04f76c16c1f233412eb8b385a8ab6005586 Mon Sep 17 00:00:00 2001 From: philipliu Date: Wed, 16 Aug 2023 14:08:17 -0400 Subject: [PATCH 08/13] Why did the address change --- ecosystem/sep-0006.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecosystem/sep-0006.md b/ecosystem/sep-0006.md index 72795f595..f02fed119 100644 --- a/ecosystem/sep-0006.md +++ b/ecosystem/sep-0006.md @@ -423,7 +423,7 @@ Ripple response example: "id": "9421871e-0623-4356-b7b5-5996da122f3e", "instructions": { "organization.crypto_address": { - "value": "1Nh7uHdvY6fNwtQtM1G5EZAFPLC33B59rB", + "value": "rNXEkKCxvfLcM1h4HJkaj2FtmYuAWrHGbf", "description": "Ripple address" }, "organization.crypto_memo": { From 2157343a8947c47dc3457db68db369fe0d66e93a Mon Sep 17 00:00:00 2001 From: philipliu Date: Wed, 16 Aug 2023 15:54:40 -0400 Subject: [PATCH 09/13] Address PR comments --- ecosystem/sep-0006.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/ecosystem/sep-0006.md b/ecosystem/sep-0006.md index f02fed119..60dcade65 100644 --- a/ecosystem/sep-0006.md +++ b/ecosystem/sep-0006.md @@ -397,7 +397,8 @@ Bank payment example: "value": "13719713158835300", "description": "US bank account number" } - } + }, + "how": "Make a payment to Bank: 121122676 Account: 13719713158835300" } ``` @@ -412,6 +413,7 @@ Bitcoin response example: "description": "Bitcoin address" } }, + "how": "Make a payment to Bitcoin address 1Nh7uHdvY6fNwtQtM1G5EZAFPLC33B59rB", "fee_fixed" : 0.0002 } ``` @@ -431,6 +433,7 @@ Ripple response example: "description": "Ripple tag" } }, + "how": "Make a payment to Ripple address rNXEkKCxvfLcM1h4HJkaj2FtmYuAWrHGbf with tag 88", "eta": 60, "fee_percent": 0.1, "extra_info": { @@ -450,6 +453,7 @@ Mexican peso (MXN) response example: "description": "CLABE number" } }, + "how": "Make a payment to Bank: STP Account: 646180111803859359", "eta": 1800 } ``` @@ -1000,7 +1004,7 @@ All assets listed in a `deposit` and `deposit-exchange` can contain these attrib * `enabled`: `true` if SEP-6 deposit for this asset is supported * `authentication_required`: Optional. `true` if client must be [authenticated](#authentication) before accessing the deposit endpoint for this asset. `false` if not specified. -* `fields` (**Deprecated**, KYC information should be supplied to the Anchor via SEP-12) `fields` object is explained below. +* `fields` (**Deprecated**, Accepting personally identifiable information through request parameters is security risk due to web server request logging. KYC information should be supplied to the Anchor via SEP-12) `fields` object is explained below. Deposit assets listed in the `deposit` object can also contain the attributes: @@ -1180,9 +1184,9 @@ Name | Type | Description `refunds` | object | (optional) An object describing any on or off-chain refund associated with this transaction. The schema for this object is defined in the [Refunds Object Schema](#refunds-object-schema) section below. `required_info_message` | string | (optional) A human-readable message indicating any errors that require updated information from the user. `required_info_updates` | object | (optional) A set of fields that require update from the user described in the same format as [/info](#info). This field is only relevant when `status` is `pending_transaction_info_update`. -`required_customer_info_message` | string | (optional) A human-readable message indicating any errors that require updated information from the user. +`required_customer_info_message` | string | (optional) A human-readable message indicating why the SEP-12 information provided by the user is not sufficient to complete the transaction. `required_customer_info_updates` | string | (optional) A set of SEP-9 fields that require update from the user via SEP-12. This field is only relevant when `status` is `pending_customer_info_update`. -`instructions` | string | (optional) JSON object containing the [SEP-9 financial account fields](sep-0009.md#financial-account-fields) that describe how to complete the off-chain deposit in the same format as the [/deposit](#deposit) response. This field is only required if `instructions` was not included in the response of a `deposit` request. Only relevant for deposit transactions. +`instructions` | string | (optional) JSON object containing the [SEP-9 financial account fields](sep-0009.md#financial-account-fields) that describe how to complete the off-chain deposit in the same format as the [/deposit](#deposit) response. This field should be present if the `instructions` were provided in the [/deposit](#deposit) response or if it could not have been previously provided synchronously. This field should only be present if the status is `pending_user_transfer_start`, not any status that precede it such as `incomplete`, or `pending_customer_info_update`. `claimable_balance_id` | string | (optional) ID of the Claimable Balance used to send the asset initially requested. Only relevant for deposit transactions. `status` should be one of: From c6b732ca00e080f1672e3a699f5016ff74671b3a Mon Sep 17 00:00:00 2001 From: philipliu Date: Wed, 16 Aug 2023 16:01:33 -0400 Subject: [PATCH 10/13] Remove extra example --- ecosystem/sep-0006.md | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/ecosystem/sep-0006.md b/ecosystem/sep-0006.md index 60dcade65..8e62fd637 100644 --- a/ecosystem/sep-0006.md +++ b/ecosystem/sep-0006.md @@ -458,16 +458,6 @@ Mexican peso (MXN) response example: } ``` -Mexican peso (MXN) response example (using deprecated `how` field): - -```json -{ - "how" : "Make a payment to Bank: STP Account: 646180111803859359", - "id": "9421871e-0623-4356-b7b5-5996da122f3e", - "eta": 1800 -} -``` - ### Special Cases #### Stellar account does not exist From 49521722b2c7c9c6560553d59e848eb76b1ac346 Mon Sep 17 00:00:00 2001 From: Philip Liu <12836897+philipliu@users.noreply.github.com> Date: Wed, 16 Aug 2023 16:10:42 -0400 Subject: [PATCH 11/13] Update ecosystem/sep-0006.md Co-authored-by: Jake Urban <10968980+JakeUrban@users.noreply.github.com> --- ecosystem/sep-0006.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ecosystem/sep-0006.md b/ecosystem/sep-0006.md index 8e62fd637..d3c2b0824 100644 --- a/ecosystem/sep-0006.md +++ b/ecosystem/sep-0006.md @@ -1176,7 +1176,7 @@ Name | Type | Description `required_info_updates` | object | (optional) A set of fields that require update from the user described in the same format as [/info](#info). This field is only relevant when `status` is `pending_transaction_info_update`. `required_customer_info_message` | string | (optional) A human-readable message indicating why the SEP-12 information provided by the user is not sufficient to complete the transaction. `required_customer_info_updates` | string | (optional) A set of SEP-9 fields that require update from the user via SEP-12. This field is only relevant when `status` is `pending_customer_info_update`. -`instructions` | string | (optional) JSON object containing the [SEP-9 financial account fields](sep-0009.md#financial-account-fields) that describe how to complete the off-chain deposit in the same format as the [/deposit](#deposit) response. This field should be present if the `instructions` were provided in the [/deposit](#deposit) response or if it could not have been previously provided synchronously. This field should only be present if the status is `pending_user_transfer_start`, not any status that precede it such as `incomplete`, or `pending_customer_info_update`. +`instructions` | string | (optional) JSON object containing the [SEP-9 financial account fields](sep-0009.md#financial-account-fields) that describe how to complete the off-chain deposit in the same format as the [/deposit](#deposit) response. This field should be present if the `instructions` were provided in the [/deposit](#deposit) response or if it could not have been previously provided synchronously. This field should only be present once the status becomes `pending_user_transfer_start`, not while the transaction has any statuses that precede it such as `incomplete`, `pending_anchor`, or `pending_customer_info_update`. `claimable_balance_id` | string | (optional) ID of the Claimable Balance used to send the asset initially requested. Only relevant for deposit transactions. `status` should be one of: From 539bd94523cf8f1f16c67a1f6c5bbf19f79209c0 Mon Sep 17 00:00:00 2001 From: philipliu Date: Wed, 16 Aug 2023 16:13:31 -0400 Subject: [PATCH 12/13] Add value to instructions schema --- ecosystem/sep-0006.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ecosystem/sep-0006.md b/ecosystem/sep-0006.md index d3c2b0824..929c14d7f 100644 --- a/ecosystem/sep-0006.md +++ b/ecosystem/sep-0006.md @@ -374,6 +374,7 @@ An object with SEP-9 financial account fields as keys and its values are objects Name | Type | Description -----|------|------------ +`value` | string | The value of the field. `description` | string | A human-readable description of the field. This can be used to provide any additional information about fields that are not defined in the SEP-9 standard. `extra_info` fields: From 14e84b90076f75fa0cdf474635583bfeb8b89198 Mon Sep 17 00:00:00 2001 From: philipliu Date: Thu, 17 Aug 2023 13:28:49 -0400 Subject: [PATCH 13/13] Fix `required_customer_info_updates` usage --- ecosystem/sep-0006.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ecosystem/sep-0006.md b/ecosystem/sep-0006.md index 929c14d7f..5f3113640 100644 --- a/ecosystem/sep-0006.md +++ b/ecosystem/sep-0006.md @@ -995,7 +995,7 @@ All assets listed in a `deposit` and `deposit-exchange` can contain these attrib * `enabled`: `true` if SEP-6 deposit for this asset is supported * `authentication_required`: Optional. `true` if client must be [authenticated](#authentication) before accessing the deposit endpoint for this asset. `false` if not specified. -* `fields` (**Deprecated**, Accepting personally identifiable information through request parameters is security risk due to web server request logging. KYC information should be supplied to the Anchor via SEP-12) `fields` object is explained below. +* `fields` (**Deprecated**, Accepting personally identifiable information through request parameters is a security risk due to web server request logging. KYC information should be supplied to the Anchor via SEP-12) `fields` object is explained below. Deposit assets listed in the `deposit` object can also contain the attributes: @@ -1418,7 +1418,7 @@ Every HTTP status code other than `200 OK` will be considered an error and in th ## Pending Customer Info Update -In certain cases the anchor may need updated customer information from the user. For example, the bank could tell the anchor that the account address does not match the user's name or other identifying information. Since this information was sent via SEP-12, the transaction should go into the `pending_customer_info_update` status until the sender makes another `PUT /customer` request to update. The anchor can check which fields need to be updated by making a `GET /customer` request including the `id` or `account` & `memo` with the `required_customer_info_updates` fields associated with the transaction. The anchor should respond with a `NEEDS_INFO` status and include the fields that need to be updated. +In certain cases the anchor may need updated customer information from the user. For example, the bank could tell the anchor that the account address does not match the user's name or other identifying information. Since this information was sent via SEP-12, the transaction should go into the `pending_customer_info_update` status until the sender makes another `PUT /customer` request to update by providing the fields from `required_customer_info_updates` in the transaction object. The wallet can also check which fields need to be updated by making a `GET /customer` request including the `id` or `account` & `memo`. The anchor should respond with a `NEEDS_INFO` status and include the fields that need to be updated. ## Pending Transaction Info Update