{"id":28101265,"url":"https://github.com/eftybv/efty-pay-nodejs-quickstart","last_synced_at":"2026-03-07T14:02:27.387Z","repository":{"id":293106492,"uuid":"982123394","full_name":"eftybv/efty-pay-nodejs-quickstart","owner":"eftybv","description":"The Efty Pay Quickstart guides \u0026 examples for using the Efty Pay Node.js SDK: https://github.com/eftybv/efty-pay-nodejs-sdk","archived":false,"fork":false,"pushed_at":"2025-05-15T20:59:47.000Z","size":36,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-19T18:57:05.497Z","etag":null,"topics":["domain-investment","efty","eftypay","examples","grpc","nodejs","quickstart","typescript"],"latest_commit_sha":null,"homepage":"https://efty.com/partnership-program/","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eftybv.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-12T12:09:24.000Z","updated_at":"2025-05-15T20:59:50.000Z","dependencies_parsed_at":"2025-05-13T18:29:47.288Z","dependency_job_id":"74591357-9320-4034-b35e-4e452cfefbea","html_url":"https://github.com/eftybv/efty-pay-nodejs-quickstart","commit_stats":null,"previous_names":["eftybv/efty-pay-nodejs-quickstart"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/eftybv/efty-pay-nodejs-quickstart","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eftybv%2Fefty-pay-nodejs-quickstart","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eftybv%2Fefty-pay-nodejs-quickstart/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eftybv%2Fefty-pay-nodejs-quickstart/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eftybv%2Fefty-pay-nodejs-quickstart/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eftybv","download_url":"https://codeload.github.com/eftybv/efty-pay-nodejs-quickstart/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eftybv%2Fefty-pay-nodejs-quickstart/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30216496,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-07T13:35:13.914Z","status":"ssl_error","status_checked_at":"2026-03-07T13:35:13.569Z","response_time":53,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["domain-investment","efty","eftypay","examples","grpc","nodejs","quickstart","typescript"],"created_at":"2025-05-13T18:54:28.968Z","updated_at":"2026-03-07T14:02:27.350Z","avatar_url":"https://github.com/eftybv.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Efty Pay Node.js Quickstart\nThis is a quickstart project for integrating with the Efty Pay Node.js SDK. It demonstrates how to use the SDK to interact with the Efty Pay API.\n\n## Table of Contents\n\n- [Efty Pay Node.js Quickstart](#efty-pay-nodejs-quickstart)\n- [Requirements](#requirements)\n- [Required Setup](#required-setup)\n   - [Initial Setup \u0026 Token Creation](#initial-setup--token-creation)\n   - [Token Creation](#token-creation)\n   - [Set Your API Credentials in Environment Variables](#set-your-api-credentials-in-your-environment-variables)\n   - [Important Notes](#important-notes)\n- [Create \u0026 Onboard the Seller](#create--onboard-the-seller)\n   - [Onboard a Seller](#onboard-a-seller)\n- [Other examples](#other-examples)\n   - [Generate Magic Link](#generate-magic-link)\n   - [Create Transaction (with Known Seller \u0026 Buyer)](#create-transaction-with-known-seller--buyer)\n   - [Get a user](#get-a-user)\n   - [List transactions](#list-transactions)\n- [Troubleshooting \u0026 support](#troubleshooting--support)\n- [License](#license)\n\n## Requirements\n- Node.js (v16 or later).\n- npm (v8 or later).\n- Efty Pay API access credentials; please fill out the [access request form](https://forms.gle/fk85K45eThgepi1Q8) to obtain early access.\n\n## Other resources\n- [Efty Pay Node.js SDK](https://github.com/eftybv/efty-pay-nodejs-sdk)\n- [Efty Pay API Resource Documentation](https://docs.eftypay.com)\n\n## Required Setup\n\n### Initial setup \u0026 token creation\nCheckout this repository:\n```bash\ngit clone https://bitbucket.org/eftypay/efty-pay-nodejs-quickstart.git\ncd efty-pay-nodejs-quickstart\n```\n\nInstall all dependencies by running the following in the repository root.\n```bash\nnpm install\n```\n\nOr in case of `yarn`:\n```bash\nyarn install\n```\n\n#### Token creation\nIn order to authenticate with Efty Pay, a JWT token needs to be passed into the authorization header when making SDK request. The sample code for this can be found in the `generateToken` method in [examples/helpers.js](examples/helpers.js)\n\nThe code relies on the [jsonwebtoken](https://www.npmjs.com/package/jsonwebtoken) package to do the JWT token generation in Node.js. Please make sure to include this library into your `package.json` if you want to use the [examples/helpers.js](examples/helpers.js) code:\n```\n\"dependencies\": {\n   \"efty-pay-nodejs-sdk\": \"1.0.0\",\n   \"jsonwebtoken\": \"^9.0.2\"\n}\n```\n\n#### Set your API credentials in your environment variables\nYou can run all the individual samples in the [examples](examples) folder, by simply adding your API credentials to your environment:\n\n```\nexport EFTY_PAY_API_KEY={{YOUR_API_KEY}}\nexport EFTY_PAY_API_SECRET={{YOUR_API_SECRET}}\nexport EFTY_PAY_INTEGRATOR_ID={{YOUR_INTEGRATOR_ID}}\nexport EFTY_PAY_API_URL=api.eftypay.com:443\n```\n\nNow from the root folder (and after running `npm install` or `yarn install`) you can execute the desired example scripts:\n```\nnode create-legal-seller-user-and-intiate-onboarding-with-mangopay.js\nnode create-transaction-new-seller-and-buyer.js\nnode getTransaction.js\n...\n```\n\n#### Important notes\n- __It's strongly recommended that you store your API credentials server side only, and if possible encrypted. Never expose or store these credentials in your code repository or front-end code.__\n- __If you think your API credentials have been leaked or compromised, please contact us immediately to invalidate your credentials.__\n\n### Create \u0026 onboard the seller\nIn order for Efty Pay to process payments for a seller, and for a seller to receive payouts through Efty Pay, the seller needs to onboard with Efty Pay and go through our KYC process.\nThis whole process is managed through the Efty Pay web interface, but does need to be initiated by the integrator by providing Efty Pay with basic data for the seller:\n\n- Legal status: personal or company seller.\n- Name \u0026 address details.\n\nOnce you have completed this step, the seller will receive an email with a link to complete their onboarding.\n\nIf you want to redirect the seller to the onboarding wizard from your application, you can generate a magic link for them to redirect them to.\n\nThe magic link implements the Efty Pay OTP (One Time Password) process for secure access by the seller.\n\n#### Onboard a seller\nThe below sample onboards a seller as legal user (company).\n```js\nconst grpc = require('@grpc/grpc-js');\nconst {\n    UsersClient,\n    PaymentsClient,\n    User,\n    UserCategory,\n    Address,\n    VatSettings,\n    UserType,\n    UserStatus,\n    PaymentDetails,\n    MangopayDetails,\n    UserRequest,\n    Id,\n    MangopayOnboarding,\n    LegalUser,\n    Person,\n    LegalUserType,\n    OnboardingType,\n    OnboardingAddress,\n    CountryCode\n} = require('efty-pay-nodejs-sdk');\nconst { Timestamp } = require('google-protobuf/google/protobuf/timestamp_pb');\nconst { generateToken, generateRandomString } = require('./helpers');\nrequire('dotenv').config();\n\n(async () =\u003e {\n    try {\n        // Get the API URL\n        const apiUrl = process.env.EFTY_PAY_API_URL;\n\n        // Random string to be used in the username \u0026 email\n        const randomString = generateRandomString(5);\n\n        const metadata = new grpc.Metadata();\n        metadata.add('authorization', generateToken());\n\n        // Define the clients for the users \u0026 payments API\n        const usersClient = new UsersClient(apiUrl, grpc.credentials.createSsl());\n        const paymentsClient = new PaymentsClient(apiUrl, grpc.credentials.createSsl());\n\n        // Define the seller with nested objects\n        const seller = new User();\n        seller.setFirstname('Patrick');\n        seller.setLastname('Kosterman');\n        seller.setUsername(`patrick-kosterman-seller-${randomString}`);\n        seller.setEmail(`patrick-kosterman-seller-${randomString}@efty.com`);\n        seller.setPassword('wasdfp-0wsdfe-mafdfrw');\n        seller.setCompanyregistrationnumber('87654321');\n        seller.setCompanyname('Efty Pay B.V.');\n\n        const companyAddress = new Address();\n        companyAddress.setAddressline1('Zuiderpark 17');\n        companyAddress.setPostalcode('9724 AG');\n        companyAddress.setCity('Groningen');\n        companyAddress.setCountry(CountryCode.NL);\n        seller.setCompanyaddress(companyAddress);\n\n        const vatSettings = new VatSettings();\n        vatSettings.setHasvat(true);\n        seller.setVatsettings(vatSettings);\n\n        seller.setUsertype(UserType.BUYER_OR_SELLER);\n        seller.setStatus(UserStatus.ACTIVE);\n        seller.setPhonenumber('+34615504467');\n\n        const mangopayDetails = new MangopayDetails();\n        mangopayDetails.setOnboardassellerwithmangopay(true);\n        mangopayDetails.setUsercategory(UserCategory.OWNER);\n\n        const paymentDetails = new PaymentDetails();\n        paymentDetails.setMangopaydetails(mangopayDetails);\n        seller.setPaymentdetails(paymentDetails);\n\n        // Create the user request\n        const userRequest = new UserRequest();\n        userRequest.setUser(seller);\n\n        // Create the user\n        const userResponse = await new Promise((resolve, reject) =\u003e {\n            usersClient.createUser(userRequest, metadata, (err, response) =\u003e {\n                if (err) return reject(err);\n                resolve(response);\n            });\n        });\n\n        console.log('New seller user created:', userResponse.getId());\n\n        // Create the onboarding object\n        const dateOfBirth = new Date('1982-03-21');\n        const timestamp = new Timestamp();\n        timestamp.fromDate(dateOfBirth);\n\n        const legalRepresentative = new Person();\n        legalRepresentative.setFirstname(userResponse.getFirstname());\n        legalRepresentative.setLastname(userResponse.getLastname());\n        legalRepresentative.setEmail(userResponse.getEmail());\n        legalRepresentative.setDateofbirth(timestamp);\n        legalRepresentative.setNationality(CountryCode.NL);\n        legalRepresentative.setCountryofresidence(CountryCode.NL);\n\n        const legalUser = new LegalUser();\n        legalUser.setRegisteredname(userResponse.getCompanyname());\n        legalUser.setCompanynumber(userResponse.getCompanyregistrationnumber());\n        legalUser.setEmail(userResponse.getEmail());\n\n        const companyOnboardingAddress = new OnboardingAddress();\n        companyOnboardingAddress.setAddressline1('Zuiderpark 17');\n        companyOnboardingAddress.setPostalcode('9724 AG');\n        companyOnboardingAddress.setCity('Groningen');\n        companyOnboardingAddress.setCountry(CountryCode.NL);\n\n        legalUser.setRegisteredaddress(companyOnboardingAddress);\n        legalUser.setLegalrepresentative(legalRepresentative);\n        legalUser.setLegalusertype(LegalUserType.BUSINESS);\n        legalUser.setVatnumber('abc123');\n\n        const mangopayOnboardingRequest = new MangopayOnboarding();\n        const sellerId = new Id();\n        sellerId.setId(userResponse.getId());\n        mangopayOnboardingRequest.setSelleruserid(sellerId);\n        mangopayOnboardingRequest.setLegaluser(legalUser);\n        mangopayOnboardingRequest.setOnboardingtype(OnboardingType.LEGAL_USER);\n\n        // Onboard the user\n        const onboardingResponse = await new Promise((resolve, reject) =\u003e {\n            paymentsClient.createSellerOnboardingForMangopay(mangopayOnboardingRequest, metadata, (err, response) =\u003e {\n                if (err) return reject(err);\n                resolve(response);\n            });\n        });\n\n        console.log('New seller onboarding successfully initiated for user:', onboardingResponse.getSelleruserid().getId());\n\n        const magicLinkResponse = await new Promise((resolve, reject) =\u003e {\n            paymentsClient.getGenericMagicLink(sellerId, metadata, (err, response) =\u003e {\n                if (err) return reject(err);\n                resolve(response);\n            });\n        });\n\n        console.log('Magic link:', magicLinkResponse.getValue());\n    } catch (error) {\n        console.error('Error:', error.message);\n    }\n})();\n```\n\nFull examples:\n- Onboard natural-person seller (individual): [examples/create-individual-seller-user-and-intiate-onboarding-with-mangopay.js](./examples/create-individual-seller-user-and-intiate-onboarding-with-mangopay.js).\n- Onboard legal-user seller (company): [examples/create-legal-seller-user-and-intiate-onboarding-with-mangopay.js](./examples/create-legal-seller-user-and-intiate-onboarding-with-mangopay.js).\n\n## Other examples\n\n### Generate magic link\nThe `GenerateMagicLink` method can be used to generate a magic link for the user to their Efty Pay environment. Here they can see their onboarding \u0026 transaction information.\n\nThe magic links use the Efty Pay OTP process \u0026 technology for secure access.\n\n```js\nconst grpc = require('@grpc/grpc-js');\nconst { PaymentsClient, Id } = require('efty-pay-nodejs-sdk');\nconst { generateToken } = require('./helpers');\nrequire('dotenv').config();\n\n(async () =\u003e {\n    try {\n        // Get the API URL\n        const apiUrl = process.env.EFTY_PAY_API_URL;\n\n        // Replace with your actual seller ID (likely from a previous transaction)\n        const sellerIdValue = '4VlIPczrBspb83omByVH32';\n\n        const metadata = new grpc.Metadata();\n        metadata.add('authorization', generateToken());\n\n        // Create gRPC client\n        const paymentsClient = new PaymentsClient(apiUrl, grpc.credentials.createSsl());\n\n        // Create the Id message for the seller\n        const sellerId = new Id();\n        sellerId.setId(sellerIdValue);\n\n        // Request the generic magic link\n        const magicLinkResponse = await new Promise((resolve, reject) =\u003e {\n            paymentsClient.getGenericMagicLink(sellerId, metadata, (err, response) =\u003e {\n                if (err) return reject(err);\n                resolve(response);\n            });\n        });\n\n        console.log('Magic link:', magicLinkResponse.getValue());\n    } catch (error) {\n        console.error('Error:', error.message);\n    }\n})();\n```\n\nFull examples:\n- Generate generic magic link: [examples/generate-generic-magic-link.js](./examples/generate-generic-magic-link.js).\n- Generate magic link for specific transaction: [examples/generate-transaction-magic-link.js](./examples/generate-transaction-magic-link.js).\n\n### Create transaction (with known seller \u0026 buyer)\nThis is the most straightforward and easy way to create a transaction (including the buyer user).\n\nNotes:\n- When creating a transaction, Efty Pay will check if the user already exists by email and/or username; these values are unique within the integrator data-space in Efty Pay.\n- If a user already exists, creating a transaction will throw an error, instead you should pass in the user ID of the existing user.\n- To get the user details (including the ID) for an email or username, you can use the [Get User method](examples/get-user.js).\n\n```js\nconst grpc = require('@grpc/grpc-js');\nconst {\n    TransactionsClient,\n    TransactionRequest,\n    Transaction,\n    DigitalAsset,\n    UtmParameters,\n    AssetType,\n    Currency,\n    TransactionParty,\n    Domain,\n} = require('efty-pay-nodejs-sdk');\nconst {\n    User,\n    UserType,\n    UserStatus,\n    Address,\n    VatSettings,\n    CountryCode\n} = require('efty-pay-nodejs-sdk');\nconst {\n    PaymentDetails,\n    MangopayDetails,\n    UserCategory,\n} = require('efty-pay-nodejs-sdk');\nconst { generateToken, generateRandomString } = require('./helpers');\nrequire('dotenv').config();\n\n(async () =\u003e {\n    try {\n        const apiUrl = process.env.EFTY_PAY_API_URL;\n        const randomString = generateRandomString(5);\n        const sellerUserId = '4VlIPczrBspb83omByVH32'; // Replace with actual seller ID\n\n        const metadata = new grpc.Metadata();\n        metadata.add('authorization', generateToken());\n\n        const transactionsClient = new TransactionsClient(apiUrl, grpc.credentials.createSsl());\n\n        // Buyer details\n        const buyer = new User();\n        buyer.setFirstname('Patrick');\n        buyer.setLastname('Kosterman');\n        buyer.setUsername(`patrick-kosterman-buyer-${randomString}`);\n        buyer.setEmail(`patrick-kosterman-buyer-${randomString}@efty.com`);\n        buyer.setPassword('wasdfp-0wsdfe-mafdfrw');\n        buyer.setCompanyregistrationnumber('87654321');\n        buyer.setCompanyname('Efty Pay B.V.');\n\n        const address = new Address();\n        address.setAddressline1('Zuiderpark 17');\n        address.setPostalcode('9724 AG');\n        address.setCity('Groningen');\n        address.setCountry(CountryCode.NL);\n\n        buyer.setCompanyaddress(address);\n\n        const vatSettings = new VatSettings();\n        vatSettings.setHasvat(true);\n        buyer.setVatsettings(vatSettings);\n\n        buyer.setUsertype(UserType.BUYER_OR_SELLER);\n        buyer.setStatus(UserStatus.ACTIVE);\n        buyer.setPhonenumber('+34615504467');\n\n        const mangopayDetails = new MangopayDetails();\n        mangopayDetails.setOnboardassellerwithmangopay(false);\n        mangopayDetails.setUsercategory(UserCategory.PAYER);\n\n        const paymentDetails = new PaymentDetails();\n        paymentDetails.setMangopaydetails(mangopayDetails);\n        buyer.setPaymentdetails(paymentDetails);\n\n        // Transaction object\n        const transaction = new Transaction();\n        const seller = new User();\n        seller.setId(sellerUserId);\n        transaction.setSeller(seller);\n        transaction.setBuyer(buyer);\n        transaction.setAssettype(AssetType.DOMAIN_NAME);\n\n        const domain = new Domain();\n        domain.setDomainname(`efty${randomString}.com`);\n\n        const digitalAsset = new DigitalAsset();\n        digitalAsset.setDomain(domain);\n        transaction.setDigitalasset(digitalAsset);\n\n        const utm = new UtmParameters();\n        utm.setUtmcampaign('utm-campaign');\n        utm.setUtmsource('utm-source');\n        utm.setUtmterm('utm-term');\n        utm.setUtmmedium('utm-medium');\n        utm.setUtmcontent('utm-content');\n        transaction.setUtmparameters(utm);\n\n        transaction.setCurrency(Currency.USD);\n        transaction.setAssetamountexcvat(100000); // 1000.00 USD\n\n        // Optional: seller initiated\n        transaction.setInitiatedby(TransactionParty.SELLER);\n\n        const transactionRequest = new TransactionRequest();\n        transactionRequest.setTransaction(transaction);\n\n        const newTransaction = await new Promise((resolve, reject) =\u003e {\n            transactionsClient.createTransaction(transactionRequest, metadata, (err, response) =\u003e {\n                if (err) return reject(err);\n                resolve(response);\n            });\n        });\n\n        console.log('New transaction created:', newTransaction.getId());\n        console.log('Transaction checkout URL:', newTransaction.getCheckoutdetails().getCheckouturl());\n    } catch (error) {\n        console.error('Error:', error.message);\n    }\n})();\n```\n\nFull examples:\n- Create transaction (with known buyer): [examples/create-transaction-known-buyer.js](./examples/create-transaction-known-buyer.js).\n- Create transaction (with no buyer): [examples/create-transaction-no-buyer.js](./examples/create-transaction-no-buyer.js).\n\n### Get a user\nYou can get a user by ID, email, or username. Below sample shows getting the user by ID and email.\n\n```js\nconst grpc = require('@grpc/grpc-js');\nconst {\n    UsersClient,\n    Id,\n    GetObjectRequest,\n} = require('efty-pay-nodejs-sdk');\nconst { generateToken } = require('./helpers');\nrequire('dotenv').config();\n\n(async () =\u003e {\n    try {\n        const apiUrl = process.env.EFTY_PAY_API_URL;\n        const userIdValue = '4VlIPczrBspb83omByVH32'; // Replace with actual user ID\n\n        const metadata = new grpc.Metadata();\n        metadata.add('authorization', generateToken());\n\n        const usersClient = new UsersClient(apiUrl, grpc.credentials.createSsl());\n\n        // Get user by ID\n        const userIdRequest = new Id();\n        userIdRequest.setId(userIdValue);\n\n        const userById = await new Promise((resolve, reject) =\u003e {\n            usersClient.getUserById(userIdRequest, metadata, (err, response) =\u003e {\n                if (err) return reject(err);\n                resolve(response);\n            });\n        });\n\n        console.log('User details (by ID):');\n        console.log('Id:', userById.getId());\n        console.log('Username:', userById.getUsername());\n        console.log('Email:', userById.getEmail());\n\n        // Get user by email\n        const getObjectRequest = new GetObjectRequest();\n        getObjectRequest.setFieldvalue(userById.getEmail());\n\n        const userByEmail = await new Promise((resolve, reject) =\u003e {\n            usersClient.getUserByEmail(getObjectRequest, metadata, (err, response) =\u003e {\n                if (err) return reject(err);\n                resolve(response);\n            });\n        });\n\n        console.log('\\nUser details (by Email):');\n        console.log('Id:', userByEmail.getId());\n        console.log('Username:', userByEmail.getUsername());\n        console.log('Email:', userByEmail.getEmail());\n    } catch (error) {\n        console.error('Error:', error.message);\n    }\n})();\n```\n\nFull examples:\n- Get user: [examples/get-user.js](./examples/get-user.js).\n\n### List transactions\nYou can list all transactions in your account, or you can list transactions with filter criteria. The below sample lists all transactions for a seller.\n\n```js\nconst grpc = require('@grpc/grpc-js');\nconst {\n  TransactionsClient,\n  ListTransactionsRequest,\n} = require('efty-pay-nodejs-sdk');\nconst {\n  ListRequest,\n  Query,\n  Condition,\n  ConditionOperator,\n  ComparisonOperator,\n} = require('efty-pay-nodejs-sdk');\nconst { generateToken } = require('./helpers');\nrequire('dotenv').config();\n\n(async () =\u003e {\n  try {\n    const apiUrl = process.env.EFTY_PAY_API_URL;\n    const sellerId = '4VlIPczrBspb83omByVH32'; // Replace with actual seller ID\n\n    const metadata = new grpc.Metadata();\n    metadata.add('authorization', generateToken());\n\n    const transactionsClient = new TransactionsClient(apiUrl, grpc.credentials.createSsl());\n\n    // Build field condition\n    const condition = new Condition();\n    condition.setField('SellerId');\n    condition.setOperator(ComparisonOperator.COMPARISON_OPERATOR_EQUALS);\n    condition.setStringvalue(sellerId);\n\n    // Build query\n    const query = new Query();\n    query.setConditionoperator(ConditionOperator.CONDITION_OPERATOR_AND);\n    query.setFieldconditionsList([condition]);\n\n    // Build list request\n    const listRequest = new ListRequest();\n    listRequest.setLimit(25);\n    listRequest.setQueriesList([query]);\n\n    // Build final request\n    const transactionListRequest = new ListTransactionsRequest();\n    transactionListRequest.setReturnbuyerdata(true);\n    transactionListRequest.setReturnsellerdata(true);\n    transactionListRequest.setListrequest(listRequest);\n\n    // Stream the responses\n    const call = transactionsClient.listTransactions(transactionListRequest, metadata);\n\n    call.on('data', (transaction) =\u003e {\n      console.log(transaction.getId());\n    });\n\n    call.on('error', (err) =\u003e {\n      console.error('Error streaming transactions:', err.message);\n    });\n\n    call.on('end', () =\u003e {\n      console.log('Transaction stream complete.');\n    });\n\n  } catch (error) {\n    console.error('Error:', error.message);\n  }\n})();\n```\n\nFull examples:\n- List transactions for seller: [examples/list-transactions-for-seller.js](./examples/list-transactions-for-seller.js).\n- List transactions for buyer: [examples/list-transactions-for-buyer.js](./examples/list-transactions-for-buyer.js).\n\n## Troubleshooting \u0026 support\nIf you run into any other issues, contact us at [api@efty.com](api@efty.com).\n\n## License\nThis project is licensed under the MIT License. See the LICENSE file for details.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feftybv%2Fefty-pay-nodejs-quickstart","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feftybv%2Fefty-pay-nodejs-quickstart","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feftybv%2Fefty-pay-nodejs-quickstart/lists"}