Near protocol helper url for mainnet using near-api-js - helper

I am working on the back-end for a multi-coin wallet and I have provided support for NEAR protocol using near-api-js but I'm stuck on setting a helper url for the mainnet network. I initially used https://helper.nearprotocol.com but it seems it's a helper url for generating accounts on testnet. I switched to https://helper.mainnet.near.org but accounts cannot be generated using this helper. Is there any other way accounts can be generated on the mainnet network using the near-api-js sdk?

You have to fund accounts on mainnet to be able to create them. On testnet helper basically is running a faucet to fund accounts, it’s not available on mainnet.
What you can do to create .near accounts is to call create_account method, see example here https://github.com/near/near-wallet/blob/1fc30e26019613db0091683886615e5d4e903873/src/utils/wallet.js#L359

Related

How should I use stripe Payments as a Developer without signed up for Connect

I have signed up for the stripe account and wanted to use this as a developer for my projects but every time a try to use, its shows the error StripeInvalidRequestError: You can only create new accounts if you've signed up for Connect
and my nodemon app crashes!!![enter image description here][1]
The error suggests you are using the connect portion of the Stripe APIs. If this was intended then Stripe has some steps to take before you can begin using it, which involves adding business details to your account.
I'm not completely familiar with the connect section of the API but Stripe offers a 'test' account mode which you may be able to utilize if you are early in the development phase and are not ready to fill out details just yet.

Stripe Connect Custom Account Verification In Test Mode

I was testing Stripe APIs for Connect custom accounts, but for some reason, I keep getting pending verification. I tried to follow docs step by step, and I used testing tokens for account onboarding, created Person object, and uploaded testing files that need to be verified on the dashboard. Without verification, I cannot test payouts. I must have missed extra steps, but I was not able to figure it out. Does anyone know how to make it verified for testing?
I have one more question to make sure that I am not misunderstanding the custom account. Can the platform make a custom account have a direct charge instead of a destination charge? And if possible, is liability for returns and disputes still on platform?
You can check the account's requirements.currently_due hash, it tells you what information are needed to keep the account enabled. You should also use Connect Onboarding to collect the necessary info.
Technically you can create Direct Charge on custom connect accounts. However, it's not recommended. Because:
There's no Dashboard for custom account to address disputes
There's no Dashboard for custom account to set Radar rules
Refunds for Direct Charges on connected account will results in negative balance, which platform needs to cover

How to test Stripe Connect connected account creations

I want to use Stripe Connect to provide multiparty payments, in my website.
I have a platform. User A (customer) will pay User B (which is the service provider) on the platform and as a platform, I want to get some amount percentage in the middle.
So, I'm following this guide
https://stripe.com/docs/connect/collect-then-transfer-guide
But, when it comes to testing creating those standard connected accounts, I need to fill real information like phones and emails.
However, I found this guide to fullfill my problem:
https://stripe.com/docs/connect/testing#using-oauth
But, I'm not sure how can I use this guide?
How can I create a stripe account for my user B (who will accept payment through my platform) and got that account_id in testing (and later production)?
There are multiple points to clear:
There are Standard, Express and Custom account types. There are also
3 fund flows of Direct Charge, Destination Charge, or Separate
Charges and Transfers. See comparison from Stripe Doc (this is important)
If you decide to use Standard Account, you should go with Direct
Charges
There are 2 ways to onboard a Standard Account. OAuth is a
legacy integration. Account Link is preferable.
But really, Express + Destination Charge would be easier. You should also use Account Link to create express accounts

Stripe Charges API - How to make test destination charge without Connect?

Two parts to this question:
I only see docs about making Destination Charges when you're using Stripe Connect and Custom Accounts. Is it possible to do it without Connect?
If it's possible to make a destination charge with just regular (Standard?) Stripe Accounts, am I able to test it out without needing two accounts that are live?
Thanks in advance!
Destination Charges are charges made by a Connect Platform on behalf of a connected account (whether that connected account is a Standard, Express, or Custom account). There is no reason to make a Destination Charge without Connect (and indeed, no way that you could).

Connect Account with Stripe

How can I connect an account with Stripe as Developer ?
I found that connect needs express account. Express account need US address.
First of all it is recommended you have to toggle to use view test data to work as developer. You have to use developer/test data API keys to work as a developer.
Secondly, You can use account type custom to create connected account.
Also, there is no restriction to be based in US to used connected account with this account.

Resources