#stephenbnetn_api

1 messages ยท Page 1 of 1 (latest)

solid wolfBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1247964270377832516

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

lusty forge
#

I promise i won't take much time from you i just want to make sure i understand how to proceed with the test to achieve what i have researched so far

#

Essentially my concern is that i still need to follow the steps to setup stripe connect to just test this solution and i have this working session tomorrow with the other company. Can this be tested without officially going through the stripe connect setup in the dashboard and verifying the company with documents and such?

tropic creek
lusty forge
#

okay great so i just use the business verification bypass values in this document and i'll be able to get through. THANK YOU. Anything else i should know, or will this allow me to be able to test the curl calls soon after with my key that i have already?

#

actually one more question. Both companies would need to ensure this is done i assume?

tropic creek
#

Once the connect account is created, you can start making cURL calls to it

lusty forge
#

Much appreciated. I may be back with a question or two on the calls. Should we leave this chat open or should i submit a new request if i have any questions then?

tropic creek
#

Just post in the main channel and our Discord bot will link this thread automatically

lusty forge
#

sure sorry one quick question

#

i am in this step of enabling the stripe connect and i am represented with these fields and one of them is registration. I don't see any value test valuess need to put in there for the account. Can i leave it blank or put anything?

tropic creek
lusty forge
#

I am getting an error when trying to add the test values in the banking section complaining that known test accounts can't be supported in live mode. I am in test mode current. ANy idea what i'm doing wrong?

#

maybe i'm misunderstanding what you want me to do but those values in that document is not working.

tropic creek
#

That looks like the activation form for live mode. An account created in test mode can be activated and used in live mode, so you'll want to make sure you're using the right workflows

lusty forge
#

okay so maybe i misunderstood what i need to do then. I have a stripe account and i have the test button toggled at the top right. I want to test making some curl calls to test stripe connect. Do i need to activate anything or can i simply send in this curl call to start testing?
o curl https://api.stripe.com/v1/accounts
o -u sk_test_netnation_secret_key:
o -d type=custom
o -d country=US
o -d email=incauthority@example.com

#

perhaps my account is already properly setup for a test?

tropic creek
#

That looks like it's just creating a Connect account. Once the account is created, you can perform actions on it in both the Dashboard and the API.

#

Also, I looked at your demo. Is this a new integration path for you? If so, why are you using OAuth and the Tokens API?

lusty forge
#

Let me be clear on what you're asking. Currently

#

we have a number of accounts in different states. WE have a fully tokenized account where we are migrating over to. And we have some partners still on our integration where we have the credit cards and we use Stripe to transact. CUrrently this account i'm trying to use is tied to our Dev environment that is being used with Oauth and Token api.
WHat we are trying to do is test a solution for when we are tokenized with this particular partner.

#

obviously i don't want to disrupt those other accounts so i'm using the dev account

#

What should i do in this case? Should i use this account and try to create a new account int he top left hand corner and then try to activate connect through it with those values

#

?

tropic creek
#

I guess I'm still unsure what you're hoping to achieve. If you're just trying to demo the creation and onboarding of a new Connect account to your platform with their first payment, and you must use OAuth and Tokens, instead of Account Links and Payment Intents, then this seems to be working as expected, no?

lusty forge
#

We are trying to prove the stripe connect feature where we can have company A (our partner) share their token with us (company B). Essentially we are a partnership but they receive the customer first and take in a payment. They securely redirect the customer over to us to choose their products and then we need a payment to process as well. SO currently we take the payment a second time from the customer

tropic creek
#

Does company A already have a Stripe account in this case?

lusty forge
#

in that integration the customer comes to our platform currently and sends us the credit card to our platform where we store it and then transact via stripe with the credit card on our platform still. We will be migrating off of this soon. Meaning we will fully tokenize with this partner

#

CUrrently the partner has no valid stripe account. Just a test stripe account

#

they started one up for testing this

#

That is why i wanted to create a test account and them create one and get on a live working session to make some curl calls to prove this will work

tropic creek
#

Right, but are you simulating a scenario where company A comes to you with a Stripe account they already created? Or are they just contacting you and saying "we want to partner" and you create their Stripe account for them?

lusty forge
#

THey will come to us with a stripe account

tropic creek
lusty forge
#

and the idea was that we integrate this fully. ANd then when they get a customer passed through they will input their credit card into their stripe account with stripe connect passing the card as a token over to our stripe account. THey will also createa customer object to store the card in. WHen the customer gets over to us we will already have their card on file

lusty forge
tropic creek
lusty forge
#

from what i can tell.. Direct

tropic creek
#

And what account is going to store payment methods?

lusty forge
#

Company A's account will call to create the token direct into our account and then attach a customer object to it as well so we can search it on our end when it comes time

tropic creek
#

Okay, so Company B is creating Customers, Payment Methods, and payments on behalf of Company A. Correct?

lusty forge
#

Other way around

#

we are company B. we are downstream

#

Company A will be the ones who will call with their stripe account access and use the direct method

tulip sandBOT
tropic creek
#

And is this a net-new integration? Or are you using Tokens because there's an existing integration that's already using them?

#

Basically asking: how did you come to use the Tokens API?

lusty forge
#

net new

tropic creek
#

Okay, so you need to use OAuth to create the connection of the 2 accounts. Company A will create the OAuth link to connect the accounts: https://docs.stripe.com/connect/oauth-standard-accounts

Once that's done, you should use Payment Intents along with a payment surface (e.g. Stripe Checkout, Payment Element, etc.) instead of the Tokens API (since it's legacy): https://docs.stripe.com/payments/payment-methods/integration-options#choose-integration

Company A will need to authenticate themselves so that they can make requests on behalf of Company B, which is what will ensure that the payments are Direct:

lusty forge
#

yeah in my document i posted above i show that what i think is the first call to create that account with Oauh. DOes this look right for the first step?

  1. Create Connected Account:
    o NetNation sends a request to Stripeโ€™s API to create a connected account for Inc Authority:
    o curl https://api.stripe.com/v1/accounts
    o -u sk_test_netnation_secret_key:
    o -d type=custom
    o -d country=US
    o -d email=incauthority@example.com
tropic creek
#

No. That creates a new account entirely

#

You need to follow the guide I sent you for connecting an existing account

lusty forge
#

And does this mean i don't need to set up anything further in the dashboard regarding the connect account? As long as i have a test account i can just make the curl calls, or do i still need to go through those fields and enter those test validation values?

lusty forge
tropic creek
lusty forge
#

right. sorry i mean to post step two in my doc. SO this is the auth step?

  1. Obtain OAuth Authorization:
    o NetNation redirects Inc Authority to Stripeโ€™s OAuth authorization page:
    o https://connect.stripe.com/oauth/authorize?response_type=code&client_id=ca_1HXXXXXXXXXXXXXXX&scope=read_write
    o Inc Authority authorizes and NetNation exchanges the authorization code for an access token:
    o curl https://connect.stripe.com/oauth/token
    o -d client_secret=sk_test_netnation_secret_key
    o -d code=AUTHORIZATION_CODE
    o -d grant_type=authorization_code
tropic creek
#

Yup

lusty forge
#

great, just one more question then as i'm still very confused about the activating connect in the dashboard. DO i need to do this before i can make these curl calls?

#

As those values just don't seem to work in the activation flow, which leads me to believe this is onyl for setting up legitimate payment connect accounts

stark river
#

๐Ÿ‘‹ stepping in as two-shoes needs to step away

lusty forge
#

okay thank you

stark river
#

You can only use those Connect testing values for testmode-only accounts which is why this doesn't work when going through an OAuth flow or attempting to activate an account

#

When connecting via Oauth, even if going through in test mode, you are still connecting a potential live-mode account

#

So you have to use "real" values.

#

That said, the account doesn't actually need to be enabled to make these test mode requests for testing.

lusty forge
#

oh great

#

thats all i am trying to do

stark river
#

However you will have to fill in "real" values during the OAuth flow

lusty forge
#

let me give a quick download what i'm trying to test and you can tell me what i'm missing here

stark river
#

I read the above

lusty forge
#

okay great

stark river
#

Everything you are doing seems fine

#

You just need to ensure you have what at least looks like "real" info (like a bank account) to be able to complete the OAuth flow and perform the connection

lusty forge
#

So currently with my test account in test mode when i go to run my curl requests right now it should work?

stark river
#

Yes it will work for any requests on that account or any Standard Connected Accounts that are connected to that account

lusty forge
#

What i wanted to test with the comapny A tomorrow was just test sending a test credit card through their stripe account using stripe connect and validate that we receive it on our stripe account. SO for me to do that will i need to enable connect through the dashboard?

stark river
#

No you will need to connect your account to theirs and then they would use their keys to tokenize the card on your account

#

You can never make requests from Connected Account --> Platform. Always has to be Platform --> Connected Account

lusty forge
#

right. SO for the test tomorrow. What would be the first api call to make? Would it be this?

  1. Obtain OAuth Authorization:
    o NetNation redirects Inc Authority to Stripeโ€™s OAuth authorization page:
    o https://connect.stripe.com/oauth/authorize?response_type=code&client_id=ca_1HXXXXXXXXXXXXXXX&scope=read_write
    o Inc Authority authorizes and NetNation exchanges the authorization code for an access token:
    o curl https://connect.stripe.com/oauth/token
    o -d client_secret=sk_test_netnation_secret_key
    o -d code=AUTHORIZATION_CODE
    o -d grant_type=authorization_code
#

or will it be somethign else. Actually maybe if you could point me to what the sequence of envents would be that would help

#

i get the feeling i am off

stark river
#

Yes that is the first thing to do. NetNation is company A, correct?

lusty forge
#

No, INc authority is company A

#

they are the ones who will send the token

stark river
#

Oh then no it is the opposite above

#

Inc authority redirects NetNation to the OAuth page they set up.

#

Let's pause for a second

lusty forge
#

okay

stark river
#

Do you care about doing exactly what you will end up doing. Or you just want to walk through what it will basically look like to show your partner?

lusty forge
#

Ideally we jsut want to prove that they can submit a credit card and it end up in our account tokenized

stark river
#

The easiest way to do this is to just do this all in test mode and create a test-only Standard account without messing with OAuth at all here

#

Okay yeah so I'd ignore the above

lusty forge
#

okay

#

great

stark river
#

You can set this all up ahead of time

#

Have you enabled Connect on your account yet in test mode?

lusty forge
#

If its the process of going into the dashboard and clicking connect and enabling it, i've tried but It asks for legitimate values to verify which i can't supply right now

stark river
#

No it should not

#

You are likely trying to do that in live mode

#

Make sure you are in test mode, or visit the link above

lusty forge
#

oh thats different

#

i see values already fileld in

#

wait

stark river
lusty forge
#

no... so when i go there i see this:

stark river
#

Click the Connect button on the left

#

Under Products

lusty forge
#

this is for overview:

stark river
#

Okay great

#

That's all you need to do for test mode

#

So now you can create an account

lusty forge
#

okay so i can proceed without finishing those 3 steps?

stark river
#

Yes since you are only using test mode

lusty forge
#

excellent

#

okay whe you say create an account you mean?

stark river
#

All you need to do is curl https://api.stripe.com/v1/accounts \ -u "sk_test_123:" \ -d type=standard

#

Replace that with your test key

lusty forge
#

okay and that will create a test account that will function as the representative of THEIR account right?

stark river
#

Nope, that test account would represent YOUR account

#

Since they are the platform

lusty forge
#

oh okay

#

well they will send the token to us. does that mean they are the platform?

stark river
#

Yes

lusty forge
#

okay good to be on the same termenology ๐Ÿ™‚

stark river
#

๐Ÿ‘

#

So go ahead and create that account right now

lusty forge
#

okay hold on

stark river
#

And then we can talk about the next steps

lusty forge
#

okay give me a second. i gotta go create a new key for this account as its new

stark river
lusty forge
#

yup.. just grabbed it. But i'm unfortunately only on powershell today so give me a second to figure out how to get curl onto this thing and powershell syntax

stark river
#

Hmm it sounds like you don't have an integration built yet to handle accepting card details?

lusty forge
#

well i do with our other account

#

maybe i should just use that?

#

i clicke on the menu on the top left and created a new account for this test but the key seems the same so will it matter?

stark river
#

The key shouldn't be the same if you are on a different account

#

But if you already have an integration with your other account then you could just pop in this account's key, or you could just use your other account.

#

Up to you

lusty forge
#

you are correct my apologies i saw it there and was confused since it was a new account. I guess you guys generate one automatically

stark river
#

Yep

lusty forge
#

this account is connected to our dev account though and we always use test tokens only to test. I don't think we have a legit bank accoutn connected to this account. Is that fine?

stark river
#

You don't need any legitimate information since you aren't going to use OAuth

lusty forge
#

okay so give me a minute sorry. WIndows aint my forte

stark river
#

All good

lusty forge
#

okay sent

#

StatusCode : 200
StatusDescription : OK
Content : {
"id": "acct_1POPYIQRVSqDXO1R",
"object": "account",
"business_profile": {
"annual_revenue": null,
"estimated_worker_count": null,
"mcc": null,
"name": null,
"product_descri...
RawContent : HTTP/1.1 200 OK
Connection: keep-alive
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: GET,HEAD,PUT,PATCH,POST,DELETE
Access-Control-Allow-Origin: *
Access-Control-Expose-Hea...
Forms : {}
Headers : {[Connection, keep-alive], [Access-Control-Allow-Credentials, true],
[Access-Control-Allow-Methods, GET,HEAD,PUT,PATCH,POST,DELETE], [Access-Control-Allow-Origin,
*]...}
Images : {}
InputFields : {}
Links : {}
ParsedHtml : mshtml.HTMLDocumentClass
RawContentLength : 3210

stark river
#

Alright so if you refresh your Dashboard you should see that account

lusty forge
#

i do

stark river
#

Great, so what you are trying to do here you can simulate completely through the Dashboard if you want.

#

Step 1: Click on the account and then click the 3 little dots in the top right of the page and click "View Dashboard as this account"

#

That will portal you into the Connected Account's Dashboard

#

You have limited viewing options (for instance you can't view/change most of the settings on the account) since this isn't actually your account but you can still make requests on the account via the Dashboard just like you would via the API

#

So Step 2: Click on the Customers tab on the left

#

Step 3: click "Add customer" and create a Customer on that account

#

Step 4: Click on the Customer in the Dashboard and you will see a section for "Payment methods" and a + button on the right side. Click that and click "Add card"

#

Step 5: Add a test card (like the 4242 test card)

#

And that basically simulates everything that is going to happen. The platform (Inc Authority) now created a Customer and tokenized a Card on the Connected Account (NetNation)

#

And now NetNation could charge that Card at their discretion

#

Everything that was just done via the Dashboard can be done programmatically via the API

lusty forge
#

okay so give me one second to just convert this in my head to api sequence calls to think about it

stark river
#

Yeah so that depends a little bit on the integration that Inc Authority uses to collect payment methods

#

That will dictate the actual API calls

lusty forge
#

because essentially i jsut added an account to my own account

#

but how would company A create this customer which is us in their account

stark river
#

How do they create the Customer object within your account?

#

(Step 3 above)

lusty forge
#

no i mean ... in these series of steps company A would be INC. And they are the ones with the credit card that want to pass it to our account. So from what i see here. THey would have to make the call to create the account that represents our account no?

stark river
#

No, that is the OAuth part

#

That is what we are ignoring just for this testing to make it easier

lusty forge
#

right but assuming that the Oauth part is setup in a final solution

stark river
#

Then yeah they use OAuth to connect your account in place of the step above where you created a Connected Account

lusty forge
#

so assuming they get their account verified and they are able to make the appropriate calls

#

and that would be the first step right?

stark river
#

Yes, that would replace the account creation that we did initially

lusty forge
#

they create the OAUTH API call which we then respond to

#

and then effectively on their side they will see us as a connected account

stark river
lusty forge
#

You've been excellent! Thank you!

stark river
#

Sure

lusty forge
#

i could simulate the api calls too though tomorrow right. I jsut would have to make the api calls to my own account

stark river
#

Yep for sure

#

The only difference is that you can't pass raw PANs via the API

lusty forge
#

meanig after i created the connected account to my own account i would be able to do these two steps right?

  1. Create Payment Token:
    o Inc Authority uses the access token to create a token in NetNation's Stripe account:
    o curl https://api.stripe.com/v1/tokens
    o -u sk_XXXXXXXXXXXXXX:
    o -d "card[number]=4242424242424242"
    o -d "card[exp_month]=12"
    o -d "card[exp_year]=2024"
    o -d "card[cvc]=314"
  2. Store Token and Create Customer:
    o NetNation uses the token to create a new customer in their Stripe account:
    o curl https://api.stripe.com/v1/customers
    o -u sk_test_netnation_secret_key:
    o -d "source=tok_1HXXXXXXXXXXXXXXX"
    o -d "email=customer@example.com"
stark river
#

Ah no that won't work unless your account is approved to pass those raw PANs via the API

lusty forge
#

ah i see so bank account attached

#

and only company A would really need that right?

#

i mean we will have it anyway

stark river
lusty forge
#

but for this, they are the ones doing the api calls so they would need it. AND PCI compliance right?

stark river
#

Yes

lusty forge
#

Ah i see. So compliance is checked

#

fantastic thanks

stark river
#

๐Ÿ‘

lusty forge
#

Appreciate your time. And tell @tropic creek i say thank you! ๐Ÿ™‚

#

have a good day