npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

citypay-api

v1.3.2

Published

JavaScript ECMAScript 6 client for the CityPay API

Downloads

24

Readme

citypay-api

Citypay Api Client - JavaScript client for citypay-api

Welcome to the CityPay API, a robust HTTP API payment solution designed for seamless server-to-server transactional processing. Our API facilitates a wide array of payment operations, catering to diverse business needs. Whether you're integrating Internet payments, handling Mail Order/Telephone Order (MOTO) transactions, managing Subscriptions with Recurring and Continuous Authority payments, or navigating the complexities of 3-D Secure authentication, our API is equipped to support your requirements. Additionally, we offer functionalities for Authorisation, Refunding, Pre-Authorisation, Cancellation/Voids, and Completion processing, alongside the capability for tokenised payments.

Compliance and Security Overview

Key Compliance and Security Measures

  • TLS Encryption: All data transmissions must utilise TLS version 1.2 or higher, employing strong cryptography. Our infrastructure strictly enforces this requirement to maintain the integrity and confidentiality of data in transit. We conduct regular scans and assessments of our TLS endpoints to identify and mitigate vulnerabilities.
  • Data Storage Prohibitions: Storing sensitive cardholder data (CHD), such as the card security code (CSC) or primary account number (PAN), is strictly prohibited. Our API is designed to minimize your exposure to sensitive data, thereby reducing your compliance burden.
  • Data Masking: For consumer protection and compliance, full card numbers must not be displayed on receipts or any customer-facing materials. Our API automatically masks PANs, displaying only the last four digits to facilitate safe receipt generation.
  • Network Scans: If your application is web-based, regular scans of your hosting environment are mandatory to identify and rectify potential vulnerabilities. This proactive measure is crucial for maintaining a secure and compliant online presence.
  • PCI Compliance: Adherence to PCI DSS standards is not optional; it's a requirement for operating securely and legally in the payments ecosystem. For detailed information on compliance requirements and resources, please visit the PCI Security Standards Council website https://www.pcisecuritystandards.org/.
  • Request Validation: Our API includes mechanisms to verify the legitimacy of each request, ensuring it pertains to a valid account and originates from a trusted source. We leverage remote IP address verification alongside sophisticated application firewall technologies to thwart a wide array of common security threats.

Getting Started

Before integrating with the CityPay API, ensure your application and development practices align with the outlined compliance and security measures. This preparatory step is crucial for a smooth integration process and the long-term success of your payment processing operations.

For further details on API endpoints, request/response formats, and code examples, proceed to the subsequent sections of our documentation. Our aim is to provide you with all the necessary tools and information to integrate our payment processing capabilities seamlessly into your application.

Thank you for choosing CityPay API. We look forward to supporting your payment processing needs with our secure, compliant, and versatile API solution.

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 6.6.40
  • Package version: 1.3.2
  • Build date: 2024-04-25T08:53:41.616830964Z[Etc/UTC]
  • Generator version: 7.5.0
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen For more information, please visit https://www.citypay.com/contacts/

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install citypay-api --save

Finally, you need to build the module:

npm run build
Local development

To use the library locally without publishing to a remote npm registry, first install the dependencies by changing into the directory containing package.json (and this README). Let's call this JAVASCRIPT_CLIENT_DIR. Then run:

npm install

Next, link it globally in npm with the following, also from JAVASCRIPT_CLIENT_DIR:

npm link

To use the link you just defined in your project, switch to the directory you want to use your citypay-api from, and run:

npm link /path/to/<JAVASCRIPT_CLIENT_DIR>

Finally, you need to build the module:

npm run build

git

If the library is hosted at a git repository, e.g.https://github.com/citypay/citypay-api-client-js then install it via:

    npm install citypay/citypay-api-client-js --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

import CityPay from 'citypay-api';

let auth_request = new CityPay.AuthRequest();
auth_request.identifier = "example1";

new CityPay.PaymentProcessingApi().authorisationRequest(auth_request).then((data) => {
    console.log('API called successfully. Returned data: ' + data);
}, (error) => {
    console.error(error);
});

Documentation for API Endpoints

All URIs are relative to https://api.citypay.com

Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- Citypay Api Client.AuthorisationAndPaymentApi | authorisationRequest | POST /v6/authorise | Authorisation Citypay Api Client.AuthorisationAndPaymentApi | binRangeLookupRequest | POST /v6/bin | Bin Lookup Citypay Api Client.AuthorisationAndPaymentApi | cResRequest | POST /v6/cres | CRes Citypay Api Client.AuthorisationAndPaymentApi | captureRequest | POST /v6/capture | Capture Citypay Api Client.AuthorisationAndPaymentApi | createPaymentIntent | POST /v6/intent/create | Create a Payment Intent Citypay Api Client.AuthorisationAndPaymentApi | paResRequest | POST /v6/pares | PaRes Citypay Api Client.AuthorisationAndPaymentApi | refundRequest | POST /v6/refund | Refund Citypay Api Client.AuthorisationAndPaymentApi | retrievalRequest | POST /v6/retrieve | Retrieval Citypay Api Client.AuthorisationAndPaymentApi | voidRequest | POST /v6/void | Void Citypay Api Client.BatchProcessingApi | batchProcessRequest | POST /v6/batch/process | Batch Process Request Citypay Api Client.BatchProcessingApi | batchRetrieveRequest | POST /v6/batch/retrieve | Batch Retrieve Request Citypay Api Client.BatchProcessingApi | checkBatchStatusRequest | POST /v6/batch/status | Check Batch Status Citypay Api Client.CardHolderAccountApi | accountCardDeleteRequest | DELETE /v6/account/{accountid}/card/{cardId} | Card Deletion Citypay Api Client.CardHolderAccountApi | accountCardRegisterRequest | POST /v6/account/{accountid}/register | Card Registration Citypay Api Client.CardHolderAccountApi | accountCardStatusRequest | POST /v6/account/{accountid}/card/{cardId}/status | Card Status Citypay Api Client.CardHolderAccountApi | accountChangeContactRequest | POST /v6/account/{accountid}/contact | Contact Details Update Citypay Api Client.CardHolderAccountApi | accountCreate | POST /v6/account/create | Account Create Citypay Api Client.CardHolderAccountApi | accountDeleteRequest | DELETE /v6/account/{accountid} | Account Deletion Citypay Api Client.CardHolderAccountApi | accountExistsRequest | GET /v6/account-exists/{accountid} | Account Exists Citypay Api Client.CardHolderAccountApi | accountRetrieveRequest | GET /v6/account/{accountid} | Account Retrieval Citypay Api Client.CardHolderAccountApi | accountStatusRequest | POST /v6/account/{accountid}/status | Account Status Citypay Api Client.CardHolderAccountApi | chargeRequest | POST /v6/charge | Charge Citypay Api Client.DirectPostApi | directCResAuthRequest | POST /direct/cres/auth/{uuid} | Handles a CRes response from ACS, returning back the result of authorisation Citypay Api Client.DirectPostApi | directCResTokeniseRequest | POST /direct/cres/tokenise/{uuid} | Handles a CRes response from ACS, returning back a token for future authorisation Citypay Api Client.DirectPostApi | directPostAuthRequest | POST /direct/auth | Direct Post Auth Request Citypay Api Client.DirectPostApi | directPostTokeniseRequest | POST /direct/tokenise | Direct Post Tokenise Request Citypay Api Client.DirectPostApi | tokenRequest | POST /direct/token | Direct Post Token Request Citypay Api Client.OperationalFunctionsApi | aclCheckRequest | POST /v6/acl/check | ACL Check Request Citypay Api Client.OperationalFunctionsApi | domainKeyCheckRequest | POST /dk/check | Domain Key Check Request Citypay Api Client.OperationalFunctionsApi | domainKeyGenRequest | POST /dk/gen | Domain Key Generation Request Citypay Api Client.OperationalFunctionsApi | listMerchantsRequest | GET /v6/merchants/{clientid} | List Merchants Request Citypay Api Client.OperationalFunctionsApi | pingRequest | POST /v6/ping | Ping Request Citypay Api Client.PaylinkApi | tokenAdjustmentRequest | POST /paylink/{token}/adjustment | Paylink Token Adjustment Citypay Api Client.PaylinkApi | tokenCancelRequest | PUT /paylink/{token}/cancel | Cancel a Paylink Token Citypay Api Client.PaylinkApi | tokenChangesRequest | POST /paylink/token/changes | Paylink Token Audit Citypay Api Client.PaylinkApi | tokenCloseRequest | PUT /paylink/{token}/close | Close Paylink Token Citypay Api Client.PaylinkApi | tokenCreateBillPaymentRequest | POST /paylink/bill-payment | Create Bill Payment Paylink Token Citypay Api Client.PaylinkApi | tokenCreateRequest | POST /paylink/create | Create Paylink Token Citypay Api Client.PaylinkApi | tokenPurgeAttachmentsRequest | PUT /paylink/{token}/purge-attachments | Purges any attachments for a Paylink Token Citypay Api Client.PaylinkApi | tokenReconciledRequest | PUT /paylink/{token}/reconciled | Reconcile Paylink Token Citypay Api Client.PaylinkApi | tokenReopenRequest | PUT /paylink/{token}/reopen | Reopen Paylink Token Citypay Api Client.PaylinkApi | tokenResendNotificationRequest | POST /paylink/{token}/resend-notification | Resend a notification for Paylink Token Citypay Api Client.PaylinkApi | tokenStatusRequest | GET /paylink/{token}/status | Paylink Token Status Citypay Api Client.ReportingApi | batchedTransactionReportRequest | POST /v6/merchant-batch/{merchantid}/{batch_no}/transactions | Batch Transaction Report Request Citypay Api Client.ReportingApi | merchantBatchReportRequest | POST /v6/merchant-batch/report | Merchant Batch Report Request Citypay Api Client.ReportingApi | merchantBatchRequest | GET /v6/merchant-batch/{merchantid}/{batch_no} | Merchant Batch Request Citypay Api Client.ReportingApi | remittanceRangeReport | POST /v6/remittance/report/{clientid} | Remittance Report Request Citypay Api Client.ReportingApi | remittanceReportRequest | GET /v6/remittance/report/{clientid}/{date} | Remittance Date Report Request

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

cp-api-key

  • Type: API key
  • API key parameter name: cp-api-key
  • Location: HTTP header

cp-domain-key

  • Type: API key
  • API key parameter name: cp-domain-key
  • Location: URL query string