stellar / stellar-protocol

Developer discussion about possible changes to the protocol.
509 stars 301 forks source link

[SEP-6] Add location_id to withdrawal #1433

Closed Ifropc closed 4 months ago

Ifropc commented 5 months ago

Background

One of partners requires for user to choose a location to be selected. This location will be used to pick up funds

Proposed change

Add location_id to withdrawal requests

JakeUrban commented 5 months ago

Its unclear if fields listed in /info need to be SEP-9 or can be custom. The fields dest and dest_extra are defined in the SEP itself, where as others in the example are SEP-9 fields, so its unclear if location_id should be defined somewhere as well. As long as we clarify I think this approach is fine.

I'm not opposed to simply adding an optional location_id argument. It is unclear how using an object like extra would work in the context of GET URL arguments.

Ifropc commented 5 months ago

I don't mind just adding location_id directly, but I think it's more flexible if we allow anchors to define their own fields, so we don't need to modify protocol for any small deviation from SEP-6 protocol

JakeUrban commented 5 months ago

I agree it is valuable that your solution provides anchors a way to request their own custom fields, and if we were starting from scratch I think this is the right approach. The reason I think we should try to avoid making this change is simply because it is breaking, and it is unclear how common the need for custom fields will be.

I also think that a location_id parameter makes sense to include in an on/off ramp standard API. Right now MGI is the only cash-agent network that supports a stellar on/off ramp standard, but any future cash-agent network anchor will need this. And if we don't standardize the location_id parameter, they'll define their own parameter in GET /info which could use a different name.

JakeUrban commented 5 months ago

Ok, it sounds like we're on the same page of adding location_id to request parameters rather than the approach defined here, so I'll close this PR.

Ifropc commented 5 months ago

Reopened PR to preserve discussion history

JakeUrban commented 5 months ago

Also, don't forget to update the updated-at and version fields.