# About using code to directly call Wix’s payment system in developer mode

**URL:** <https://forum.wixstudio.com/t/about-using-code-to-directly-call-wix-s-payment-system-in-developer-mode/67747>\
**Category:** Ask the community\
**Tags:** wix-bookings, wix-forms, code\
**Created:** [January 20, 2025, 4:19pm UTC](https://forum.wixstudio.com/t/about-using-code-to-directly-call-wix-s-payment-system-in-developer-mode/67747 "2025-01-20T16:19:47Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wang\_zhibo](https://avatars.discourse-cdn.com/v4/letter/w/6de8d8/32.png) [@wang\_zhibo](https://forum.wixstudio.com/u/wang_zhibo)\
**Post date:** [January 20, 2025, 4:19pm UTC](https://forum.wixstudio.com/t/about-using-code-to-directly-call-wix-s-payment-system-in-developer-mode/67747/1 "2025-01-20T16:19:47Z")

</div>

Hello Wix Community,

I manage four websites created using Wix, two of which are commercial sites ready for online operations. I am using Developer Mode to integrate user-submitted booking information with custom database fields and redirect users to Wix’s payment page.

However, I’ve encountered a challenge with Wix’s built-in payment system. Before selecting a payment method, users are prompted to input their email, name, and phone number. Unfortunately, I cannot access this information through my setup, which limits my ability to automate tasks after users complete their bookings.

Here’s what I’m trying to achieve:

1. Automatically send users a detailed confirmation of their booking information and payment amount.
2. Simultaneously notify customer service with the user’s booking details.

I’m open to sharing my Developer Mode code for review, and I can provide it via email if needed. The code is specifically applied to the **online Book** page.

I understand that I could create a Wix form to collect email and phone information beforehand, but having users input this information again during the payment process isn’t user-friendly. Ideally, I would like to access the email and phone number users provide during the payment process to streamline the booking experience. This way, our customer service team can contact users immediately after their payment is completed.

If anyone has faced a similar issue or knows how to access this information, I would greatly appreciate your advice or suggestions!

Thank you in advance for your help!

---

<div class="post-metadata">

**Author:** ![Pratham](https://sea1.discourse-cdn.com/wix/user_avatar/forum.wixstudio.com/pratham/32/119586_2.png) [@Pratham](https://forum.wixstudio.com/u/Pratham)\
**Post date:** [January 22, 2025, 7:59am UTC](https://forum.wixstudio.com/t/about-using-code-to-directly-call-wix-s-payment-system-in-developer-mode/67747/2 "2025-01-22T07:59:46Z")

</div>

> [@wang\_zhibo](#):
>
> I understand that I could create a Wix form to collect email and phone information beforehand, but having users input this information again during the payment process isn’t user-friendly.

Dosen’t the [**createPayment()**](https://dev.wix.com/docs/velo/api-reference/wix-pay-backend/create-payment) function take in a **userInfo** object as a parameter? Did you try passing the info through that?

 ![Screenshot 2025-01-22 at 1.29.27 PM](https://us1.discourse-cdn.com/wix/original/3X/f/a/fa0e00cfe57e79ebb1bb86418eb47bb9f013918a.jpeg)

This same userInfo is then returned with the [**onPaymentUpdate()**](https://dev.wix.com/docs/velo/api-reference/wix-pay-backend/events/on-payment-update) event (as mentioned in the docs).

---

<div class="post-metadata">

**Author:** ![wang\_zhibo](https://avatars.discourse-cdn.com/v4/letter/w/6de8d8/32.png) [@wang\_zhibo](https://forum.wixstudio.com/u/wang_zhibo)\
**Post date:** [January 24, 2025, 6:26pm UTC](https://forum.wixstudio.com/t/about-using-code-to-directly-call-wix-s-payment-system-in-developer-mode/67747/3 "2025-01-24T18:26:01Z")

</div>

Thank you! I have implemented the user information pre-fill logic according to your suggestion. I have one more question: should I use `const paymentMethod = paymentResult.paymentMethod` ? It seems like `paymentResult` does not contain `paymentMethod` . Should I use `const paymentMethod = payment.paymentMethod` instead?
