Skip to content

Commit 84f3a1c

Browse files
Merge pull request #129 from CyberSource/feb-2024-release
Feb 2024 release
2 parents 46acf5d + 5b5a791 commit 84f3a1c

File tree

36 files changed

+807
-305
lines changed

36 files changed

+807
-305
lines changed

README.md

+49-20
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,31 @@
1+
12
# Node.JS Client SDK for the CyberSource REST API
23

4+
## Description
5+
36
The CyberSource Node client provides convenient access to the [CyberSource REST API](https://developer.cybersource.com/api/reference/api-reference.html) from your Node application.
47

5-
## Requirements
8+
## System Requirements
69

7-
* Node.js version 14.21.3 or higher
8-
* A CyberSource account (see _Registration & Configuration_ section below)
10+
* Node.js version 14.21.3 or higher.
911

1012
## Installation
1113

1214
```shell
1315
npm install cybersource-rest-client
1416
```
1517

16-
## Registration & Configuration
18+
## Account Registration and Configuration
19+
20+
* Account Registration
21+
22+
Follow the first step mentioned in [Getting Started with CyberSource REST SDKs](https://developer.cybersource.com/hello-world/rest-api-sdks.html#gettingstarted) to create a sandbox account.
1723

18-
Use of this SDK and the CyberSource APIs requires having an account on our system. You can find details of getting a test account and creating your keys [here](https://developer.cybersource.com/api/developer-guides/dita-gettingstarted/registration.html)
24+
* Configuration
1925

20-
Remember this SDK is for use in server-side Node applications that access the CyberSource REST API and credentials should always be securely stored and accessed appropriately.
26+
Follow the second step mentioned in [Getting Started with CyberSource REST SDKs](https://developer.cybersource.com/hello-world/rest-api-sdks.html#gettingstarted) to configure the SDK by inputting your credentials.
2127

22-
## SDK Usage Examples and Sample Code
28+
## How to Use
2329

2430
To get started using this SDK, it's highly recommended to download our sample code repository:
2531

@@ -33,19 +39,18 @@ Additionally, you can find details and examples of how our API is structured in
3339

3440
The API Reference Guide provides examples of what information is needed for a particular request and how that information would be formatted. Using those examples, you can easily determine what methods would be necessary to include that information in a request using this SDK.
3541

36-
## MetaKey Support
37-
38-
A Meta Key is a single key that can be used by one, some, or all merchants (or accounts, if created by a Portfolio user) in the portfolio.
39-
40-
The Portfolio or Parent Account owns the key and is considered the transaction submitter when a Meta Key is used, while the merchant owns the transaction.
42+
### Example using Sample Code Application
4143

42-
MIDs continue to be able to create keys for themselves, even if a Meta Key is generated.
44+
* Add the [CyberSource REST client as a dependency](https://github.com/CyberSource/cybersource-rest-samples-node/blob/2dceb63f2fc5eb01150d1c7a9d935b291f52012f/package.json#L16C5-L16C41) in your Node.JS project.
45+
* Configure your credentials in a [Config Object](https://github.com/CyberSource/cybersource-rest-samples-node/blob/2dceb63f2fc5eb01150d1c7a9d935b291f52012f/Data/Configuration.js#L40C1-L70C2).
46+
* Create an instance of [ApiClient](https://github.com/CyberSource/cybersource-rest-samples-node/blob/2dceb63f2fc5eb01150d1c7a9d935b291f52012f/Samples/Payments/Payments/simple-authorizationinternet.js#L11).
47+
* Use the created ApiClient instance to call CyberSource APIs. For example [SimpleAuthorizationInternet](https://github.com/CyberSource/cybersource-rest-samples-node/blob/2dceb63f2fc5eb01150d1c7a9d935b291f52012f/Samples/Payments/Payments/simple-authorizationinternet.js#L56C3-L71C6)
4348

44-
Further information on MetaKey can be found in [New Business Center User Guide](https://developer.cybersource.com/library/documentation/dev_guides/Business_Center/New_Business_Center_User_Guide.pdf).
49+
For more detailed examples, refer to the [cybersource-rest-samples-node](https://github.com/CyberSource/cybersource-rest-samples-node) repository.
4550

46-
### Switching between the sandbox environment and the production environment
51+
### Switching between Test environment and Production environment
4752

48-
Cybersource maintains a complete sandbox environment for testing and development purposes. This sandbox environment is an exact duplicate of our production environment with the transaction authorization and settlement process simulated. By default, this SDK is configured to communicate with the sandbox environment. To switch to the production environment, set the `runEnvironment` in the SDK Configuration. See our sample at <https://github.com/CyberSource/cybersource-rest-samples-node/blob/master/Data/Configuration.js>.
53+
CyberSource maintains a complete sandbox environment for testing and development purposes. This sandbox environment is an exact duplicate of our production environment with the transaction authorization and settlement process simulated. By default, this SDK is configured to communicate with the sandbox environment. To switch to the production environment, set the `runEnvironment` in the SDK Configuration. See our sample at <https://github.com/CyberSource/cybersource-rest-samples-node/blob/master/Data/Configuration.js>.
4954

5055
```javascript
5156
// For TESTING use
@@ -56,18 +61,42 @@ Cybersource maintains a complete sandbox environment for testing and development
5661

5762
API credentials are different for each environment, so be sure to switch to the appropriate credentials when switching environments.
5863

59-
### Logging
64+
## Logging
6065

6166
[![Generic badge](https://img.shields.io/badge/LOGGING-NEW-GREEN.svg)](https://shields.io/)
6267

6368
Since v0.0.35, a new logging framework has been introduced in the SDK. This new logging framework makes use of Winston, and standardizes the logging so that it can be integrated with the logging in the client application.
6469

6570
More information about this new logging framework can be found in this file : [Logging.md](Logging.md)
6671

67-
## License
72+
## Features
6873

69-
This repository is distributed under a proprietary license. See the provided [`LICENSE.txt`](/LICENSE.txt) file.
74+
### MetaKey Support
75+
76+
A Meta Key is a single key that can be used by one, some, or all merchants (or accounts, if created by a Portfolio user) in the portfolio.
77+
78+
The Portfolio or Parent Account owns the key and is considered the transaction submitter when a Meta Key is used, while the merchant owns the transaction.
79+
80+
MIDs continue to be able to create keys for themselves, even if a Meta Key is generated.
81+
82+
Further information on MetaKey can be found in [New Business Center User Guide](https://developer.cybersource.com/library/documentation/dev_guides/Business_Center/New_Business_Center_User_Guide.pdf).
83+
84+
## How to Contribute
85+
86+
* Fork the repo and create your branch from `master`.
87+
* If you've added code that should be tested, add tests.
88+
* Ensure the test suite passes.
89+
* Submit your pull request! (Ensure you have [synced your fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork) with the original repository before initiating the PR).
90+
91+
92+
## Need Help?
93+
94+
For any help, you can reach out to us at our [Discussion Forum](https://community.developer.cybersource.com/t5/cybersource-APIs/bd-p/api).
7095

7196
## Disclaimer
7297

73-
Cybersource may allow Customer to access, use, and/or test a Cybersource product or service that may still be in development or has not been market-tested (“Beta Product”) solely for the purpose of evaluating the functionality or marketability of the Beta Product (a “Beta Evaluation”). Notwithstanding any language to the contrary, the following terms shall apply with respect to Customer’s participation in any Beta Evaluation (and the Beta Product(s)) accessed thereunder): The Parties will enter into a separate form agreement detailing the scope of the Beta Evaluation, requirements, pricing, the length of the beta evaluation period (“Beta Product Form”). Beta Products are not, and may not become, Transaction Services and have not yet been publicly released and are offered for the sole purpose of internal testing and non-commercial evaluation. Customer’s use of the Beta Product shall be solely for the purpose of conducting the Beta Evaluation. Customer accepts all risks arising out of the access and use of the Beta Products. Cybersource may, in its sole discretion, at any time, terminate or discontinue the Beta Evaluation. Customer acknowledges and agrees that any Beta Product may still be in development and that Beta Product is provided “AS IS” and may not perform at the level of a commercially available service, may not operate as expected and may be modified prior to release. CYBERSOURCE SHALL NOT BE RESPONSIBLE OR LIABLE UNDER ANY CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE RELATING TO A BETA PRODUCT OR THE BETA EVALUATION (A) FOR LOSS OR INACCURACY OF DATA OR COST OF PROCUREMENT OF SUBSTITUTE GOODS, SERVICES OR TECHNOLOGY, (B) ANY CLAIM, LOSSES, DAMAGES, OR CAUSE OF ACTION ARISING IN CONNECTION WITH THE BETA PRODUCT; OR (C) FOR ANY INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES INCLUDING, BUT NOT LIMITED TO, LOSS OF REVENUES AND LOSS OF PROFITS.
98+
CyberSource may allow Customer to access, use, and/or test a CyberSource product or service that may still be in development or has not been market-tested (“Beta Product”) solely for the purpose of evaluating the functionality or marketability of the Beta Product (a “Beta Evaluation”). Notwithstanding any language to the contrary, the following terms shall apply with respect to Customer’s participation in any Beta Evaluation (and the Beta Product(s)) accessed thereunder): The Parties will enter into a separate form agreement detailing the scope of the Beta Evaluation, requirements, pricing, the length of the beta evaluation period (“Beta Product Form”). Beta Products are not, and may not become, Transaction Services and have not yet been publicly released and are offered for the sole purpose of internal testing and non-commercial evaluation. Customer’s use of the Beta Product shall be solely for the purpose of conducting the Beta Evaluation. Customer accepts all risks arising out of the access and use of the Beta Products. CyberSource may, in its sole discretion, at any time, terminate or discontinue the Beta Evaluation. Customer acknowledges and agrees that any Beta Product may still be in development and that Beta Product is provided “AS IS” and may not perform at the level of a commercially available service, may not operate as expected and may be modified prior to release. CYBERSOURCE SHALL NOT BE RESPONSIBLE OR LIABLE UNDER ANY CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE RELATING TO A BETA PRODUCT OR THE BETA EVALUATION (A) FOR LOSS OR INACCURACY OF DATA OR COST OF PROCUREMENT OF SUBSTITUTE GOODS, SERVICES OR TECHNOLOGY, (B) ANY CLAIM, LOSSES, DAMAGES, OR CAUSE OF ACTION ARISING IN CONNECTION WITH THE BETA PRODUCT; OR (C) FOR ANY INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES INCLUDING, BUT NOT LIMITED TO, LOSS OF REVENUES AND LOSS OF PROFITS.
99+
100+
## License
101+
102+
This repository is distributed under a proprietary license. See the provided [`LICENSE.txt`](/LICENSE.txt) file

docs/CheckPayerAuthEnrollmentRequest.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Name | Type | Description | Notes
1111
**buyerInformation** | [**Riskv1authenticationsBuyerInformation**](Riskv1authenticationsBuyerInformation.md) | | [optional]
1212
**deviceInformation** | [**Riskv1authenticationsDeviceInformation**](Riskv1authenticationsDeviceInformation.md) | | [optional]
1313
**merchantInformation** | [**Riskv1decisionsMerchantInformation**](Riskv1decisionsMerchantInformation.md) | | [optional]
14-
**acquirerInformation** | [**Ptsv2paymentsAcquirerInformation**](Ptsv2paymentsAcquirerInformation.md) | | [optional]
14+
**acquirerInformation** | [**Riskv1decisionsAcquirerInformation**](Riskv1decisionsAcquirerInformation.md) | | [optional]
1515
**recurringPaymentInformation** | [**Ptsv2paymentsRecurringPaymentInformation**](Ptsv2paymentsRecurringPaymentInformation.md) | | [optional]
1616
**consumerAuthenticationInformation** | [**Riskv1decisionsConsumerAuthenticationInformation**](Riskv1decisionsConsumerAuthenticationInformation.md) | | [optional]
1717
**riskInformation** | [**Riskv1authenticationsRiskInformation**](Riskv1authenticationsRiskInformation.md) | | [optional]

docs/CreateBundledDecisionManagerCaseRequest.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Name | Type | Description | Notes
1414
**travelInformation** | [**Riskv1decisionsTravelInformation**](Riskv1decisionsTravelInformation.md) | | [optional]
1515
**merchantDefinedInformation** | [**[Riskv1decisionsMerchantDefinedInformation]**](Riskv1decisionsMerchantDefinedInformation.md) | | [optional]
1616
**merchantInformation** | [**Riskv1decisionsMerchantInformation**](Riskv1decisionsMerchantInformation.md) | | [optional]
17-
**acquirerInformation** | [**Ptsv2paymentsAcquirerInformation**](Ptsv2paymentsAcquirerInformation.md) | | [optional]
17+
**acquirerInformation** | [**Riskv1decisionsAcquirerInformation**](Riskv1decisionsAcquirerInformation.md) | | [optional]
1818
**recurringPaymentInformation** | [**Ptsv2paymentsRecurringPaymentInformation**](Ptsv2paymentsRecurringPaymentInformation.md) | | [optional]
1919
**consumerAuthenticationInformation** | [**Riskv1decisionsConsumerAuthenticationInformation**](Riskv1decisionsConsumerAuthenticationInformation.md) | | [optional]
2020
**watchlistScreeningInformation** | [**Ptsv2paymentsWatchlistScreeningInformation**](Ptsv2paymentsWatchlistScreeningInformation.md) | | [optional]

docs/InvoicingV2InvoicesAllGet404Response.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**submitTimeUtc** | **String** | Time of request in UTC. Format: &#x60;YYYY-MM-DDThh:mm:ssZ&#x60; **Example** &#x60;2016-08-11T22:47:57Z&#x60; equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The &#x60;T&#x60; separates the date and the time. The &#x60;Z&#x60; indicates UTC. Returned by Cybersource for all services. | [optional]
7-
**status** | **String** | The status of the invoice. Possible values: - NOTFOUND | [optional]
7+
**status** | **String** | The status of the invoice. Possible values: - NOTFOUND | [optional]
88
**reason** | **String** | The reason of the status. Possible values: - MISSING_FIELD - INVALID_DATA - DUPLICATE_REQUEST - INVALID_MERCHANT_CONFIGURATION - PROCESSOR_UNAVAILABLE | [optional]
99
**message** | **String** | The detail message related to the status and reason listed above. | [optional]
1010
**details** | [**[PtsV2PaymentsPost201ResponseErrorInformationDetails]**](PtsV2PaymentsPost201ResponseErrorInformationDetails.md) | | [optional]

docs/PostPaymentCredentialsRequest.md

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# CyberSource.PostPaymentCredentialsRequest
2+
3+
## Properties
4+
Name | Type | Description | Notes
5+
------------ | ------------- | ------------- | -------------
6+
**paymentCredentialType** | **String** | The type of payment credentials to be returned. By default, payment credentials include network token and cryptogram or dynamic CVV. If \&quot;NETWORK_TOKEN\&quot; is supplied then only network token will be returned and cryptogram or dynamic CVV will be excluded. Possible Values: - NETWORK_TOKEN | [optional]
7+
8+

docs/PtsV2PaymentsCapturesPost201Response.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Name | Type | Description | Notes
66
**links** | [**PtsV2PaymentsCapturesPost201ResponseLinks**](PtsV2PaymentsCapturesPost201ResponseLinks.md) | | [optional]
77
**id** | **String** | An unique identification number generated by Cybersource to identify the submitted request. Returned by all services. It is also appended to the endpoint of the resource. On incremental authorizations, this value with be the same as the identification number returned in the original authorization response. | [optional]
88
**submitTimeUtc** | **String** | Time of request in UTC. Format: &#x60;YYYY-MM-DDThh:mm:ssZ&#x60; **Example** &#x60;2016-08-11T22:47:57Z&#x60; equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The &#x60;T&#x60; separates the date and the time. The &#x60;Z&#x60; indicates UTC. Returned by Cybersource for all services. | [optional]
9-
**status** | **String** | The status of the submitted transaction. Possible values: - PENDING | [optional]
9+
**status** | **String** | The status of the submitted transaction. Possible values: - PENDING - TRANSMITTED (Only for Online Capture enabled merchants) | [optional]
1010
**reconciliationId** | **String** | Reference number for the transaction. Depending on how your Cybersource account is configured, this value could either be provided in the API request or generated by CyberSource. The actual value used in the request to the processor is provided back to you by Cybersource in the response. | [optional]
1111
**clientReferenceInformation** | [**PtsV2PaymentsPost201ResponseClientReferenceInformation**](PtsV2PaymentsPost201ResponseClientReferenceInformation.md) | | [optional]
1212
**processorInformation** | [**PtsV2PaymentsCapturesPost201ResponseProcessorInformation**](PtsV2PaymentsCapturesPost201ResponseProcessorInformation.md) | | [optional]

docs/PtsV2PaymentsCapturesPost201ResponseProcessorInformation.md

+1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**transactionId** | **String** | Processor transaction ID. This value identifies the transaction on a host system. This value is supported only for Moneris. It contains this information: - Terminal used to process the transaction - Shift during which the transaction took place - Batch number - Transaction number within the batch You must store this value. If you give the customer a receipt, display this value on the receipt. Example For the value 66012345001069003: - Terminal ID &#x3D; 66012345 - Shift number &#x3D; 001 - Batch number &#x3D; 069 - Transaction number &#x3D; 003 | [optional]
7+
**networkTransactionId** | **String** | Network Transaction Identifier Applicable for online capture transactions only. | [optional]
78

89

docs/PtsV2PaymentsPost201ResponseEmbeddedActionsCAPTURE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
## Properties
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
6-
**status** | **String** | The status of the submitted transaction. Possible values: - PENDING | [optional]
6+
**status** | **String** | The status of the submitted transaction. Possible values: - PENDING - TRANSMITTED (Only for Online Capture enabled merchants) | [optional]
77
**reason** | **String** | The reason of the status. Possible values: - MISSING_FIELD - INVALID_DATA - DUPLICATE_REQUEST - INVALID_MERCHANT_CONFIGURATION - EXCEEDS_AUTH_AMOUNT - AUTH_ALREADY_REVERSED - TRANSACTION_ALREADY_SETTLED - INVALID_AMOUNT - MISSING_AUTH - TRANSACTION_ALREADY_REVERSED_OR_SETTLED - NOT_SUPPORTED | [optional]
88
**message** | **String** | The detail message related to the status and reason listed above. | [optional]
99

docs/Ptsv2paymentsAcquirerInformation.md

+1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ Name | Type | Description | Notes
77
**country** | **String** | Issuers need to be aware of the Acquirer&#39;s Country Code when the Acquirer country differs from the Merchant country and the Acquirer is in the EEA (European Economic Area). | [optional]
88
**password** | **String** | Registered password for the Visa directory server. | [optional]
99
**merchantId** | **String** | Username for the visa directory server that is created when your acquirer sets up your account. This ID might be the same as your merchant ID. the username can be 15 or 23 characters. | [optional]
10+
**acquirerMerchantId** | **String** | Acquirer assigned merchant id. Check if your processor supports this field. | [optional]
1011

1112

docs/Riskv1authenticationresultsOrderInformation.md

-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,5 @@
44
Name | Type | Description | Notes
55
------------ | ------------- | ------------- | -------------
66
**amountDetails** | [**Riskv1authenticationresultsOrderInformationAmountDetails**](Riskv1authenticationresultsOrderInformationAmountDetails.md) | | [optional]
7-
**lineItems** | [**[Riskv1authenticationresultsOrderInformationLineItems]**](Riskv1authenticationresultsOrderInformationLineItems.md) | | [optional]
87

98

0 commit comments

Comments
 (0)