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
- Citypay Api Client.AccountCreate
- Citypay Api Client.AccountStatus
- Citypay Api Client.Acknowledgement
- Citypay Api Client.AclCheckRequest
- Citypay Api Client.AclCheckResponseModel
- Citypay Api Client.AirlineAdvice
- Citypay Api Client.AirlineSegment
- Citypay Api Client.AuthReference
- Citypay Api Client.AuthReferences
- Citypay Api Client.AuthRequest
- Citypay Api Client.AuthResponse
- Citypay Api Client.Batch
- Citypay Api Client.BatchReportRequest
- Citypay Api Client.BatchReportResponseModel
- Citypay Api Client.BatchTransaction
- Citypay Api Client.BatchTransactionReportRequest
- Citypay Api Client.BatchTransactionReportResponse
- Citypay Api Client.BatchTransactionResultModel
- Citypay Api Client.Bin
- Citypay Api Client.BinLookup
- Citypay Api Client.CResAuthRequest
- Citypay Api Client.CaptureRequest
- Citypay Api Client.Card
- Citypay Api Client.CardHolderAccount
- Citypay Api Client.CardStatus
- Citypay Api Client.ChargeRequest
- Citypay Api Client.CheckBatchStatus
- Citypay Api Client.CheckBatchStatusResponse
- Citypay Api Client.ContactDetails
- Citypay Api Client.Decision
- Citypay Api Client.DirectPostRequest
- Citypay Api Client.DirectTokenAuthRequest
- Citypay Api Client.DomainKeyCheckRequest
- Citypay Api Client.DomainKeyRequest
- Citypay Api Client.DomainKeyResponse
- Citypay Api Client.Error
- Citypay Api Client.EventDataModel
- Citypay Api Client.Exists
- Citypay Api Client.ExternalMPI
- Citypay Api Client.ListMerchantsResponse
- Citypay Api Client.MCC6012
- Citypay Api Client.Merchant
- Citypay Api Client.MerchantBatchReportRequest
- Citypay Api Client.MerchantBatchReportResponse
- Citypay Api Client.MerchantBatchResponse
- Citypay Api Client.NetSummaryResponse
- Citypay Api Client.PaResAuthRequest
- Citypay Api Client.PaylinkAddress
- Citypay Api Client.PaylinkAdjustmentRequest
- Citypay Api Client.PaylinkAttachmentRequest
- Citypay Api Client.PaylinkAttachmentResult
- Citypay Api Client.PaylinkBillPaymentTokenRequest
- Citypay Api Client.PaylinkCardHolder
- Citypay Api Client.PaylinkCart
- Citypay Api Client.PaylinkCartItemModel
- Citypay Api Client.PaylinkConfig
- Citypay Api Client.PaylinkCustomParam
- Citypay Api Client.PaylinkEmailNotificationPath
- Citypay Api Client.PaylinkErrorCode
- Citypay Api Client.PaylinkFieldGuardModel
- Citypay Api Client.PaylinkPartPayments
- Citypay Api Client.PaylinkResendNotificationRequest
- Citypay Api Client.PaylinkSMSNotificationPath
- Citypay Api Client.PaylinkStateEvent
- Citypay Api Client.PaylinkTokenCreated
- Citypay Api Client.PaylinkTokenRequestModel
- Citypay Api Client.PaylinkTokenStatus
- Citypay Api Client.PaylinkTokenStatusChangeRequest
- Citypay Api Client.PaylinkTokenStatusChangeResponse
- Citypay Api Client.PaylinkUI
- Citypay Api Client.PaymentIntent
- Citypay Api Client.PaymentIntentReference
- Citypay Api Client.Ping
- Citypay Api Client.ProcessBatchRequest
- Citypay Api Client.ProcessBatchResponse
- Citypay Api Client.RefundRequest
- Citypay Api Client.RegisterCard
- Citypay Api Client.RemittanceData
- Citypay Api Client.RemittanceReportRequest
- Citypay Api Client.RemittanceReportResponse
- Citypay Api Client.RemittedClientData
- Citypay Api Client.RequestChallenged
- Citypay Api Client.RetrieveRequest
- Citypay Api Client.ThreeDSecure
- Citypay Api Client.TokenisationResponseModel
- Citypay Api Client.VoidRequest
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