11# Xendit API Node.js Client
22
3- ![ ] ( https://github.com/xendit/xendit-node/workflows/Code%20Linting/badge.svg )
4- ![ ] ( https://github.com/xendit/xendit-node/workflows/Integration%20Tests/badge.svg )
3+ ![ Code Linting Badge ] ( https://github.com/xendit/xendit-node/workflows/Code%20Linting/badge.svg )
4+ ![ Integration Tests Badge ] ( https://github.com/xendit/xendit-node/workflows/Integration%20Tests/badge.svg )
55[ ![ Coverage Status] ( https://coveralls.io/repos/github/xendit/xendit-node/badge.svg )] ( https://coveralls.io/github/xendit/xendit-node )
66
77This library is the abstraction of Xendit API for access from applications written with server-side Javascript.
@@ -51,9 +51,15 @@ For PCI compliance to be maintained, tokenization of credit cards info should be
5151 + [ Get a payout] ( #get-a-payout )
5252 + [ Void a payout] ( #void-a-payout )
5353 * [ EWallet Services] ( #ewallet-services )
54+ + [ Create payment] ( #create-payment )
55+ + [ Get payment] ( #get-payment )
5456 + [ Create an ewallet charge] ( #create-an-ewallet-charge )
5557 + [ Get an ewallet charge status] ( #get-an-ewallet-charge-status )
5658 + [ Void an ewallet charge] ( #void-an-ewallet-charge )
59+ + [ Initialize tokenization] ( #initialize-tokenization )
60+ + [ Unlink tokenization] ( #unlink-tokenization )
61+ + [ Create payment method] ( #create-payment-method )
62+ + [ Get payment methods by customer ID] ( #get-payment-methods-by-customer-id )
5763 * [ Balance Services] ( #balance-services )
5864 + [ Get balance] ( #get-balance )
5965 * [ Retail Outlet Services] ( #retail-outlet-services )
@@ -74,8 +80,8 @@ For PCI compliance to be maintained, tokenization of credit cards info should be
7480 + [ Initialize linked account tokenization] ( #initialize-linked-account-tokenization )
7581 + [ Validate OTP for Linked Account Token] ( #validate-otp-for-linked-account-token )
7682 + [ Retrieve accessible accounts by linked account token] ( #retrieve-accessible-accounts-by-linked-account-token )
77- + [ Create payment method] ( #create-payment-method )
78- + [ Get payment methods by customer ID] ( #get-payment-methods-by-customer-id )
83+ + [ Create payment method] ( #create-payment-method-1 )
84+ + [ Get payment methods by customer ID] ( #get-payment-methods-by-customer-id-1 )
7985 + [ Create direct debit payment] ( #create-direct-debit-payment )
8086 + [ Validate OTP for direct debit payment] ( #validate-otp-for-direct-debit-payment )
8187 + [ Get direct debit payment status by ID] ( #get-direct-debit-payment-status-by-id )
@@ -659,6 +665,31 @@ ew.createEWalletCharge({
659665
660666Refer to [ Xendit API Reference] ( https://developers.xendit.co/api-reference/#ewallets ) for more info about methods' parameters
661667
668+ #### Create payment
669+
670+ ``` ts
671+ ew .createPayment (data : {
672+ externalID: string ;
673+ amount : number ;
674+ phone ?: string ;
675+ expirationDate ?: Date ;
676+ callbackURL ?: string ;
677+ redirectURL ?: string ;
678+ items ?: PaymentItem [];
679+ ewalletType : CreateSupportWalletTypes ;
680+ xApiVersion ?: string ;
681+ })
682+ ```
683+
684+ #### Get payment
685+
686+ ``` ts
687+ ew .getPayment (data : {
688+ externalID: string ;
689+ ewalletType : GetSupportWalletTypes ;
690+ })
691+ ```
692+
662693#### Create an ewallet charge
663694
664695``` ts
@@ -696,6 +727,44 @@ ew.voidEWalletCharge(data: {
696727})
697728```
698729
730+ #### Initialize tokenization
731+
732+ ``` ts
733+ ew .initializeTokenization (data : {
734+ customerID: string ;
735+ channelCode : ChannelCode ;
736+ properties ?: OnlineBankingAccessProperties ;
737+ metadata ?: object ;
738+ })
739+ ```
740+
741+ #### Unlink tokenization
742+
743+ ``` ts
744+ ew .unlinkTokenization (data : {
745+ linkedAccTokenID: string ;
746+ })
747+ ```
748+
749+ #### Create payment method
750+
751+ ``` ts
752+ ew .createPaymentMethod (data : {
753+ customerID: string ;
754+ type : PaymentMethodType ;
755+ properties : PaymentMethodProperties ;
756+ metadata ?: object ;
757+ })
758+ ```
759+
760+ #### Get payment methods by customer ID
761+
762+ ``` ts
763+ ew .getPaymentMethodsByCustomerID (data : {
764+ customerID: string ;
765+ })
766+ ```
767+
699768### Balance Services
700769
701770Instanitiate Balance service using constructor that has been injected with Xendit keys
0 commit comments