开发者

Delayed Chained Payments in PayPal with initially-unknown Secondary Receiver

开发者 https://www.devze.com 2023-04-09 04:40 出处:网络
Reading through PayPal\'s API documents I don\'t see a clear way to do this, but I don\'t want to assume that it\'s impossible because I don\'t know how to do it.

Reading through PayPal's API documents I don't see a clear way to do this, but I don't want to assume that it's impossible because I don't know how to do it.

Use case: I'm building a marketplace for a client开发者_高级运维 that allows a consumer to purchase a commodity service, then we find a provider to fulfill that service. (specifics are omitted for confidentiality and irrelevancy)

The problem: At the time of purchase the provider is unknown, but we want to authorize payment when the consumer buys the service (and trigger payment after fulfilled).

From PayPal's Adaptive Payments API I see it's possible to create a Delayed Chained Payment (which is great), but the secondary receiver must be declared when created. That's not possible because we don't yet know who's going to fulfill the consumer's request.

One somewhat naive solution is to have the consumer pay us directly, then we trigger a secondary transaction between us and the provider. This isn't great because it incurs double the transaction fees.

Is there another way to accomplish this with PayPal? Is there another payment provider that might be a better fit?

Thanks!!


The Permissions API should allow you to setup the payment on behalf of the buyer at a later time, when all parties are known.


If the secondary receiver is unknown - probably the best way to implement this is to obtain a Preapproval from the user and then use it to pay the secondary receiver in the future. Here is how you can do it:

https://developer.paypal.com/docs/classic/adaptive-payments/ht_ap-basicPreapproval-curl-etc/

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号