xendit-node
Advanced tools
Comparing version 3.1.0 to 3.2.0
@@ -23,2 +23,8 @@ # BankCode | ||
* `SahabatSampoerna` (value: `'SAHABAT_SAMPOERNA'`) | ||
* `Cimb` (value: `'CIMB'`) | ||
* `Bnc` (value: `'BNC'`) | ||
@@ -37,2 +37,12 @@ # DirectDebitType | ||
* `DdBdoEpay` (value: `'DD_BDO_EPAY'`) | ||
* `DdRcbc` (value: `'DD_RCBC'`) | ||
* `DdChinabank` (value: `'DD_CHINABANK'`) | ||
* `BaChinabank` (value: `'BA_CHINABANK'`) | ||
* `DcChinabank` (value: `'DC_CHINABANK'`) | ||
@@ -23,2 +23,8 @@ # EwalletType | ||
* `Astrapay` (value: `'ASTRAPAY'`) | ||
* `Nexcash` (value: `'NEXCASH'`) | ||
* `Jeniuspay` (value: `'JENIUSPAY'`) | ||
@@ -13,4 +13,8 @@ # InvoiceCurrency | ||
* `Thb` (value: `'THB'`) | ||
* `Vnd` (value: `'VND'`) | ||
* `Php` (value: `'PHP'`) | ||
@@ -60,8 +60,66 @@ ## PaymentMethod | ||
### Usage Examples | ||
#### Minimum API Usage | ||
#### Account linking for E-Wallet | ||
```typescript | ||
import { PaymentMethod } from 'xendit-node/payment_method/models' | ||
import { PaymentMethodParameters, PaymentMethod } from 'xendit-node/payment_method/models' | ||
const response: PaymentMethod = await xenditPaymentMethodClient.createPaymentMethod({ }) | ||
const data: PaymentMethodParameters = { | ||
"ewallet" : { | ||
"channelProperties" : { | ||
"failureReturnUrl" : "https://redirect.me/failure", | ||
"successReturnUrl" : "https://redirect.me/success", | ||
"cancelReturnUrl" : "https://redirect.me/cancel" | ||
}, | ||
"channelCode" : "OVO" | ||
}, | ||
"metadata" : { | ||
"sku" : "example-1234" | ||
}, | ||
"reusability" : "MULTIPLE_USE", | ||
"type" : "EWALLET", | ||
"customer" : { | ||
"type" : "INDIVIDUAL", | ||
"referenceId" : "customer-123", | ||
"individualDetail" : { | ||
"surname" : "Doe", | ||
"givenNames" : "John" | ||
} | ||
} | ||
} | ||
const response: PaymentMethod = await xenditPaymentMethodClient.createPaymentMethod({ | ||
data | ||
}) | ||
``` | ||
#### Account linking for PH Direct Debit | ||
```typescript | ||
import { PaymentMethodParameters, PaymentMethod } from 'xendit-node/payment_method/models' | ||
const data: PaymentMethodParameters = { | ||
"mobileNumber" : 628774494404, | ||
"reusability" : "MULTIPLE_USE", | ||
"type" : "DIRECT_DEBIT", | ||
"directDebit" : { | ||
"channelProperties" : { | ||
"failureReturnUrl" : "https://redirect.me/failure", | ||
"successReturnUrl" : "https://redirect.me/success" | ||
}, | ||
"channelCode" : "BPI" | ||
}, | ||
"email" : "testemail@email.com", | ||
"customer" : { | ||
"type" : "INDIVIDUAL", | ||
"referenceId" : "customer-123", | ||
"individualDetail" : { | ||
"surname" : "Doe", | ||
"givenNames" : "John" | ||
} | ||
} | ||
} | ||
const response: PaymentMethod = await xenditPaymentMethodClient.createPaymentMethod({ | ||
data | ||
}) | ||
``` | ||
## Expires a payment method | ||
@@ -68,0 +126,0 @@ |
@@ -87,8 +87,122 @@ ## PaymentRequest | ||
### Usage Examples | ||
#### Minimum API Usage | ||
#### E-Wallet One Time Payment via Redirect URL | ||
```typescript | ||
import { PaymentRequest } from 'xendit-node/payment_request/models' | ||
import { PaymentRequestParameters, PaymentRequest } from 'xendit-node/payment_request/models' | ||
const response: PaymentRequest = await xenditPaymentRequestClient.createPaymentRequest({ }) | ||
const data: PaymentRequestParameters = { | ||
"country" : "ID", | ||
"amount" : 15000, | ||
"paymentMethod" : { | ||
"ewallet" : { | ||
"channelProperties" : { | ||
"successReturnUrl" : "https://redirect.me/success" | ||
}, | ||
"channelCode" : "SHOPEEPAY" | ||
}, | ||
"reusability" : "ONE_TIME_USE", | ||
"type" : "EWALLET" | ||
}, | ||
"currency" : "IDR", | ||
"referenceId" : "example-ref-1234" | ||
} | ||
const response: PaymentRequest = await xenditPaymentRequestClient.createPaymentRequest({ | ||
data | ||
}) | ||
``` | ||
#### Fixed amount dynamic QR | ||
```typescript | ||
import { PaymentRequestParameters, PaymentRequest } from 'xendit-node/payment_request/models' | ||
const data: PaymentRequestParameters = { | ||
"amount" : 15000, | ||
"metadata" : { | ||
"sku" : "example-sku-1234" | ||
}, | ||
"paymentMethod" : { | ||
"qrCode" : { | ||
"channelCode" : "“QRIS”" | ||
}, | ||
"reusability" : "ONE_TIME_USE", | ||
"type" : "QR_CODE" | ||
}, | ||
"currency" : "IDR", | ||
"referenceId" : "example-ref-1234" | ||
} | ||
const response: PaymentRequest = await xenditPaymentRequestClient.createPaymentRequest({ | ||
data | ||
}) | ||
``` | ||
#### Fixed amount single use Virtual Account | ||
```typescript | ||
import { PaymentRequestParameters, PaymentRequest } from 'xendit-node/payment_request/models' | ||
const data: PaymentRequestParameters = { | ||
"country" : "ID", | ||
"amount" : 15000, | ||
"metadata" : { | ||
"sku" : "example-sku-1234" | ||
}, | ||
"paymentMethod" : { | ||
"reusability" : "ONE_TIME_USE", | ||
"type" : "VIRTUAL_ACCOUNT", | ||
"virtualAccount" : { | ||
"channelProperties" : { | ||
"customerName" : "Ahmad Gunawan", | ||
"expiresAt" : "2023-01-03T17:00:00Z" | ||
}, | ||
"channelCode" : "BNI" | ||
}, | ||
"referenceId" : "example-1234" | ||
}, | ||
"currency" : "IDR", | ||
"referenceId" : "example-ref-1234" | ||
} | ||
const response: PaymentRequest = await xenditPaymentRequestClient.createPaymentRequest({ | ||
data | ||
}) | ||
``` | ||
#### Subsequent PH Direct Debit payments after account linking | ||
```typescript | ||
import { PaymentRequestParameters, PaymentRequest } from 'xendit-node/payment_request/models' | ||
const data: PaymentRequestParameters = { | ||
"amount" : 1500, | ||
"metadata" : { | ||
"sku" : "example-sku-1234" | ||
}, | ||
"paymentMethodId" : "pm-9685a196-81e9-4c73-8d62-97df5aab2762", | ||
"currency" : "PHP", | ||
"referenceId" : "example-ref-1234" | ||
} | ||
const response: PaymentRequest = await xenditPaymentRequestClient.createPaymentRequest({ | ||
data | ||
}) | ||
``` | ||
#### Subsequent tokenized E-Wallet payments after account linking | ||
```typescript | ||
import { PaymentRequestParameters, PaymentRequest } from 'xendit-node/payment_request/models' | ||
const data: PaymentRequestParameters = { | ||
"amount" : 15000, | ||
"metadata" : { | ||
"sku" : "example-sku-1234" | ||
}, | ||
"paymentMethodId" : "pm-2b2c6092-2100-4843-a7fc-f5c7edac7efd", | ||
"currency" : "IDR", | ||
"referenceId" : "example-ref-1234" | ||
} | ||
const response: PaymentRequest = await xenditPaymentRequestClient.createPaymentRequest({ | ||
data | ||
}) | ||
``` | ||
## Get all payment requests by filter | ||
@@ -162,4 +276,2 @@ | ||
| limit| | number | | ||
| afterId| | string | | ||
| beforeId| | string | | ||
| idempotencyKey| | string | | ||
@@ -166,0 +278,0 @@ |
@@ -18,2 +18,5 @@ /** | ||
readonly Bjb: "BJB"; | ||
readonly SahabatSampoerna: "SAHABAT_SAMPOERNA"; | ||
readonly Cimb: "CIMB"; | ||
readonly Bnc: "BNC"; | ||
}; | ||
@@ -20,0 +23,0 @@ export type BankCode = typeof BankCode[keyof typeof BankCode]; |
@@ -22,3 +22,6 @@ "use strict"; | ||
Bsi: 'BSI', | ||
Bjb: 'BJB' | ||
Bjb: 'BJB', | ||
SahabatSampoerna: 'SAHABAT_SAMPOERNA', | ||
Cimb: 'CIMB', | ||
Bnc: 'BNC' | ||
}; | ||
@@ -25,0 +28,0 @@ function BankCodeFromJSON(json) { |
@@ -25,2 +25,7 @@ /** | ||
readonly DdBcaKlikpay: "DD_BCA_KLIKPAY"; | ||
readonly DdBdoEpay: "DD_BDO_EPAY"; | ||
readonly DdRcbc: "DD_RCBC"; | ||
readonly DdChinabank: "DD_CHINABANK"; | ||
readonly BaChinabank: "BA_CHINABANK"; | ||
readonly DcChinabank: "DC_CHINABANK"; | ||
}; | ||
@@ -27,0 +32,0 @@ export type DirectDebitType = typeof DirectDebitType[keyof typeof DirectDebitType]; |
@@ -29,3 +29,8 @@ "use strict"; | ||
DcBcaKlikpay: 'DC_BCA_KLIKPAY', | ||
DdBcaKlikpay: 'DD_BCA_KLIKPAY' | ||
DdBcaKlikpay: 'DD_BCA_KLIKPAY', | ||
DdBdoEpay: 'DD_BDO_EPAY', | ||
DdRcbc: 'DD_RCBC', | ||
DdChinabank: 'DD_CHINABANK', | ||
BaChinabank: 'BA_CHINABANK', | ||
DcChinabank: 'DC_CHINABANK' | ||
}; | ||
@@ -32,0 +37,0 @@ function DirectDebitTypeFromJSON(json) { |
@@ -18,2 +18,5 @@ /** | ||
readonly Grabpay: "GRABPAY"; | ||
readonly Astrapay: "ASTRAPAY"; | ||
readonly Nexcash: "NEXCASH"; | ||
readonly Jeniuspay: "JENIUSPAY"; | ||
}; | ||
@@ -20,0 +23,0 @@ export type EwalletType = typeof EwalletType[keyof typeof EwalletType]; |
@@ -22,3 +22,6 @@ "use strict"; | ||
Gcash: 'GCASH', | ||
Grabpay: 'GRABPAY' | ||
Grabpay: 'GRABPAY', | ||
Astrapay: 'ASTRAPAY', | ||
Nexcash: 'NEXCASH', | ||
Jeniuspay: 'JENIUSPAY' | ||
}; | ||
@@ -25,0 +28,0 @@ function EwalletTypeFromJSON(json) { |
@@ -13,2 +13,4 @@ /** | ||
readonly Usd: "USD"; | ||
readonly Thb: "THB"; | ||
readonly Vnd: "VND"; | ||
readonly Php: "PHP"; | ||
@@ -15,0 +17,0 @@ }; |
@@ -18,2 +18,4 @@ "use strict"; | ||
Usd: 'USD', | ||
Thb: 'THB', | ||
Vnd: 'VND', | ||
Php: 'PHP' | ||
@@ -20,0 +22,0 @@ }; |
{ | ||
"name": "xendit-node", | ||
"version": "3.1.0", | ||
"version": "3.2.0", | ||
"description": "OpenAPI client for xendit-node", | ||
@@ -5,0 +5,0 @@ "author": "OpenAPI-Generator", |
@@ -38,4 +38,2 @@ /** | ||
limit?: number; | ||
afterId?: string; | ||
beforeId?: string; | ||
idempotencyKey?: string; | ||
@@ -42,0 +40,0 @@ } |
@@ -368,8 +368,2 @@ "use strict"; | ||
} | ||
if (requestParameters.afterId !== undefined) { | ||
queryParameters['after_id'] = requestParameters.afterId; | ||
} | ||
if (requestParameters.beforeId !== undefined) { | ||
queryParameters['before_id'] = requestParameters.beforeId; | ||
} | ||
headerParameters = {}; | ||
@@ -376,0 +370,0 @@ headerParameters["Authorization"] = "Basic " + btoa(this.secretKey + ":"); |
@@ -8,3 +8,3 @@ ![Xendit Node SDK](images/header.jpg) | ||
* Package version: 3.1.0 | ||
* Package version: 3.2.0 | ||
@@ -11,0 +11,0 @@ # Getting Started |
@@ -267,3 +267,3 @@ "use strict"; | ||
headers['xendit-lib'] = 'node'; | ||
headers['xendit-lib-ver'] = '3.1.0'; | ||
headers['xendit-lib-ver'] = '3.2.0'; | ||
initParams = { | ||
@@ -270,0 +270,0 @@ method: context.method, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1220396
24069
649