#red_api

1 messages · Page 1 of 1 (latest)

flat mossBOT
#

đź‘‹ Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

đź”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1435429157449498715

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

sonic geode
#

Node.js code:

            amount_requested: {
            currency: 'usd',
            value: propsData.amount * 100,
            },
            customer_presence: 'off_session',
            description: 'Future cash payment option when booking event',
            initiated_at: secondsSinceEpoch,
            payment_method_details: {
                custom: {
                    display_name: 'newpay',
                    type: CASH_PAYMENT_METHOD_ID
                },
                type: 'custom',
            }
        });```
#

not sure why it's complaining about reportPayment?

#

TypeError: Cannot read properties of undefined (reading 'reportPayment')

ionic portal
#

hi there, give me a moment to catch up

#

can I have your Stripe account ID so that I can take a look at your account logs?

#

is your Stripe account using our latest API version: 2025-10-29.clover?

sonic geode
#

how do I see ID?

#

oh: acct_1RZepBBBPymgN3Ps

ionic portal
#

thank you, taking a look

sonic geode
#

oh

#

had no idea

ionic portal
sonic geode
#

how do I upgrade

#

I think I did 🙂

ionic portal
sonic geode
#

it's just sandbox

#

same issue

#

same error anyway

#

hmmm basil shows increased api calls - not clover?

#

just ran it again and it increased to 7 calls

#

and now 8

ionic portal
#

Hmmm....it looks like your integration could be setting 2025-05-28.basil somewhere, could you check?

sonic geode
#

something else I need to do?

#

where would that be? I can't imagine I am

#

just using secret key

#

import Stripe from 'stripe';

const stripe = new Stripe('sk_test_51RZepBBB...F');

ionic portal
#

You can try searching 2025-05-28.basil across your files to check where its possibly set

sonic geode
#

it's not

#

ok, I hardcoded it

#

now I see the method calls increase for clover

#

but I still get the same error

ionic portal
#

Okay let me check the SDK version you're using, I see stripe-node 18.2.1 on my end

sonic geode
#

not sure where that comes from?

#

oh

#

1
stripe
2
nodejs22.x

arn:aws:lambda:us-east-2:300821598169:layer:stripe:2

#

it's in AWS Lambda - looks like 22.x

#

seems like it should work?

ionic portal
sonic geode
#

hmm, that's gonna be a pain - will need to upgrade the whole lambda layer

ionic portal
#

I understand, but it looks like the upgrade is needed otherwise the new Stripe methods like .reportPayment can't be used

sonic geode
#

ok. how can I spit out the sdk version?

#

in my logging, so I can verify that it's correct?

#

looks like it's working

#

now I"m getting: ERROR stripe.paymentRecords.reportPayment failed - err: Error: You may only specify one of these parameters: display_name, type.

#

docs don't suggest that?

#

now I'm getting:

ERROR stripe.paymentRecords.reportPayment failed - err: Error: Missing required param: processor_details

#

again, not in the example code?

#

ok, fixed that one too

#

how do I link customer?

#

customer_details
object


Hide child parameters

customer_details.customer
string
The customer who made the payment.


customer_details.email
string
The customer’s phone number.


customer_details.name
string
The customer’s name.


customer_details.phone
string
The customer’s phone number.```
#

is customer_details.customer the customerId in the Customer object retrieved?

#

why would I need to specify email / name / phone too?

#

whelp - I retrieve the customer and do this:

                customer: customer.id,
                email: customer.email,
                phone: customer.phone,
                name: customer.name
            },```
#

ie pull the details right from the Customer object Stripe returns to me...but I have to check for null values?!

#

wait, what?

ERROR stripe.paymentRecords.reportPayment failed - err: Error: You may not provide other customer parameters when providing the `customer` parameter.

#

I think it would be good to update the docs!!

ionic portal
#

sorry, this is a pretty new method and I am reading up on our docs on this. Regarding your question
is customer_details.customer the customerId in the Customer object retrieved?— this is likely the customer ID.

#

I will need more time to look at this with my team. Would you mind if we work on the errors you flagged here over email? I will drop you a dm to create a support case directly with us.

flat mossBOT
#

Hello @sonic geode, we have sent you a direct message, please check it at https://discord.com/channels/@me/1435448187849805827

  • đź”—The message has instructions on how to open a direct support case with our Developer Support team, in order to help you more effectively.
sonic geode
#

I actually got it working

#

the docs need updating

#

if I just specify the customerId as the customer field, leave off email/phone/name, it associates it on the backend

#

would be great for others though if you could get docs updated

ionic portal
#

But based on the error message, you can specify customer ID and other customer parameters right

#

yes, I will flag the need to make the docs more explicit to our team

#

appreciate the feedback here

sonic geode
#
                customer: customer.id
                //email: customer.email,
                //phone: customer.phone,
                //name: customer.name
            },```
#

this worked fine

#

I either get or create a customer in the step prior, so always exists

ionic portal
#

I see, so when do you actually get the following error?
ERROR stripe.paymentRecords.reportPayment failed - err: Error: You may not provide other customer parameters when providing the customer parameter.

sonic geode
#

if I include the customer AND the email/phone/name

ionic portal
#

Got it, so the docs can be clearer that email/phone/name is not needed if customer.id is passed.

sonic geode
#

yes

#

and this:

now I"m getting: ERROR stripe.paymentRecords.reportPayment failed - err: Error: You may only specify one of these parameters: display_name, type.

#

for custom payment method

ionic portal
#

thank you I will flag that as well

sonic geode
#

and sample code could do with being updated to include this:

again, not in the example code?```
sonic geode
#

I need to check if the payment record exists

#

what's the best way to do that?

#

oh noooooooo

#
  -u "sk_test_51RZepBBBPymgN3PsbqTxxEqu98iGm5ss52g6bv7S8aFxLSxpFI7cEmsjaC0MPR43WocWcvbUvfgQI7lyH2557khH00scg5RcUF:"
We show the cURL request because this method is currently unsupported in the Node.js client. To see it in the library, let us know about your use case.```
#

whelp!!

#

my situation: I give option in the UI to pay by CC, ACH or Cash (custom payment method)

#

for the integration with GoHighLevel they make a second call to verify the payment was successful

#

if they pay with Cash I need to verify there's a Payment Record for Cash, and return a Pending state to GoHighLevel

#

but I obviously have to be able to look it up!!!

ionic portal
#

yeah..currently it looks like its not possible to list Payment Records to look up. It looks like you would have to store the payment records ID in database for to list, I'm not seeing another workaround

sonic geode
#

that's awful!

ionic portal
#

I will raise this as a feedback as well

sonic geode
#

yeah, that's pretty big gap for anyone implementing this

#

at worst, I guess the Curl will work, correct? I can do that from within Node myself

ionic portal
#

you mean retrieving a specific payment record?

#

or listing payment records?