Paying out to Merchants in Stripe - node.js

I am new to Stripe and I am making an e-commerce site where customers can buy digital art and resell it. I am able to charge the customer fine, but I do not know how to pay out to customers with Stripe. I have tried to use Stripe Connect, but I keep getting error messages which I cannot fix.
My Code:
let account = await this.stripe.accounts.create({
type: 'custom',
country: 'US',
email: user.email,
capabilities: {
card_payments: {
requested: true,
},
transfers: {
requested: true,
},
},
business_type: 'individual',
})
await this.stripe.customers.create({
name: user.name,
email: user.email,
source
}, {
stripeAccount: account.id
})
The error:
Your account cannot currently make charges. To find out why charge creation is currently disabled, look at the `requirements.disabled_reason` property on this account (/v1/accounts/acct_****************).

Depends on the country, Service Agreement, Business type and capabilities, onboarding a Stripe custom Connect account requires you (platform) to gather information from the users for verification purpose.
You can view the requirements on this page

Related

Stripe checkout session with auto tax calculation doesn't show Google Pay or Apple Pay when billing address collection is auto

When creating a Node js Stripe checkout session using automatic tax calculation, Google Pay and Apple Pay options aren't available when setting billing_address_collection: 'auto'. However, those wallet options are available if I set:
shipping_address_collection: {
allowed_countries: ['US'],
},
Here is my entire create checkout configuration:
{
mode: 'subscription',
line_items: [
{
price: 'price_key',
quantity: 1,
},
],
billing_address_collection: 'auto', // does not work
// shipping_address_collection: { // works
// allowed_countries: ['US'],
// },
automatic_tax: {
enabled: true,
},
allow_promotion_codes: true,
success_url: `success_url`,
cancel_url: 'cancel_url',
customer: 'stripe_customer_id';
customer_update: {
address: 'auto', // does not work
// shipping: 'auto', // works
};
}
Am I doing something wrong or is this how it works?
According to docs, when you enable Stripe Tax in Checkout, Apple and Google Pay are only available to customers for sessions that require collecting a shipping address. Therefore, this is expected.

DocuSign creates the envelope via API but no e-mail are sent

And thanks in advance for any help !
When I create en envelope with the status "sent", the signers does not get e-mail any more.
Friday morning, everything was working I was receiving e-mail.
But since friday noon, i can not receive a single e-mail (for recipients).
When I use: envelopeApi.createEnvelope(this.config.accountId, { envelopeDefinition })
My code receive:
{
"envelopeId": "xxx",
"status": "sent",
"statusDateTime": "2021-07-26T09:29:11.1800000Z",
"uri": "/envelopes/xxx"
}
And When I check in the envelope administration panel, I see
If I try to create the envelope from the administration panel, emails are sent but not from API calls...
Is it my account which limited or did I missed something?
Complete code example:
async testSendEnvelope2() {
const signers: TemplateRole[] = [
{
email: 'sirko.alexandre#gmail.com',
name: 'alexander',
clientUserId: 'toto',
tabs: {
textTabs: [
{
tabLabel: 'toto',
locked: 'true',
required: 'true',
value: 'blabla',
},
],
},
roleName: 'Freeluper',
},
{
email: 'alexandre#jump-biz.com',
name: 'jalexandre',
clientUserId: 'titi',
tabs: {
textTabs: [
{
tabLabel: 'titi',
locked: 'true',
required: 'true',
value: 'blibli',
},
],
},
roleName: 'Company',
},
];
const env: EnvelopeDefinition = {
emailSubject: 'le sujet du mail',
status: 'sent',
templateId: 'xxx',
templateRoles: signers,
};
const results = await this.docusignService.sendEnvelope(env);
console.log(results);
}
And this.docusignService.sendEnvelope simply calls the envelopeApi.createEnvelope (with credentials)
Re: Why aren't my recipients receiving email invitations to the signing ceremony?
The reason is that you are setting the clientUserId attribute for the recipient objects.
When you do that, the recipients become captive (embedded) recipients. In this case, email is not sent since the assumption is that you want your application to offer the signing ceremony to them.
If you want to record recipient metadata without causing the recipients to become embedded signers, use the customFields attribute
Re: Limitations for developer accounts?
The main limitations for the developer (demo) accounts are:
the envelopes cannot be used for legally binding agreements
the envelopes are cleared out periodically.
Re slow email
On rare occasions the developer system gets a bit backed up and email delivery is slow.
A way to check is to use the DocuSign web app to send a test envelope from your developer account. If it works then you should suspect your API app.

"You cannot specify a different service agreement in FI" returned from Stripe

I am triying to create stripe connected account in testing mode referencing
service_agreement: 'recipient'
here with the full code I wrote:
account = Stripe::Account.create(
type: 'custom',
business_type: 'company',
email: account_params[:email],
external_account: "btok_us_verified",
capabilities: {
transfers: {requested: true}
},
company: {
name: "Test Company name 6",
tax_id: "000000000",
},
tos_acceptance: {
service_agreement: 'recipient',
date: Time.now.to_i,
ip: request.remote_ip,
}
)
After I made the call stripe returned this error.
You cannot specify a different service agreement in FI.
But stripe docs says recipient service agreement is available.
Can anyone help me to figure out this issue.
This should be possible, or at least it worked when I tested using my test US-based platform. You may need to explicitly specify the account country=FI:
account = Stripe::Account.create(
type: 'custom',
**country: 'FI',**
business_type: 'company',
email: account_params[:email],
external_account: "btok_us_verified",
capabilities: {
transfers: {requested: true}
},
company: {
name: "Test Company name 6",
tax_id: "000000000",
},
tos_acceptance: {
service_agreement: 'recipient',
date: Time.now.to_i,
ip: request.remote_ip,
}
)
If this does not resolve it for you I can create a test FI platform to try myself.

AWS Cognito with CDK UserPool MFA

Can someone tell me if it's possible to create a userPool with MFA required, SMS MFA disabled but OTP MFA enabled.
On the AWS console, it doesn't seem to be an issue but for some reason through CDK, it isn't quite happy.
I have attempted to update an existing user pool as well as create one new.
new UserPool(this, 'foo-user-pool', {
userPoolName: 'foo',
selfSignUpEnabled: false,
passwordPolicy: {
minLength: 12,
requireDigits: true,
requireLowercase: true,
requireSymbols: true,
requireUppercase: true,
tempPasswordValidity: cdk.Duration.days(7)
},
accountRecovery: AccountRecovery.EMAIL_ONLY,
enableSmsRole: false,
mfa: Mfa.REQUIRED,
mfaSecondFactor: {
sms: false,
otp: true
},
signInAliases: {
email: true,
},
autoVerify: {
email: true,
},
})
Gives me the following error message and has been for some time now...
SMS configuration and Auto verification for phone_number are required when MFA is required/optional (Service: AWSCognitoIdentityProviderService; Status Code: 400; Error Code: InvalidParameterException; Request ID: bcc2143c-546a-439a-b7b5-6fcf3888cf9a; Proxy: null)
The link shows a PR that allows us to disabled the SMS role creation.
AWS CDK 1.77.0

Google Contacts API learn is contact google+ or not

I'm using Google Contacts API to get user's contacts in my NodeJS app and I need to check, has contact google+ or not, but I can't find a way to do it in docs. Currently I'm receiving response from API that looks like this:
{ id: { '$t': 'http://www.google.com/m8/feeds/contacts/ex%40domain.com/base/40411dcf8aeb5354' },
updated: { '$t': '2016-08-12T08:03:22.026Z' },
category:
[ { scheme: 'http://schemas.google.com/g/2005#kind',
term: 'http://schemas.google.com/contact/2008#contact' } ],
title: { type: 'text', '$t': 'TestGoogleContact' },
link:
[ { rel: 'http://schemas.google.com/contacts/2008/rel#edit-photo',
type: 'image/*',
href: 'https://www.google.com/m8/feeds/photos/media/ii%40risingapp.com/40411dcf8aeb5354/1B2M2Y8AsgTpgAmY7PhCfg' },
{ rel: 'self',
type: 'application/atom+xml',
href: 'https://www.google.com/m8/feeds/contacts/ii%40risingapp.com/full/40411dcf8aeb5354' },
{ rel: 'edit',
type: 'application/atom+xml',
href: 'https://www.google.com/m8/feeds/contacts/ii%40risingapp.com/full/40411dcf8aeb5354/1470989002026004' } ],
'gd$email':
[ { address: 'testcontact#somedomain.com',
primary: 'true',
rel: 'http://schemas.google.com/g/2005#home' } ] }
Contacts API pre-dates Google+ so profile information is not available. A feature was added later to show just the G+ photo from the profile if a the user set one, which could be a hacky/flakey heuristic to check for a profile. However, you can easily get this information by using the People API instead, which joins G+ profile information onto contacts and will likely replace the Contacts API eventually: https://developers.google.com/people/

Resources