简体   繁体   English

如何在 Rave Flutterwave 中结算托管付款和退还托管付款?

[英]How does Settling an Escrow payment and Refunding an Escrow payment work in Rave Flutterwave?

I am new to flutterwave integrations.我是 flutterwave 集成的新手。 I am developing a website and testing the Escrow Payments feature.我正在开发一个网站并测试托管付款功能。 I have created an account and all the other stuff with api, secret key and well as details and upoads etc. It all seem to be looking good in my development environment using the api key from ravesandbox.我已经使用 api、密钥以及详细信息和上传等创建了一个帐户和所有其他内容。使用 ravesandbox 中的 api 密钥在我的开发环境中看起来一切都很好。 I am totally confused on how Settling an Escrow payment and Refunding an Escrow payment works.我对结算托管付款和退还托管付款的方式感到非常困惑。 It says in the documentation "When the funds are in escrow and you would like to settle the seller for the funds you would need to call our settlement endpoint."它在文档中说:“当资金处于托管状态并且您想向卖方结算资金时,您需要调用我们的结算端点。”

Test endpoint: https://ravesandboxapi.flutterwave.com/v2/gpx/transactions/escrow/settle and then it gave a sample request测试端点: https://ravesandboxapi.flutterwave.com/v2/gpx/transactions/escrow/settle然后给出了一个sample request

{
    "id": "348813", // this is the txid value returned in the v2/verify response.
    "secret_key": "FLWSECK-*************************-X" // your merchant secret key.
}

Something Similar too with Refunding an Escrow payment.退还托管付款也有类似之处。 How exactly does this work?这究竟是如何工作的? Does it go somewhere in my site or...?它是 go 在我网站的某处还是...?

I would assume you are building a marketplace platform, from the description this is what I can gather.我假设您正在构建一个市场平台,根据描述,这是我可以收集到的。 Rave allows you to handle payments in your marketplace using two features split payments and Escrow (for consumer protection). Rave 允许您使用split paymentsEscrow (用于消费者保护)两个功能来处理您的市场中的split payments

When using split payments the assumption is that you want Rave to handle automatic settlements to sellers on your platform, so for example when a seller has collected N10,000 via your platform and it's due to be settled tomorrow, Rave automatically settles into the account you've provided for the seller.使用分期付款时,假设您希望 Rave 为您平台上的卖家处理自动结算,例如,当卖家通过您的平台收取 N10,000 且将于明天结算时,Rave 会自动结算到您的账户中已经提供给卖家。 You can read more on split payments here .您可以在此处阅读有关拆分付款的更多信息

Escrow payments allow you to provide consumer protection and works best when using the scenario I described above with split payments.托管付款允许您提供消费者保护,并且在使用我上面描述的拆分付款方案时效果最佳。 Assume the transactions from the merchant above were flagged as escrow transactions, this is the scenario that would play out.假设来自上述商家的交易被标记为托管交易,这就是会发生的情况。

Merchant x has collected 4 transactions worth N10,000 because you set them in escrow, they would not be settled on the due date as expected.商户 x 收集了价值 N10,000 的 4 笔交易,因为您将它们设置为托管,它们不会按预期在到期日结算。 Each transaction would now be settled when you call the settlement API.现在,当您调用结算 API 时,每笔交易都会被结算。

Let's break it down using a sample transaction from the 4 transactions.让我们使用 4 个交易中的一个示例交易来分解它。 Assume 1 f the 4 transactions were done by customer A - N2000 on the 4th of May 2019, this means the transaction was initially due to be settled to the seller on the 5th of May 2019 (T+1 settlements ), but you placed the transaction in escrow, till your assumed buyer confirmation flow is completed, and seller meets all conditions to receive the payment.假设 1 f 这 4 笔交易是由客户 A - N2000 在 2019 年 5 月 4 日完成的,这意味着该交易最初应于 2019 年 5 月 5 日向卖方结算T+1 结算),但您将托管交易,直到您假设的买家确认流程完成,卖家满足所有条件才能收到付款。 Assume the date this confirmation happens is on the 10th of May this means you call the settlement API on this date, the transaction leaves escrow and Rave automatically settles the fund into the Sellers account the next day.假设此确认发生的日期是 5 月 10 日,这意味着您在该日期调用结算 API,交易离开托管,Rave 会在第二天自动将资金结算到卖家账户。

This is how the Escrow service works on Rave, let me know if this clarifies things for you.这就是托管服务在 Rave 上的工作方式,如果这为您澄清了问题,请告诉我。

Flutterwave docs dont do a good job telling us that this is a POST method, not GET. Flutterwave 文档没有很好地告诉我们这是一个 POST 方法,而不是 GET。

const options = {
    method: 'POST',
    headers: {
               'Content-Type': 'application/json',
    },
    body: JSON.stringify(data),
};
    
let data = {
    "id": txid,
    "secret_key": "your-secret-key"
};

fetch('https://api.ravepay.co/v2/gpx/transactions/escrow/settle', options)
   .then(response => response.json())
   .then(response => console.log(response))
   .catch(err => console.error(err))

For anyone seeing this past 2022, it seems Flutterwave has quietly removed support for v2 escrows (currently they work only in test mode but not in prod).对于任何看到 2022 年过去的人来说,Flutterwave 似乎已经悄悄地取消了对 v2 托管的支持(目前它们仅在测试模式下工作,而不在生产模式下工作)。 There is no mention of escrow support in v3 of Flutterwave's api so it's safe to assume it won't be supported going forward在 Flutterwave 的 api 的 v3 中没有提到托管支持,所以可以肯定地假设它不会在未来得到支持

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM