gpt4 book ai didi

paypal - 是否可以通过 Paypal API 导入发票记录

转载 作者:太空宇宙 更新时间:2023-11-03 16:24:57 25 4
gpt4 key购买 nike

我可以从 paypal API docs 中看出可以创建发票记录并将其标记为已付款。

这个要钱吗?

我有过去 3 年的发票纸质记录 (<1000),我可以使用 API 来“导入”发票的历史记录,以便可以像搜索新发票一样搜索旧发票等/将通过 Paypal 进行的付款。

最佳答案

可以发送 API 调用以获取发票详细信息和搜索发票。很可能您将无法回溯超过 2 年。您需要提交第 3 方权限的申请请求,以便发送 API 调用以获取此信息。这是 apply for third party permissions 的链接:

这是 Invoicing API Examples :

来自上述 PayPal 文档:

Searching for Invoices

This example searches for invoices using SearchInvoices. You must have created the original invoice either for yourself or on behalf of another merchant.

PayPal can return a maximum of 100 invoices per page. In this example, only the first 10 invoices that you created using the Invoicing Service API for the jb-us-seller1@paypal.com account are returned:

curl https://svcs.sandbox.paypal.com/Invoice/SearchInvoices \
-s \
--insecure \
-H "X-PAYPAL-SECURITY-USERID: Your_API_username" \
-H "X-PAYPAL-SECURITY-PASSWORD: Your_API_password" \
-H "X-PAYPAL-SECURITY-SIGNATURE: Your_API_signature" \
-H "X-PAYPAL-REQUEST-DATA-FORMAT: NV" \
-H "X-PAYPAL-RESPONSE-DATA-FORMAT: NV" \
-H "X-PAYPAL-APPLICATION-ID: Your_AppID" \
-d requestEnvelope.errorLanguage=en_US \
-d merchantEmail=jb-us-seller1%40paypal.com \
-d parameters.origin=API \
-d parameters.email=jb-us-seller1%40paypal.com \
-d page=1 \
-d pageSize=10

这里是从 PayPal 文档中获取 Invoice 的示例详情:

Obtaining Invoice Details

This example gets information about an invoice using GetInvoiceDetails.

curl https://svcs.sandbox.paypal.com/Invoice/GetInvoiceDetails \
-s \
--insecure \
-H "X-PAYPAL-SECURITY-USERID: Your_API_username" \
-H "X-PAYPAL-SECURITY-PASSWORD: Your_API_password" \
-H "X-PAYPAL-SECURITY-SIGNATURE: Your_API_signature" \
-H "X-PAYPAL-REQUEST-DATA-FORMAT: NV" \
-H "X-PAYPAL-RESPONSE-DATA-FORMAT: NV" \
-H "X-PAYPAL-APPLICATION-ID: Your_AppID" \
-d requestEnvelope.detailLevel=ReturnAll \
-d requestEnvelope.errorLanguage=en_US \
-d invoiceID=INV2-RVY9-UWTW-64HZ-BR9W

关于paypal - 是否可以通过 Paypal API 导入发票记录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36421318/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com