#svemirski_webhooks

1 messages ยท Page 1 of 1 (latest)

river gobletBOT
#

๐Ÿ‘‹ 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/1430817112732995685

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

opal belfry
#

Hey! do give me some time to take a look at this

surreal canyon
#

Thanks a lot sir, I mean if you can just give me conbination of inputs that can trigger this that would be great, I even tried on a fresh hosted flow without my implementation and again all connected accounts where succeffullly created

#

here is example for 000000001 tax id

opal belfry
#

Could you provide your account ID?

#

It should have the prefix acct_xxx

surreal canyon
#

let me find that guy I tested him last night

#

acct_1SLBIa3K7i1ShskA

opal belfry
#

From your dashboard i can see that your Connect Webhook endpoint is disabled

surreal canyon
#

hmmm I'm receiving webhooks normaly

#

I get the ones for success and all

#

one sec

opal belfry
#

Oh apologies I was looking at your livemode account

surreal canyon
#

no worries sir

#

also I can see webhook events on my dashboard, thing is that I cannot manage to get any account in the state to need additional requirements and future requirements so I can test my logic on instance with needed requirements state

#

I always get success state ๐Ÿ˜„

surreal canyon
#

I tested them thru rest to confirm logic works, but our QA needs to test it in dev env too, so that's why I need to provide them instructions how to do it

opal belfry
#

Is there a reason why you need to know that the SSN was updated specifically?

surreal canyon
#

not that I'm aware, I mean I need any test data that works, that you enter into form to get connected account into state that it needs future requirements or change in requirements

river gobletBOT
pliant steeple
#

๐Ÿ‘‹ taking over for my colleague. Let me catch up.

surreal canyon
#

sounds good sir, thanks!

#

also I tried demo app from stripe with stripe hosted flow and I'm probably using test data wrong

#

since I alway get

#

connected account created properly

#

without any updates in requirements

#

or updated requirements

pliant steeple
#

which requirements are you waiting for exactly?

surreal canyon
#

so if If you can provide me example of combination of fields that can get me to that state to test that webhook would be great ๐Ÿบ

#

anything really

#

so QA can test to see if webhook logic is working

pliant steeple
#

ok

surreal canyon
#

I tried all that 111111111 is still successful for SSN can you try and see?

pliant steeple
#

would you mind sharing the request ID?

surreal canyon
#

hey sry what's request id?

pliant steeple
#

basically it's the ID of the API request you sent to create/update the account

surreal canyon
#

I'll need to do that in 40 mins if that's fine I'm not on my machine?

#

basically how you can re-create this is try any hosted flow

#

yourself

#

and try to trigger this that's what's weird to me

#

one sec

pliant steeple
#

what's your platform's account ID?

#

the acct_xxx

surreal canyon
#

account id of person I tested or? acct_1SLBIa3K7i1ShskA

#

or you need my sk_test_ ?

pliant steeple
#

is that the one you're using to create connected accounts?

#

no I don't need your API keys

#

ok this is the custom account you created

#

but no worries I found the Platform account ID

#

thanks ๐Ÿ™‚

surreal canyon
#

sry sir, thanks a lot!

pliant steeple
#

no worries

surreal canyon
#

I'm really stuck with this ๐Ÿ˜„

pliant steeple
#

please don't apologize

surreal canyon
#

and it's stupid since I have a code working just need to provide for QA to test

#

thanks again!

pliant steeple
#

no worries

surreal canyon
#

hey that id number is this

User enters full SSN in the form (fullSsn)
Frontend calls stripe.createToken('pii', { personal_id_number: values.fullSsn })
Stripe returns a token ID (like tok_xxxxx) - this is a secure tokenized version
Only the last 4 digits and the token ID are sent to the backend

#

that's how docs say ti should be sent

#

we have that on production already for other place

#

inside the code

#

so that's why it's long

#

const response = await stripe.createToken('pii', {
personal_id_number: values.fullSsn,
});

#

you have in that request

"id_number":
"****************************",

and "ssn_last_4": "****"

#

basically if you can take any example of hosted flow and try to get it to that state that would be great

pliant steeple
#

but that's not how you're updating the person in this request

surreal canyon
#

sry I'm not sure I understand what you mean?

#

we use the same approach on production for a last 5 years and we have a milion of users that's why I'm confused now ๐Ÿ˜„

pliant steeple
#

in the request I shared with you, this hasn't been done in the frontend

#

but rather in the backend

#

and instead of passing a token, you're passing the raw values AFAICT

surreal canyon
#

so in frontend we collect ssn and we have

ssn_last_4: full_ssn?.substring(
full_ssn?.length - 4,
full_ssn?.length,
),
id_number: token?.id,

token is generated with

const response = await stripe.createToken('pii', {
personal_id_number: values.fullSsn,
});

and then on BE

we send this id_number and that's what you are seeing in that field

full ssn never reaches our BE

#

I just confirmed it's properly tokenized on the client with

const response = await stripe.createToken('pii', {
personal_id_number: values.fullSsn,
});

and it matches lenght of value you are seeing there

#

I would expect stripe would throw an error here

#

if value is wrong

pliant steeple
#

I'm not talking about your code in production

#

I'm just talking about the request I shared with you

river gobletBOT
pliant steeple
#

which I'm not sure you've followed the same logic with

surreal canyon
#

I did the logic i just shared is from the code

#

I mentioning here as a problem

#

If I get you correctly you are saying

#

id_number that's sent is wrong?

#

I'm sending you overview of implementation now

late wagon
surreal canyon
#

here is the logic we have

#

can you tell me it's good

#

id_number is tokenized ssn

#

that's how your docs are expecting it to be sent

#

we are sending PII token

#

@late wagon basically implementation works I don't have a problem with that

#

I just need test data for hosted stripe flow

#

to trigger requiremensts change

#

or trigger future requiremenents

#

that's all

#

bacuse when I try the one from your docs I always get successfully created connected account

late wagon
#

yes, our docs are expecting the ID number to be tokenised, but that didn't happen for the above request (the raw value was passed server-side)

when you say 'hosted stripe flow', do you mean using the Account Links API?

surreal canyon
#

yes, our docs are expecting the ID number to be tokenised, but that didn't happen for the above request (the raw value was passed server-side)

how do you mean raw value? what was the value ?

#

I just checked the code and we are passing what stripe has tokenized here back to stripe

#

"when you say 'hosted stripe flow', do you mean using the Account Links API?"

yes sir! ๐Ÿบ

late wagon
#

for this connected account: acct_1SLBIa3K7i1ShskA?

surreal canyon
#

yes

#

I'll test a new one now

#

and will let you know

#

what value stripe creates for token

#

here

#

{id: 'pii_1SLKb2KTFJkLeHsPEiezlC9x', object: 'token', client_ip: '93.86.252.91', created: 1761210852, livemode: false,ย โ€ฆ}

#

and it's sent properly

#

to BE

#

also

#

here is that new account id

late wagon
#

ok thanks for sharing that - have you used this token to update the account?

surreal canyon
#

to create a new one this one

#

acct_1SLKb5Kx0Mkw6rMW

#

and as you see I used tax id that's stated in docs that will

#

fail

#

and it did not

#

so as I said implementation works, I just need test data that will cause connected acc to go into state of needing requirements or future requirements

#

for QA to test

late wagon
#

quite a few things are mismatched here

#

your screenshot has '**** 0001', but you've said you used the one from the docs (111111111)

#

the value passed to the PII token (pii_1SLKb2KTFJkLeHsPEiezlC9x) was again different

surreal canyon
#

So

#

SSN I uses is all 00000 zeros

late wagon
#

and it doesn't seem that the PII token was passed to update acct_1SLKb5Kx0Mkw6rMW

surreal canyon
#

and for Tax Id

#

I used

#

000000001

#

base don this post

late wagon
#

what are you doing after you create the PII token? how are you passing the PII token to the account?

surreal canyon
#

const accountData: Stripe.AccountCreateParams = {
type: 'custom',
country: 'US',
business_type: 'individual',
individual: {
first_name: 'John',
last_name: 'Doe',
email: 'vendor@example.com',
// SSN token passed here
id_number: idNumber, // The PII token from frontend
ssn_last_4: ssnLast4,
dob: { day: 1, month: 1, year: 1990 },
address: {
line1: '123 Main St',
city: 'San Francisco',
state: 'CA',
postal_code: '94111',
country: 'US'
}
},
capabilities: {
transfers: { requested: true }
}
};

await stripe.accounts.create(accountData);

#

it's sent to BE and passed

#

I'll create a new test acc now to confirm that the value created on the client is passed on the be and sent to stripe

late wagon
#

if you can try with a new test account, and send me the account ID, I'll review the logs

surreal canyon
#

testing now and will send all the logs both what's on BE and what's on FE generated and what I'm passing to stripe

#

give me one sec

late wagon
#

thank you!

surreal canyon
#

no no thank you sir

#

this means a lot to me

#

I'm stuck with this for the last 2 days

#

Ok so I have a new connected account created

acct_1SLKv8Kb56pyRhXZ

SSN I used all 0's
Tax ID I used: 000000001

PII on generated on the client for this SSN: pii_1SLKv4KTFJkLeHsP4OPOP73c
PII passed to stripe from BE for this SSN: pii_1SLKv4KTFJkLeHsP4OPOP73c

#

It seems that all is good from the implementation side

#

wait can it be a problem that I use same email for these acc's ?

#

I'll create a new acc with new email completely now

#

acct_1SLL273MzNg986Pw

#

this is that new acc id: acct_1SLL273MzNg986Pw

#

it all works fine from what I can tell

late wagon
surreal canyon
#

I'm doing the second step

#

too

#

one second

late wagon
#

and regardless of the method of collecting/passing the data, I should also point out that none of your requests are using the value from the docs to trigger extra requirements ('111111111').

surreal canyon
#

I'm not using that value right now since you co worker started this topic around PII and I'm not confused so let's clear that one out and I'll create test with all 1's too I tested it last night and it did not work either

#

so we use

client.accounts.createPerson

#

to create a person on BE

#

and the PII I showed you above is from server, I confirmed it's being sent to stripe

#

should id number be sent about account creation too not just person creation?

#

what PII you are seeing for this fresh new acc on your end since you said it's not being pased? @late wagon

river gobletBOT
surreal canyon
#

Hey @vague wraith good morning!

To explain the situation

I created a stripe hosted onboarding flow, and implementation works, I just need test data to test failing creation when additional requirements are needed etc

but your co workers started saying that PII i'm sending for SSN is not properly passed to stripe

from everything I tested it's seems fine

#

and I createa new account above

#

acct_1SLL273MzNg986Pw

#

and confirmed that PII generated on client is sent to stripe on BE

#

and they are saying they are not seeing it

#

but even on dahsbord for that acc I see that PII number

#

here are logs from server confirimg PII is sent properly

#

for this acc id acct_1SLLSWKv99pDBEsF

#

@late wagon @pliant steeple @vague wraith please check the above if you can

late wagon
#

you're passing the pii_ token as a string to person.id_number

surreal canyon
#

so this is for completely new acc acct_1SLLSWKv99pDBEsF

#

how it should be passed?

#

that's how it's stated in doc's

#

you create a token and pass it as this param

#

we have the same implementation for other feature on prod

late wagon
#

ah you're right, apologies! this looked incorrect to me because the value was redacted in the logs but I see what you mean now

surreal canyon
#

all good

#

sir

#

do you want me now to create a completely new acc with all 1's so you can see what I mean?

#

that it's not triggering any requirements

late wagon
#

so if we accept that the implementation is correct, do you have an example with the '111111111' ID number, which did not trigger the currently_due requirements?

#

yes that would be perfect!

surreal canyon
#

creating completely new acc for that one

#

now

#

give me one sec

#

so I'll use 111111111 for SSN, what should I use for Tax ID or it does not metter?

late wagon
surreal canyon
#

this is how my form looks like

#

what should I use for other fields ?

late wagon
#

it depends which form fields map to which API parameters in Stripe, but sample test data for all API parameters can be found on the testing page

surreal canyon
#

I'll use 000000000 for tax id and 111111111 for SSN

#

@late wagon

acct_1SLLk13TvCS7Xrso

#

acc_id: acct_1SLLk13TvCS7Xrso

#

again to requirements triggered or anything

late wagon
#

ok, thanks for getting a clear example for us!

#

since the behaviour here isn't aligning with our docs, we'll need to open a support case to investigate this further and determine whether this is a bug

#

I'll share a link for you to open a case with our support team, and then we can follow up with you over email