Get All Refunds in BigCommerce - rest

I'm using BigCommerce and want to know if there is an endpoint that retrieves all refunds. I've seen the v3 orders endpoint /orders/{order_id}/payment_actions/refunds, but this gets all refunds for a specific order.
I want to know if its possible to get all refunds of all orders.
Edit:
Found the path for refunds, but now I need to know if I can use query params to filter the data or not.
In the orders API we can use filters like min_date_modified. Can I use the same for the refunds endpoint?

It seems they've missed the documentation on that endpoint, but if I was to guess I'd try /v3/orders/payment_actions/refunds?created:min=2021-01-01T23:05:05%2B00:00 since that's how other V3 endpoints work. I used that query and it didn't error (once I encoded the + sign in the time), but I don't have production creds at hand to test with real refunds.

I found an article that specified the endpoint URL
https://medium.com/bigcommerce-developer-blog/order-refund-api-automate-refunds-in-bigcommerce-7a00aaa6fae7
the endpoint to get all refunds is orders/payment_actions/refunds

Related

GetTransactionDetails and permissions in the new REST API world

I'm still trying to wrap my head around all this, so my apologies if I've made a mistake, but it seems like the old NVP apps that are now unable to be registered as of December 1st had some features available that can't be replicated in the new REST world order...
Here's what I want/need: I need to be able to translate buyer-side transaction IDs into my seller-side transaction IDs, and I want to be able to do this on a webserver that is secure but I don't want it to have full access to my account, so I'd like fine-grained authz for this server.
It seems like I am a couple days too late to actually get what I want/need. Basically, GetTransactionDetails does exactly what I want (convert buyer to seller transaction IDs, and returns the rest of the transaction information for good measure). And, although I haven't gotten it working, it looks like the Permissions SDK plus an NVP AppID would allow me to have just the TRANSACTION_DETAILS permission on this service which is exactly what I want.
However, as of Friday apparently I can't get an AppID for the classic NVP API? If so, my timing is impeccable.
Trying to figure out how to do this in the REST API has proven difficult. This thread talks about the sale record, which does indeed take a buyer-side transaction ID, but it does not actually translate it into a seller-side one. It does have the custom field, which helps me a little, but I really need the seller-side transaction ID. It looks like maybe the parent_payment URL in the return from the sale might help, but the API started returning PERMISSION_DENIED on me even on previously successful queries so I can't exactly test this right now. And, even if that did work, it seems like the permissions on the REST API are incredibly coarse compared to the Permissions SDK, for example the sale endpoint is under /v1/payments which seems to also include refunds and all kinds of other stuff I don't want exposed. It looks like there's a Transaction Search permission but it's marked beta and it didn't work for querying a sale for me. But maybe it means they're working on it?
What are my options here?
Thanks,
Chris
Okay, so I played around with this for a while, and it seems like the PayPal REST API is just not very good. So, I worked around the limitations here using AWS Lambda and its fine-grained IAM permissions. I created a Lambda function that took my PayPal NVP credentials as encrypted env vars, and an IAM account that could only call my Lambda function, and so now I've got a microservice that will translate transaction IDs and return some extra info (custom and email) from the transaction to boot.
I wish I didn't have to use AWS to work around PayPal's limitations (which seem to be getting worse with the REST API, the NVP api would have been fine if I could have gotten and AppID and used the Permissions SDK), but oh well.
Chris

PayPal REST API - Get Sale by Transaction ID - The requested resource ID was not found (404)

I am essentially trying to get the details of any transaction ID in my PayPal account to authenticate users I am migrating to a new authentication system.
I am using the PayPal Rest API so: http://puu.sh/gdb3T/461dde2928.png and yes I have checked everything is fine, it is infact set to live with the correct id / secret.
This isn't exactly an answer to this specific question, but I have simply fixed it by using PayPal's classic API in order to get the job done.
Kind of strange the rest API doesn't let me do this.

How to pre-fill customer details using Paypal REST API?

We're using Paypal's REST API and we'd like to pre-fill the customer's data (email, name, address) on the approval's page.
There is a payer_info object that can passed to Paypal when the payment is created. But it does not allow specifying customer's details - email field is not supported and others are read-only. Also I don't see any mentions in the API docs on how to achieve this with the REST API. Do you know if it's possible and how? If it's not supported, is it known when it's gonna be supported?
Thanks in advance.
Even when using PayPal REST API you can follow these instructions https://www.paypal.com/cgi-bin/webscr?cmd=_pdn_xclick_prepopulate_outside and append the params as GET params on the end of the aproval_url before redirect the customer.
For example:
https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=EC-77D44712W7736393M&first_name=Geovanny&last_name=Junio

PayPal Rest API - historical data

I'm just wondering if the new PayPal rest API can be used to receive historical data. For example getting a list of sales made before the rest API existed.
I thought there would be some way to hook it up but it seems you can only get sales that were made though the rest API itself.
Am I wrong?
That's correct - only transactions created (via the REST API's) are returned in a GET /payment call today.
You would need to use the classic TransactionSearch API call for any transaction created prior to that.

Bigcommerce API Authenticating a customer with GET request

I'm doing a GET for customers with a given email address (there will only be one). Before displaying the returned information, I need to authenticate the user, but I can't see a way in the docs that allows providing a password as a parameter to a GET. In fact It only seems to be possible to provide a password when creating (POSTing) or updating (PUTting) a customer. Is it possible to authenticate customers via the API this way?
from what I understand - _authentication is only supported for POST and PUT on customer objects. I believe it is intended to create a customer who can login and stuff like that.
Can you explain your use case and maybe there is a workaround..