You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-10Lines changed: 14 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,29 +2,33 @@
2
2
3
3
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.
4
4
5
-
## Requirements
5
+
## Requirements
6
+
6
7
* Node.js version 6.17.1 or higher
7
8
* A CyberSource account (see _Registration & Configuration_ section below)
8
9
9
-
10
10
## Installation
11
11
12
12
```shell
13
-
npm install cybersource-rest-client
13
+
npm install cybersource-rest-client
14
14
```
15
15
16
16
## Registration & Configuration
17
+
17
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)
18
19
19
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.
20
21
21
22
## SDK Usage Examples and Sample Code
23
+
22
24
To get started using this SDK, it's highly recommended to download our sample code repository:
25
+
23
26
*[Cybersource Node.js Sample Code Repository (on GitHub)](https://github.com/CyberSource/cybersource-rest-samples-node)
24
27
25
28
In that respository, we have comprehensive sample code for all common uses of our API:
26
29
27
30
Additionally, you can find details and examples of how our API is structured in our API Reference Guide:
31
+
28
32
*[Developer Center API Reference](https://developer.cybersource.com/api/reference/api-reference.html)
29
33
30
34
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.
@@ -40,18 +44,18 @@ MIDs continue to be able to create keys for themselves, even if a Meta Key is ge
40
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).
41
45
42
46
### Switching between the sandbox environment and the production environment
43
-
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.
47
+
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>.
**pointsBeforeRedemption** | **String** | Loyalty points total balance before redemption. For Example: Points, such as 100 | [optional]
7
+
**pointsValueBeforeRedemption** | **String** | The total value of loyalty points before redemption in the default currency. Max characters is 12 excluding the \".\" symbol For Example: Points, such as 20.00 | [optional]
8
+
**pointsRedeemed** | **String** | Number of loyalty points that were redeemed. For Example: Points, such as 100 | [optional]
9
+
**pointsValueRedeemed** | **String** | The value of the loyalty points that were redeemed in the default currency. Max characters is 12 excluding the \".\" symbol For Example: Points, such as 100.00 | [optional]
10
+
**pointsAfterRedemption** | **String** | Loyalty Points remaining total balance after redemption. For Example: Points, such as 20.00 | [optional]
11
+
**pointsValueAfterRedemption** | **String** | The value of the remaining loyalty points after redumption in the default currency. Max characters is 12 excluding the \".\" symbol For Example: Points, such as 20.00 | [optional]
**suffix** | **String** | Last four digits of the cardholder’s account number. This field is included in the reply message when the client software that is installed on the POS terminal uses the token management service (TMS) to retrieve tokenized payment details. You must contact customer support to have your account enabled to receive these fields in the credit reply message. #### PIN debit This field is returned only for tokenized transactions. You can use this value on the receipt that you give to the cardholder. Returned by PIN debit credit and PIN debit purchase. This field is supported only by the following processors: - American Express Direct - Credit Mutuel-CIC - FDC Nashville Global - OmniPay Direct - SIX | [optional]
6
+
**suffix** | **String** | Last four digits of the cardholder’s account number. This field is included in the reply message when the client software that is installed on the POS terminal uses the token management service (TMS) to retrieve tokenized payment details. You must contact customer support to have your account enabled to receive these fields in the credit reply message. #### Google Pay transactions For PAN-based Google Pay transactions, this field is returned in the API response. #### PIN debit This field is returned only for tokenized transactions. You can use this value on the receipt that you give to the cardholder. Returned by PIN debit credit and PIN debit purchase. This field is supported only by the following processors: - American Express Direct - Credit Mutuel-CIC - FDC Nashville Global - OmniPay Direct - SIX | [optional]
7
+
**expirationMonth** | **String** | Two-digit month in which the payment card expires. Format: `MM`. Valid values: `01` through `12`. Leading 0 is required. #### Barclays and Streamline For Maestro (UK Domestic) and Maestro (International) cards on Barclays and Streamline, this must be a valid value (`01` through `12`) but is not required to be a valid expiration date. In other words, an expiration date that is in the past does not cause CyberSource to reject your request. However, an invalid expiration date might cause the issuer to reject your request. #### Encoded Account Numbers For encoded account numbers (_type_=039), if there is no expiration date on the card, use `12`. #### FDMS Nashville Required field. #### All other processors Required if `pointOfSaleInformation.entryMode=keyed`. However, this field is optional if your account is configured for relaxed requirements for address data and expiration date. **Important** It is your responsibility to determine whether a field is required for the transaction you are requesting. #### Google Pay transactions For PAN-based Google Pay transactions, this field is returned in the API response. | [optional]
8
+
**expirationYear** | **String** | Four-digit year in which the payment card expires. Format: `YYYY`. #### Barclays and Streamline For Maestro (UK Domestic) and Maestro (International) cards on Barclays and Streamline, this must be a valid value (`1900` through `3000`) but is not required to be a valid expiration date. In other words, an expiration date that is in the past does not cause CyberSource to reject your request. However, an invalid expiration date might cause the issuer to reject your request. #### Encoded Account Numbers For encoded account numbers (**_type_**`=039`), if there is no expiration date on the card, use `2021`. #### FDMS Nashville Required field. #### FDC Nashville Global and FDMS South You can send in 2 digits or 4 digits. If you send in 2 digits, they must be the last 2 digits of the year. #### All other processors Required if `pointOfSaleInformation.entryMode=keyed`. However, this field is optional if your account is configured for relaxed requirements for address data and expiration date. **Important** It is your responsibility to determine whether a field is required for the transaction you are requesting. #### Google Pay transactions For PAN-based Google Pay transactions, this field is returned in the API response. | [optional]
9
+
**type** | **String** | Three-digit value that indicates the card type. **IMPORTANT** It is strongly recommended that you include the card type field in request messages even if it is optional for your processor and card type. Omitting the card type can cause the transaction to be processed with the wrong card type. Possible values: - `001`: Visa. For card-present transactions on all processors except SIX, the Visa Electron card type is processed the same way that the Visa debit card is processed. Use card type value `001` for Visa Electron. - `002`: Mastercard, Eurocard[^1], which is a European regional brand of Mastercard. - `003`: American Express - `004`: Discover - `005`: Diners Club - `006`: Carte Blanche[^1] - `007`: JCB[^1] - `014`: Enroute[^1] - `021`: JAL[^1] - `024`: Maestro (UK Domestic)[^1] - `031`: Delta[^1]: Use this value only for Ingenico ePayments. For other processors, use `001` for all Visa card types. - `033`: Visa Electron[^1]. Use this value only for Ingenico ePayments and SIX. For other processors, use `001` for all Visa card types. - `034`: Dankort[^1] - `036`: Cartes Bancaires[^1,4] - `037`: Carta Si[^1] - `039`: Encoded account number[^1] - `040`: UATP[^1] - `042`: Maestro (International)[^1] - `050`: Hipercard[^2,3] - `051`: Aura - `054`: Elo[^3] - `062`: China UnionPay [^1]: For this card type, you must include the `paymentInformation.card.type` or `paymentInformation.tokenizedCard.type` field in your request for an authorization or a stand-alone credit. [^2]: For this card type on Cielo 3.0, you must include the `paymentInformation.card.type` or `paymentInformation.tokenizedCard.type` field in a request for an authorization or a stand-alone credit. This card type is not supported on Cielo 1.5. [^3]: For this card type on Getnet and Rede, you must include the `paymentInformation.card.type` or `paymentInformation.tokenizedCard.type` field in a request for an authorization or a stand-alone credit. [^4]: For this card type, you must include the `paymentInformation.card.type` in your request for any payer authentication services. #### Used by **Authorization** Required for Carte Blanche and JCB. Optional for all other card types. #### Card Present reply This field is included in the reply message when the client software that is installed on the POS terminal uses the token management service (TMS) to retrieve tokenized payment details. You must contact customer support to have your account enabled to receive these fields in the credit reply message. Returned by the Credit service. This reply field is only supported by the following processors: - American Express Direct - Credit Mutuel-CIC - FDC Nashville Global - OmniPay Direct - SIX #### Google Pay transactions For PAN-based Google Pay transactions, this field is returned in the API response. #### GPX This field only supports transactions from the following card types: - Visa - Mastercard - AMEX - Discover - Diners - JCB - Union Pay International | [optional]
10
+
**prefix** | **String** | Bank Identification Number (BIN). This is the initial four to six numbers on a credit card account number. #### Google Pay transactions For PAN-based Google Pay transactions, this field is returned in the API response. | [optional]
0 commit comments