Skip to content

Commit 85c741b

Browse files
author
xendit-devx-bot
committed
Generated Xendit node SDK
1 parent f2aeb00 commit 85c741b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

60 files changed

+663
-97
lines changed

.openapi-generator/FILES

+6
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ docs/payment_request/Capture.md
88
docs/payment_request/CaptureListResponse.md
99
docs/payment_request/CaptureParameters.md
1010
docs/payment_request/Card.md
11+
docs/payment_request/CardChannelCode.md
1112
docs/payment_request/CardChannelProperties.md
1213
docs/payment_request/CardInformation.md
14+
docs/payment_request/CardParameters.md
1315
docs/payment_request/CardVerificationResults.md
1416
docs/payment_request/CardVerificationResultsThreeDSecure.md
1517
docs/payment_request/DirectDebit.md
@@ -59,6 +61,7 @@ docs/payment_request/PaymentRequestParametersChannelProperties.md
5961
docs/payment_request/PaymentRequestParametersChannelPropertiesAllOf.md
6062
docs/payment_request/PaymentRequestShippingInformation.md
6163
docs/payment_request/PaymentRequestStatus.md
64+
docs/payment_request/PaymentSimulation.md
6265
docs/payment_request/QrCode.md
6366
docs/payment_request/QrCodeChannelCode.md
6467
docs/payment_request/QrCodeChannelProperties.md
@@ -80,8 +83,10 @@ payment_request/models/Capture.ts
8083
payment_request/models/CaptureListResponse.ts
8184
payment_request/models/CaptureParameters.ts
8285
payment_request/models/Card.ts
86+
payment_request/models/CardChannelCode.ts
8387
payment_request/models/CardChannelProperties.ts
8488
payment_request/models/CardInformation.ts
89+
payment_request/models/CardParameters.ts
8590
payment_request/models/CardVerificationResults.ts
8691
payment_request/models/CardVerificationResultsThreeDSecure.ts
8792
payment_request/models/DirectDebit.ts
@@ -131,6 +136,7 @@ payment_request/models/PaymentRequestParametersChannelProperties.ts
131136
payment_request/models/PaymentRequestParametersChannelPropertiesAllOf.ts
132137
payment_request/models/PaymentRequestShippingInformation.ts
133138
payment_request/models/PaymentRequestStatus.ts
139+
payment_request/models/PaymentSimulation.ts
134140
payment_request/models/QRCode.ts
135141
payment_request/models/QRCodeChannelCode.ts
136142
payment_request/models/QRCodeChannelProperties.ts

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
The official Xendit Node SDK provides a simple and convenient way to call Xendit's REST API
66
in applications written in Node.
77

8-
* Package version: 4.3.0
8+
* Package version: 5.0.0
99

1010
# Getting Started
1111

balance_and_transaction/apis/Balance.ts

+5
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import {
2525
export interface GetBalanceRequest {
2626
accountType?: GetBalanceAccountTypeEnum;
2727
currency?: string;
28+
atTimestamp?: Date;
2829
forUserId?: string;
2930
}
3031

@@ -59,6 +60,10 @@ export class BalanceApi extends runtime.BaseAPI {
5960
queryParameters['currency'] = requestParameters.currency;
6061
}
6162

63+
if (requestParameters.atTimestamp !== undefined) {
64+
queryParameters['at_timestamp'] = (requestParameters.atTimestamp as any).toISOString();
65+
}
66+
6267
const headerParameters: runtime.HTTPHeaders = {};
6368
headerParameters["Authorization"] = "Basic " + btoa(this.secretKey + ":");
6469

balance_and_transaction/models/FeeResponse.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ export const FeeResponseStatusEnum = {
5353
Pending: 'PENDING',
5454
Completed: 'COMPLETED',
5555
Canceled: 'CANCELED',
56-
Reversed: 'REVERSED'
56+
Reversed: 'REVERSED',
57+
NotApplicable: 'NOT_APPLICABLE'
5758
} as const;
5859
export type FeeResponseStatusEnum = typeof FeeResponseStatusEnum[keyof typeof FeeResponseStatusEnum];
5960

docs/Balance.md

+1
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ All URIs are relative to https://api.xendit.co, except if the operation defines
3838
|-----------|:----------:|:----------:|-----------|
3939
| **accountType** | [CASH, HOLDING, TAX] | | ['CASH'] |
4040
| **currency** | **string** | | |
41+
| **atTimestamp** | **Date** | | |
4142
| **forUserId** | **string** | | |
4243

4344
### Usage Example

docs/PaymentRequest.md

+24
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ All URIs are relative to https://api.xendit.co, except if the operation defines
2727
| [**capturePaymentRequest()**](PaymentRequest.md#capturepaymentrequest-function) | **POST** /payment_requests/{paymentRequestId}/captures | Payment Request Capture |
2828
| [**authorizePaymentRequest()**](PaymentRequest.md#authorizepaymentrequest-function) | **POST** /payment_requests/{paymentRequestId}/auth | Payment Request Authorize |
2929
| [**resendPaymentRequestAuth()**](PaymentRequest.md#resendpaymentrequestauth-function) | **POST** /payment_requests/{paymentRequestId}/auth/resend | Payment Request Resend Auth |
30+
| [**simulatePaymentRequestPayment()**](PaymentRequest.md#simulatepaymentrequestpayment-function) | **POST** /payment_requests/{paymentRequestId}/payments/simulate | Payment Request Simulate Payment |
3031

3132

3233
## `createPaymentRequest()` Function
@@ -317,6 +318,29 @@ const response: PaymentRequest = await xenditPaymentRequestClient.resendPaymentR
317318
paymentRequestId: "pr-1fdaf346-dd2e-4b6c-b938-124c7167a822",
318319
)
319320
```
321+
## `simulatePaymentRequestPayment()` Function
322+
323+
324+
### Function Signature
325+
| Name | Value |
326+
|--------------------|:-------------:|
327+
| Function Name | `simulatePaymentRequestPayment` |
328+
| Request Parameters | [SimulatePaymentRequestPaymentRequest](#request-parameters--SimulatePaymentRequestPaymentRequest) |
329+
| Return Type | [PaymentSimulation](payment_request/PaymentSimulation.md) |
330+
331+
### Request Parameters - SimulatePaymentRequestPaymentRequest
332+
| Field Name | Type | Required | Default |
333+
|-----------|:----------:|:----------:|-----------|
334+
| **paymentRequestId** | **string** | ☑️ | |
335+
336+
### Usage Example
337+
```typescript
338+
import { PaymentSimulation } from 'xendit-node/payment_request/models'
339+
340+
const response: PaymentSimulation = await xenditPaymentRequestClient.simulatePaymentRequestPayment({
341+
paymentRequestId: "pr-1fdaf346-dd2e-4b6c-b938-124c7167a822",
342+
)
343+
```
320344
321345
## Callback Objects
322346
Use the following callback objects provided by Xendit to receive callbacks (also known as webhooks) that Xendit sends you on events, such as successful payments. Note that the example is meant to illustrate the contents of the callback object -- you will not need to instantiate these objects in practice

docs/payment_method/Card.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ Card Payment Method Details
66

77
| Name | Type | Required | Description | Examples |
88
|------------|:-------------:|:-------------:|-------------|:-------------:|
9-
| **currency** |string | ☑️ | | | |
9+
| **channelCode** |[CardChannelCode](CardChannelCode.md) | | | | |
10+
| **currency** |string | | | | |
1011
| **channelProperties** |[CardChannelProperties](CardChannelProperties.md) | ☑️ | | | |
1112
| **cardInformation** |[TokenizedCardInformation](TokenizedCardInformation.md) | | | | |
1213
| **cardVerificationResults** |[CardVerificationResults](CardVerificationResults.md) | | | | |
+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# CardChannelCode
2+
3+
Card Channel Code
4+
5+
6+
## Enum
7+
8+
9+
* `Gpn` (value: `'GPN'`)
10+
11+
* `XenditEnumDefaultFallback` (value: `UNKNOWN_ENUM_VALUE`)
12+
13+
If you encounter `UNKNOWN_ENUM_VALUE`, it means that this ENUM is unavailable in your current SDK version. Please upgrade to get the newest ENUM.
14+
15+
16+
[[Back to README]](../../README.md)

docs/payment_method/CardChannelProperties.md

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ Card Channel Properties
1010
| **successReturnUrl** |string | | URL where the end-customer is redirected if the authorization is successful | | |
1111
| **failureReturnUrl** |string | | URL where the end-customer is redirected if the authorization failed | | |
1212
| **cardonfileType** |string | | Type of “credential-on-file” / “card-on-file” payment being made. Indicate that this payment uses a previously linked Payment Method for charging. | | |
13+
| **expiresAt** |Date | | | | |
1314

1415

1516

docs/payment_method/DirectDebitChannelCode.md

+6
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ Direct Debit Channel Code
1414

1515
* `Bpi` (value: `'BPI'`)
1616

17+
* `AutodebitBpi` (value: `'AUTODEBIT_BPI'`)
18+
19+
* `BpiRecurring` (value: `'BPI_RECURRING'`)
20+
1721
* `Bri` (value: `'BRI'`)
1822

1923
* `Bni` (value: `'BNI'`)
@@ -52,6 +56,8 @@ Direct Debit Channel Code
5256

5357
* `AutodebitUbp` (value: `'AUTODEBIT_UBP'`)
5458

59+
* `UbpDebitPull` (value: `'UBP_DEBIT_PULL'`)
60+
5561
* `AffinFpx` (value: `'AFFIN_FPX'`)
5662

5763
* `AgroFpx` (value: `'AGRO_FPX'`)

docs/payment_method/EWalletChannelCode.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ EWallet Channel Code
4646

4747
* `Alipay` (value: `'ALIPAY'`)
4848

49-
* `Touchandgo` (value: `'TOUCHANDGO'`)
49+
* `Touchngo` (value: `'TOUCHNGO'`)
5050

5151
* `XenditEnumDefaultFallback` (value: `UNKNOWN_ENUM_VALUE`)
5252

docs/payment_method/EWalletChannelProperties.md

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ EWallet Channel Properties
99
| **successReturnUrl** |string | | URL where the end-customer is redirected if the authorization is successful | | |
1010
| **failureReturnUrl** |string | | URL where the end-customer is redirected if the authorization failed | | |
1111
| **cancelReturnUrl** |string | | URL where the end-customer is redirected if the authorization cancelled | | |
12+
| **pendingReturnUrl** |string | | URL where the end-customer is redirected if the authorization is pending | | |
1213
| **mobileNumber** |string | | Mobile number of customer in E.164 format (e.g. +628123123123). For OVO one time payment use only. | | |
1314
| **redeemPoints** |string | | REDEEM_NONE will not use any point, REDEEM_ALL will use all available points before cash balance is used. For OVO and ShopeePay tokenized payment use only. | | |
1415
| **cashtag** |string | | Available for JENIUSPAY only | | |

docs/payment_method/QrCodeChannelCode.md

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ QR Code Channel Code
1616

1717
* `Linkaja` (value: `'LINKAJA'`)
1818

19+
* `Xendit` (value: `'XENDIT'`)
20+
1921
* `XenditEnumDefaultFallback` (value: `UNKNOWN_ENUM_VALUE`)
2022

2123
If you encounter `UNKNOWN_ENUM_VALUE`, it means that this ENUM is unavailable in your current SDK version. Please upgrade to get the newest ENUM.

docs/payment_method/TokenizedCardInformation.md

+11-9
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ Tokenized Card Information
66

77
| Name | Type | Required | Description | Examples |
88
|------------|:-------------:|:-------------:|-------------|:-------------:|
9-
| **tokenId** |string | ☑️ | | | |
10-
| **maskedCardNumber** |string | ☑️ | 1st 6 and last 4 digits of the card | | |
9+
| **tokenId** |string | | | | |
10+
| **maskedCardNumber** |string | | 1st 6 and last 4 digits of the card | | |
1111
| **cardholderName** |string | | Cardholder name is optional but recommended for 3DS 2 / AVS verification | | |
12-
| **expiryMonth** |string | ☑️ | Card expiry month in MM format | | |
13-
| **expiryYear** |string | ☑️ | Card expiry month in YY format | | |
14-
| **fingerprint** |string | ☑️ | Xendit-generated identifier for the unique card number. Multiple payment method objects can be created for the same account - e.g. if the user first creates a one-time payment request, and then later on creates a multiple-use payment method using the same account. The fingerprint helps to identify the unique account being used. | | |
15-
| **type** |string | ☑️ | Whether the card is a credit or debit card | | |
16-
| **network** |string | ☑️ | Card network - VISA, MASTERCARD, JCB, AMEX, DISCOVER, BCA | | |
17-
| **country** |string | ☑️ | Country where the card was issued ISO 3166-1 Alpha-2 | | |
18-
| **issuer** |string | ☑️ | Issuer of the card, most often an issuing bank For example, “BCA”, “MANDIRI” | | |
12+
| **expiryMonth** |string | | Card expiry month in MM format | | |
13+
| **expiryYear** |string | | Card expiry month in YY format | | |
14+
| **fingerprint** |string | | Xendit-generated identifier for the unique card number. Multiple payment method objects can be created for the same account - e.g. if the user first creates a one-time payment request, and then later on creates a multiple-use payment method using the same account. The fingerprint helps to identify the unique account being used. | | |
15+
| **type** |string | | Whether the card is a credit or debit card | | |
16+
| **network** |string | | Card network - VISA, MASTERCARD, JCB, AMEX, DISCOVER, BCA | | |
17+
| **country** |string | | Country where the card was issued ISO 3166-1 Alpha-2 | | |
18+
| **issuer** |string | | Issuer of the card, most often an issuing bank For example, “BCA”, “MANDIRI” | | |
19+
| **cardNumber** |string | | | | |
20+
| **oneTimeToken** |string | | | | |
1921

2022

2123

docs/payment_method/VirtualAccountChannelCode.md

+6
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ Virtual Account Channel Code
3838

3939
* `Ambank` (value: `'AMBANK'`)
4040

41+
* `Bnc` (value: `'BNC'`)
42+
43+
* `Hana` (value: `'HANA'`)
44+
45+
* `Muamalat` (value: `'MUAMALAT'`)
46+
4147
* `XenditEnumDefaultFallback` (value: `UNKNOWN_ENUM_VALUE`)
4248

4349
If you encounter `UNKNOWN_ENUM_VALUE`, it means that this ENUM is unavailable in your current SDK version. Please upgrade to get the newest ENUM.

docs/payment_request/Card.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@
66

77
| Name | Type | Required | Description | Examples |
88
|------------|:-------------:|:-------------:|-------------|:-------------:|
9-
| **currency** |[PaymentRequestCurrency](PaymentRequestCurrency.md) | ☑️ | | | |
9+
| **channelCode** |[CardChannelCode](CardChannelCode.md) | | | | |
10+
| **currency** |[PaymentRequestCurrency](PaymentRequestCurrency.md) | | | | |
1011
| **channelProperties** |[CardChannelProperties](CardChannelProperties.md) | ☑️ | | | |
11-
| **cardInformation** |[CardInformation](CardInformation.md) | ☑️ | | | |
12+
| **cardInformation** |[CardInformation](CardInformation.md) | | | | |
1213
| **cardVerificationResults** |[CardVerificationResults](CardVerificationResults.md) | | | | |
1314

1415

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# CardChannelCode
2+
3+
Card Channel Code
4+
5+
6+
## Enum
7+
8+
9+
* `Gpn` (value: `'GPN'`)
10+
11+
* `XenditEnumDefaultFallback` (value: `UNKNOWN_ENUM_VALUE`)
12+
13+
If you encounter `UNKNOWN_ENUM_VALUE`, it means that this ENUM is unavailable in your current SDK version. Please upgrade to get the newest ENUM.
14+
15+
16+
[[Back to README]](../../README.md)

docs/payment_request/CardChannelProperties.md

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Card Channel Properties
1111
| **failureReturnUrl** |string | | URL where the end-customer is redirected if the authorization failed | | |
1212
| **cardonfileType** |string | | Type of “credential-on-file” / “card-on-file” payment being made. Indicate that this payment uses a previously linked Payment Method for charging. | | |
1313
| **merchantIdTag** |string | | Tag for a Merchant ID that you want to associate this payment with. For merchants using their own MIDs to specify which MID they want to use | | |
14+
| **expiresAt** |Date | | | | |
1415

1516

1617

docs/payment_request/CardInformation.md

+6-4
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ Card Information
66

77
| Name | Type | Required | Description | Examples |
88
|------------|:-------------:|:-------------:|-------------|:-------------:|
9-
| **tokenId** |string | ☑️ | | | |
10-
| **maskedCardNumber** |string | ☑️ | 1st 6 and last 4 digits of the card | | |
11-
| **expiryMonth** |string | ☑️ | Card expiry month in MM format | | |
12-
| **expiryYear** |string | ☑️ | Card expiry month in YY format | | |
9+
| **tokenId** |string | | | | |
10+
| **maskedCardNumber** |string | | 1st 6 and last 4 digits of the card | | |
11+
| **expiryMonth** |string | | Card expiry month in MM format | | |
12+
| **expiryYear** |string | | Card expiry month in YY format | | |
1313
| **cardholderName** |string | | Cardholder name | | |
1414
| **fingerprint** |string | | | | |
1515
| **type** |string | | | | |
1616
| **network** |string | | | | |
1717
| **country** |string | | | | |
1818
| **issuer** |string | | | | |
19+
| **cardNumber** |string | | | | |
20+
| **oneTimeToken** |string | | | | |
1921

2022

2123

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# CardParameters
2+
3+
4+
5+
## Properties
6+
7+
| Name | Type | Required | Description | Examples |
8+
|------------|:-------------:|:-------------:|-------------|:-------------:|
9+
| **channelProperties** |[CardChannelProperties](CardChannelProperties.md) | ☑️ | | | |
10+
| **cardInformation** |[CardInformation](CardInformation.md) | | | | |
11+
12+
13+
14+
[[Back to README]](../../README.md)

docs/payment_request/DirectDebitChannelCode.md

+35-1
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ Direct Debit Channel Code
1818

1919
* `Bpi` (value: `'BPI'`)
2020

21+
* `BpiRecurring` (value: `'BPI_RECURRING'`)
22+
2123
* `Bdo` (value: `'BDO'`)
2224

2325
* `Cimbniaga` (value: `'CIMBNIAGA'`)
@@ -28,7 +30,9 @@ Direct Debit Channel Code
2830

2931
* `Ubp` (value: `'UBP'`)
3032

31-
* `AutodebitUbp` (value: `'AUTODEBIT_UBP'`)
33+
* `UbpEada` (value: `'UBP_EADA'`)
34+
35+
* `UbpDebitPull` (value: `'UBP_DEBIT_PULL'`)
3236

3337
* `Chinabank` (value: `'CHINABANK'`)
3438

@@ -132,6 +136,36 @@ Direct Debit Channel Code
132136

133137
* `UobFpxBusiness` (value: `'UOB_FPX_BUSINESS'`)
134138

139+
* `BdoOnlineBanking` (value: `'BDO_ONLINE_BANKING'`)
140+
141+
* `BpiOnlineBanking` (value: `'BPI_ONLINE_BANKING'`)
142+
143+
* `UnionbankOnlineBanking` (value: `'UNIONBANK_ONLINE_BANKING'`)
144+
145+
* `BocOnlineBanking` (value: `'BOC_ONLINE_BANKING'`)
146+
147+
* `ChinabankOnlineBanking` (value: `'CHINABANK_ONLINE_BANKING'`)
148+
149+
* `InstapayOnlineBanking` (value: `'INSTAPAY_ONLINE_BANKING'`)
150+
151+
* `LandbankOnlineBanking` (value: `'LANDBANK_ONLINE_BANKING'`)
152+
153+
* `MaybankOnlineBanking` (value: `'MAYBANK_ONLINE_BANKING'`)
154+
155+
* `MetrobankOnlineBanking` (value: `'METROBANK_ONLINE_BANKING'`)
156+
157+
* `PnbOnlineBanking` (value: `'PNB_ONLINE_BANKING'`)
158+
159+
* `PsbankOnlineBanking` (value: `'PSBANK_ONLINE_BANKING'`)
160+
161+
* `PesonetOnlineBanking` (value: `'PESONET_ONLINE_BANKING'`)
162+
163+
* `RcbcOnlineBanking` (value: `'RCBC_ONLINE_BANKING'`)
164+
165+
* `RobinsonsBankOnlineBanking` (value: `'ROBINSONS_BANK_ONLINE_BANKING'`)
166+
167+
* `SecurityBankOnlineBanking` (value: `'SECURITY_BANK_ONLINE_BANKING'`)
168+
135169
* `XenditEnumDefaultFallback` (value: `UNKNOWN_ENUM_VALUE`)
136170

137171
If you encounter `UNKNOWN_ENUM_VALUE`, it means that this ENUM is unavailable in your current SDK version. Please upgrade to get the newest ENUM.

docs/payment_request/DirectDebitChannelProperties.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66

77
| Name | Type | Required | Description | Examples |
88
|------------|:-------------:|:-------------:|-------------|:-------------:|
9+
| **email** |string | | Email address of the customer that is registered to the partner channel | | |
910
| **mobileNumber** |string | | Mobile number of the customer registered to the partner channel | | |
1011
| **successReturnUrl** |string | | | | |
1112
| **failureReturnUrl** |string | | | | |
1213
| **identityDocumentNumber** |string | | | | |
1314
| **accountNumber** |string | | | | |
1415
| **cardLastFour** |string | | Last four digits of the debit card | | |
1516
| **cardExpiry** |string | | Expiry month and year of the debit card (in MM/YY format) | | |
16-
| **email** |string | | Email address of the customer that is registered to the partner channel | | |
1717

1818

1919

0 commit comments

Comments
 (0)