{"id":43320374,"url":"https://github.com/xendit/xendit-dotnet","last_synced_at":"2026-02-01T22:33:13.086Z","repository":{"id":42632626,"uuid":"380986692","full_name":"xendit/xendit-dotnet","owner":"xendit","description":"Xendit API for C#","archived":false,"fork":false,"pushed_at":"2025-10-01T15:33:59.000Z","size":504,"stargazers_count":4,"open_issues_count":5,"forks_count":9,"subscribers_count":34,"default_branch":"main","last_synced_at":"2025-10-24T08:16:58.207Z","etag":null,"topics":["disbursements","dotnet","virtual-accounts","xendit"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xendit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-28T10:07:06.000Z","updated_at":"2025-10-01T15:34:05.000Z","dependencies_parsed_at":"2023-01-24T01:00:55.776Z","dependency_job_id":null,"html_url":"https://github.com/xendit/xendit-dotnet","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/xendit/xendit-dotnet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Fxendit-dotnet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Fxendit-dotnet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Fxendit-dotnet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Fxendit-dotnet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xendit","download_url":"https://codeload.github.com/xendit/xendit-dotnet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xendit%2Fxendit-dotnet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28993253,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T22:01:47.507Z","status":"ssl_error","status_checked_at":"2026-02-01T21:58:37.335Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["disbursements","dotnet","virtual-accounts","xendit"],"created_at":"2026-02-01T22:33:12.373Z","updated_at":"2026-02-01T22:33:13.072Z","avatar_url":"https://github.com/xendit.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Xendit API .NET Library\n\nThis library is the abstraction of Xendit API for access from applications written with C# .NET.\n\n## Table of Contents\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n\n- [API Documentation](#api-documentation)\n- [Installation](#installation)\n- [Usage](#usage)\n  - [API Key](#api-key)\n    - [Global Variable](#global-variable)\n    - [`XenditClient` instance or Individual `Client` instance](#xenditclient-instance-or-individual-client-instance)\n  - [Balance Service](#balance-service)\n    - [Get Balance](#get-balance)\n  - [Virtual Account Services](#virtual-account-services)\n    - [Create a Virtual Account](#create-a-virtual-account)\n    - [Get a Virtual Account by ID](#get-a-virtual-account-by-id)\n    - [Update a Virtual Account](#update-a-virtual-account)\n    - [Get banks with available virtual account service](#get-banks-with-available-virtual-account-service)\n    - [Get a virtual account payment by payment ID](#get-a-virtual-account-payment-by-payment-id)\n  - [Disbursement Services](#disbursement-services)\n    - [Create a disbursement](#create-a-disbursement)\n    - [Get a disbursement by ID](#get-a-disbursement-by-id)\n    - [Get a disbursement by External ID](#get-a-disbursement-by-external-id)\n    - [Get banks with available disbursement service](#get-banks-with-available-disbursement-service)\n  - [Invoice services](#invoice-services)\n    - [Create an invoice](#create-an-invoice)\n    - [Get invoice by ID](#get-invoice-by-id)\n    - [Get all invoices](#get-all-invoices)\n    - [Expire an invoice](#expire-an-invoice)\n  - [Customer services](#customer-services)\n    - [Create Customer](#create-customer)\n    - [Get Customer by Reference ID](#get-customer-by-reference-id)\n  - [Direct Debit Payment Services](#direct-debit-payment-services)\n    - [Create Direct Debit Payment](#create-direct-debit-payment)\n    - [Validate OTP for Direct Debit Payment](#validate-otp-for-direct-debit-payment)\n    - [Get Direct Debit Payment by ID](#get-direct-debit-payment-by-id)\n    - [Get Direct Debit Payments by Reference ID](#get-direct-debit-payments-by-reference-id)\n  - [Linked Account Services](#linked-account-services)\n    - [Initialize Linked Account Tokenization](#initialize-linked-account-tokenization)\n    - [Validate OTP for Linked Account Token](#validate-otp-for-linked-account-token)\n    - [Get Accessible Accounts by Linked Account Token](#get-accessible-accounts-by-linked-account-token)\n    - [Unbind Linked Account Token](#unbind-linked-account-token)\n  - [Payment Methods Services](#payment-methods-services)\n    - [Create Payment Methods](#create-payment-methods)\n    - [Get Payment Methods by Customer ID](#get-payment-methods-by-customer-id)\n  - [Retail Outlet Services](#retail-outlet-services)\n    - [Create Fixed Payment Code](#create-fixed-payment-code)\n    - [Update Fixed Payment Code](#update-fixed-payment-code)\n    - [Get Payment Code](#get-payment-code)\n    - [Get Payments By Payment Code ID](#get-payments-by-payment-code-id)\n    - [Get Payments By Fixed Payment Code ID](#get-payments-by-fixed-payment-code-id)\n  - [E-Wallet Service](#e-wallet-service)\n    - [Create E-Wallet Charge (API version `2020-01-25`)](#create-e-wallet-charge-api-version-2020-01-25)\n    - [Get E-Wallet Charge (API version `2020-01-25`)](#get-e-wallet-charge-api-version-2020-01-25)\n    - [Create E-Wallet Payment (API version `2020-02-01`)](#create-e-wallet-payment-api-version-2020-02-01)\n    - [Create E-Wallet Payment (API version `2019-02-04`)](#create-e-wallet-payment-api-version-2019-02-04)\n    - [Get E-Wallet Payment](#get-e-wallet-payment)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## API Documentation\n\nPlease check [Xendit API Reference](https://developers.xendit.co/api-reference/)\n\n## Installation\n\n- Add project reference manually.\n\n  Copy this line into your project's `csproj` file. Change the reference to Xendit.net directory if needed.\n\n  ```\n  \u003cItemGroup\u003e\n    \u003cProjectReference Include=\"..\\Xendit.net\\Xendit.net\\Xendit.net.csproj\" /\u003e\n  \u003c/ItemGroup\u003e\n  ```\n\n- Add project reference through `.NET CLI`.\n  Run this command:\n\n  ```bash\n  dotnet add your_project.csproj reference \u003cXendit.net.csproj_Directory\u003e\n  ```\n\n## Usage\n\n### API Key\n\nYou need to use secret API key in order to use functionality in this library. The key can be obtained from your [Xendit Dashboard](https://dashboard.xendit.co/settings/developers#api-keys).\n\nTo add API Key, you have 2 options: Use global variable or use `XenditClient` or Individual `Client` instance.\n\n#### Global Variable\n\n```cs\nnamespace XenditExample\n{\n    using System;\n    using System.Threading.Tasks;\n    using System.Net.Http;\n    using Xendit.net;\n    using Xendit.net.Exception;\n    using Xendit.net.Model;\n    using Xendit.net.Network;\n\n    class ExampleGetBalance\n    {\n        static async Task Main(string[] args)\n        {\n            try\n            {\n                HttpClient httpClient = new HttpClient();\n                NetworkClient requestClient = new NetworkClient(httpClient);\n                XenditConfiguration.RequestClient = requestClient;\n                XenditConfiguration.ApiKey = \"xnd_development_...\";\n\n                BalanceResponse balanceResponse = await Balance.Get();\n                Console.WriteLine(balanceResponse.Balance);\n            }\n            catch (XenditException e)\n            {\n                Console.WriteLine(e.ToString());\n            }\n        }\n    }\n}\n```\n\n#### `XenditClient` instance or Individual `Client` instance\n\n```cs\nnamespace XenditExample\n{\n    using System;\n    using System.Threading.Tasks;\n    using System.Net.Http;\n    using Xendit.net;\n    using Xendit.net.Exception;\n    using Xendit.net.Model;\n    using Xendit.net.Network;\n\n    class ExampleGetBalance\n    {\n        static async Task Main(string[] args)\n        {\n            try\n            {\n                // define API key\n                string apiKey = \"xnd_development_...\";\n\n                // define base URL (optional, default is `https://api.xendit.co`)\n                string baseUrl = \"https://api.xendit.co\";\n\n                // define network client\n                HttpClient httpClient = new HttpClient();\n                NetworkClient requestClient = new NetworkClient(httpClient);\n      \n                // define XenditClient, request client and base url is optional\n                XenditClient client = new XenditClient(apiKey, requestClient, baseUrl);\n                BalanceResponse balanceResponse = await client.Balance.Get();\n                Console.WriteLine(balanceResponse.Balance);\n\n                // not using request client and base URL\n                XenditClient client2 = new XenditClient(apiKey);\n                BalanceResponse balanceResponse2 = await client2.Balance.Get();\n                Console.WriteLine(balanceResponse2.Balance);\n            }\n            catch (XenditException e)\n            {\n                Console.WriteLine(e.ToString());\n            }\n        }\n    }\n}\n```\n\nYou also can use individual instance (e.g: `BalanceClient`, `VirtualAccountClient`, etc.)\n\n```cs\nnamespace XenditExample\n{\n    using System;\n    using System.Threading.Tasks;\n    using System.Net.Http;\n    using Xendit.net;\n    using Xendit.net.Exception;\n    using Xendit.net.Model;\n    using Xendit.net.Network;\n\n    class ExampleGetBalance\n    {\n        static async Task Main(string[] args)\n        {\n            try\n            {\n                // define API key (optional, default using XenditConfiguration API key)\n                string apiKey = \"xnd_development_...\";\n\n                // define base URL (optional, default using XenditConfiguration base URL)\n                string baseUrl = \"https://api.xendit.co\";\n\n                // define network client (optional, default using XenditConfiguration network client)\n                HttpClient httpClient = new HttpClient();\n                NetworkClient requestClient = new NetworkClient(httpClient);\n      \n                // define BalanceClient, all of the parameters are optional (default: using global variable)\n                BalanceClient balanceClient = new BalanceClient(apiKey, requestClient, baseUrl)\n                BalanceResponse balanceResponse = balanceClient.Get();\n                Console.WriteLine(balanceResponse.Balance);\n\n                // using only API key as constructor parameter\n                BalanceClient balance = new BalanceClient(apiKey);\n                BalanceResponse balanceResponse2 = balance.Get();\n                Console.WriteLine(balanceResponse2.Balance);\n            }\n            catch (XenditException e)\n            {\n                Console.WriteLine(e.ToString());\n            }\n        }\n    }\n}\n```\n\nNote that since constructor parameters of individual client are optional and it will use global variable, you need to define `XenditConfiguration` API key if you don't pass any value to the constructor parameters.\n\n### Balance Service\n\n#### Get Balance\n\nThe `accountType` parameter is optional. You can use `accountType` in enum (`\"Cash\"`, `\"Holding\"`, `\"Tax\"`)\n\n```cs\nBalanceResponse balance = await Balance.Get();\n\nBalanceResponse holdingBalance = await Balance.Get(BalanceAccountType.Holding);\n```\n\nIt will return:\n\n```cs\nBalanceResponse balance = new BalanceResponse\n{\n  Balance = 100000,\n};\n```\n\n### Virtual Account Services\n\n#### Create a Virtual Account\n\nTo create a virtual account, use struct `CreateVirtualAccountParameter`. You may use `VirtualAccountEnum.BankCode` for `BankCode` property.\n\n```cs\nCreateVirtualAccountParameter parameter = new CreateVirtualAccountParameter\n{\n  ExternalId = \"my_external_id\",\n  BankCode = VirtualAccountEnum.BankCode.Bni,\n  Name = \"John Doe\",\n  ExpectedAmount = 200000,\n};\n\nVirtualAccountResponse virtualAccount = await VirtualAccount.Create(parameter);\n```\n\nIt will return:\n\n```cs\nVirtualAccountResponse virtualAccount = new VirtualAccountResponse\n{\n  ExternalId = \"my_external_id\",\n  BankCode = VirtualAccountEnum.BankCode.Bni,\n  Name = \"John Doe\",\n  ExpectedAmount = 200000,\n  IsSingleUse = false,\n  IsClosed = false,\n  ExpirationDate = \"2021-09-27T17:00:00.000Z\",\n};\n```\n\n#### Get a Virtual Account by ID\n\n```cs\nVirtualAccountResponse virtualAccount = await VirtualAccount.Get(\"VIRTUAL_ACCOUNT_ID\");\n```\n\nIt will return:\n\n```cs\nVirtualAccountResponse virtualAccount = new VirtualAccountResponse\n{\n  Id = \"VIRTUAL_ACCOUNT_ID\",\n  ExternalId = \"my_external_id\",\n  OwnerId = \"owner-id\",\n  BankCode = VirtualAccountEnum.BankCode.Bni,\n  MerchantCode = \"8888\",\n  Name = \"John Doe\",\n  ExpectedAmount = 200000,\n  IsSingleUse = false,\n  IsClosed = false,\n  ExpirationDate = \"2021-09-27T17:00:00.000Z\",\n  Status = VirtualAccountEnum.Status.Pending,\n  Currency = Currency.IDR,\n};\n```\n\n#### Update a Virtual Account\n\nTo update a virtual account, use struct `UpdateVirtualAccountParameter`.\n\n```cs\nUpdateVirtualAccountParameter parameter = new UpdateVirtualAccountParameter\n{\n    IsSingleUse = true,\n    ExpectedAmount = 20000,\n};\n\nVirtualAccountResponse virtualAccount = await VirtualAccount.Update(parameter, \"virtual_account_id\");\n```\n\nIt will return:\n```cs\nVirtualAccountResponse virtualAccount = new VirtualAccountResponse\n{\n  Id = \"VIRTUAL_ACCOUNT_ID\",\n  ExternalId = \"my_external_id\",\n  OwnerId = \"owner-id\",\n  BankCode = VirtualAccountEnum.BankCode.Bni,\n  MerchantCode = \"8888\",\n  Name = \"John Doe\",\n  ExpectedAmount = 20000,\n  IsSingleUse = true,\n  IsClosed = false,\n  ExpirationDate = \"2021-09-27T17:00:00.000Z\",\n  Status = VirtualAccountEnum.Status.Pending,\n  Currency = Currency.IDR,\n};\n```\n\n#### Get banks with available virtual account service\n\n```cs\nAvailableBank[] availableBanks = await VirtualAccount.GetAvailableBanks();\n```\n\nIt will return:\n\n```cs\nAvailableBank[] availableBanks = new AvailableBank[]\n{\n  new AvailableBank\n  {\n    Name = \"Bank Mandiri\",\n    Code = DisbursementChannelCode.Mandiri,\n    IsActivated = true,\n  },\n  // ...\n};\n```\n\n#### Get a virtual account payment by payment ID\n\n```cs\nVirtualAccountPaymentResponse virtualAccountPayment = await VirtualAccountPayment.Get(\"VIRTUAL_ACCOUNT_PAYMENT_ID\");\n```\n\nIt will return:\n\n```cs\nVirtualAccountPaymentResponse virtualAccountPayment = new VirtualAccountPaymentResponse\n{\n  Id = \"598d91b1191029596846047f\",\n  PaymentId = \"5f218745736e619164dc8608\",\n  CallbackVirtualAccountId = \"598d5f71bf64853820c49a18\",\n  ExternalId = \"demo-1502437214715\",\n  BankCode = VirtualAccountEnum.BankCode.Bni,\n  MerchantCode = \"8888\",\n  SenderName = \"John Doe\",\n  Amount = 200000,\n  AccountNumber = \"8808999939380502\",\n  TransactionTimestamp = \"2021-07-24T05:22:55.115Z\",\n};\n```\n\n### Disbursement Services\n\n#### Create a disbursement\n\nTo create a disbursement, use struct `DisbursementParameter`. You may use `DisbursementChannelCode` for `BankCode` property.\n\nHere is the example of `Create`:\n\n```cs\nDisbursementParameter parameter = new DisbursementParameter\n{\n  ExternalId = \"disb-1475459775872\",\n  BankCode = DisbursementChannelCode.Bca,\n  AccountHolderName = \"MICHAEL CHEN\",\n  AccountNumber = \"1234567890\",\n  Description = \"Reimbursement for shoes\",\n  Amount = 1000,\n};\n\nDisbursementResponse disbursement = await Disbursement.Create(parameter);\n```\n\nIt will return:\n\n```cs\nDisbursementResponse disbursement = new DisbursementResponse\n{\n  Id = \"generated-id\",\n  ExternalId = \"disb-1475459775872\",\n  UserId = \"user-id\",\n  BankCode = DisbursementChannelCode.Bca,\n  AccountHolderName = \"MICHAEL CHEN\",\n  DisbursementDescription = \"Reimbursement for shoes\",\n  Amount = 1000,\n  Status = DisbursementStatus.Pending,\n};\n```\n\n#### Get a disbursement by ID\n\n```cs\nDisbursementResponse disbursement = await Disbursement.GetById(\"disbursement_id\");\n```\n\nIt will return:\n\n```cs\nDisbursementResponse disbursement = new DisbursementResponse\n{\n  Id = \"disbursement_id\",\n  ExternalId = \"disb-1475459775872\",\n  UserId = \"user-id\",\n  BankCode = DisbursementChannelCode.Bca,\n  AccountHolderName = \"MICHAEL CHEN\",\n  DisbursementDescription = \"Reimbursement for shoes\",\n  Amount = 1000,\n  Status = DisbursementStatus.Pending,\n};\n```\n\n#### Get a disbursement by External ID\n\n```cs\nDisbursementResponse[] disbursements = await Disbursement.GetByExternalId(\"external_id\");\n```\n\nIt will return:\n\n```cs\nDisbursementResponse[] disbursements = new DisbursementResponse[]\n{\n  new DisbursementResponse\n  {\n    Id = \"disbursement_id\",\n    ExternalId = \"disb-1475459775872\",\n    UserId = \"user-id\",\n    BankCode = DisbursementChannelCode.Bca,\n    AccountHolderName = \"MICHAEL CHEN\",\n    DisbursementDescription = \"Reimbursement for shoes\",\n    Amount = 1000,\n    Status = DisbursementStatus.Pending,\n  }\n};\n```\n\n#### Get banks with available disbursement service\n\n```cs\nAvailableBank[] availableBanks = await Disbursement.GetAvailableBanks();\n```\n\nIt will return:\n\n```cs\nAvailableBank[] availableBanks = new AvailableBank[]\n{\n  new AvailableBank\n  {\n    Name = \"Bank Mandiri\",\n    Code = DisbursementChannelCode.Mandiri,\n    CanDisburse = true,\n    CanNameValidate = true,\n  },\n  // ...\n};\n```\n\n### Invoice services\n\n#### Create an invoice\n\nTo create an invoice, please use struct `InvoiceParameter` for parameter body. You may use these classes to construct `InvoiceParameter`:\n\n- `ItemInvoice` for `Items` property\n- `CustomerResponse` for `Customer` property\n- `Address` for `Addresses` property in `Customer`\n- `FeeInvoice` for `Fees` property\n- `NotificationPreference` for `NotificationPreference` property\n\nHere is the example:\n\n```cs\nAddress addresses = new Address\n{\n  Country = Country.Indonesia,\n  StreetLine1 = \"Jalan Makan\",\n  StreetLine2 = \"Kecamatan Kebayoran Baru\",\n  City = \"Jakarta Selatan\",\n  Province = \"Daerah Khusus Ibukota Jakarta\",\n  PostalCode = \"12345\",\n};\n\nCustomerResponse customer = new CustomerResponse\n{\n  GivenNames = \"John\",\n  Email = \"john@email.com\",\n  MobileNumber = \"+6287774441111\",\n  Addresses = new Address[] { addresses },\n};\n\nNotificationPreference preference = new NotificationPreference\n{\n  InvoicePaid = new NotificationType[] { NotificationType.Email }\n};\n\nItemInvoice item = new ItemInvoice\n{\n  Name = \"shoes\",\n  Quantity = 1,\n  Price = 100,\n};\n\nFeeInvoice fee = new FeeInvoice\n{\n  Type = \"name_of_fee_for_internal_reference\",\n  Value = 200,\n};\n\nInvoiceParameter parameter = new InvoiceParameter\n{\n  ExternalId = \"external-id\",\n  Amount = 1000,\n  Customer = customer,\n  NotificationPreference = preference,\n  Items = new ItemInvoice[] { item },\n  Fees = new FeeInvoice[] { fee },\n  Currency = Currency.IDR,\n};\n\nInvoiceResponse invoice = await Invoice.Create(parameter);\nConsole.WriteLine(invoice);\n```\n\nIt will return:\n\n```cs\nInvoiceResponse invoice = new InvoiceResponse\n{\n  Id = \"610a306ffe63418fdb6bd0b3\",\n  ExternalId = \"external-id\",\n  UserId = \"\u003cUSER_ID\u003e\",\n  Status = InvoiceStatus.Pending,\n  MerchantName = \"\u003cMERCHANT_NAME\u003e\",\n  MerchantProfilePictureUrl = \"\u003cMERCHANT_PROFILE_PICTURE_URL\u003e\",\n  Amount = 1000,\n  ExpiryDate = \"\u003cCREATED_DATE + INVOICE_DURATION\u003e\",\n  InvoiceUrl = \"\u003cINVOICE_URL\u003e\",\n  AvailableBanks = new AvailableBankInvoice[]\n  {\n    new AvailableBankInvoice\n    {\n      BankCode = BankCode.Mandiri,\n      CollectionType = \"POOL\",\n      BankAccountNumber = \"8860810000525\",\n      TransferAmount = 50000,\n      BankBranch = \"Virtual Account\",\n      AccountHolderName = \"LANSUR13\",\n    },\n    // ...\n  },\n  AvailableEwallets = new AvailableEwalletInvoice[]\n  {\n    new AvailableEwalletInvoice { EwalletType = EwalletType.OVO },\n    // ...\n  },\n  AvailableRetailOutlets = new AvailableRetailOutletInvoice[]\n  {\n    new AvailableRetailOutletInvoice\n    {\n      RetailOutletName = RetailOutlet.Alfamart,\n      PaymentCode = \"ALFA123456\",\n      TransferAmount = 50000,\n    },\n    // ...\n  }\n  ShouldExcludeCreditCard = false,\n  ShouldSendEmail = false,\n  Created = \"\u003cCREATED_TIMESTAMP\u003e\",\n  Updated = \"\u003cUPDATED_TIMESTAMP\u003e\",\n  Currency = Currency.IDR,\n  Fees = new FeeInvoice[] { new FeeInvoice { Type = \"name_of_fee_for_internal_reference\", Value = 200 } },\n  CustomerResponse = new CustomerResponse {\n    GivenNames = \"John\",\n    Email = \"john@email.com\",\n    MobileNumber = \"+6287774441111\",\n    Addresses = new Address[]\n    {\n      new Address\n      {\n        Country = Country.Indonesia,\n        StreetLine1 = \"Jalan Makan\",\n        StreetLine2 = \"Kecamatan Kebayoran Baru\",\n        City = \"Jakarta Selatan\",\n        Province = \"Daerah Khusus Ibukota Jakarta\",\n        PostalCode = \"12345\"\n      }\n    },\n  },\n  NotificationPreference = new NotificationPreference\n  {\n    InvoicePaid = new NotificationType[] { NotificationType.Email }\n  },\n};\n```\n\n#### Get invoice by ID\n\n```cs\nInvoiceResponse invoice = await Invoice.GetById(\"EXAMPLE_ID\");\n```\n\nIt will return:\n\n```cs\nInvoiceResponse invoice = new InvoiceResponse\n{\n  Id = \"610a306ffe63418fdb6bd0b3\",\n  ExternalId = \"external-id\",\n  UserId = \"\u003cUSER_ID\u003e\",\n  Status = InvoiceStatus.Pending,\n  MerchantName = \"\u003cMERCHANT_NAME\u003e\",\n  MerchantProfilePictureUrl = \"\u003cMERCHANT_PROFILE_PICTURE_URL\u003e\",\n  Amount = 1000,\n  ExpiryDate = \"\u003cCREATED_DATE + INVOICE_DURATION\u003e\",\n  InvoiceUrl = \"\u003cINVOICE_URL\u003e\",\n  AvailableBanks = new AvailableBankInvoice[]\n  {\n    new AvailableBankInvoice\n    {\n      BankCode = BankCode.Mandiri,\n      CollectionType = \"POOL\",\n      BankAccountNumber = \"8860810000525\",\n      TransferAmount = 50000,\n      BankBranch = \"Virtual Account\",\n      AccountHolderName = \"LANSUR13\",\n    },\n    // ...\n  },\n  AvailableEwallets = new AvailableEwalletInvoice[]\n  {\n    new AvailableEwalletInvoice { EwalletType = EwalletType.OVO },\n    // ...\n  },\n  AvailableRetailOutlets = new AvailableRetailOutletInvoice[]\n  {\n    new AvailableRetailOutletInvoice\n    {\n      RetailOutletName = RetailOutlet.Alfamart,\n      PaymentCode = \"ALFA123456\",\n      TransferAmount = 50000,\n    },\n    // ...\n  }\n  ShouldExcludeCreditCard = false,\n  ShouldSendEmail = false,\n  Created = \"\u003cCREATED_TIMESTAMP\u003e\",\n  Updated = \"\u003cUPDATED_TIMESTAMP\u003e\",\n  Currency = Currency.IDR,\n  Fees = new FeeInvoice[] { new FeeInvoice { Type = \"name_of_fee_for_internal_reference\", Value = 200 } },\n  CustomerResponse = new CustomerResponse\n  {\n    GivenNames = \"John\",\n    Email = \"john@email.com\",\n    MobileNumber = \"+6287774441111\",\n    Addresses = new Address[]\n    {\n      new Address\n      {\n        Country = Country.Indonesia,\n        StreetLine1 = \"Jalan Makan\",\n        StreetLine2 = \"Kecamatan Kebayoran Baru\",\n        City = \"Jakarta Selatan\",\n        Province = \"Daerah Khusus Ibukota Jakarta\",\n        PostalCode = \"12345\"\n      }\n    },\n  },\n  NotificationPreference = new NotificationPreference\n  {\n    InvoicePaid = new NotificationType[] { NotificationType.Email }\n  },\n};\n```\n\n#### Get all invoices\n\nTo get all invoices, please use struct `ListInvoiceParameter` for defining which request parameters that you want to use. You may use these enums to construct `ListInvoiceParameter`:\n\n- `InvoiceStatus` for `Statuses` property\n- `InvoiceClientType` for `ClientType` property\n- `InvoicePaymentChannelType` for `PaymentChannels` property\n\n```cs\n// Invoke GetAll without specifying parameter\nInvoiceResponse[] invoicesWithoutParams = await Invoice.GetAll(null);\n\n// specify parameter using ListInvoiceParameter\nListInvoiceParameter parameter = new ListInvoiceParameter\n{\n    Limit = 1,\n    ClientTypes = new InvoiceClientType[] { InvoiceClientType.ApiGateway, InvoiceClientType.Dashboard },\n    PaymentChannels = new InvoicePaymentChannelType[] { },\n};\n\nInvoiceResponse[] invoiceArray = await Invoice.GetAll(parameter);\n```\n\nIt will return:\n\n```cs\nInvoiceResponse[] invoices = new InvoiceResponse[]\n{\n  new InvoiceResponse\n  {\n    Id = \"610a306ffe63418fdb6bd0b3\",\n    ExternalId = \"external-id\",\n    UserId = \"\u003cUSER_ID\u003e\",\n    Status = InvoiceStatus.Expired,\n    MerchantName = \"\u003cMERCHANT_NAME\u003e\",\n    MerchantProfilePictureUrl = \"\u003cMERCHANT_PROFILE_PICTURE_URL\u003e\",\n    Amount = 1000,\n    ExpiryDate = \"\u003cCREATED_DATE + INVOICE_DURATION\u003e\",\n    InvoiceUrl = \"\u003cINVOICE_URL\u003e\",\n    AvailableBanks = new AvailableBankInvoice[]\n    {\n      new AvailableBankInvoice\n      {\n        BankCode = BankCode.Mandiri,\n        CollectionType = \"POOL\",\n        BankAccountNumber = \"8860810000525\",\n        TransferAmount = 50000,\n        BankBranch = \"Virtual Account\",\n        AccountHolderName = \"LANSUR13\",\n      },\n      // ...\n    },\n    AvailableEwallets = new AvailableEwalletInvoice[]\n    {\n      new AvailableEwalletInvoice { EwalletType = EwalletType.OVO },\n      // ...\n    },\n    AvailableRetailOutlets = new AvailableRetailOutletInvoice[]\n    {\n      new AvailableRetailOutletInvoice\n      {\n        RetailOutletName = RetailOutlet.Alfamart,\n        PaymentCode = \"ALFA123456\",\n        TransferAmount = 50000,\n      },\n      // ...\n    }\n    ShouldExcludeCreditCard = false,\n    ShouldSendEmail = false,\n    Created = \"\u003cCREATED_TIMESTAMP\u003e\",\n    Updated = \"\u003cUPDATED_TIMESTAMP\u003e\",\n    Currency = Currency.IDR,\n    Fees = new FeeInvoice[] { new FeeInvoice { Type = \"name_of_fee_for_internal_reference\", Value = 200 } },\n    CustomerResponse = new CustomerResponse\n    {\n      GivenNames = \"John\",\n      Email = \"john@email.com\",\n      MobileNumber = \"+6287774441111\",\n      Addresses = new Address[]\n      {\n        new Address\n        {\n          Country = Country.Indonesia,\n          StreetLine1 = \"Jalan Makan\",\n          StreetLine2 = \"Kecamatan Kebayoran Baru\",\n          City = \"Jakarta Selatan\",\n          Province = \"Daerah Khusus Ibukota Jakarta\",\n          PostalCode = \"12345\"\n        }\n      },\n    },\n    NotificationPreference = new NotificationPreference\n    {\n      InvoicePaid = new NotificationType[] { NotificationType.Email }\n    },\n  },\n};\n```\n\n#### Expire an invoice\n\n```cs\nInvoiceResponse invoice = await Invoice.Expire(\"EXAMPLE_ID\");\n```\n\nIt will return:\n\n```cs\nInvoiceResponse invoice = new InvoiceResponse\n{\n  Id = \"610a306ffe63418fdb6bd0b3\",\n  ExternalId = \"external-id\",\n  UserId = \"\u003cUSER_ID\u003e\",\n  Status = InvoiceStatus.Expired,\n  MerchantName = \"\u003cMERCHANT_NAME\u003e\",\n  MerchantProfilePictureUrl = \"\u003cMERCHANT_PROFILE_PICTURE_URL\u003e\",\n  Amount = 1000,\n  ExpiryDate = \"\u003cCREATED_DATE + INVOICE_DURATION\u003e\",\n  InvoiceUrl = \"\u003cINVOICE_URL\u003e\",\n  AvailableBanks = new AvailableBankInvoice[]\n  {\n    new AvailableBankInvoice\n    {\n      BankCode = BankCode.Mandiri,\n      CollectionType = \"POOL\",\n      BankAccountNumber = \"8860810000525\",\n      TransferAmount = 50000,\n      BankBranch = \"Virtual Account\",\n      AccountHolderName = \"LANSUR13\",\n    },\n    // ...\n  },\n  AvailableEwallets = new AvailableEwalletInvoice[]\n  {\n    new AvailableEwalletInvoice { EwalletType = EwalletType.OVO },\n    // ...\n  },\n  AvailableRetailOutlets = new AvailableRetailOutletInvoice[]\n  {\n    new AvailableRetailOutletInvoice\n    {\n      RetailOutletName = RetailOutlet.Alfamart,\n      PaymentCode = \"ALFA123456\",\n      TransferAmount = 50000,\n    },\n    // ...\n  }\n  ShouldExcludeCreditCard = false,\n  ShouldSendEmail = false,\n  Created = \"\u003cCREATED_TIMESTAMP\u003e\",\n  Updated = \"\u003cUPDATED_TIMESTAMP\u003e\",\n  Currency = Currency.IDR,\n  Fees = new FeeInvoice[] { new FeeInvoice { Type = \"name_of_fee_for_internal_reference\", Value = 200 } },\n  CustomerResponse = new CustomerResponse\n  {\n    GivenNames = \"John\",\n    Email = \"john@email.com\",\n    MobileNumber = \"+6287774441111\",\n    Addresses = new Addresses[]\n    {\n      new Addresses\n      {\n        Country = Country.Indonesia,\n        StreetLine1 = \"Jalan Makan\",\n        StreetLine2 = \"Kecamatan Kebayoran Baru\",\n        City = \"Jakarta Selatan\",\n        Province = \"Daerah Khusus Ibukota Jakarta\",\n        PostalCode = \"12345\"\n      }\n    },\n  },\n  NotificationPreference = new NotificationPreference\n  {\n    InvoicePaid = new NotificationType[] { NotificationType.Email }\n  },\n};\n```\n\n### Customer services\n\n#### Create Customer\n\nThe library supports get customer operation for API version `2020-10-31` (recommended) and `2020-05-19`.\n\nMethod `Create` has three parameters: parameter or request body using struct `CustomerParameter`, optional headers, and optional API version with default value of `ApiVersion.Version20201031` enum (represents `2020-10-31` version).\n\nTo construct struct `CustomerParameter`, you may use these classes and enums (applicable for API version of `2020-10-31`):\n\n- Class: `IndividualDetail`, `BusinessDetail`, `IdentityAccount`, `KycDocument`, `IdentityAccountProperties`, and `Address` (applicable for both API versions).\n- Enum: `CustomerType`, `CustomerKycDocumentType`, `CustomerKycDocumentSubType`, `CustomerIdentityAccountType`, `CustomerGender`, `CustomerBusinessType`, and `CustomerAddressCategory`.\n\nHere is the example of invoking method `Create` with API version of `2020-10-31`:\n\n```cs\nIndividualDetail individualDetail = new IndividualDetail\n{\n  GivenNames = \"John\",\n  Gender = CustomerGender.Male,\n};\n\nIdentityAccount identityAccount = new IdentityAccount\n{\n  Country = Country.Indonesia,\n  Type = CustomerIdentityAccountType.BankAccount,\n  Properties = new IdentityAccountProperties { AccountNumber = \"account_number\" }\n};\n\nKycDocument document = new KycDocument\n{\n  Country = Country.Indonesia,\n  Type = CustomerKycDocumentType.IdentityCard,\n  SubType = CustomerKycDocumentSubType.NationalId,\n};\n\nCustomerParameter individualParameter = new CustomerParameter\n{\n  ReferenceId = \"demo_11212145\",\n  Type = CustomerType.Individual,\n  IndividualDetail = individualDetail,\n  IdentityAccount = new IdentityAccount[] { identityAccount },\n  KycDocuments = new KycDocument[] { document },\n};\n\nCustomerResponse customerDefault = await Customer.Create(individualParameter);\nConsole.WriteLine(customerDefault);\n\n// or you can define with the API version\nCustomerResponse customer = await Customer.Create(individualParameter, version: ApiVersion.Version20201031);\nConsole.WriteLine(customer);\n```\n\nIt will return:\n\n```cs\nCustomerResponse customerDefault = new CustomerResponse\n{\n  ReferenceId = \"demo_11212145\",\n  Type = CustomerType.Individual,\n  IndividualDetail = new IndividualDetail { GivenNames = \"John\", Gender = CustomerGender.Male },\n  IdentityAccount = new IdentityAccount[]\n  {\n    new IdentityAccount\n    {\n      Country = Country.Indonesia,\n      Type = CustomerIdentityAccountType.BankAccount,\n      Properties = new IdentityAccountProperties { AccountNumber = \"account_number\" }\n    }\n  },\n  KycDocuments = new KycDocument[]\n  {\n    new KycDocument\n    { Country = Country.Indonesia,\n      Type = CustomerKycDocumentType.IdentityCard,\n      SubType = CustomerKycDocumentSubType.NationalId,\n    }\n  }\n};\n```\n\nFor API version of `2020-05-19`, here is the example:\n\n```cs\nCustomerParameter parameter = new CustomerParameter\n{\n    ReferenceId = \"demo_11212144\",\n    Email = \"john@email.com\",\n    GivenNames = \"John\",\n    Addresses = new Address[] { new Address { Country = Country.Indonesia } }\n};\n\nCustomerResponse customerWithVersion = await Customer.Create(parameter, version: ApiVersion.Version20200519);\n```\n\nIt will return:\n\n```cs\nCustomerResponse customerWithVersion = new Customer\n{\n    ReferenceId = \"demo_11212144\",\n    Email = \"john@email.com\",\n    GivenNames = \"John\",\n    Addresses = new Address[] { new Address { Country = Country.Indonesia } }\n};\n```\n\n#### Get Customer by Reference ID\n\nThe library supports get customer operation for API version `2020-10-31` (recommended) and `2020-05-19`.\n\nMethod `Get` has three parameters: reference ID (required), optional headers, and optional API version with default value of `ApiVersion.Version20201031` enum (represents `2020-10-31` version).\n\nHere is the example of invoking method `Get` with API version of `2020-10-31`:\n\n```cs\nCustomerResponse customerDefault = await Customer.Get(\"example_reference_id\");\n\nCustomerResponse customerWithVersion20201031 = await Customer.Get(\"example_reference_id\", version: ApiVersion.Version20201031);\n```\n\nIt will return:\n\n```cs\nCustomerResponse customerDefault = new CustomerResponse\n{\n  Data = new CustomerResponse[]\n  {\n    new CustomerResponse\n    {\n      ReferenceId = \"example_reference_id\",\n      Type = CustomerType.Individual,\n      IndividualDetail = new IndividualDetail { GivenNames = \"John\", Gender = CustomerGender.Male },\n      IdentityAccount = new IdentityAccount[]\n      {\n        new IdentityAccount\n        {\n          Country = Country.Indonesia,\n          Type = CustomerIdentityAccountType.BankAccount,\n          Properties = new IdentityAccountProperties { AccountNumber = \"account_number\" }\n        }\n      },\n      KycDocuments = new KycDocument[]\n      {\n        new KycDocument\n        { Country = Country.Indonesia,\n          Type = CustomerKycDocumentType.IdentityCard,\n          SubType = CustomerKycDocumentSubType.NationalId,\n        }\n      }\n    }\n  },\n  HasMore = false,\n};\n```\n\nFor API version of `2020-05-19`, here is the example:\n\n```cs\nCustomerResponse customerWithVersion = await Customer.Get(\"example_reference_id\", version: ApiVersion.Version20200519);\n```\n\nIt will return:\n\n```cs\nCustomerResponse customerWithVersion = new CustomerResponse\n{\n  Data = new CustomerResponse[]\n  {\n    new CustomerResponse\n    {\n      ReferenceId = \"example_reference_id\",\n      Email = \"john@email.com\",\n      GivenNames = \"John\",\n      Addresses = new Address[] { new Address { Country = Country.Indonesia } }\n    }\n  },\n};\n```\n\n### Direct Debit Payment Services\n\n#### Create Direct Debit Payment\n\nMethod `Create` has three parameters: parameter or request body using `DirectDebitPaymentParameter`, idempotency key (required), and optional headers.\n\nTo create direct debit payment, please use struct `DirectDebitPaymentParameter` for parameter body. You may use these enum and classes to construct `DirectDebitPaymentParameter`:\n\n- Enum `Currency` for `Currency` property\n- `LinkedAccountDevice` for `Device` property\n- `BasketItem` for `Basket` property\n\nHere is the example of invoking `Create`:\n\n```cs\nDirectDebitPaymentParameter directDebitPaymentParameter = new DirectDebitPaymentParameter\n{\n  ReferenceId = \"reference-id\",\n  PaymentMethodId = \"pm-c30d4800-afe4-4e58-ad5f-cc006d169139\",\n  Currency = Currency.IDR,\n  Amount = 10000,\n  CallbackUrl = \"https://callback-url.com/\",\n  EnableOtp = true,\n  Description = \"Example Description\",\n  SuccessRedirectUrl = \"https://success-url.com/\",\n  FailureRedirectUrl = \"https://failure-url.com/\",\n  Device = new LinkedAccountDevice\n  {\n    Id = \"device-id\",\n    IpAddress = \"255.255.255.255\",\n    UserAgent = \"App\",\n    Imei = \"imei-example\",\n    AdId = \"ad-id\",\n  },\n  Metadata = null,\n  Basket = new BasketItem[]\n  {\n    new BasketItem { Name = \"Black shoes\", Type = \"goods\", Price = 2000, Quantity = 1 },\n    new BasketItem { Name = \"Blue shirt\", Type = \"apparel\", Price = 2000, Quantity = 1 },\n  },\n};\n\nstring idempotencyKey = \"fa9b53a1-f81a-47ff-8fde-b2eec3546b66\";\n\nDirectDebitPaymentResponse directDebitPayment = await DirectDebitPayment.Create(directDebitPaymentParameter, idempotencyKey);\nConsole.WriteLine(directDebitPayment);\n```\n\nIt will return:\n\n```cs\nDirectDebitPaymentResponse directDebitPayment = new DirectDebitPaymentResponse\n{\n  Id = \"ddpy-623dca10-5dad-4916-b14d-81aaa76b5d14\",\n  ReferenceId = \"reference-id\",\n  ChannelCode = LinkedAccountEnum.ChannelCode.DcBri,\n  PaymentMethodId = \"pm-c30d4800-afe4-4e58-ad5f-cc006d169139\",\n  Currency = Currency.IDR,\n  Amount = 10000,\n  Description = \"Example Description\",\n  Status = DirectDebitStatus.Pending,\n  FailureCode = null,\n  IsOtpRequired = true,\n  OtpMobileNumber = \"+6287774441111\",\n  OtpExpirationTimestamp = \"2020-03-26T05:44:26+0800\",\n  RequiredAction = DirectDebitRequiredAction.ValidateOtp,\n  SuccessRedirectUrl = null,\n  FailureRedirectUrl = null,\n  Created = \"2020-03-26T05:44:26+0800\",\n  Updated = null,\n  Metadata = null,\n  Basket = new BasketItem[]\n  {\n    new BasketItem { Name = \"Black shoes\", Type = \"goods\", Price = 2000, Quantity = 1 },\n    new BasketItem { Name = \"Blue shirt\", Type = \"apparel\", Price = 2000, Quantity = 1 },\n  },\n};\n```\n\n#### Validate OTP for Direct Debit Payment\n\nHere is the example of invoking `ValidateOtp`:\n\n```cs\nstring otpCode = \"123456\";\n\nDirectDebitPaymentResponse directDebitPayment = await DirectDebitPayment.ValidateOtp(otpCode, \"ddpy-623dca10-5dad-4916-b14d-81aaa76b5d14\");\nConsole.WriteLine(directDebitPayment);\n```\n\nIt will return:\n\n```cs\nDirectDebitPaymentResponse directDebitPayment = new DirectDebitPaymentResponse\n{\n  Id = \"ddpy-623dca10-5dad-4916-b14d-81aaa76b5d14\",\n  ReferenceId = \"reference-id\",\n  ChannelCode = LinkedAccountEnum.ChannelCode.DcBri,\n  PaymentMethodId = \"pm-c30d4800-afe4-4e58-ad5f-cc006d169139\",\n  Currency = Currency.IDR,\n  Amount = 10000,\n  Description = \"Example Description\",\n  Status = DirectDebitStatus.Pending,\n  FailureCode = null,\n  IsOtpRequired = true,\n  OtpMobileNumber = \"+6287774441111\",\n  OtpExpirationTimestamp = \"2020-03-26T05:44:26+0800\",\n  RequiredAction = DirectDebitRequiredAction.ValidateOtp,\n  SuccessRedirectUrl = null,\n  FailureRedirectUrl = null,\n  Created = \"2020-03-26T05:44:26+0800\",\n  Updated = null,\n  Metadata = null,\n  Basket = new BasketItem[]\n  {\n    new BasketItem { Name = \"Black shoes\", Type = \"goods\", Price = 2000, Quantity = 1 },\n    new BasketItem { Name = \"Blue shirt\", Type = \"apparel\", Price = 2000, Quantity = 1 },\n  },\n};\n```\n\n#### Get Direct Debit Payment by ID\n\n```cs\nDirectDebitPaymentResponse directDebitPayment = await DirectDebitPayment.GetById(\"ddpy-623dca10-5dad-4916-b14d-81aaa76b5d14\");\nConsole.WriteLine(directDebitPayment);\n```\n\nIt will return:\n\n```cs\nDirectDebitPaymentResponse directDebitPayment = new DirectDebitPaymentResponse\n{\n  Id = \"ddpy-623dca10-5dad-4916-b14d-81aaa76b5d14\",\n  ReferenceId = \"reference-id\",\n  ChannelCode = LinkedAccountEnum.ChannelCode.DcBri,\n  PaymentMethodId = \"pm-c30d4800-afe4-4e58-ad5f-cc006d169139\",\n  Currency = Currency.IDR,\n  Amount = 10000,\n  Description = \"Example Description\",\n  Status = DirectDebitStatus.Pending,\n  FailureCode = null,\n  IsOtpRequired = true,\n  OtpMobileNumber = \"+6287774441111\",\n  OtpExpirationTimestamp = \"2020-03-26T05:44:26+0800\",\n  RequiredAction = DirectDebitRequiredAction.ValidateOtp,\n  SuccessRedirectUrl = null,\n  FailureRedirectUrl = null,\n  Created = \"2020-03-26T05:44:26+0800\",\n  Updated = null,\n  Metadata = null,\n  Basket = new BasketItem[]\n  {\n    new BasketItem { Name = \"Black shoes\", Type = \"goods\", Price = 2000, Quantity = 1 },\n    new BasketItem { Name = \"Blue shirt\", Type = \"apparel\", Price = 2000, Quantity = 1 },\n  },\n};\n```\n\n#### Get Direct Debit Payments by Reference ID\n\n```cs\nDirectDebitPaymentResponse[] directDebitPayments = await DirectDebitPayment.GetByReferenceId(\"reference-id\");\nConsole.WriteLine(directDebitPayments);\n```\n\nIt will return:\n\n```cs\nDirectDebitPaymentResponse[] directDebitPayments = new DirectDebitPaymentResponse[]\n{\n  {\n    Id = \"ddpy-623dca10-5dad-4916-b14d-81aaa76b5d14\",\n    ReferenceId = \"reference-id\",\n    ChannelCode = LinkedAccountEnum.ChannelCode.DcBri,\n    PaymentMethodId = \"pm-c30d4800-afe4-4e58-ad5f-cc006d169139\",\n    Currency = Currency.IDR,\n    Amount = 10000,\n    Description = \"Example Description\",\n    Status = DirectDebitStatus.Pending,\n    FailureCode = null,\n    IsOtpRequired = true,\n    OtpMobileNumber = \"+6287774441111\",\n    OtpExpirationTimestamp = \"2020-03-26T05:44:26+0800\",\n    RequiredAction = DirectDebitRequiredAction.ValidateOtp,\n    SuccessRedirectUrl = null,\n    FailureRedirectUrl = null,\n    Created = \"2020-03-26T05:44:26+0800\",\n    Updated = null,\n    Metadata = null,\n    Basket = new BasketItem[]\n    {\n      new BasketItem { Name = \"Black shoes\", Type = \"goods\", Price = 2000, Quantity = 1 },\n      new BasketItem { Name = \"Blue shirt\", Type = \"apparel\", Price = 2000, Quantity = 1 },\n    },\n  }\n};\n```\n\n### Linked Account Services\n\n#### Initialize Linked Account Tokenization\n\nTo initialize linked account tokenization, use struct `InitializedLinkedAccountTokenParameter`. You may use these enum and class to construct `InitializedLinkedAccountTokenParameter`:\n\n- Enum `LinkedAccountEnum.ChannelCode` for `ChannelCode` property\n- `LinkedAccountTokenProperties` for `Properties` property\n\nHere is the example:\n\n```cs\nInitializedLinkedAccountTokenParameter parameter = new InitializedLinkedAccountTokenParameter\n{\n  CustomerId = \"customer-id\",\n  ChannelCode = LinkedAccountEnum.ChannelCode.DcBri,\n  Properties = new LinkedAccountProperties\n  {\n    AccountMobileNumber = \"+62818555988\",\n    CardLastFour = \"4444\",\n    CardExpiry = \"06/24\",\n    AccountEmail = \"test@email.com\",\n  },\n  Metadata = new Dictionary\u003cstring, object\u003e()\n  {\n    { \"example-metadata\", \"here is the example\" },\n  },\n};\n\nInitializedLinkedAccountToken initializedLinkedAccount = await LinkedAccountToken.Initialize(parameter);\n```\n\nIt will return:\n\n```cs\nInitializedLinkedAccountToken initializedLinkedAccount = new InitializedLinkedAccountToken\n{\n  Id = \"linked-account-token-id\",\n  CustomerId = \"customer-id\",\n  ChannelCode = LinkedAccountEnum.ChannelCode.DcBri,\n  AuthorizerUrl = \"https://example.com/\",\n  Status = LinkedAccountEnum.Status.Pending,\n  Metadata = new Dictionary\u003cstring, object\u003e()\n  {\n    { \"example-metadata\", \"here is the example\" },\n  },\n};\n```\n\n#### Validate OTP for Linked Account Token\n\n```cs\nstring otpCode = \"123456\";\nstring linkedAccountTokenId = \"linked-account-token-id\";\n\nValidatedLinkedAccountToken validatedLinkedAccount = await ValidatedLinkedAccount.ValidateOtp(otpCode,linkedAccountTokenId);\n```\n\nIt will return:\n\n```cs\nValidatedLinkedAccountToken validatedLinkedAccount = new ValidatedLinkedAccountToken\n{\n  Id = \"linked-account-token-id\",\n  CustomerId = \"customer-id\",\n  ChannelCode = LinkedAccountEnum.ChannelCode.DcBri,\n  Status = LinkedAccountEnum.Status.Success,\n};\n```\n\n#### Get Accessible Accounts by Linked Account Token\n\n```cs\nAccessibleLinkedAccountToken[] accessibleLinkedAccounts = await LinkedAccountToken.Get(\"linked-account-token-id\");\n```\n\nIt will return:\n\n```cs\nAccessibleLinkedAccountToken[] accessibleLinkedAccounts = new AccessibleLinkedAccountToken[]\n{\n  new AccessibleLinkedAccountToken\n  {\n    Id = \"linked-account-token-id\",\n    ChannelCode = LinkedAccountEnum.ChannelCode.DcBri,\n    Type = LinkedAccountEnum.Type.DebitCard,\n    Properties = new LinkedAccountProperties\n    {\n      AccountMobileNumber = \"+62818555988\",\n      CardLastFour = \"4444\",\n      CardExpiry = \"06/24\",\n      AccountEmail = \"test@email.com\",\n    },\n  },\n};\n```\n\n#### Unbind Linked Account Token\n\n```cs\nUnbindedLinkedAccountToken unbindedLinkedAccount = await LinkedAccount.Unbind(\"linked-account-token-id\");\n```\n\nIt will return:\n\n```cs\nUnbindedLinkedAccountToken unbindedLinkedAccount = new UnbindedLinkedAccountToken\n{\n  Id = \"linked-account-token-id\",\n  IsDeleted = true,\n};\n```\n\n### Payment Methods Services\n\n#### Create Payment Methods\n\nTo create payment methods, please use struct `PaymentMethodParameter` for parameter body. You may use these enum and classes to construct `PaymentMethodParameter`:\n\n- Enum `PaymentMethodEnum.AccountType` for `Type` property\n- `PaymentMethodProperties` for `Properties` property\n\nHere is the example:\n\n```cs\nPaymentMethodParameter parameter = new PaymentMethodParameter\n{\n  Type = PaymentMethodEnum.AccountType.DebitCard,\n  Properties = new PaymentMethodProperties\n  {\n    Id = \"la-052d3e2d-bc4d-4c98-8072-8d232a552299\",\n    ChannelCode = PaymentMethodEnum.ChannelCode.DcBri,\n    Currency = Currency.IDR,\n    CardLastFour = \"1234\",\n    CardExpiry = \"06/24\",\n    Description = \"Payment Debit Card\",\n  },\n  CustomerId = \"4b7b6050-0830-440a-903b-37d527dbbaa9\",\n};\nPaymentMethodResponse paymentMethod = await PaymentMethod.Create(parameter);\nConsole.WriteLine(paymentMethod);\n```\n\nIt will return:\n\n```cs\nPaymentMethodResponse paymentMethod = new PaymentMethodResponse\n{\n  Id = \"pm-c30d4800-afe4-4e58-ad5f-cc006d169139\",\n  Type = PaymentMethodEnum.AccountType.DebitCard,\n  Properties = new PaymentMethodProperties\n  {\n    Id = \"la-052d3e2d-bc4d-4c98-8072-8d232a552299\",\n    ChannelCode = PaymentMethodEnum.ChannelCode.DcBri,\n    Currency = Currency.IDR,\n    CardLastFour = \"1234\",\n    CardExpiry = \"06/24\",\n    Description = \"Payment Debit Card\",\n  },\n  CustomerId = \"4b7b6050-0830-440a-903b-37d527dbbaa9\",\n  Status = PaymentMethodEnum.Status.Active,\n  Created = \"2020-03-19T05:34:55+0800\",\n  Updated = \"2020-03-19T05:34:55+0800\",\n  Metadata = null,\n};\n```\n\n#### Get Payment Methods by Customer ID\n\n```cs\nPaymentMethodResponse[] paymentMethods = await PaymentMethod.Get(\"4b7b6050-0830-440a-903b-37d527dbbaa9\");\n```\n\nIt will return\n\n```cs\nPaymentMethodResponse[] paymentMethods = new PaymentMethodResponse[]\n{\n  new PaymentMethodResponse\n  {\n    Id = \"pm-c30d4800-afe4-4e58-ad5f-cc006d169139\",\n    Type = PaymentMethodEnum.AccountType.DebitCard,\n    Properties = new PaymentMethodProperties\n    {\n      Id = \"la-052d3e2d-bc4d-4c98-8072-8d232a552299\",\n      ChannelCode = PaymentMethodEnum.ChannelCode.DcBri,\n      Currency = Currency.IDR,\n      CardLastFour = \"1234\",\n      CardExpiry = \"06/24\",\n      Description = \"Payment Debit Card\",\n    },\n    CustomerId = \"4b7b6050-0830-440a-903b-37d527dbbaa9\",\n    Status = PaymentMethodEnum.Status.Active,\n    Created = \"2020-03-19T05:34:55+0800\",\n    Updated = \"2020-03-19T05:34:55+0800\",\n    Metadata = null,\n  }\n};\n```\n\n### Retail Outlet Services\n\nThis library supports Retail Outlet API for Philippines (PH).\n\n#### Create Fixed Payment Code\n\nTo create a payment code, please use struct `CreateFixedPaymentCodeParameter` for parameter body. You may use these enums to construct `CreateFixedPaymentCodeParameter`:\n\n- `RetailOutletEnum.ChannelCode` for `ChannelCode` property\n- `Currency` for `Currency` property with enum value of `Currency.PHP`\n- `Country` for `Market` property with enum value of `Country.Philippines`\n\nHere is the example:\n\n```cs\nCreateFixedPaymentCodeParameter parameter = new CreateFixedPaymentCodeParameter\n{\n  ReferenceId = \"demo_payment_code_id\",\n  ChannelCode = RetailOutletEnum.ChannelCode.SevenEleven,\n  CustomerName = \"Rika Sutanto\",\n  Amount = 50,\n  Currency = Currency.PHP,\n  Market = Country.Philippines,\n  PaymentCode = \"12345678\",\n  Description = \"Example payment code\",\n};\n\nFixedPaymentCode fixedPaymentCode = await RetailOutlet.CreatePaymentCode(parameter);\n```\n\nIt will return:\n\n```cs\nFixedPaymentCode fixedPaymentCode = new FixedPaymentCode\n{\n  Id = \"\u003cGENERATED_ID\u003e\",\n  BusinessId = \"\u003cBUSINESS_ID\u003e\"\n  ReferenceId = \"demo_payment_code_id\",\n  ChannelCode = RetailOutletEnum.ChannelCode.SevenEleven,\n  CustomerName = \"Rika Sutanto\",\n  Amount = 50,\n  Currency = Currency.PHP,\n  Market = Country.Philippines,\n  PaymentCode = \"12345678\",\n  Description = \"Example payment code\",\n  IsSingleUse = true,\n  Status = RetailOutletEnum.Status.Active,\n  Metadata = null,\n  CreatedAt = \"2021-01-01T02:38:01.385383888Z\",\n  UpdatedAt = \"2021-01-01T02:38:01.385383888Z\",\n  ExpiresAt = \"2021-05-30T02:38:01.327283048Z\",\n}\n```\n\n#### Update Fixed Payment Code\n\nTo update payment code, please use struct `UpdateFixedPaymentCodeParameter` for parameter body. You may use these enums to construct `UpdateFixedPaymentCodeParameter`:\n\n- `Currency` for `Currency` property with enum value of `Currency.PHP`.\n\nHere is the example:\n\n```cs\nUpdateFixedPaymentCodeParameter parameter = new UpdateFixedPaymentCodeParameter\n{\n    CustomerName = \"Rika Sutanto\",\n    Amount = 100,\n    Currency = Currency.PHP,\n    Description = \"Example updated payment code\",\n};\n\nFixedPaymentCode fixedPaymentCode = await RetailOutlet.UpdatePaymentCode(parameter, \"example_payment_code_id\");\n```\n\nIt will return:\n\n```cs\nFixedPaymentCode fixedPaymentCode = new FixedPaymentCode\n{\n  Id = \"\u003cGENERATED_ID\u003e\",\n  BusinessId = \"\u003cBUSINESS_ID\u003e\"\n  ReferenceId = \"demo_payment_code_id\",\n  ChannelCode = RetailOutletEnum.ChannelCode.SevenEleven,\n  CustomerName = \"Rika Sutanto\",\n  Amount = 100,\n  Currency = Currency.PHP,\n  Market = Country.Philippines,\n  PaymentCode = \"12345678\",\n  Description = \"Example updated payment code\",\n  IsSingleUse = true,\n  Status = RetailOutletEnum.Status.Active,\n  Metadata = null,\n  CreatedAt = \"2021-01-01T02:38:01.385383888Z\",\n  UpdatedAt = \"2021-01-01T02:38:01.385383888Z\",\n  ExpiresAt = \"2021-05-30T02:38:01.327283048Z\",\n}\n```\n\n#### Get Payment Code\n\n```cs\nFixedPaymentCode fixedPaymentCode = await RetailOutlet.GetPaymentCode(\"example_payment_code_id\");\n```\n\nIt will return:\n\n```cs\nFixedPaymentCode fixedPaymentCode = new FixedPaymentCode\n{\n  Id = \"\u003cGENERATED_ID\u003e\",\n  BusinessId = \"\u003cBUSINESS_ID\u003e\"\n  ReferenceId = \"demo_payment_code_id\",\n  ChannelCode = RetailOutletEnum.ChannelCode.SevenEleven,\n  CustomerName = \"Rika Sutanto\",\n  Amount = 50,\n  Currency = Currency.PHP,\n  Market = Country.Philippines,\n  PaymentCode = \"12345678\",\n  Description = \"Example payment code\",\n  IsSingleUse = true,\n  Status = RetailOutletEnum.Status.Active,\n  Metadata = null,\n  CreatedAt = \"2021-01-01T02:38:01.385383888Z\",\n  UpdatedAt = \"2021-01-01T02:38:01.385383888Z\",\n  ExpiresAt = \"2021-05-30T02:38:01.327283048Z\",\n}\n```\n\n#### Get Payments By Payment Code ID\n\n```cs\nFixedPaymentCode[] fixedPaymentCodes = await RetailOutlet.GetPayments(\"example_payment_code_id\");\n```\n\nIt will return:\n\n```cs\nFixedPaymentCode[] fixedPaymentCodes = new FixedPaymentCode[]\n{\n  new FixedPaymentCode\n  {\n    Id = \"\u003cGENERATED_ID\u003e\",\n    PaymentCodeId = \"\u003cPAYMENT_CODE_ID\u003e\"\n    ChannelCode = RetailOutletEnum.ChannelCode.SevenEleven,\n    Amount = 50,\n    Currency = Currency.PHP,\n    PaymentCode = \"12345678\",\n    Remarks = \"\u003cREMARKS\u003e\",\n    Status = RetailOutletEnum.Status.Completed,\n    CreatedAt = \"2021-01-01T02:38:01.385383888Z\",\n    UpdatedAt = \"2021-01-01T02:38:01.385383888Z\",\n  },\n  // ...\n}\n```\n\n#### Get Payments By Fixed Payment Code ID\n\n```cs\nPaymentsResponse payments = await RetailOutlet.GetPaymentsByFixedPaymentCode(\"example_fixed_payment_code_id\");\n```\n\nIt will return:\n\n```cs\nPaymentsResponse payments = new PaymentsResponse()\n{\n  Data = new Payment[] { new Payment {\n      Status = \"COMPLETED\",\n      FixedPaymentCodePaymentId = \"61c53c4fdc1b825d9a58ff54\",\n      FixedPaymentCodeId = \"61c53c3727c7a679826dd90a\",\n      Amount = 1000,\n      Name = \"JOHN DOE\",\n      Prefix = \"TEST\",\n      PaymentCode = \"TEST892185\",\n      PaymentId = \"1640315983260\",\n      ExternalId = \"FPC-1640315959\",\n      RetailOutletName = \"ALFAMART\",\n      TransactionTimestamp = \"2021-12-24T03:19:43.260Z\",\n      Id = \"61c53c4f6cc577e4038ab099\",\n      OwnerId = \"60ca10b83ffd534ece8aa856\",\n  }},\n  HasMore = true,\n  Links = new Links() {\n      Href = \"https://api.xendit.co/fixed_payment_code/61c53c3727c7a679826dd90a/payments?limit=1\u0026after_id=61c53c4f6cc577e4038ab099\",\n      Rel = \"next\",\n      Method = \"GET\",\n  }\n  // ...\n}\n```\n\n### E-Wallet Service\n\n#### Create E-Wallet Charge (API version `2020-01-25`)\n\nTo create an e-wallet charge, use struct `EWalletChargeParameter`. You may use these enums and classes to construct `EWalletChargeParameter`:\n\n- Enum `Currency` for `Currency` property\n- Enum `EWalletEnum.CheckoutMethod` for `CheckoutMethod` property\n- Enum `EWalletEnum.ChannelCode` for `ChannelCode` property\n- `EWalletChargeProperties` for `ChannelProperties` property\n- `BasketItem` for `Basket` property\n\nHere is the example of invoking `Create` method:\n\n```cs\nEWalletChargeParameter parameter = new EWalletChargeParameter\n{\n  ReferenceId = \"demo-reference-id\",\n  Currency = Currency.IDR,\n  Amount = 1000,\n  CheckoutMethod = EWalletEnum.CheckoutMethod.OneTimePayment,\n  ChannelCode = EWalletEnum.ChannelCode.IdOvo,\n  ChannelProperties = new EWalletChargeProperties\n  {\n    MobileNumber = \"+628123123123\",\n  },\n};\n\nEWalletChargeResponse eWalletCharge = await EWalletCharge.Create(parameter);\n\n// define API version\nEWalletChargeResponse eWalletCharge = await EWalletCharge.Create(parameter, apiVersion: ApiVersion.Version20210125);\n```\n\nIt will return:\n\n```cs\nEWalletChargeResponse eWalletCharge = new EWalletChargeResponse\n{\n  Id = \"\u003cGENERATED_ID\u003e\",\n  BusinessId = \"\u003cMERCHANT_BUSINESS_ID\u003e\",\n  ReferenceId = \"demo-reference-id\",\n  Status = EWalletEnum.Status.Pending,\n  Currency = Currency.IDR,\n  ChargeAmount = 1000,\n  CaptureAmount = 1000,\n  CheckoutMethod = EWalletEnum.CheckoutMethod.OneTimePayment,\n  ChannelCode = EWalletEnum.ChannelCode.IdOvo,\n  ChannelProperties = new EWalletChargeProperties\n  {\n    MobileNumber = \"+628123123123\",\n  },\n  Actions = null,\n  IsRedirectRequired = false,\n  CallbackUrl = \"\u003cCALLBACK_URL\",\n  Created = \"2017-07-21T17:32:28Z\",\n  Updated = \"2017-07-21T17:32:28Z\",\n  Voided = null,\n  customerId = null,\n  PaymentMethodId = null,\n  FailureCode = null,\n  Basket = null,\n  Metadata = null,\n};\n```\n\n#### Get E-Wallet Charge (API version `2020-01-25`)\n\n```cs\nEWalletChargeResponse eWalletCharge = await EWalletCharge.Get(\"CHARGE_ID\");\n```\n\nIt will return:\n\n```cs\nEWalletChargeResponse eWalletCharge = new EWalletChargeResponse\n{\n  Id = \"\u003cGENERATED_ID\u003e\",\n  BusinessId = \"\u003cMERCHANT_BUSINESS_ID\u003e\",\n  ReferenceId = \"demo-reference-id\",\n  Status = EWalletEnum.Status.Pending,\n  Currency = Currency.IDR,\n  ChargeAmount = 1000,\n  CaptureAmount = 1000,\n  CheckoutMethod = EWalletEnum.CheckoutMethod.OneTimePayment,\n  ChannelCode = EWalletEnum.ChannelCode.IdOvo,\n  ChannelProperties = new EWalletChargeProperties\n  {\n    MobileNumber = \"+628123123123\",\n  },\n  Actions = null,\n  IsRedirectRequired = false,\n  CallbackUrl = \"\u003cCALLBACK_URL\",\n  Created = \"2017-07-21T17:32:28Z\",\n  Updated = \"2017-07-21T17:32:28Z\",\n  Voided = null,\n  customerId = null,\n  PaymentMethodId = null,\n  FailureCode = null,\n  Basket = null,\n  Metadata = null,\n};\n```\n\n#### Create E-Wallet Payment (API version `2020-02-01`)\n\nTo create an e-wallet Payment, use struct `EWalletPaymentParameter`. You may use these enum and class to construct `EWalletPaymentParameter`:\n\n- Enum `EWalletEnum.PaymentType` for `EWalletType` property\n- `Item` for `Items` property\n\nHere is the example of invoking `Create` method:\n\n```cs\nEWalletPaymentParameter parameter = new EWalletPaymentParameter\n{\n  ExternalId = \"example-external-id\",\n  Amount = 100000,\n  Phone = \"08123123123\",\n  EWalletType = EWalletEnum.PaymentType.Ovo,\n};\n\n// if we don't pass API version parameter, it uses default value of API version 2020-02-01\nEWalletPaymentResponse eWalletPayment = await EWalletPayment.Create(parameter);\n\n// define API version\nEWalletPaymentResponse eWalletPayment = await EWalletPayment.Create(parameter, apiVersion: ApiVersion.Version20200201);\n```\n\nIt will return:\n\n```cs\nEWalletPaymentResponse eWalletPayment = new EWalletPaymentResponse\n{\n  BusinessId = \"\u003cMERCHANT_BUSINESS_ID\u003e\",\n  ExternalId = \"example-external-id\",\n  Amount = 100000,\n  Phone = \"08123123123\",\n  EWalletType = EWalletEnum.PaymentType.Ovo,\n  Status = EWalletEnum.Status.Pending,\n  Created = \"2020-02-20T00:00:00.000Z\",\n};\n```\n\n#### Create E-Wallet Payment (API version `2019-02-04`)\n\nTo create an e-wallet Payment, use struct `EWalletPaymentParameter`. You may use these enum and class to construct `EWalletPaymentParameter`:\n\n- Enum `EWalletEnum.PaymentType` for `EWalletType` property\n- `Item` for `Items` property\n\nHere is the example of invoking `Create` method of API version `2019-02-04`:\n\n```cs\nEWalletPaymentParameter parameter = new EWalletPaymentParameter\n{\n  ExternalId = \"example-external-id\",\n  Amount = 100000,\n  Phone = \"08123123123\",\n  EWalletType = EWalletEnum.PaymentType.Ovo,\n};\n\n// define API version\nEWalletPaymentResponse eWalletPayment = await EWalletPayment.Create(parameter, apiVersion: ApiVersion.Version20190204);\n```\n\nIt will return:\n\n```cs\nEWalletPaymentResponse eWalletPayment = new EWalletPaymentResponse\n{\n  BusinessId = \"\u003cMERCHANT_BUSINESS_ID\u003e\",\n  ExternalId = \"example-external-id\",\n  Amount = 100000,\n  Phone = \"08123123123\",\n  EWalletType = EWalletEnum.PaymentType.Ovo,\n  Status = EWalletEnum.Status.Pending,\n  Created = \"2020-02-20T00:00:00.000Z\",\n};\n```\n\n#### Get E-Wallet Payment\n\n```cs\nEWalletPaymentResponse eWalletPayment = await EWalletPayment.Get(\"example-external-id\", EWalletEnum.PaymentType.Ovo);\n```\n\nIt will return:\n\n```cs\nEWalletPaymentResponse eWalletPayment = new EWalletPaymentResponse\n{\n  BusinessId = \"\u003cMERCHANT_BUSINESS_ID\u003e\",\n  ExternalId = \"example-external-id\",\n  Amount = 100000,\n  Phone = \"08123123123\",\n  EWalletType = EWalletEnum.PaymentType.Ovo,\n  Status = EWalletEnum.Status.Completed,\n  TransactionDate = \"2020-02-20T00:00:00.000Z\",\n};\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxendit%2Fxendit-dotnet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxendit%2Fxendit-dotnet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxendit%2Fxendit-dotnet/lists"}