# Access to Payments Table on dashboard via code?

**URL:** <https://forum.wixstudio.com/t/access-to-payments-table-on-dashboard-via-code/1683>\
**Category:** Ask the community\
**Tags:** question, wix-stores, code\
**Created:** [December 8, 2021, 3:49am UTC](https://forum.wixstudio.com/t/access-to-payments-table-on-dashboard-via-code/1683 "2021-12-08T03:49:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![cherierevells](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@cherierevells](https://forum.wixstudio.com/u/cherierevells)\
**Post date:** [December 8, 2021, 3:49am UTC](https://forum.wixstudio.com/t/access-to-payments-table-on-dashboard-via-code/1683/1 "2021-12-08T03:49:52Z")

</div>

I have a simple payment scenario set up on my site using Wix Payments as shown in this example:  
[https://support.wix.com/en/article/velo-tutorial-using-the-velo-pay-api-to-collect-payments-for-a-single-product](https://support.wix.com/en/article/velo-tutorial-using-the-velo-pay-api-to-collect-payments-for-a-single-product)

On another page, I need to know whether the user has in fact paid or not for the service. I can get the payment ID when the payment is created and store that with my user info. I see that all the information I need about the payments is kept in my site dashboard under Finances \> Payments. Can I access this programmatically?

If not, I can keep the data I need when I receive wixPay\_onPaymentUpdate events, but it seems unnecessary since everything I need is being stored in this Payments Table on the dashboard.

---

<div class="post-metadata">

**Author:** ![anon72313111](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@anon72313111](https://forum.wixstudio.com/u/anon72313111)\
**Post date:** [December 8, 2021, 5:37am UTC](https://forum.wixstudio.com/t/access-to-payments-table-on-dashboard-via-code/1683/2 "2021-12-08T05:37:53Z")

</div>

Hi there,

Unfortunately, you can’t access this data with Velo 😥

---

<div class="post-metadata">

**Author:** ![cherierevells](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@cherierevells](https://forum.wixstudio.com/u/cherierevells)\
**Post date:** [December 8, 2021, 2:43pm UTC](https://forum.wixstudio.com/t/access-to-payments-table-on-dashboard-via-code/1683/3 "2021-12-08T14:43:26Z")

</div>

Thanks @ahmadnasriya . Now I have a question about the events that I will receive in my wixPay\_onPaymentUpdate event handler. The docs say:

1. When the customer places an order and it is approved, the payment appears on the payments dashboard in Status as: **Pending Credit**. Once the customers’s card issuer pays the funds to Wix the status of the payment changes to **Successful**.

When I test it with a purchase on my credit card, I only receive one event that is Successful. If there is delay between the transaction pending and being successful (I assume this depends on the credit card provider), will I receive two events? I’m not sure how to test this. In the end, I want to be able to look up the transaction ID in my own Payments collection (which I populate in the event handler) and see if that transaction is in the Successful state.

---

<div class="post-metadata">

**Author:** ![cherierevells](https://avatars.discourse-cdn.com/v4/letter/c/d6d6ee/32.png) [@cherierevells](https://forum.wixstudio.com/u/cherierevells)\
**Post date:** [December 8, 2021, 3:52pm UTC](https://forum.wixstudio.com/t/access-to-payments-table-on-dashboard-via-code/1683/4 "2021-12-08T15:52:40Z")

</div>

I’m also not quite sure which ID field I should be using to represent a payment. I want the \_id field of my database Payments table to be one of these ids and then it would be a bit easier programmatically. I don’t quite understand the difference between the two.

event.transactionId – This is the Provider Payment ID in downloaded Payments Table  
event.payment.id – This is the Order ID in downloaded Payments Table.

The docs say the Order ID could be associated with multiple payables so I’m guessing the Provider Payment ID is better to use, but the example in the Wix documentation here:  
[https://www.wix.com/velo/reference/wix-pay-backend/events/onpaymentupdate](https://www.wix.com/velo/reference/wix-pay-backend/events/onpaymentupdate)  
uses event.payment.id :

```javascript
export function wixPay_onPaymentUpdate(event) {
5 let paymentId = event.payment.id;
6 let newTransactionStatus = event.status;
7}

```

Maybe it doesn’t matter which one I use.

---

<div class="post-metadata">

**Author:** ![anon72313111](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@anon72313111](https://forum.wixstudio.com/u/anon72313111)\
**Post date:** [December 9, 2021, 7:16am UTC](https://forum.wixstudio.com/t/access-to-payments-table-on-dashboard-via-code/1683/5 "2021-12-09T07:16:42Z")

</div>

The supported events don’t include the pending status, you only receive a few events that are all listed in the docs, one of which is the success event.

---

<div class="post-metadata">

**Author:** ![anon72313111](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@anon72313111](https://forum.wixstudio.com/u/anon72313111)\
**Post date:** [December 9, 2021, 7:19am UTC](https://forum.wixstudio.com/t/access-to-payments-table-on-dashboard-via-code/1683/6 "2021-12-09T07:19:06Z")

</div>

If you want to represent the payment to your clients/customers, you should use your own IDs, the payment ID is for your reference in case of refunds, chargebacks, etc, and the order ID is for your reference in the website, as you pass it to Wix Pay, other than that, your customers should see your own transaction ID.

---

<div class="post-metadata">

**Author:** ![siliconvalleywoodtur](https://avatars.discourse-cdn.com/v4/letter/s/c4cdca/32.png) [@siliconvalleywoodtur](https://forum.wixstudio.com/u/siliconvalleywoodtur)\
**Post date:** [January 17, 2022, 10:17pm UTC](https://forum.wixstudio.com/t/access-to-payments-table-on-dashboard-via-code/1683/7 "2022-01-17T22:17:29Z")

</div>

I am disappointed that the payment and payout data are not available from velo code. I would like to create reports for the accountant/treasurer who deals with the bank statements. There is currently no way to show which payments are included in which payouts. The treasurer is not interested (and not technically saavy) to login to a Wix account to gather that information. But if I could present the data in a format that he likes on our website then it will be very useful. Is there any particular reason why the data visible in the dashboard is not allowed to be accessed using velo code?
