Skip to content

Instantly share code, notes, and snippets.

@maccman
Last active August 4, 2021 22:20
Show Gist options
  • Save maccman/82d42c335236184bd1f9c84f36598a29 to your computer and use it in GitHub Desktop.
Save maccman/82d42c335236184bd1f9c84f36598a29 to your computer and use it in GitHub Desktop.
Clearbit Batch Example
source status person_name_full_name person_name_given_name person_name_family_name person_email person_gender person_location person_time_zone person_utc_offset person_geo_city person_geo_state person_geo_state_code person_geo_country person_geo_country_code person_geo_lat person_geo_lng person_bio person_site person_avatar person_employment_domain person_employment_name person_employment_title person_employment_role person_employment_seniority person_facebook_handle person_github_handle person_github_id person_github_avatar person_github_company person_github_blog person_github_followers person_github_following person_twitter_handle person_twitter_id person_twitter_bio person_twitter_followers person_twitter_following person_twitter_statuses person_twitter_favorites person_twitter_location person_twitter_site person_twitter_avatar person_linkedin_handle person_googleplus_handle person_aboutme_handle person_aboutme_bio person_aboutme_avatar person_gravatar_handle person_gravatar_urls person_gravatar_avatar person_gravatar_avatars person_fuzzy company_name company_legal_name company_domain company_domain_aliases company_url company_site_url company_site_title company_site_h1 company_site_meta_description company_site_meta_author company_site_phone_numbers company_site_email_addresses company_category_sector company_category_industry_group company_category_industry company_category_sub_industry company_tags company_description company_founded_date company_location company_time_zone company_utc_offset company_geo_street_number company_geo_street_name company_geo_sub_premise company_geo_city company_geo_postal_code company_geo_state company_geo_state_code company_geo_country company_geo_country_code company_geo_lat company_geo_lng company_logo company_facebook_handle company_linkedin_handle company_twitter_handle company_twitter_id company_twitter_bio company_twitter_followers company_twitter_following company_twitter_location company_twitter_site company_twitter_avatar company_crunchbase_handle company_email_provider company_type company_ticker company_phone company_metrics_alexa_us_rank company_metrics_alexa_global_rank company_metrics_google_rank company_metrics_employees company_metrics_market_cap company_metrics_raised company_metrics_annual_revenue company_tech company_parent_name company_parent_domain
[email protected] found Alex MacCaw Alex MacCaw [email protected] male San Francisco, CA, US America/Los_Angeles -7.0 San Francisco California CA United States US 37.7749295 -122.4194155 https://clearbit.com co-founder. Tea, Earl Grey, hot. http://alexmaccaw.com https://d1ts43dypk8bqh.cloudfront.net/v1/avatars/7caac381-b2d2-4e16-924d-1c2505ac96f8 clearbit.com Clearbit Hacker engineering amaccaw maccman 2142.0 https://avatars.githubusercontent.com/u/2142?v=3 Clearbit http://alexmaccaw.com 3304.0 98.0 maccaw 2006261.0 https://clearbit.com co-founder. Tea, Earl Grey, hot. 17513.0 2068.0 9352.0 4782.0 San Francisco http://alexmaccaw.com https://pbs.twimg.com/profile_images/658880981017882629/nlXSOJnc.jpg in/alex-maccaw-ab592978 maccaw maccman {"title"=>"Personal Website","value"=>"http://alexmaccaw.com"} http://2.gravatar.com/avatar/994909da96d3afaf4daaf54973914b64 {"type"=>"thumbnail","url"=>"http://2.gravatar.com/avatar/994909da96d3afaf4daaf54973914b64"} Clearbit clearbit.com clearbit.co,apihub.co http://clearbit.com http://clearbit.com Clearbit Gain insights into your customers Clearbit provides powerful products and data APIs to help your business grow. Contact enrichment, lead generation, financial compliance, and more... +1 252-227-7014 [email protected],[email protected],[email protected],[email protected],[email protected],[email protected] Information Technology Software & Services Internet Software & Services Internet Software & Services SAAS,B2B,Information Technology & Services,Technology Clearbit provides powerful products and data APIs to help your business grow. Contact enrichment, lead generation, financial compliance, and more... 3030 16th St, San Francisco, CA 94103, USA America/Los_Angeles -7.0 3030 16th Street San Francisco 94103 California CA United States US 37.7652736 -122.4203596 https://logo.clearbit.com/clearbit.com company/clearbit clearbit 2857311332 Business Intelligence APIs 867.0 32.0 San Francisco https://t.co/r06mCbdPuR https://pbs.twimg.com/profile_images/557204249411457024/B0Nb_vTU_normal.png organization/clearbit private 30768.0 60958.0 11.0 3000000.0 google_analytics,mixpanel,adroll,segment,typekit_by_adobe,perfect_audience,mailgun,nginx,google_apps,aws_ec2,mixpanel,customer_io,aws_route_53
@bigboss978
Copy link

app.post("/checkout", function (req, res) {
var nonce = req.body.payment_method_nonce;
// Use payment method nonce here
});app.get("/client_token", function (req, res) {
gateway.clientToken.generate({}, function (err, response) {
res.send(response.clientToken);
});
});var gateway = new braintree.BraintreeGateway({
accessToken: useYourAccessToken
});

var saleRequest = {
amount: req.body.amount,
merchantAccountId: "USD",
paymentMethodNonce: req.body.nonce,
deviceData: req.body.device_data,
orderId: "Mapped to PayPal Invoice Number",
descriptor: {
name: "Descriptor displayed in customer CC statements. 22 char max"
},
shipping: {
firstName: "Jen",
lastName: "Smith",
company: "Braintree",
streetAddress: "1 E 1st St",
extendedAddress: "5th Floor",
locality: "Bartlett",
region: "IL",
postalCode: "60103",
countryCodeAlpha2: "US"
},
options: {
paypal: {
customField: "PayPal custom field",
description: "Description for PayPal email receipt"
},
submitForSettlement: true
}
};

gateway.transaction.sale(saleRequest, function (err, result) {
if (err) {
res.send("

Error: " + err + "

");
} else if (result.success) {
res.send("

Success! Transaction ID: " + result.transaction.id + "

");
} else {
res.send("

Error: " + result.message + "

");
}
});

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment