Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Add timeEstimate to PaymentMethod #263

Closed
mistermoe opened this issue Mar 11, 2024 · 9 comments · Fixed by #269
Closed

Add timeEstimate to PaymentMethod #263

mistermoe opened this issue Mar 11, 2024 · 9 comments · Fixed by #269

Comments

@mistermoe
Copy link
Contributor

PaymentMethod is the type used for the elements within Offering.payinMethods[] and Offering.payoutMethods[].

including a property that alows PFIs to convey the estimated settlement time based on a given payment method could be very informative to individuals.

Proposing we add a field to PaymentMethod that allows PFIs to convey this information. haven't yet decided on

  • Property name. maybe estimatedSettlementTime?
  • data type and precision. thinking uint and seconds
  • required or not. thinking required
@selfissued
Copy link

Like my comment in #262, I would try to follow existing payment industry practices to the extent possible here. Is there such a field in other financial transaction protocol, such as SWIFT? If so, great, copy it. If not, I'd think hard before inventing something new in this space.

@angiejones
Copy link
Member

I like this, especially in cases where as a customer is considering multiple PFIs

@decentralgabe
Copy link
Contributor

From digging through SWIFT I could not find an analogous concept; however, if LPs (fka PFIs) provide this type of data then I believe it would be useful to include in our PaymentMethod. Do we have any data to show that LPs have and will provide an estimate?

@mistermoe
Copy link
Contributor Author

I like this, especially in cases where as a customer is considering multiple PFIs

@angiejones or even just multiple payment methods in a single offering. esp. given that different methods can have different fees associated to them. it adds a whole new layer to price off of

@mistermoe
Copy link
Contributor Author

mistermoe commented Mar 12, 2024

From digging through SWIFT I could not find an analogous concept; however, if LPs (fka PFIs) provide this type of data then I believe it would be useful to include in our PaymentMethod. Do we have any data to show that LPs have and will provide an estimate?

thanks so much for digging into SWIFT and looking. i couldn't find anything either.

i think LPs will sorta have to if we make it required and it's something i personally am in favor of if for no other reason than acting as a means to keep LPs honest / accountable. Technically speaking, Alice has a provable way to show that an LP either did or didn't deliver within the estimated settlement time simply by showing the message exchange between her and the LP.

@decentralgabe
Copy link
Contributor

Excellent point this is a good piece of data we can use to score PFIs

@mistermoe
Copy link
Contributor Author

minor snag here w.r.t. making this a required field for PaymentMethod (type which applies to both payin and payout methods): settlement times feel a bit awkward for payin methods. makes more sense to limit their usage for payout methods only. e.g.

Note

fields omitted for brevity

{
  "metadata": {
    "from": "did:ex:pfi",
    "kind": "offering",
    "id": "offering_01ha82y8d0fhstg95hhfjwmgxf",
    "createdAt": "2023-09-13T20:15:22.528Z",
    "protocol": "1.0"
  },
  "data": {
    "description": "Selling BTC for USD",
    "payoutUnitsPerPayinUnit": "0.00003826",
    "payin": {
      "currencyCode": "USD",
      "methods": [
        {
          "kind": "DEBIT_CARD",
          "estimatedSettlementTime": 60 <--- weird?
        }
      ]
    },
    "payout": {
      "currencyCode": "BTC",
      "max": "999526.11",
      "methods": [
        {
          "kind": "BTC_ADDRESS",
          "estimatedSettlementTime": 3600
        }
      ]
    }
  }
}

options here are:

  1. limit requirement to payout methods only
  2. make estimatedSettlementTime optional.

I prefer option 1. have a feeling that no pfi will use the field if it's optional esp. if concerned about scoring.

@decentralgabe
Copy link
Contributor

Agree with option 1

mistermoe added a commit that referenced this issue Mar 13, 2024
Co-Authored-By: corcillo <[email protected]>
@mistermoe mistermoe mentioned this issue Mar 13, 2024
@mistermoe mistermoe linked a pull request Mar 13, 2024 that will close this issue
@jiyoonie9
Copy link
Contributor

i have not looked through SWIFT docs, but in terms of an LP facilitating remittance, it's pretty typical for a consumer to see (and if they don't see, ask for) payout delivery estimate. landing page of a popular remittance service wise.com showcases this (Should arrive in 2 hours at the bottom)

image

mistermoe added a commit that referenced this issue Mar 14, 2024
* address #260

* update schemas to reflect changes described in #260

* address #261

* address #262

* address #263

Co-Authored-By: corcillo <[email protected]>

* address #253

* Update specs/protocol/README.md

Co-authored-by: Kendall Weihe <[email protected]>

* Apply suggestions from code review

Co-authored-by: Gabe <[email protected]>

* Update specs/protocol/README.md

Co-authored-by: Kendall Weihe <[email protected]>

* Update specs/protocol/README.md

Co-authored-by: phoebe-lew <[email protected]>

* Update specs/protocol/README.md

Co-authored-by: Kendall Weihe <[email protected]>

* Update specs/protocol/README.md

Co-authored-by: phoebe-lew <[email protected]>

* add description for `estimatedSettlementTime`

* Update hosted/json-schemas/offering.schema.json

Co-authored-by: Gabe <[email protected]>

* narrow type for `requiredPaymentDetails`

Co-Authored-By: Gabe <[email protected]>

* fomatting

---------

Co-authored-by: corcillo <[email protected]>
Co-authored-by: Kendall Weihe <[email protected]>
Co-authored-by: Gabe <[email protected]>
Co-authored-by: phoebe-lew <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants