| The API key doesn't have permissions to perform the request\nSERVER_ERROR | API errors cover any other type of problem (e.g. a temporary problem with Xendit's servers), and are extremely uncommon\n\n## Error Handling\n\n### Safely retry requests with idempotency\n\nA key part of web API design is the idea of idempotency, defined as being able to apply the same operation multiple times without changing the result beyond the first try. Because a certain amount of intermittent failure is to be expected, clients need a way of reconciling failed requests with a server, and idempotency provides a mechanism for that.\n\nThe Xendit API guarantees the idempotency of `GET` requests, so it's always safe to retry them. Including an idempotency key makes `POST` and `PATCH` request idempotent, which prompts the API to do the bookkeeping required to prevent duplicate operations. For example, if a request to create disbursements does not respond due to network connection error, you can retry the request with the same idempotency key to guarantee that no more than one disbursement is created.\n\nIdempotency keys are sent in the `x-idempotency-key` header, and you should use them for all `POST` requests to Xendit's API whenever supported. A few common strategies for generating idempotency keys are:\n- Use an algorithm that generates a token with good randomness, like UUID v4\n- Derive the key from a user-attached object like the ID of a shopping cart. This provides a relatively easy way to protect against double submissions\n\nA response that's being replayed from the server because it had already executed previously can be identified by the error code `DUPLICATE_TRANSACTION_ERROR`\n\n\n\n### Content errors\nContent errros are the result of the contents of an API request being invalid and return a `4xx` error code. Integrations should correct the original request and try again. Depending of the type of user error, it may be possible to handle the problem programmatically.\n\nFor a `POST` operation using an idempotency key, as long as an API method began execution, Xendit's API servers will cache the results of the request regardless of what they were. A request that returns a `400` will send back the same `400` if followed by a new request with the same idempotency key. A fresh idempotency key should be generated when modifying the original request to get a successful result. The safest strategy where `4xx` errors are concerned is to always generate a new idempotency key.\n\n\n### Network errors\nNetwork errors are the result of connectivity problems between client and server and tend to manifest as low-level errors like socket or timeout exceptions.\n\nThis class of errors is where the value of idempotency keys and request retries is most obvious. When intermittent problems occur, clients are usually left in a state where they don't know whether or not the server received the request. To get a definitive answer, they should retry such requests with the same idempotency keys and the same parameters until they're able to receive a result from the server. Sending the same idempotency with different parameters will produce an error indicating that the new request didn't match the original.\n\n\n### Server errors\nServer errors are the result of a server-side problem and return a `5xx` error code. These errors are the most difficult to handle, so we try to ensure that they happen as infrequently as possible.\n\nAs with the errors, retrying them with the same idempotency key will usually produce the same result. The request can be retried with a new idempotency key, but we'd advice against it because it's possible for the original one to have produced side effects.\n\nThe result of a `500` request should be treated as indeterminate. The exact nature of any retroactive changes in the system depend heavily on the type of request. For example, if creating a disbursement returns a `500` error but we detect that the information has gone out to a payment network, we'll try to roll it forward and send callback after it has been completed. If not, we'll try to roll it back. However, ideal results under these circumstances are not guaranteed, and requests resulting in a `500` error may proeduce user-visible side effects.\n\n\n\nIntegration that want to maximize robustness must configure callback handlers that are capable of receiving events that have never been seen in an API response.\n\n# Callback\nXendit uses callback to notify your application any time an event happens on your account. Set up callback for events that Xendit doesn't already notify you of, like when a disbursement has been completed, a Virtual Account has been created and paid, or your invoice has expired.\n\n## Setup\nYou need to provide an endpoint in your system to receive callback from us. The callback notification will be sent over POST request to your callback URL that you have set. Setup your callback URL in [Callback settings](https://dashboard.xendit.co/settings/developers#callbacks). You can use a tool like [ngrok](https://ngrok.com) to make your endpoint available for receiving callback during testing.\n\n## Delivery Attempts and Retries\nUnderstand how to view delivery attempts and retry logic when callback events aren't acknowledged\n\n### View events\nWhen viewing information about a specific event through the Dashboard's [Callback tab](https://dashboard.xendit.co/callbacks), you can check how many times Xendit attempted to send an event to the endpoint. This shows the latest response from your endpoint, a list of all attempted callback, and the respective HTTP status codes Xendit received.\n\n### Retry logic\nXendit attempts to deliver your callback three times and will stop retrying until we have received response from your server or there is still no response yet.\n\n### Receive callback statistics via email\nYou can also receive summary of your callback statistics (number of success and failed callback) via email every 6 hours. You can enable this feature in [Email Recipient settings](https://dashboard.xendit.co/settings/team#notifications)\n\n\n## Event Handling\nHandling callback events correctly is crucial to making sure your integration's business logic works as expected\n\n### Acknowledge events immediately\nIf your callback script performs complex logic, or makes network calls, it's possible that the script would time out before Xendit sees its complete execution. Ideally, your callback handler code (acknowledging receipt of an event by returning a `2xx` status code) is separate of any other logic you do for that event.\n\n### Handle duplicate events\nCallback endpoints might occasionally receive the same event more than once. We advise you to guard against duplicated event receipts by making your event processing idempotent. One way of doing this is logging the events you've processed, and then not processing already-logged events.\n\n### Order of events\nXendit does not guarantee delivery of events in the order in which they are generated. Your endpoint should not expect delivery of these events in this order and should handle this accordingly. You can also use the API to fetch any missing objects.\n\n## Security\nKeeping your endpoints secure is critical to protecting your customers' information. Xendit provides several ways for you to verify events are coming from Xendit in a secure manner.\n\n### Receive events with an HTTPS server\nIf you use an HTTPS URL for your callback endpoint, Xendit will validate that the connection to your server is secure before sending your callback data. For this to work, your server must be correctly configured to support HTTPS with a valid server certificate.\n\n### Verify events are sent from Xendit\nXendit can optionally sign the callback events it sends to your endpoints. We do so by including a token in each event's `x-callback-token` header. This allows you to verify that the events were sent by Xendit, not by a third party.\n\nHeader Parameter | Description\n--- | ---\nx-callback-token |string Your Xendit unique callback token to verify the origin of the callback
\n\nBefore you can verify tokens, you need to retrieve your callback token from Dashboard's [Callback settings](https://dashboard.xendit.co/settings/developers#callbacks). Each secret is unique to each environments.\n\n# Test Scenarios\nThis section includes test scenarios and other information to make sure your integration works as planned. Use it to trigger different flows in your integration and ensure they are handled accordingly\n\n- [Direct Debit Testing Scenarios](https://docs.xendit.co/direct-debit/testing-direct-debit/index.html)\n\n# Checklists\nXendit has designed its live and test modes to function as similarly as possible. Flipping the switch is mostly a matter of swapping your API keys.\n\nIf you are a developer, or had a developer perform an integration for you, you should also consider the following items before going live.\n\n## Handle Edge Cases\nWe have created several test cases you can use to replicate various states and responses. Beyond these options, perform your due diligence, testing your integration with:\n- Incomplete data\n- Invalid data\n- Duplicate data (e.g., retry the same request to see what happens)\n\nWe also recommend you have someone else test your integration, especially if that other person is not a developer themselves.\n\n## Review Error Handling\nOnce you have gone live is an unfortunate time to discover you have not properly written your code to handle every possible error type, including those that should 'never' happen. Be certain your code is defensive, handling not just the common errors, but all possibilities.\n\nWhen testing your error handling, especially watch what information is shown to your users. A card being declined (i.e., `CARD_DECLINED`) is a different concern than an error on your backend (e.g., an `API_VALIDATION_ERROR`).\n\n## Review Your Logging\nXendit logs every request made with you API keys. We recommend that you log all important data on your end, too, despite the apparent redundancy. Your own logs will be a life-saver if your server has a problem contacting Xendit or there's an issue with your API keys--both cases would prevent us from logging your request.\n\nRegularly examine your logs to ensure they're storing all the information you may need and they are not storing anything of a sensitive nature (e.g., personally identifiable information).\n\n## Independent From Test Mode Objects\nXendit objects created in test mode--such as charge, virtual accounts, retail outlets, etc---are not usable in live mode. This prevents your test data from being inadvertently used in your production code. When recreating necessary objects in live mode, be certain to use the same ID values (e.g. the same Virtual Account external ID) to guarantee your code will continue to work without issue\n\n## Register Live Callback URL\nYour Xendit account can have both test and live callback URLs. If you are using callback, make sure you have defined live endpoints in your Xendit account. Then confirm that the live endpoint functions exactly the same as your test endpoint.\n\nWhile examining your callback status, also take a moment to check that your live endpoint:\n- Gracefully handles delayed callback notifications\n- Gracefully handles duplicate callback notifications\n- Does not require event notifications to occur in a specific order\n\n## Secure Your API keys\nAs a security measure, we recommend change your API keys on a regular basis, and also just before going live. This is in case they have been saved somewhere outside of your codebase during development. Make sure your workflow doesn't result in your API keys being represented or stored in multiple places--this leads to bugs--or even ending up in your version control software.\n",version:"1.0.2",title:"Direct Debit API"},paths:{"/customers":{post:{tags:["Customers"],summary:"Creates new customer object",operationId:"createCustomer",description:"A customer object is required in order to link a payment method for direct debit, to initiate a PayLater transaction. This allows you to easily link and track payment methods and transactions by a single customer.",parameters:[{in:"header",name:"Idempotency-key",description:"Provided by the merchant to prevent duplicate requests. May be equal to any GUID. Idempotency keys are stored on the request layer; it expires after 24 hours from the first request.",schema:{type:"string"},required:!1,example:"bc9faa22-23e5-486e-bfee-869c46d32cc3"}],requestBody:{$ref:"#/components/requestBodies/CreateCustomer"},responses:{200:{description:"Customer successfully created",content:{"application/json":{schema:{allOf:[{type:"object",required:["id"],properties:{id:{type:"string",format:"uuid",example:"7205eb90-ce35-436d-8fa1-3695ecc5889a"}}},{$ref:"#/components/schemas/Customer"}]}}}},400:{$ref:"#/components/responses/ValidationError"},401:{$ref:"#/components/responses/Unauthorized"},409:{description:"Conflict - these errors occur due to duplicate records.",content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/DuplicateError"},{$ref:"#/components/schemas/IdempotencyError"}]},examples:{"Example of error due to duplicate `reference_id`":{$ref:"#/components/examples/DuplicateError"},"Example of error due to duplicate `Idempotency-key`":{$ref:"#/components/examples/IdempotencyError"}}}}},500:{$ref:"#/components/responses/InternalServerError"}}},get:{tags:["Customers"],summary:"Get customer details by reference ID",operationId:"getCustomerByRefId",description:"Returns the customer details",parameters:[{in:"query",name:"reference_id",description:"Merchant-provided reference ID",required:!0,schema:{type:"string",format:"uuid",example:"7205eb90-ce35-436d-8fa1-3695ecc5889a"}}],responses:{200:{description:"Customer details successfully retrieved.",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/Customer"}},examples:{"Matching record found":{$ref:"#/components/examples/CustomerArray"},"No matching record found":{value:[]}}}}},400:{$ref:"#/components/responses/ValidationError"},401:{$ref:"#/components/responses/Unauthorized"},500:{$ref:"#/components/responses/InternalServerError"}}}},"/customers/{id}":{get:{tags:["Customers"],summary:"Get customer details by customer ID",operationId:"getCustomer",description:"Returns the details of the customer object matching the provided `id`",parameters:[{in:"path",name:"id",description:"ID of the customer object to be queried",required:!0,schema:{type:"string",format:"uuid",example:"7205eb90-ce35-436d-8fa1-3695ecc5889a"}},{in:"query",name:"sort_by",schema:{type:"number"}}],responses:{200:{description:"Customer details successfully retrieved.",content:{"application/json":{schema:{allOf:[{type:"object",required:["id"],properties:{id:{type:"string",format:"uuid",example:"7205eb90-ce35-436d-8fa1-3695ecc5889a"}}},{$ref:"#/components/schemas/Customer"}]}}}},401:{$ref:"#/components/responses/Unauthorized"},404:{$ref:"#/components/responses/NotFound"},500:{$ref:"#/components/responses/InternalServerError"}}}},"/linked_account_tokens/auth":{post:{tags:["Linked Account Tokens"],summary:"Initiate account authorization request",operationId:"initiateAccountAuth",description:"Account authorizations are represented by linked account tokens. This endpoint initializes the authorization process and linked account token creation.",requestBody:{content:{"application/json":{schema:{$ref:"#/components/schemas/AccountAuth"},examples:{"Request for bank access linking":{$ref:"#/components/examples/LinkBankAccountRequest"},"Request for debit card linking":{$ref:"#/components/examples/LinkDebitCardRequest"}}}}},callbacks:{"linked_account_token.successful":{"{your-provided-callback-url}":{post:{summary:"Notification for successful authorization",description:"This callback is only applicable for bank access authorization (channel codes with `BA_` prefix).
This is triggered when the end-customer has successfully given authorization to access the bank account. Some banks may return more than one accessible account.",requestBody:{$ref:"#/components/requestBodies/LinkedAccountTokenSuccessfulCallback"},responses:{200:{description:"Expected response if your server successfully received the callback"}}}}}},responses:{200:{description:"Account authorization successfully initiated.",content:{"application/json":{schema:{allOf:[{type:"object",required:["id"],properties:{id:{type:"string",description:"Xendit's unique identifer for the specific authorization",example:"lat-2ed8da9a-96de-4818-ab17-4fc809ad50fa"},customer_id:{type:"string",description:"ID of the customer object the authorization is linked",example:"2ed8da9a-96de-4818-ab17-4fc809ad50fa"},channel_code:{type:"string",description:"Xendit’s code for selected channel",example:"BA_BPI"},authorizer_url:{type:"string",description:"Target URL/Webview for Authorizer. Merchant renders this page to begin authorization. Will return null for debit card flow.",example:"https://link-web.xendit.co/auth/d88ede5dd016?state=",nullable:!0},status:{type:"string",description:"Current status of the current account binding.",example:"PENDING"},metadata:{type:"object",description:"Metadata object provided by merchant"}}}]},examples:{"Response for successful bank access auth initialization":{$ref:"#/components/examples/LATAuthBankAccountResponse"},"Response for successful debit card auth initialization":{$ref:"#/components/examples/LATAuthDebitCardResponse"}}}}},400:{description:"An error has occurred due to request contents",content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/ValidationError"},{$ref:"#/components/schemas/CustomerIdNotFoundError"},{$ref:"#/components/schemas/InvalidAccountDetails"},{$ref:"#/components/schemas/OTPDeliveryError"}]},examples:{"Example of error due to request validation":{$ref:"#/components/examples/APIValidationError"},"Example of error due to invalid `customer_id`":{$ref:"#/components/examples/CustomerNotFoundError"},"Example of error due to invalid debit card details":{$ref:"#/components/examples/InvalidAccountDetails"},"Example of error due to partner channel failed to send OTP":{$ref:"#/components/examples/OTPDeliveryError"}}}}},401:{$ref:"#/components/responses/Unauthorized"},500:{$ref:"#/components/responses/InternalServerError"},503:{$ref:"#/components/responses/ChannelUnavailable"}}}},"/linked_account_tokens/{id}/accounts":{get:{tags:["Linked Account Tokens"],summary:"Get accessible accounts",operationId:"getAccountInformation",description:"Returns a list of accessible accounts by the given linked account token",parameters:[{in:"path",name:"id",description:"account ID",required:!0,schema:{type:"string",example:"lat-2ed8da9a-96de-4818-ab17-4fc809ad50fa"}}],responses:{200:{description:"Successfully retrieved accounts; returns an array of objects",content:{"application/json":{schema:{allOf:[{type:"array",items:{type:"object",properties:{id:{type:"string",description:"Xendit's unique identifer for the account",example:"lat-2ed8da9a-96de-4818-ab17-4fc809ad50fa"},channel_code:{type:"string",description:"Xendit’s code for selected channel",example:"BA_BPI"},type:{type:"string",description:"Type of payment method",enum:["BANK_ACCOUNT","DEBIT_CARD"],example:"BANK_ACCOUNT"},properties:{type:"object",description:"Object with properties regarding the account",oneOf:[{$ref:"#/components/schemas/BankAccountProperties"},{$ref:"#/components/schemas/DebitCardAccountProperties"}],example:{account_detail:"xxxxx1234",account_hash:"5eb63bbbe01eeed093cb22bb8f5acdc3",currency:"PHP",account_type:"SAVINGS",description:"Primary savings accounts"}}}}}]},examples:{"Response for accounts accessible via bank access":{$ref:"#/components/examples/BankAccountsArrayResponse"},"Response for accounts accessible via debit card":{$ref:"#/components/examples/DebitCardAccountsArrayResponse"}}}}},400:{$ref:"#/components/responses/ValidationError"},401:{$ref:"#/components/responses/Unauthorized"},404:{$ref:"#/components/responses/NotFound"},500:{$ref:"#/components/responses/InternalServerError"}}}},"/linked_account_tokens/{id}/validate_otp":{post:{tags:["Linked Account Tokens"],summary:"Validate OTP from end-customer and proceed with authorization. Only required and supported for debit card linking.",operationId:"linkedAccountTokenValidateOTP",description:"Validates a debit card linking OTP from end-customer; finalizes authorization.",parameters:[{in:"path",name:"id",required:!0,description:"Linked Account Token ID",schema:{type:"string",example:"lat-d290f1ee-6c54-4b01-90e6-d701748f0851"}}],requestBody:{$ref:"#/components/requestBodies/DebitCardValidateOtp"},responses:{200:{description:"Account authorization successfully initiated",content:{"application/json":{schema:{allOf:[{type:"object",required:["id"],properties:{id:{type:"string",description:"Linked account token ID",example:"la-1c0bd626-5e34-4aef-9f88-cea045c8535d"},customer_id:{type:"string",description:"Xendit-generated ID for the customer",format:"uuid",example:"7205eb90-ce35-436d-8fa1-3695ecc5889a"},channel_code:{type:"string",description:"Xendit-defined code for the specific payment channel",example:"DC_BRI"},status:{type:"string",description:"Status whether or not account linking is successful or not",example:"AUTHORIZED"},metadata:{type:"object",description:"Merchant-provided metadata object",example:{origin:"mobile_app"}}}}]}}}},400:{description:"An error has occurred due to request body values provided",content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/ValidationError"},{$ref:"#/components/schemas/InvalidOTPError"},{$ref:"#/components/schemas/ExpiredOTPError"},{$ref:"#/components/schemas/MaxOTPAttemptsError"}]},examples:{"Example of error due to request validation":{$ref:"#/components/examples/APIValidationError"},"Example of error due to incorrect OTP provided":{$ref:"#/components/examples/InvalidOTPError"},"Example of error due to expired OTP provided":{$ref:"#/components/examples/ExpiredOTPError"},"Example of error due to reaching maximum OTP attempts":{$ref:"#/components/examples/MaxOTPAttemptsError"}}}}},401:{$ref:"#/components/responses/Unauthorized"},404:{$ref:"#/components/responses/NotFound"},500:{$ref:"#/components/responses/InternalServerError"},503:{$ref:"#/components/responses/ChannelUnavailable"}}}},"/linked_account_tokens/{id}":{delete:{tags:["Linked Account Tokens"],summary:"Deletes the specified linked account token",operationId:"deleteLinkedAccountToken",description:"Deletes the linked account token, effectively deactivating any authorization and activation linked to it",parameters:[{in:"path",name:"id",description:"Linked Account Token ID",required:!0,schema:{type:"string",example:"lat-7205eb90-ce35-436d-8fa1-3695ecc5889a"}}],responses:{200:{description:"Linked account token successfully deleted. All payment methods that refers to the linked account token will be invalid.",content:{"application/json":{schema:{type:"object",required:["id","is_deleted"],properties:{id:{type:"string",example:"lat-7205eb90-ce35-436d-8fa1-3695ecc5889a"},is_deleted:{type:"boolean",example:!0}}}}}},401:{$ref:"#/components/responses/Unauthorized"},404:{$ref:"#/components/responses/NotFound"},500:{$ref:"#/components/responses/InternalServerError"}}}},"/payment_methods":{post:{tags:["Payment Methods"],summary:"Create a payment method",operationId:"activatePaymentMethod",description:"Payment methods enable you to abstract sources of funds and use them for making direct debit payments or recurring payments. Currently, only supports linked accounts.",parameters:[{in:"header",name:"Idempotency-key",description:"Provided by the merchant to prevent duplicate requests. May be equal to any GUID. Idempotency keys are stored on the request layer; it expires after 24 hours from the first request.",schema:{type:"string"},required:!1,example:"bc9faa22-23e5-486e-bfee-869c46d32cc3"}],requestBody:{$ref:"#/components/requestBodies/ActivatePaymentMethod"},callbacks:{"payment_method.expiry.expiring":{"{your-provided-callback-url}":{post:{summary:"Notification when a payment method is expiring soon",description:"This callback is triggered when a particular payment method is near its expiration.",requestBody:{$ref:"#/components/requestBodies/PaymentMethodExpiringCallback"},responses:{200:{description:"Expected response if your server successfully received the callback"}}}}},"payment_method.expiry.expired":{"{your-provided-callback-url}":{post:{summary:"Notification when a payment method has expired",description:"This callback is triggered when a particular payment method has expired and will be unusable for payment transactions.",requestBody:{$ref:"#/components/requestBodies/PaymentMethodExpiredCallback"},responses:{200:{description:"Expected response if your server successfully received the callback"}}}}}},responses:{200:{description:"Payment method successfully activated",content:{"application/json":{schema:{$ref:"#/components/schemas/PaymentMethod"},examples:{"Response for BANK_ACCOUNT payment method":{$ref:"#/components/examples/BankAccountPaymentMethod"},"Response for DEBIT_CARD payment method":{$ref:"#/components/examples/DebitCardPaymentMethod"}}}}},400:{description:"An error has occurred due to request body values provided",content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/ValidationError"},{$ref:"#/components/schemas/LinkedAccountNotFoundError"},{$ref:"#/components/schemas/CustomerIdNotFoundError"},{$ref:"#/components/schemas/DuplicateError"}]},examples:{"Example of error due to request validation":{$ref:"#/components/examples/APIValidationError"},"Example of error due to linked account id value":{$ref:"#/components/examples/LinkedAccountNotFoundError"},"Example of error due to customer id not found":{$ref:"#/components/examples/CustomerNotFoundError"},"Example of error due to duplicate active payment method properties":{$ref:"#/components/examples/DuplicateError"}}}}},401:{$ref:"#/components/responses/Unauthorized"},500:{$ref:"#/components/responses/InternalServerError"}}},get:{tags:["Payment Methods"],summary:"List all payment methods",operationId:"listPaymentMethods",description:"Returns an array of payment method objects that match the provided query parameters",parameters:[{in:"query",name:"customer_id",required:!0,description:"Xendit-generated ID for the customer",schema:{type:"string",format:"uuid",example:"7205eb90-ce35-436d-8fa1-3695ecc5889a"}},{in:"query",name:"type",required:!1,description:"Payment method type",schema:{type:"string",enum:["BANK_ACCOUNT","DEBIT_CARD"],example:"BANK_ACCOUNT"}},{in:"query",name:"status",required:!1,description:"Payment source status",schema:{type:"string",enum:["ACTIVE","INACTIVE"],example:"ACTIVE"}}],responses:{200:{description:"Payment method successfully activated",content:{"application/json":{schema:{type:"array",items:{$ref:"#/components/schemas/PaymentMethod"}},examples:{"Matching record found":{$ref:"#/components/examples/BankAccountPaymentMethodArray"},"No matching record found":{value:[]}}}}},400:{$ref:"#/components/responses/ValidationError"},401:{$ref:"#/components/responses/Unauthorized"},500:{$ref:"#/components/responses/InternalServerError"}}}},"/payment_methods/{id}":{get:{tags:["Payment Methods"],summary:"Get payment method",operationId:"getPaymentMethod",description:"Returns the payment method object that matches the provided `id`",parameters:[{in:"path",name:"id",required:!0,description:"Payment method ID",schema:{type:"string",example:"pm-6d1c8be4-f4d9-421c-9f0b-ab3b2b6bbc39"}}],responses:{200:{description:"Payment method successfully retrieved",content:{"application/json":{schema:{$ref:"#/components/schemas/PaymentMethod"}}}},401:{$ref:"#/components/responses/Unauthorized"},404:{$ref:"#/components/responses/NotFound"},500:{$ref:"#/components/responses/InternalServerError"}}},patch:{tags:["Payment Methods"],summary:"Update payment method status or metadata",operationId:"updatePaymentMethod",description:"Updates the payment method object with the given set of attributes",parameters:[{in:"path",name:"id",required:!0,description:"Payment source ID",schema:{type:"string",example:"pm-6d1c8be4-f4d9-421c-9f0b-ab3b2b6bbc39"}}],requestBody:{$ref:"#/components/requestBodies/UpdatePaymentMethod"},responses:{200:{description:"Payment method successfully updated",content:{"application/json":{schema:{$ref:"#/components/schemas/PaymentMethod"}}}},400:{$ref:"#/components/responses/ValidationError"},401:{$ref:"#/components/responses/Unauthorized"},404:{$ref:"#/components/responses/NotFound"},500:{$ref:"#/components/responses/InternalServerError"}}}},"/direct_debits":{post:{tags:["Direct Debits"],summary:"Debit from customer's payment method",operationId:"performDirectDebit",description:"Create a debit to pull funds from the end customer's account using an active payment method",parameters:[{in:"header",name:"Idempotency-key",description:"Provided by the merchant to prevent duplicate requests. May be equal to any GUID.",schema:{type:"string"},required:!0}],callbacks:{"direct_debit.payment":{"{your-provided-callback-url}":{post:{summary:"Notification for direct debit payment final status",description:"This callback is triggered when a direct debit payment has been successfully `COMPLETED` or has ultimately `FAILED`. Final status is reflected on the `status` parameter.
NOTE: For transactions that require OTP, the callback will be triggered after calling the `/direct_debits/:id/validate_otp` endpoint.",requestBody:{$ref:"#/components/requestBodies/DirectDebitPaymentCallback"},responses:{200:{description:"Expected response if your server successfully received the callback"}}}}}},requestBody:{$ref:"#/components/requestBodies/CreateDirectDebit"},responses:{200:{description:"Direct debit successfully initiated",content:{"application/json":{schema:{allOf:[{type:"object",required:["id"],properties:{id:{type:"string",example:"ddpy-d290f1ee-6c54-4b01-90e6-d701748f0851"}}},{$ref:"#/components/schemas/DirectDebit"}]}}}},400:{description:"An error has occurred due to request body values provided",content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/ValidationError"},{$ref:"#/components/schemas/PaymentMethodNotFoundError"},{$ref:"#/components/schemas/InvalidPaymentMethodError"},{$ref:"#/components/schemas/InsufficientBalanceError"},{$ref:"#/components/schemas/AccountAccessBlockedError"},{$ref:"#/components/schemas/MaxAmountLimitError"}]},examples:{"Example of error due to request validation":{$ref:"#/components/examples/APIValidationError"},"Example of error due to inaccessible payment method":{$ref:"#/components/examples/PaymentMethodNotFoundError"},"Example of error due to inactive or expired payment method":{$ref:"#/components/examples/InvalidPaymentMethodError"},"Example of error due to source having insufficient balance":{$ref:"#/components/examples/InsufficientBalanceError"},"Example of error due to account access blocked":{$ref:"#/components/examples/AccountAccessBlockedError"},"Example of error due to transaction exceeds the channel's limit":{$ref:"#/components/examples/MaxAmountLimitError"}}}}},401:{$ref:"#/components/responses/Unauthorized"},409:{description:"Conflict - these errors occur due to duplicate idempotency key",content:{"application/json":{schema:{type:"object",properties:{error_code:{type:"string",example:"DUPLICATE_ERROR"},message:{type:"string",example:"The Idempotency-key provided has been used before. Please enter a unique Idempotency-key and try again."}}}}}},500:{$ref:"#/components/responses/InternalServerError"},503:{$ref:"#/components/responses/ChannelUnavailable"}}},get:{tags:["Direct Debits"],summary:"Get direct debit transaction in by reference ID",operationId:"getDirectDebitByRefId",description:"Returns an array of with a direct debit object that matches the provided direct debit id",parameters:[{in:"query",name:"reference_id",description:"Merchant-provided reference ID",required:!0,schema:{type:"string",example:"ddpy-7205eb90-ce35-436d-8fa1-3695ecc5889a"}}],responses:{200:{description:"Direct debit payment transaction received",content:{"application/json":{schema:{type:"array",items:{allOf:[{type:"object",required:["id"],properties:{id:{type:"string",example:"ddpy-7205eb90-ce35-436d-8fa1-3695ecc5889a"}}},{$ref:"#/components/schemas/DirectDebit"}]}},examples:{"Matching record found":{$ref:"#/components/examples/DirectDebitArray"},"No matching record found":{value:[]}}}}},400:{$ref:"#/components/responses/ValidationError"},401:{$ref:"#/components/responses/Unauthorized"},404:{$ref:"#/components/responses/NotFound"},500:{$ref:"#/components/responses/InternalServerError"}}}},"/direct_debits/{id}":{get:{tags:["Direct Debits"],summary:"Get direct debit transaction by Direct Debit ID",operationId:"getDirectDebit",description:"Returns a direct debit object that matches the provided direct debit id",parameters:[{in:"path",name:"id",required:!0,description:"Direct debit ID",schema:{type:"string",example:"ddpy-d290f1ee-6c54-4b01-90e6-d701748f0851"}}],responses:{200:{description:"Direct debit successfully retrieved",content:{"application/json":{schema:{allOf:[{type:"object",required:["id"],properties:{id:{type:"string",example:"ddpy-d290f1ee-6c54-4b01-90e6-d701748f0851"}}},{$ref:"#/components/schemas/DirectDebit"}]}}}},401:{$ref:"#/components/responses/Unauthorized"},404:{$ref:"#/components/responses/NotFound"},500:{$ref:"#/components/responses/InternalServerError"}}}},"/direct_debits/{id}/resend_otp":{post:{tags:["Direct Debits"],summary:"Sends a new OTP to end-customer",operationId:"resendDirectDebitOtp",description:"Triggers the bank to send a OTP to the registered mobile number of the end-customer.",parameters:[{in:"path",name:"id",required:!0,description:"Direct debit ID",schema:{type:"string",example:"ddpy-d290f1ee-6c54-4b01-90e6-d701748f0851"}}],responses:{200:{description:"Direct debit successfully resent",content:{"application/json":{schema:{allOf:[{type:"object",required:["id"],properties:{id:{type:"string",example:"ddpy-d290f1ee-6c54-4b01-90e6-d701748f0851"}}},{$ref:"#/components/schemas/DirectDebit"}]}}}},401:{$ref:"#/components/responses/Unauthorized"},404:{$ref:"#/components/responses/NotFound"},500:{$ref:"#/components/responses/InternalServerError"},503:{$ref:"#/components/responses/ChannelUnavailable"}}}},"/direct_debits/{id}/validate_otp":{post:{tags:["Direct Debits"],summary:"Validates the OTP with the partner channel",operationId:"validateDirectDebitOtp",description:"Sends the OTP provided to the partner channel for validation. The transaction is completed upon successful validation. For Philippine banks, a successful response means successful direct debit.",parameters:[{in:"path",name:"id",required:!0,description:"Direct debit ID",schema:{type:"string",example:"ddpy-d290f1ee-6c54-4b01-90e6-d701748f0851"}}],requestBody:{$ref:"#/components/requestBodies/ValidateOTP"},callbacks:{"direct_debit.payment":{"{your-provided-callback-url}":{post:{summary:"Notification for direct debit payment final status",description:"This callback is triggered when a direct debit payment has been successfully `COMPLETED` or has ultimately `FAILED`. Final status is reflected on the `status` parameter.
NOTE: For transactions that require OTP, the callback will be triggered after calling the `/direct_debits/:id/validate_otp` endpoint.",requestBody:{$ref:"#/components/requestBodies/DirectDebitPaymentCallback"},responses:{200:{description:"Expected response if your server successfully received the callback"}}}}}},responses:{200:{description:"OTP successfully validated",content:{"application/json":{schema:{allOf:[{type:"object",required:["id"],properties:{id:{type:"string",example:"ddpy-d290f1ee-6c54-4b01-90e6-d701748f0851"}}},{$ref:"#/components/schemas/DirectDebit"}]}}}},400:{description:"An error has occurred due to request body values provided",content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/ValidationError"},{$ref:"#/components/schemas/InvalidOTPError"},{$ref:"#/components/schemas/ExpiredOTPError"},{$ref:"#/components/schemas/MaxOTPAttemptsError"},{$ref:"#/components/schemas/InsufficientBalanceError"},{$ref:"#/components/schemas/AccountAccessBlockedError"},{$ref:"#/components/schemas/MaxAmountLimitError"}]},examples:{"Example of error due to request validation":{$ref:"#/components/examples/APIValidationError"},"Example of error due to incorrect OTP provided":{$ref:"#/components/examples/InvalidOTPError"},"Example of error due to expired OTP provided":{$ref:"#/components/examples/ExpiredOTPError"},"Example of error due to reaching maximum OTP attempts":{$ref:"#/components/examples/MaxOTPAttemptsError"},"Example of error due to source having insufficient balance":{$ref:"#/components/examples/InsufficientBalanceError"},"Example of error due to account access blocked":{$ref:"#/components/examples/AccountAccessBlockedError"},"Example of error due to transaction exceeds the channel's limit":{$ref:"#/components/examples/MaxAmountLimitError"}}}}},401:{$ref:"#/components/responses/Unauthorized"},404:{$ref:"#/components/responses/NotFound"},409:{description:"Cannot validate OTP because the direct debit transaction has already been processed",content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/DirectDebitAlreadyCompletedError"},{$ref:"#/components/schemas/DirectDebitAlreadyFailedError"}]},examples:{"Example of error because the transaction has successfully completed":{$ref:"#/components/examples/DirectDebitAlreadyCompletedError"},"Example of error because the transaction has already failed":{$ref:"#/components/examples/DirectDebitAlreadyFailedError"}}}}},500:{$ref:"#/components/responses/InternalServerError"},503:{$ref:"#/components/responses/ChannelUnavailable"}}}},"/ewallets/charges":{post:{tags:["eWallets BETA"],description:"Create a Charge Request",parameters:[{name:"callback-url",in:"header",description:"It is strongly recommended that callback URL is set in Xendit dashboard - callback settings.
This parameter should only be used for testing or when there is a need for dynamic callback URLs. If provided, the value will override the callback URL set in Xendit dashboard.",required:!1,style:"simple",explode:!1,schema:{type:"string",example:"https://webhook.site/f4b755f5-testingsite"}}],requestBody:{content:{"application/json":{schema:{$ref:"#/components/schemas/ChargeRequest"},example:{reference_id:"test-reference-id",currency:"IDR",amount:1e3,checkout_method:"ONE_TIME_PAYMENT",channel_code:"ID_SHOPEEPAY",channel_properties:{success_redirect_url:"https://redirect.me/payment"},metadata:{branch_code:"senayan_372"}}}},required:!0},responses:{201:{description:"Charge Object with status 'PENDING'",content:{"application/json":{schema:{$ref:"#/components/schemas/ChargeObject"},example:{id:"ewc_b496c89b-6e99-4080-b99e-98b4fe88678d",business_id:"5f218745736e619164dc8608",reference_id:"test-reference-id",status:"PENDING",currency:"IDR",charge_amount:1e3,capture_amount:1e3,checkout_method:"ONE_TIME_PAYMENT",channel_code:"ID_SHOPEEPAY",channel_properties:{success_redirect_url:"https://redirect.me/payment"},actions:{desktop_web_checkout_url:null,mobile_web_checkout_url:null,mobile_deeplink_checkout_url:"https://deeplinkcheckout.this/"},is_redirect_required:!0,callback_url:"https://webhook.site/f4b755f5-testingsite",created:"2017-07-21T17:32:28Z",updated:"2017-07-21T17:32:28Z",voided_at:null,capture_now:!0,customer_id:null,payment_method_id:null,failure_code:null,basket:null,metadata:{branch_code:"senayan_372"}}}}},400:{description:"Bad Request",content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/ApiValidationError"},{$ref:"#/components/schemas/UnsupportedCurrency"}]},examples:{UNSUPPORTED_CURRENCY:{summary:"UNSUPPORTED_CURRENCY",value:{error_code:"UNSUPPORTED_CURRENCY",message:"The payment currency request is not supported for this payment channel. Please refer to our API reference or docs to pick available currencies."}},API_VALIDATION_ERROR:{summary:"API_VALIDATION_ERROR",value:{error_code:"API_VALIDATION_ERROR",message:"There is an error with the format submitted to the server."}}}}}},401:{description:"Unauthorized",content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/InvalidApiKey"},{$ref:"#/components/schemas/InvalidMerchantCredentials"}]},examples:{INVALID_API_KEY:{summary:"INVALID_API_KEY",value:{error_code:"INVALID_API_KEY",message:"API key format is invalid"}},INVALID_MERCHANT_CREDENTIALS:{summary:"INVALID_MERCHANT_CREDENTIALS",value:{error_code:"INVALID_MERCHANT_CREDENTIALS",message:"Merchant credentials met with an error with the eWallet provider. Please contact Xendit customer support to resolve this issue."}}}}}},403:{description:"Forbidden",content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/RequestForbiddenError"},{$ref:"#/components/schemas/ChannelNotActivated"}]},examples:{REQUEST_FORBIDDEN_ERROR:{summary:"REQUEST_FORBIDDEN_ERROR",value:{error_code:"REQUEST_FORBIDDEN_ERROR",message:"The API key is forbidden to perform this request"}},ChannelNotActivated:{summary:"CHANNEL_NOT_ACTIVATED",value:{error_code:"CHANNEL_NOT_ACTIVATED",message:"Payment request failed because this specific payment channel has not been activated through Xendit. Please activate via Xendit dashboard or our customer service."}}}}}},404:{description:"Callback URL Not Found",content:{"application/json":{schema:{$ref:"#/components/schemas/CallbackUrlNotFound"},examples:{CALLBACK_URL_NOT_FOUND:{summary:"CALLBACK_URL_NOT_FOUND",value:{error_code:"CALLBACK_URL_NOT_FOUND",message:"Payment request failed because there was no input of callback url in Xendit Dashboard or request headers. Please save your callback url in Xendit Dashboard."}}}}}},415:{description:"Unsupported Media Type",content:{"application/json":{schema:{$ref:"#/components/schemas/UnsupportedContentType"},examples:{UNSUPPORTED_CONTENT_TYPE:{summary:"UNSUPPORTED_CONTENT_TYPE",value:{error_code:"UNSUPPORTED_CONTENT_TYPE",message:"The content type requested is not supported"}}}}}},500:{description:"Internal Service Error",content:{"application/json":{schema:{$ref:"#/components/schemas/ServerError"},examples:{SERVER_ERROR:{summary:"SERVER_ERROR",value:{error_code:"SERVER_ERROR",message:"An unexpected error occured, our team has been notified and will troubleshoot the issue."}}}}}},503:{description:"Service Unavailable",content:{"application/json":{schema:{$ref:"#/components/schemas/ChannelUnavailableEwallet"},examples:{CHANNEL_UNAVAILABLE:{summary:"CHANNEL_UNAVAILABLE",value:{error_code:"CHANNEL_UNAVAILABLE",message:"The payment channel requested is currently experiencing unexpected issues. The eWallet provider will be notified to resolve this issue."}}}}}}}}},"/v2/ewallets/charges/{charge_id}":{get:{tags:["eWallets BETA"],description:"Get a Charge Object",parameters:[{name:"charge_id",in:"path",description:"Unique identifier for charge request transaction (returned as id in the Charge request)",required:!0,style:"simple",explode:!1,schema:{type:"string",example:"ewc_b496c89b-6e99-4080-b99e-98b4fe88678d"}}],responses:{200:{description:"Charge Object",content:{"application/json":{schema:{$ref:"#/components/schemas/ChargeObject"},example:{id:"ewc_b496c89b-6e99-4080-b99e-98b4fe88678d",business_id:"5f218745736e619164dc8608",reference_id:"test-reference-id",status:"PENDING",currency:"IDR",charge_amount:1e3,capture_amount:1e3,checkout_method:"ONE_TIME_PAYMENT",channel_code:"ID_SHOPEEPAY",channel_properties:{success_redirect_url:"https://webhook.site/f4b755f5-testingsite"},actions:null,is_redirect_required:!1,callback_url:"https://webhook.site/f4b755f5-testingsite",created:"2017-07-21T17:32:28Z",updated:"2017-07-21T17:32:28Z",voided_at:null,capture_now:!0,customer_id:null,payment_method_id:null,failure_code:null,basket:null,metadata:{branch_code:"senayan_372"}}}}},401:{description:"Unauthorized",content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/InvalidApiKey"},{$ref:"#/components/schemas/InvalidMerchantCredentials"}]},examples:{INVALID_API_KEY:{summary:"INVALID_API_KEY",value:{error_code:"INVALID_API_KEY",message:"API key format is invalid"}},INVALID_MERCHANT_CREDENTIALS:{summary:"INVALID_MERCHANT_CREDENTIALS",value:{error_code:"INVALID_MERCHANT_CREDENTIALS",message:"Merchant credentials met with an error with the eWallet provider. Please contact Xendit customer support to resolve this issue."}}}}}},404:{description:"Data not found",content:{"application/json":{schema:{$ref:"#/components/schemas/DataNotFound"},examples:{DATA_NOT_FOUND:{summary:"DATA_NOT_FOUND",value:{error_code:"DATA_NOT_FOUND",message:"Charge ewc_b496c89b-6e99-4080-b99e-98b4fe88678d not found. Please check your query again."}}}}}},500:{description:"Internal Service Error",content:{"application/json":{schema:{$ref:"#/components/schemas/ServerError"},examples:{SERVER_ERROR:{summary:"SERVER_ERROR",value:{error_code:"SERVER_ERROR",message:"An unexpected error occured, our team has been notified and will troubleshoot the issue."}}}}}}}}},"/merchant-specified-webhook-url-success":{post:{tags:["eWallets Callback Notifications"],description:"Success Callback Notifications",parameters:[{name:"x-callback-token",in:"header",description:"string Your Xendit unique callback token to verify the origin of the callback",required:!1,style:"simple",explode:!1,schema:{type:"string",example:"11a7771ee7777df11777d11ad11b11d777de11ee"}}],requestBody:{content:{"application/json":{schema:{$ref:"#/components/schemas/CallbackSchema"},example:{event:"ewallet.capture",business_id:"5abe2389ewpejrt238",created:"2020-04-20T16:25:52Z",data:{id:"ewc_b496c89b-6e99-4080-b99e-98b4fe88678d",business_id:"5f218745736e619164dc8608",reference_id:"test-reference-id",status:"SUCCEEDED",currency:"IDR",charge_amount:1e3,capture_amount:1e3,checkout_method:"ONE_TIME_PAYMENT",channel_code:"ID_SHOPEEPAY",channel_properties:{success_redirect_url:"https://redirect.me/payment"},actions:{desktop_web_checkout_url:null,mobile_web_checkout_url:null,mobile_deeplink_checkout_url:"https://deeplinkcheckout.this/"},is_redirect_required:!0,callback_url:"https://webhook.site/f4b755f5-testingsite",created:"2017-07-21T17:32:28Z",updated:"2017-07-21T17:32:28Z",voided_at:null,capture_now:!0,customer_id:null,payment_method_id:null,failure_code:null,basket:null,metadata:{branch_code:"senayan_372"}}}}},required:!0},responses:{200:{description:"Merchant system receives callback successfully",content:{"application/json":{schema:{type:"object",properties:{message:{type:"string",example:"OK"}}}}}}}}},"/merchant-specified-webhook-url-failed":{post:{tags:["eWallets Callback Notifications"],description:"Failure Callback Notifications",parameters:[{name:"x-callback-token",in:"header",description:"string Your Xendit unique callback token to verify the origin of the callback",required:!1,style:"simple",explode:!1,schema:{type:"string",example:"11a7771ee7777df11777d11ad11b11d777de11ee"}}],requestBody:{content:{"application/json":{schema:{$ref:"#/components/schemas/CallbackSchema"},example:{event:"ewallet.capture",business_id:"5abe2389ewpejrt238",created:"2020-04-20T16:25:52Z",data:{id:"ewc_b496c89b-6e99-4080-b99e-98b4fe88678d",business_id:"5f218745736e619164dc8608",reference_id:"test-reference-id",status:"FAILED",currency:"IDR",charge_amount:1e3,capture_amount:1e3,checkout_method:"ONE_TIME_PAYMENT",channel_code:"ID_SHOPEEPAY",channel_properties:{success_redirect_url:"https://redirect.me/payment"},actions:{desktop_web_checkout_url:null,mobile_web_checkout_url:null,mobile_deeplink_checkout_url:"https://deeplinkcheckout.this/"},is_redirect_required:!0,callback_url:"https://webhook.site/f4b755f5-testingsite",created:"2017-07-21T17:32:28Z",updated:"2017-07-21T17:32:28Z",voided_at:null,capture_now:!0,customer_id:null,payment_method_id:null,failure_code:"ACCOUNT_ACCESS_BLOCKED",basket:null,metadata:{branch_code:"senayan_372"}}}}},required:!0},responses:{200:{description:"Possible values and reasons of failure_code from the eWallet issuer or the end user",content:{"application/json":{schema:{$ref:"#/components/schemas/FailureReasons"}}}}}}},"/paylater/plans":{post:{summary:"Initiate PayLater Plans",operationId:"post-plans",responses:{201:{description:"OK",content:{"application/json":{schema:{$ref:"#/components/schemas/PayLaterPlanObject"},examples:{Example:{value:{id:"plp_3d88d952-9505-4ed7-84d3-e8639e99e9c4",customer_id:"49d056bd-21e5-4997-85f2-2127544c2196",channel_code:"PH_BILLEASE",currency:"PHP",amount:2184.56,order_items:[{type:"PRODUCT",reference_id:"SKU_123-456-789",name:"Dyson Vacuum",net_unit_amount:1234.56,quantity:1,url:"www.zngmyhome.com/dyson_vacuum",category:"Electronics",subcategory:"Appliances",description:null,metadata:null},{type:"SERVICE",reference_id:"SKU_123-456-790",name:"Home Cleaning Service",net_unit_amount:1e3,quantity:1,url:"www.zngmyhome.com/home_cleaning",category:"Services",subcategory:null,description:"1 hour deep cleaning up to 2 rooms",metadata:null},{type:"FEE",reference_id:"Shipping",name:"Standard Rate",net_unit_amount:50,quantity:1},{type:"DISCOUNT",reference_id:"100OFF",name:"100 Payday Voucher",net_unit_amount:-100,quantity:1}],options:[{downpayment_amount:400,installment_amount:600,interest_rate:0,total_amount:1e3,interval:"MONTH",interval_count:1,total_recurrence:1,description:"1 month installment plan"},{downpayment_amount:400,installment_amount:100,interest_rate:.025,total_amount:1015,interval:"MONTH",interval_count:1,total_recurrence:6,description:"6 month installment plan"}],created:"2020-11-11T16:23:52Z"}}}}}},400:{description:"Bad Request",content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/400APIValidationError"},{$ref:"#/components/schemas/400InvalidCustomerID"},{$ref:"#/components/schemas/400UnsupportedCurrency"}]},examples:{INVALID_CUSTOMER_ID:{value:{error_code:"INVALID_CUSTOMER_ID",message:"Missing or invalid parameter(s) in customer_id: given_name, postcode"}},UNSUPPORTED_CURRENCY:{value:{error_code:"UNSUPPORTED_CURRENCY",message:"The payment currency request is not supported by PayLater partner. Please refer to our API reference or docs for available currencies."}},"Missing Parameter":{value:{message:"request.body should have required property 'customer_id'",error_code:"API_VALIDATION_ERROR",errors:[{path:".body.customer_id",message:"should have required property 'customer_id'",errorCode:"required.openapi.validation"}]}},"Invalid Data Type":{value:{message:"request.body.amount should be number",error_code:"API_VALIDATION_ERROR",errors:[{path:".body.amount",message:"should be number",errorCode:"type.openapi.validation"}]}},"Extra Decimal Places":{value:{error_code:"API_VALIDATION_ERROR",message:"request.body.amount should have 2 decimal places or less"}},"Invalid Enum":{value:{message:"request.body.channel_code should be equal to one of the allowed values: PH_BILLEASE",error_code:"API_VALIDATION_ERROR",errors:[{path:".body.channel_code",message:"should be equal to one of the allowed values: PH_BILLEASE",errorCode:"enum.openapi.validation"}]}},"Amount Does Not Tally with Order Items":{value:{error_code:"API_VALIDATION_ERROR",message:"request.body.amount must be equal to the sum of net_unit_amount * quantity in request.body.order_items"}},"Invalid URL":{value:{message:"request.body.order_items have some invalid items",error_code:"API_VALIDATION_ERROR",errors:[{path:".body.order_items[0].url",message:"url must be a valid URL",errorCode:"API_VALIDATION_ERROR"}]}},"Non-negative Discount":{value:{message:"request.body.order_items have some invalid items",error_code:"API_VALIDATION_ERROR",errors:[{path:".body.order_items[1].net_unit_amount",message:"net_unit_amount of DISCOUNT type must be a negative number",errorCode:"API_VALIDATION_ERROR"}]}}}}}},401:{description:"Unauthorized",content:{"application/json":{schema:{$ref:"#/components/schemas/401InvalidAPIKey"},examples:{INVALID_API_KEY:{value:{error_code:"INVALID_API_KEY",message:"API key is not authorized for this API service"}}}}}},403:{description:"Forbidden",content:{"application/json":{schema:{oneOf:[{$ref:"#/components/schemas/403RequestForbiddenError"},{$ref:"#/components/schemas/403ChannelNotActivated"}]},examples:{REQUEST_FORBIDDEN_ERROR:{value:{error_code:"REQUEST_FORBIDDEN_ERROR",message:"The API key is forbidden to perform this request"}},CHANNEL_NOT_ACTIVATED:{value:{error_code:"CHANNEL_NOT_ACTIVATED",message:"Payment channel has not been activated through Xendit. Please activate via Xendit dashboard or contact our customer service."}}}}}},404:{description:"Not Found",content:{"application/json":{schema:{$ref:"#/components/schemas/404DataNotFound"},examples:{DATA_NOT_FOUND:{value:{error_code:"DATA_NOT_FOUND",message:"Customer ID is invalid. Please check the ID again or create an ID using Customer API."}}}}}},500:{description:"Server Error",content:{"application/json":{schema:{$ref:"#/components/schemas/500ServerError"},examples:{SERVER_ERROR:{value:{error_code:"SERVER_ERROR",message:"An unexpected error occured. Our team has been notified and will troubleshoot the issue."}}}}}},503:{description:"Channel Unavailable",content:{"application/json":{schema:{$ref:"#/components/schemas/503ChannelUnavailable"},examples:{CHANNEL_UNAVAILABLE:{value:{error_code:"CHANNEL_UNAVAILABLE",message:"The payment channel requested is currently experiencing unexpected issues. The PayLater partner will be notified to resolve this issue."}}}}}}},description:"Provide your end-customer information on the available PayLater/installment plans.",requestBody:{content:{"application/json":{schema:{description:"",type:"object",properties:{customer_id:{type:"string",description:"Unique identifier for customer from the Create Customer API `/customers`\n\nRequired parameters to be set for the customer object:\n`reference_id`, `given_names`, `surname`, `email`, `mobile_number`, `addresses` [{`country`, `postal_code`, `city`, `street_line1`}]\n",format:"uuid",example:"49d056bd-21e5-4997-85f2-2127544c2196"},channel_code:{type:"string",description:"Channel code for PayLater provider",enum:["PH_BILLEASE"]},currency:{type:"string",description:"ISO 4217 currency code of PayLater transaction",enum:["PHP"],format:"ISO 4217"},amount:{type:"number",minimum:50,description:"Aggregated transaction amount equivalent to the sum of `net_unit_amount` multiplied by `quantity` in the `order_items` array",example:2184.56},order_items:{type:"array",description:"Array of objects describing the item/s purchased using PayLater",items:{$ref:"#/components/schemas/OrderItems"}}},required:["customer_id","channel_code","currency","amount","order_items"]},examples:{"Product only":{value:{customer_id:"49d056bd-21e5-4997-85f2-2127544c2196",channel_code:"PH_BILLEASE",currency:"PHP",amount:3073.68,order_items:[{type:"PRODUCT",reference_id:"SKU_123-456-789",name:"Dyson Vacuum",net_unit_amount:1234.56,quantity:3,url:"www.zngmyhome.com/dyson_vacuum",category:"Electronics",subcategory:"Appliances"}]}},"Service only":{value:{customer_id:"49d056bd-21e5-4997-85f2-2127544c2196",channel_code:"PH_BILLEASE",currency:"PHP",amount:1e3,order_items:[{type:"SERVICE",reference_id:"SKU_123-456-790",name:"Home Cleaning Service",net_unit_amount:1e3,quantity:1,url:"www.zngmyhome.com/home_cleaning",category:"Services",description:"1 hour deep cleaning up to 2 rooms"}]}},"Product + Fee":{value:{customer_id:"49d056bd-21e5-4997-85f2-2127544c2196",channel_code:"PH_BILLEASE",currency:"PHP",amount:1284.56,order_items:[{type:"PRODUCT",reference_id:"SKU_123-456-789",name:"Dyson Vacuum",net_unit_amount:1234.56,quantity:1,url:"www.zngmyhome.com/dyson_vacuum",category:"Electronics",subcategory:"Appliances"},{type:"FEE",reference_id:"Shipping",name:"Standard Rate",net_unit_amount:50,quantity:1}]}},"Product + Fee + Discount":{value:{customer_id:"49d056bd-21e5-4997-85f2-2127544c2196",channel_code:"PH_BILLEASE",currency:"PHP",amount:1184.56,order_items:[{type:"PRODUCT",reference_id:"SKU_123-456-789",name:"Dyson Vacuum",net_unit_amount:1234.56,quantity:1,url:"www.zngmyhome.com/dyson_vacuum",category:"Electronics",subcategory:"Appliances"},{type:"FEE",reference_id:"Shipping",name:"Standard Rate",net_unit_amount:50,quantity:1},{type:"DISCOUNT",reference_id:"100OFF",name:"100 Payday Voucher",net_unit_amount:-100,quantity:1}]}}}}}},tags:["PayLater"]},parameters:[]},"/paylater/charges":{post:{summary:"Create Charges",operationId:"post-paylater-charges",callbacks:{"paylater.payment":{"{callback-url}":{post:{summary:"Payment notification",description:"This callback is triggered when a PayLater payment has `SUCCEEDED` or `FAILED`.",parameters:[{name:"x-callback-token",in:"header",description:"Your Xendit unique callback token to verify the origin of the callback",required:!1,style:"simple",explode:!1,schema:{type:"string",example:"2222-3333-4444-555-6666"}}],requestBody:{$ref:"#/components/requestBodies/PayLaterCallback"},responses:{200:{description:"Expected response if your server successfully received the callback"}}}}}},responses:{202:{description:"Accepted",content:{"application/json":{schema:{$ref:"#/components/schemas/PayLaterChargeObject"},examples:{"One-Time Payment":{value:{id:"plc_8cb12305-9bcf-4441-a087-ee0d446e297b",customer_id:"49d056bd-21e5-4997-85f2-2127544c2196",plan_id:"plp_3d88d952-9505-4ed7-84d3-e8639e99e9c4",business_id:"5f27a14a9bf05c73dd040bc8",reference_id:"order_id_123",channel_code:"PH_BILLEASE",checkout_method:"ONE_TIME_PAYMENT",currency:"PHP",amount:1234.56,order_items:[{type:"PRODUCT",reference_id:"SKU_123-456-789",name:"Dyson Vacuum",net_unit_amount:1234.56,quantity:1,url:"https://www.zngmyhome.com/dyson_vacuum",category:"Electronics",subcategory:"Appliances",description:"A very powerful vacuum",metadata:null}],success_redirect_url:"https://www.xendit.co",status:"PENDING",created:"2020-11-11T16:23:52Z",updated:"2020-11-11T16:23:52Z",actions:{desktop_web_checkout_url:"https://webcheckout.this/",mobile_web_checkout_url:"https://webcheckout.this/",mobile_deeplink_checkout_url:"app://deeplinkcheckout.this/"},callback_url:"https://webhook.me/gethooked",payment_method_id:null,voided_at:null,metadata:null}}}}}},400:{description:"Bad Request",content:{"application/json":{schema:{$ref:"#/components/schemas/400APIValidationError"},examples:{"Missing Parameter":{value:{message:"request.body should have required property 'success_redirect_url'",error_code:"API_VALIDATION_ERROR",errors:[{path:".body.success_redirect_url",message:"should have required property 'success_redirect_url'",errorCode:"required.openapi.validation"}]}},"Invalid URL":{value:{message:'request.body.success_redirect_url should match pattern "(^https?://(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*))|(^$)"',error_code:"API_VALIDATION_ERROR",errors:[{path:".body.success_redirect_url",message:'should match pattern "(^https?://(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*))|(^$)"',errorCode:"pattern.openapi.validation"}]}},"Unsupported Checkout Type":{value:{error_code:"API_VALIDATION_ERROR",message:"PayLater partner does not support requested checkout_method."}}}}}},401:{description:"Unauthorized",content:{"application/json":{schema:{$ref:"#/components/schemas/401InvalidAPIKey"},examples:{INVALID_API_KEY:{value:{error_code:"INVALID_API_KEY",message:"API key is not authorized for this API service"}}}}}},403:{description:"Forbidden",content:{"application/json":{schema:{$ref:"#/components/schemas/403RequestForbiddenError"},examples:{REQUEST_FORBIDDEN_ERROR:{value:{error_code:"REQUEST_FORBIDDEN_ERROR",message:"The API key is forbidden to perform this request"}}}}}},404:{description:"Not Found",content:{"application/json":{schema:{$ref:"#/components/schemas/404PayLaterPlanDataNotFound"},examples:{PAYLATER_PLAN_DATA_NOT_FOUND:{value:{error_code:"PAYLATER_PLAN_DATA_NOT_FOUND",message:"PayLater Plan ID is invalid. Please check the ID again or create an ID using PayLater Plans API."}}}}}},500:{description:"Server Error",content:{"application/json":{schema:{$ref:"#/components/schemas/500ServerError"},examples:{SERVER_ERROR:{value:{error_code:"SERVER_ERROR",message:"An unexpected error occured. Our team has been notified and will troubleshoot the issue."}}}}}},503:{description:"Channel Unavailable",content:{"application/json":{schema:{$ref:"#/components/schemas/503ChannelUnavailable"},examples:{CHANNEL_UNAVAILABLE:{value:{error_code:"CHANNEL_UNAVAILABLE",message:"The payment channel requested is currently experiencing unexpected issues. The PayLater partner will be notified to resolve this issue."}}}}}}},description:"Create PayLater transaction / generate checkout URL",parameters:[{schema:{type:"string",example:"https://webhook.site/f4b755f5-testingsite",format:"url"},in:"header",name:"callback-url",description:"Callback URL where charge status will be notified.
It is strongly recommended that callback URL is set in Xendit dashboard - callback settings.
This parameter should only be used for testing or when there is a need for dynamic callback URLs. If provided, the value will override the callback URL set in Xendit dashboard."}],requestBody:{content:{"application/json":{schema:{description:"",type:"object",properties:{plan_id:{type:"string",description:"Installment Plan ID retrieved from Initiate PayLater Plans API",example:"plp_01e2ba01-c116-4ade-a1f4-f8a720dabc5c"},reference_id:{type:"string",description:"Reference ID provided by merchant for the transaction",example:"Order #123"},checkout_method:{type:"string",description:"Supported checkout method: ONE_TIME_PAYMENT",enum:["ONE_TIME_PAYMENT"],example:"ONE_TIME_PAYMENT"},success_redirect_url:{type:"string",description:"URL where the customer is redirected after completing transaction",example:"https://www.xendit.co"},payment_method_id:{type:"string",description:"Payment method ID of end-customer source of funds\n\nRequired when checkout_method = TOKENIZED_PAYMENT (currently not supported)",nullable:!0},metadata:{type:"object",description:"Object of additional information the user may use. Users define the JSON properties and values.\n\nYou can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long\n\nThis will only be used by the user and not Xendit.",nullable:!0}},required:["plan_id","reference_id","checkout_method","success_redirect_url"]},examples:{Example:{value:{plan_id:"string",reference_id:"Order #123",checkout_method:"ONE_TIME_PAYMENT",success_redirect_url:"https://www.xendit.co"}}}}},description:"Request Parameters"},tags:["PayLater"]},parameters:[]},"/paylater/charges/{id}":{parameters:[{schema:{type:"string",example:"plc_8cb12305-9bcf-4441-a087-ee0d446e297b"},name:"id",in:"path",required:!0,description:"Unique identifier for charge request transaction (returned as `id` in the PayLater Charge request)"}],get:{summary:"Get Charge by ID",tags:["PayLater"],responses:{200:{description:"OK",content:{"application/json":{schema:{$ref:"#/components/schemas/PayLaterChargeObject"},examples:{Example:{value:{id:"plc_8cb12305-9bcf-4441-a087-ee0d446e297b",customer_id:"49d056bd-21e5-4997-85f2-2127544c2196",plan_id:"plp_3d88d952-9505-4ed7-84d3-e8639e99e9c4",business_id:"5f27a14a9bf05c73dd040bc8",reference_id:"order_id_123",channel_code:"PH_BILLEASE",checkout_method:"ONE_TIME_PAYMENT",currency:"PHP",amount:1234.56,order_items:[{type:"PRODUCT",reference_id:"SKU_123-456-789",name:"Dyson Vacuum",net_unit_amount:1234.56,quantity:1,url:"https://www.zngmyhome.com/dyson_vacuum",category:"Electronics",subcategory:"Appliances",description:"A very powerful vacuum",metadata:null}],success_redirect_url:"https://www.xendit.co",status:"SUCCEEDED",created:"2020-11-11T16:23:52Z",updated:"2020-11-11T16:23:52Z",actions:{desktop_web_checkout_url:"https://webcheckout.this/",mobile_web_checkout_url:"https://webcheckout.this/",mobile_deeplink_checkout_url:"app://deeplinkcheckout.this/"},callback_url:"https://webhook.me/gethooked",payment_method_id:null,voided_at:null,metadata:null}}}}}},400:{description:"Bad Request",content:{"application/json":{schema:{$ref:"#/components/schemas/400APIValidationError"},examples:{"Invalid Charge ID format":{value:{error_code:"API_VALIDATION_ERROR",message:"Charge ID does not match plc_UUID format"}}}}}},401:{description:"Unauthorized",content:{"application/json":{schema:{$ref:"#/components/schemas/401InvalidAPIKey"},examples:{INVALID_API_KEY:{value:{error_code:"INVALID_API_KEY",message:"API key is not authorized for this API service"}}}}}},403:{description:"Forbidden",content:{"application/json":{schema:{$ref:"#/components/schemas/403RequestForbiddenError"},examples:{REQUEST_FORBIDDEN_ERROR:{value:{error_code:"REQUEST_FORBIDDEN_ERROR",message:"The API key is forbidden to perform this request"}}}}}},404:{description:"Not Found",content:{"application/json":{schema:{$ref:"#/components/schemas/404DataNotFound"},examples:{DATA_NOT_FOUND:{value:{error_code:"DATA_NOT_FOUND",message:"Charge resource was not found. Please check your query again."}}}}}},500:{description:"Server Error",content:{"application/json":{schema:{$ref:"#/components/schemas/500ServerError"},examples:{SERVER_ERROR:{value:{error_code:"SERVER_ERROR",message:"An unexpected error occured. Our team has been notified and will troubleshoot the issue."}}}}}}},operationId:"get-paylater-charges-id",description:"Get PayLater Charge object by ID"}}},components:{schemas:{FailureReasons:{type:"object",properties:{ACCOUNT_ACCESS_BLOCKED:{type:"string",description:"End user’s account cannot be accessed as it has been restricted by the eWallet provider. End user should contact the provider for resolution."},INVALID_MERCHANT_CREDENTIALS:{type:"string",description:"Merchant credentials met with an error with the eWallet provider. Please contact Xendit customer support to resolve this issue."},USER_DECLINED_PAYMENT:{type:"string",description:"End user declined the payment request."},INVALID_ACCOUNT_DETAILS:{type:"string",description:"End user provided incorrect information for this transaction."},MAXIMUM_LIMIT_REACHED:{type:"string",description:"Maximum transaction limit for the end user has been reached."},USER_UNREACHABLE:{type:"string",description:"End user’s device cannot be reached at this moment. Common reasons include unstable network, device error or jailbroken device."},CHANNEL_UNAVAILABLE:{type:"string",description:"The payment channel requested is currently experiencing unexpected issues. The eWallet provider will be notified to resolve this issue."},INSUFFICENT_BALANCE:{type:"string",description:"End user has insufficient balance to complete the transaction."},ACCOUNT_NOT_ACTIVATED:{type:"string",description:"End user’s account cannot be accessed as it has not been activated. End user should set up their account and ensure there is sufficient balance before retrying."}},description:"Possible values and reasons of failure_code from the eWallet issuer or the end user"},CallbackSchema:{type:"object",properties:{event:{type:"string",description:"Identifies the event triggering a notification to merchant. ewallet.capture occurs when eWallet issuer confirms the payment status of a transaction",example:"ewallet.payment"},business_id:{$ref:"#/components/schemas/BusinessId"},created:{type:"string",description:"ISO 8601 Timestamp for payment creation. Timezone UTC+0.",format:"date-time",example:"2017-07-21T17:32:28Z"},data:{$ref:"#/components/schemas/ChargeObject"}},description:"Schema of callbacks to merchants"},BusinessId:{type:"string",description:"Business ID of the merchant",example:"5f218745736e619164dc8608"},ChargeStatus:{type:"string",description:"Status of charge",enum:["PENDING","FAILED","SUCCEEDED","VOIDED"]},Currency:{type:"string",format:"ISO 4217",description:"Currency used for the transaction in ISO4217 format",example:"IDR",enum:["IDR","PHP"]},CheckoutMethod:{type:"string",description:"Checkout method determines the payment flow used to process the transaction. ONE_TIME_PAYMENT is used for single guest checkouts",example:"ONE_TIME_PAYMENT",enum:["ONE_TIME_PAYMENT"]},ChannelCode:{type:"string",description:"Channel Code specifies which eWallet will be used to process the transaction",nullable:!0,example:"PH_PAYMAYA",enum:["ID_SHOPEEPAY","PH_PAYMAYA"]},Shopeepay:{required:["success_redirect_url"],type:"object",properties:{success_redirect_url:{pattern:"^https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)$",type:"string",description:"URL where the end-customer is redirected if the authorization is successful",example:"https://webhook.site/f4b755f5-testingsite"}},additionalProperties:!1},Paymaya:{required:["success_redirect_url","failure_redirect_url","cancel_redirect_url"],type:"object",properties:{success_redirect_url:{pattern:"^https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)$",type:"string",description:"URL where the end-customer is redirected if the authorization is successful",example:"https://redirect.site/f4b755f5-testingsite"},failure_redirect_url:{pattern:"^https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)$",type:"string",description:"URL where the end-customer is redirected if the authorization failed",example:"https://redirect.site/f4b755f5-testingsite"},cancel_redirect_url:{pattern:"^https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)$",type:"string",description:"URL where the end-customer is redirected if the authorization is canceled. No webhook will be sent for this scenario.",example:"https://redirect.site/f4b755f5-testingsite"}},additionalProperties:!1},ChannelProperties:{type:"object",description:"Channel specific information required for the transaction to be initiated",nullable:!0,example:{success_redirect_url:"https://redirect.me/payment"},oneOf:[{$ref:"#/components/schemas/Shopeepay"},{$ref:"#/components/schemas/Paymaya"}]},Basket:{type:"array",description:"Array of objects describing the item(s) purchased",nullable:!0,items:{required:["category","name","reference_id","currency","type","price","quantity"],type:"object",properties:{reference_id:{maxLength:255,type:"string",description:"Merchant's identifer for specific product",example:"SKU-123"},name:{type:"string",description:"Name of product",example:"iPhone 12"},category:{type:"string",description:"Merchant category for item - e.g. Electronics"},currency:{$ref:"#/components/schemas/Currency"},price:{type:"number",description:"Price per unit in basket currency",example:1e3},quantity:{type:"number",description:"Number of units of this item in the basket",example:1},type:{type:"string",description:"Type of product - PRODUCT or SERVICE"},url:{type:"string",description:"URL to e-commerce page of the item"},description:{type:"string",description:"Description of product",example:"Latest in smartphone technology"},sub_category:{type:"string",description:"Merchant sub-category for item - e.g. Mobile Phone"},metadata:{type:"object",description:"Additional object that may be used for additional product attributes",example:{promo_code:"senayan_372"}}}}},ChargeObject:{required:["actions","basket","business_id","callback_url","capture_amount","capture_now","channel_code","channel_properties","charge_amount","checkout_method","created","currency","customer_id","failure_code","id","is_redirect_required","metadata","payment_method_id","reference_id","status","updated","voided_at"],type:"object",properties:{id:{type:"string",description:"Unique identifier for charge request transaction. It will always have the prefix of 'ewc_', followed by a UUIDv4.",example:"ewc_b496c89b-6e99-4080-b99e-98b4fe88678d"},business_id:{$ref:"#/components/schemas/BusinessId"},reference_id:{type:"string",description:"Reference ID provided by merchant.",example:"test-reference-id"},status:{$ref:"#/components/schemas/ChargeStatus"},currency:{$ref:"#/components/schemas/Currency"},charge_amount:{type:"number",description:"Requested charge amount from merchant.",example:1e4},capture_amount:{type:"number",description:"Requested capture amount from merchant. In requests where checkout_method = ONE_TIME_PAYMENT, capture_amount will always be the same as charge_amount",nullable:!0,example:1e4},checkout_method:{$ref:"#/components/schemas/CheckoutMethod"},channel_code:{$ref:"#/components/schemas/ChannelCode"},channel_properties:{$ref:"#/components/schemas/ChannelProperties"},actions:{type:"object",properties:{desktop_web_checkout_url:{type:"string",nullable:!0,description:"eWallet issuer generated URL for web checkout on devices with a stand-alone screen"},mobile_web_checkout_url:{type:"string",nullable:!0,description:"eWallet issuer generated URL for web checkout on mobile devices"},mobile_deeplink_checkout_url:{type:"string",nullable:!0,description:"eWallet issuer generated URL for deeplink checkout on mobile devices (jumps directly into eWallet app for payment confirmation)"}},nullable:!0},is_redirect_required:{type:"boolean",description:"Flag which indicates whether redirection is required for end user to complete payment
When True, merchants should redirect the end user to the url given in the “actions” field. When False, there is no need for redirection for payment process to continue"},callback_url:{pattern:"^https?:\\/\\/(www\\.)?[-a-zA-Z0-9@:%._\\+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_\\+.~#?&//=]*)$",type:"string",description:"Callback URL which payment notifications will be sent",example:"https://webhook.site/f4b755f5-testingsite"},created:{type:"string",description:"ISO 8601 Timestamp for charge object creation. Timezone UTC+0.",format:"date-time",example:"2017-07-21T17:32:28Z"},updated:{type:"string",description:"ISO 8601 Timestamp for latest charge object update. Timezone UTC+0.",format:"date-time",example:"2017-07-21T17:32:30Z"},voided_at:{type:"string",description:"ISO 8601 Timestamp when transaction was voided. Timezone UTC+0.",format:"date-time",nullable:!0,example:"2017-07-21T20:32:28Z"},capture_now:{type:"boolean",description:"Default: true. Specifies if the charge will be attempted for completion immediately (true) or if the charge will place a reservation hold on the end user balance (false)",nullable:!0,example:!0},customer_id:{type:"string",description:"ID of the customer object created with Xendit. ID to will be linked to the transaction.",nullable:!0},payment_method_id:{type:"string",description:"Xendit’s identifier for end user payment tokens binded with merchant. Only used for channels which support tokenized payments",nullable:!0},failure_code:{type:"string",description:"Reason for failure of payment by end user or eWallet issuer. The failure_code is notified to the merchant in the payment callback.",nullable:!0,example:"USER_UNREACHABLE",enum:["ACCOUNT_ACCESS_BLOCKED","INVALID_MERCHANT_CREDENTIALS","USER_DECLINED_PAYMENT","INVALID_ACCOUNT_DETAILS","MAXIMUM_LIMIT_REACHED","USER_UNREACHABLE","CHANNEL_UNAVAILABLE","INSUFFICENT_BALANCE","INVALID_TOKEN","ACCOUNT_NOT_ACTIVATED",null]},basket:{$ref:"#/components/schemas/Basket"},metadata:{maxProperties:50,type:"object",description:"Object of additional information the user may use. Users define the JSON properties and values.
You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long.
This will only be used by the user and not Xendit.",nullable:!0,example:{branch_code:"senayan_372"}}}},ChargeRequest:{required:["amount","checkout_method","currency","reference_id"],type:"object",properties:{reference_id:{type:"string",description:"Reference ID provided by merchant",example:"test-reference-id"},currency:{$ref:"#/components/schemas/Currency"},amount:{type:"number",description:"Transaction amount. Min - 100 IDR, 1 PHP Max - based on eWallet holding limit",example:1e4},checkout_method:{$ref:"#/components/schemas/CheckoutMethod"},channel_code:{$ref:"#/components/schemas/ChannelCode"},channel_properties:{$ref:"#/components/schemas/ChannelProperties"},customer_id:{type:"string",description:"ID of the customer object to which the account token will be linked to."},basket:{$ref:"#/components/schemas/Basket"},metadata:{maxProperties:50,type:"object",description:"Object of additional information the user may use. Users define the JSON properties and values.
You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long.
This will only be used by the user and not Xendit.",example:{branch_code:"senayan_372"}}}},ApiValidationError:{required:["error_code","message"],type:"object",properties:{error_code:{type:"string",example:"API_VALIDATION_ERROR",enum:["API_VALIDATION_ERROR"]},message:{type:"string",example:"There is an error with the format submitted to the server"}}},InvalidApiKey:{required:["error_code","message"],type:"object",properties:{error_code:{type:"string",example:"INVALID_API_KEY",enum:["INVALID_API_KEY"]},message:{type:"string",example:"API key format is invalid",enum:["API key format is invalid"]}}},InvalidMerchantCredentials:{required:["error_code","message"],type:"object",properties:{error_code:{type:"string",example:"INVALID_MERCHANT_CREDENTIALS",enum:["INVALID_MERCHANT_CREDENTIALS"]},message:{type:"string",enum:["Merchant credentials met with an error with the eWallet provider. Please contact Xendit customer support to resolve this issue."]}}},UnsupportedCurrency:{required:["error_code","message"],type:"object",properties:{error_code:{type:"string",example:"UNSUPPORTED_CURRENCY",enum:["UNSUPPORTED_CURRENCY"]},message:{type:"string",enum:["The payment currency request is not supported for this payment channel. Please refer to our API reference or docs to pick available currencies."]}}},RequestForbiddenError:{type:"object",properties:{error_code:{type:"string",example:"REQUEST_FORBIDDEN_ERROR",enum:["REQUEST_FORBIDDEN_ERROR","CHANNEL_NOT_ACTIVATED"]},message:{type:"string",enum:["The API key is forbidden to perform this request"]}},required:["error_code","message"]},ChannelNotActivated:{required:["error_code","message"],type:"object",properties:{error_code:{type:"string",example:"CHANNEL_NOT_ACTIVATED",enum:["CHANNEL_NOT_ACTIVATED"]},message:{type:"string",enum:["Payment request failed because this specific payment channel has not been activated through Xendit. Please activate via Xendit dashboard or our customer service."]}}},DataNotFound:{required:["error_code","message"],type:"object",properties:{error_code:{type:"string",example:"DATA_NOT_FOUND",enum:["DATA_NOT_FOUND"]},message:{type:"string",enum:["Charge ewc_b496c89b-6e99-4080-b99e-98b4fe88678d not found. Please check your query again."]}}},CallbackUrlNotFound:{required:["error_code","message"],type:"object",properties:{error_code:{type:"string",example:"CALLBACK_URL_NOT_FOUND",enum:["CALLBACK_URL_NOT_FOUND"]},message:{type:"string",enum:["Payment request failed because there was no input of callback url in Xendit Dashboard or request headers. Please save your callback url in Xendit Dashboard."]}}},UnsupportedContentType:{required:["error_code","message"],type:"object",properties:{error_code:{type:"string",example:"UNSUPPORTED_CONTENT_TYPE",enum:["UNSUPPORTED_CONTENT_TYPE"]},message:{type:"string",enum:["The content type requested is not supported"]}}},ServerError:{required:["error_code","message"],type:"object",properties:{error_code:{type:"string",example:"SERVER_ERROR",enum:["SERVER_ERROR"]},message:{type:"string",enum:["An unexpected error occured, our team has been notified and will troubleshoot the issue."]}}},ChannelUnavailableEwallet:{required:["error_code","message"],type:"object",properties:{error_code:{type:"string",example:"CHANNEL_UNAVAILABLE",enum:["CHANNEL_UNAVAILABLE"]},message:{type:"string",enum:["The payment channel requested is currently experiencing unexpected issues. The eWallet provider will be notified to resolve this issue."]}}},Customer:{type:"object",properties:{reference_id:{type:"string",description:"ID provided by merchant to identify its customer",example:"19283661"},description:{type:"string",description:"Merchant-provided description for the customer object",example:"Buyer"},given_names:{type:"string",description:"Primary/First names of the customer",example:"John"},middle_name:{type:"string",description:"Middle name of the customer",example:null,nullable:!0},surname:{type:"string",description:"Surname of the customer `required for PayLater`",example:"Doe"},mobile_number:{type:"string",description:"Mobile number of customer in E.164 format `required for PayLater`",format:"E.164",example:"+639123456789"},email:{type:"string",description:"E-mail address of customer `required for PayLater`",format:"email",example:"john.doe@xendit.co"},phone_number:{type:"string",description:"Additional contact number of the customer. can be landline",example:"+639123456789"},nationality:{type:"string",description:"Country code for the customer’s nationality",format:"ISO 3166-2",example:"US"},addresses:{type:"array",description:"Array of objects with the customer’s address information. `required for PayLater`",items:{type:"object",properties:{country:{type:"string",description:"Country code of residence `required for PayLater`",format:"ISO 3166-2",example:"PH"},street_line1:{type:"string",description:"Line 1 of the street address e.g., building name and apartment number `required for PayLater`",example:"25X Tall Building"},street_line2:{type:"string",description:"Line 2 of the street address e.g., street number and name",example:null,nullable:!0},city:{type:"string",description:"City of residence of the customer `required for PayLater`",example:"Taguig City"},province:{type:"string",description:"Province of residence of customer",example:"Taguig"},state:{type:"string",description:"Line 2 of the street address e.g., street number and name",example:"Metro Manila"},postal_code:{type:"string",description:"State of residence of customer `required for PayLater`",example:"1600"},description:{type:"string",description:"Free text to capture type of address eg home, work, daytime, nighttime",example:"home"},metadata:{type:"object",description:"Free format JSON for any additional information",example:null,nullable:!0}}}},employment:{type:"object",description:"Object describing the customer’s employment information",properties:{employer_name:{type:"string",description:"Name of the customer's employer",example:"Xendit"},nature_of_business:{type:"string",description:"Industry or nature of business",example:"Financial Tech"},role_description:{type:"string",description:"Occupation or title",example:"Software Engineer"}}},date_of_birth:{type:"string",description:"Date of birth of customer in (YYYY-MM-DD)",format:"YYYY-MM-DD",example:"1990-01-01"},source_of_wealth:{type:"string",description:"Primary source of wealth for the individual",example:"Salary"},metadata:{type:"object",description:"Object of additional information the user may use. User defines the JSON properties and values",example:{customer_device_id:"1234567890"}}}},AccountAuth:{type:"object",required:["customer_id","channel_code"],properties:{customer_id:{type:"string",format:"uuid",description:"Xendit-generated ID identifying a customer",example:"7205eb90-ce35-436d-8fa1-3695ecc5889a"},channel_code:{type:"string",enum:["BA_BPI","BA_UBP","DC_BRI"],description:"Xendit code for the specific channel",example:"BA_BPI"},properties:{type:"object",description:"Object container specific fields for authorization",oneOf:[{$ref:"#/components/schemas/BankLinkedAccountTokenRequest"},{$ref:"#/components/schemas/DebitCardLinkedAccountTokenRequest"}],example:{success_redirect_url:"https://success.co/",failure_redirect_url:"https://fail.co/",callback_url:"https://merchant.co/callback/"}},metadata:{description:"A free-format JSON for additional information that you may use.",type:"object",example:{}}}},BankLinkedAccountTokenRequest:{type:"object",required:["success_redirect_url","failure_redirect_url"],properties:{success_redirect_url:{type:"string",description:"URL where the end-customer is redirected if the authorization is successful. Linked account token ID will be included in the URL as a query parameter.",example:"http://success.co"},fail_redirect_url:{type:"string",description:"URL where the end-customer is redirected if the authorization fails",example:"http://fail.co"},callback_url:{type:"string",description:"URL where the successful linking webhook will be sent. If none is provided, webhook will be sent to the default set during onboarding.",example:"http://merchant.co/callback"}}},DebitCardLinkedAccountTokenRequest:{type:"object",required:["account_mobile_number","card_last_four","card_expiry","account_email"],properties:{account_mobile_number:{type:"string",description:"Mobile number of the customer registered to the partner channel",example:"+62818555988"},card_last_four:{type:"string",description:"Last four digits of the debit card",example:"1234"},card_expiry:{type:"string",description:"Expiry month and year of the debit card (in MM/YY format)",format:"MM/YY",example:"06/24"},account_email:{type:"string",description:"Email address of the customer that is registered to the partner channel",example:"email@email.com"}}},BankAccountProperties:{type:"object",required:["account_details","account_hash","currency","account_type","description"],properties:{account_details:{type:"string",description:"Masked bank account number (for display purposes)",example:"XXXXXX1234"},account_hash:{type:"string",description:"Unique hash for specific account. This does not change across different authorizations.",example:"5789fb5c4b051701928af5ac268c8178"},currency:{type:"string",description:"ISO 4217 Currency Code",format:"ISO 4217",example:"PHP"},account_type:{type:"string",description:"Account type (provided by channel)",enum:["SAVINGS","CHECKING"],example:"SAVINGS"},description:{type:"string",description:"Description of the account (provided by channel)",example:"Sample description",nullable:!0}}},DebitCardAccountProperties:{type:"object",required:["card_last_four","card_expiry","currency","description"],properties:{card_last_four:{type:"string",description:"Last 4 digits of debit card",example:"1234"},card_expiry:{type:"string",description:"Expiry of debit card",example:"07/25"},currency:{type:"string",description:"ISO 4217 Currency Code",format:"ISO 4217",example:"IDR"},description:{type:"string",description:"Description of the account (provided by channel)",example:"Sample description"},channel_code:{type:"string",example:"DC_BRI"},id:{type:"string",example:"pm-c30d4800-afe4-4e58-ad5f-cc006d169139"}}},PaymentMethod:{type:"object",required:["id","type","customer_id","properties","status","created","updated"],properties:{id:{type:"string",description:"Unique identifier for the payment method. This has a prefix of `pm-`",example:"pm-6d1c8be4-f4d9-421c-9f0b-ab3b2b6bbc39"},type:{type:"string",description:"Type of account",enum:["BANK_ACCOUNT","DEBIT_CARD"],example:"BANK_ACCOUNT"},customer_id:{type:"string",description:"ID of the customer object in which this payment method is linked to",format:"uuid",example:"7205eb90-ce35-436d-8fa1-3695ecc5889a"},properties:{description:"Object containing information regarding the account. The values inside properties change based on the type of account.",oneOf:[{$ref:"#/components/schemas/BankAccountProperties"},{$ref:"#/components/schemas/DebitCardAccountProperties"}],example:{account_details:"XXXXXX1235",account_hash:"5789fb5c4b051701928af5ac268c8178",currency:"PHP",account_type:"SAVINGS",description:""}},status:{type:"string",enum:["ACTIVE","INACTIVE","EXPIRED"],example:"ACTIVE"},created:{type:"string",description:"Timestamp in ISO 8601 UTC+0 when the request was made",format:"ISO 8601 (YYYY-MM-DDTHH:mm:ssZ)",example:"2006-08-29T09:12:33.001Z"},updated:{type:"string",description:"Timestamp in ISO 8601 UTC+0 when transaction information was updated",format:"ISO 8601 (YYYY-MM-DDTHH:mm:ssZ)",example:"2006-08-29T09:12:33.001Z"},metadata:{type:"object",description:"A free-format JSON for additional information that you provded during request.",example:{},nullable:!0}}},DirectDebit:{type:"object",required:["reference_id","channel_code","payment_method_id","currency","amount","description","status","failure_reason","is_otp_required","otp_expiration_timestamp","created","updated","metadata"],properties:{reference_id:{type:"string",description:"Merchant-provided identifier for the transaction",example:"5162749123"},payment_method_id:{type:"string",description:"Xendit-generated identifier for payment method",example:"pm-6d1c8be4-f4d9-421c-9f0b-ab3b2b6bbc39"},currency:{type:"string",description:"Currency code of the amount to debit in ISO 4217",enum:["PHP","IDR"],format:"ISO 4217",example:"PHP"},amount:{type:"number",description:"Amount to debit from the end-customer's account",example:500.99},channel_code:{type:"string",enum:["BA_BPI","BA_UBP","DC_BRI"],description:"Xendit code identifying the payment channel",example:"BA_BPI"},basket:{type:"array",description:"Array of objects describing the item/s purchased using direct debit",items:{type:"object",required:["reference_id","name","market","type"],properties:{reference_id:{type:"string",description:"Merchant-provided identifier for the item",example:"5162749123"},name:{type:"string",description:"Name of product",example:"Wallet Top Up"},market:{type:"string",description:"2-letter ISO 3166-2 country code where the transaction was made",format:"ISO 3166-2",example:"PH"},type:{type:"string",description:"Type of product",enum:["GOOD","SERVICE"],example:"GOOD"},description:{type:"string",description:"Description of product",example:"Assorted set"},category:{type:"string",description:"Merchant category for item",example:"Bundles"},"sub-category":{type:"string",description:"Merchant sub-category for item",example:"Special sets"},price:{type:"string",description:"Price per unit in basket currency",example:"500.99"},quantity:{type:"string",description:"Number of units of this item in the basket",example:"1"},url:{type:"string",description:"Link to the product",example:""},metadata:{type:"object",example:{}}}}},description:{type:"string",description:"Description for the specific direct debit transaction",example:"This is a description"},callback_url:{type:"string",format:"url",description:"http://callback.url"},status:{type:"string",enum:["PENDING","COMPLETED","FAILED"],example:"PENDING"},failure_reason:{type:"string",description:"Xendit code that specifies the reason why the direct debit failed. This is applicable for asynchronous transactions.",enum:["INSUFFICIENT_BALANCE","ACCOUNT_ACCESS_BLOCKED","MAX_AMOUNT_LIMIT_ERROR","CHANNEL_UNAVAILABLE"],example:"INSUFFICIENT_BALANCE"},is_otp_required:{type:"boolean",description:"Whether an OTP is required to complete the transaction.",example:!0},otp_expiration_timestamp:{type:"string",format:"date-time",description:"Timestamp in ISO 8601 when the OTP becomes invalid.",example:"2006-08-29T09:12:33.001Z"},created:{type:"string",description:"Timestamp in ISO 8601 UTC+0 when the request was made",format:"ISO 8601 (YYYY-MM-DDTHH:mm:ssZ)",example:"2006-08-29T09:12:33.001Z"},updated:{type:"string",description:"Timestamp in ISO 8601 UTC+0 when transaction information was updated",format:"ISO 8601 (YYYY-MM-DDTHH:mm:ssZ)",example:"2006-08-29T09:12:33.001Z"},metadata:{type:"object",description:"Object of additional information the user may use. User defines the JSON properties and values.",example:{}}}},DuplicateError:{type:"object",properties:{error_code:{description:"Xendit code specifying the error encountered",type:"string",enum:["DUPLICATE_ERROR"],example:"DUPLICATE_ERROR"},message:{description:"Additional description for the error that occurred",type:"string",example:"The reference_id entered has been used before. Please enter a unique reference_id and try again."}},required:["error_code","message"]},IdempotencyError:{type:"object",properties:{error_code:{description:"Xendit code specifying the error encountered",type:"string",enum:["IDEMPOTENCY_ERROR"],example:"IDEMPOTENCY_ERROR"},message:{description:"Additional description for the error that occurred",type:"string",example:"The reference_id entered has been used before. Please enter a unique reference_id and try again."}},required:["error_code","message"]},ValidationError:{description:"Some values provided in the request did not pass validation rules.",type:"object",required:["error_code","message"],properties:{error_code:{type:"string",enum:["API_VALIDATION_ERROR"],example:"API_VALIDATION_ERROR"},message:{type:"string",example:"There was an error with the values submitted in the request."}}},CustomerIdNotFoundError:{description:"The provided `customer_id` does not exist.",type:"object",required:["error_code","message"],properties:{error_code:{type:"string",enum:["CUSTOMER_NOT_FOUND_ERROR"]},message:{type:"string",example:"The customer_id provided was not found. Please make sure that the customer_id exists."}}},InvalidAccountDetails:{description:"Partner channel cannot send the OTP to the end-customer. The transaction has failed.",type:"object",required:["error_code","message"],properties:{error_code:{type:"string",enum:["INVALID_ACCOUNT_DETAILS"]},message:{type:"string",example:"Given account details do not match any records on the channel’s side."}}},OTPDeliveryError:{description:"Partner channel cannot send the OTP to the end-customer. The transaction has failed.",type:"object",required:["error_code","message"],properties:{error_code:{type:"string",enum:["OTP_DELIVERY_ERROR"]},message:{type:"string",example:"Partner channel cannot send the OTP to the end-customer."}}},InvalidOTPError:{description:"An incorrect or invalid OTP was provided.",type:"object",required:["error_code","message"],properties:{error_code:{type:"string",enum:["INVALID_OTP_ERROR"]},message:{type:"string",example:"The `otp_code` provided is invalid or incorrect."}}},ExpiredOTPError:{description:"The OTP provided as expired.",type:"object",required:["error_code","message"],properties:{error_code:{type:"string",enum:["EXPIRED_OTP_ERROR"]},message:{type:"string",example:"The `otp_code` provided has expired."}}},MaxOTPAttemptsError:{description:"The maximum attempts allowed by the channel has been reached.",type:"object",required:["error_code","message"],properties:{error_code:{type:"string",enum:["MAX_OTP_ATTEMPTS_ERROR"]},message:{type:"string",example:"The channel's allowed maximum attempts for OTP validation for a transaction has been reached."}}},LinkedAccountNotFoundError:{description:"Error caused due to unexpected error from target partner channel. Usually caused by partner channel downtime.",type:"object",required:["error_code","message"],properties:{error_code:{type:"string",enum:["LINKED_ACCOUNT_NOT_FOUND_ERROR"]},message:{type:"string",example:"Provided properties and type combination in the request does not exist or access is unauthorized."}}},PaymentMethodNotFoundError:{description:"Error caused due to `payment_method_id` provided does not exist or access is unauthorized",type:"object",required:["error_code","message"],properties:{error_code:{type:"string",enum:["PAYMENT_METHOD_NOT_FOUND_ERROR"]},message:{type:"string",example:"Provided `payment_method_id` is invalid, not found or access is unauthorized"}}},InvalidPaymentMethodError:{description:"Error caused due to `payment_method_id` has expired or has been invalidated",type:"object",required:["error_code","message"],properties:{error_code:{type:"string",enum:["INVALID_PAYMENT_METHOD_ERROR"]},message:{type:"string",example:"The payment method has expired or has been invalidated."}}},InsufficientBalanceError:{description:"Error caused due to target source of funds has insufficient balance to complete the transaction",type:"object",required:["error_code","message"],properties:{error_code:{type:"string",enum:["INSUFFICIENT_BALANCE"]},message:{type:"string",example:"There is insufficient balance in the end-customer’s account to complete the transaction."}}},AccountAccessBlockedError:{description:"Error caused due to the partner channel blocking access to the payment method",type:"object",required:["error_code","message"],properties:{error_code:{type:"string",enum:["ACCOUNT_ACCESS_BLOCKED"]},message:{type:"string",example:"Access to the target account has been blocked by the channel."}}},MaxAmountLimitError:{description:"Error caused due to the transaction amount exceeds the partner channel's set limits",type:"object",required:["error_code","message"],properties:{error_code:{type:"string",enum:["MAX_AMOUNT_LIMIT_ERROR"]},message:{type:"string",example:"Cannot proceed with the transaction since the amount is above the maximum cumulative transaction limit set by the channel."}}},DirectDebitAlreadyCompletedError:{description:"Cannot proceed because the specified transaction is already completed",properties:{error_code:{type:"string",enum:["DIRECT_DEBIT_ALREADY_COMPLETED"]},message:{type:"string",example:"The direct_debit_id provided has already been processed and successfully completed."}}},DirectDebitAlreadyFailedError:{description:"Cannot proceed because the specified transaction has already failed.",properties:{error_code:{type:"string",enum:["DIRECT_DEBIT_ALREADY_FAILED"]},message:{type:"string",example:"The direct_debit_id provided has already been processed and has failed."}}},OrderItems:{description:"",type:"object",properties:{type:{type:"string",enum:["PRODUCT","SERVICE","FEE","DISCOUNT"],example:"PRODUCT",description:"Type of item"},reference_id:{type:"string",example:"SKU_123-456-789",description:"Merchant’s identifier for specific item (ie. SKU, promotion code, etc)"},name:{type:"string",example:"Dyson Vacuum",description:"Item name"},net_unit_amount:{type:"number",example:1234.56,description:"Net amount to be charged per unit\n\nMust be a negative number when type = DISCOUNT"},quantity:{type:"number",example:1,description:"Number of units of this item in the basket"},url:{type:"string",example:"https://www.zngmyhome.com/dyson_vacuum",description:"Item URL\n\nRequired when type = PRODUCT or SERVICE"},category:{type:"string",example:"Electronics",description:"Merchant category for item\n\nRequired when type = PRODUCT or SERVICE"},subcategory:{type:"string",nullable:!0,example:"Appliances",description:"Merchant subcategory for item"},description:{type:"string",nullable:!0,example:"A very powerful vacuum",description:"Item description"},metadata:{type:"object",description:"Additional object that may be used for additional item attributes",nullable:!0}},required:["type","reference_id","name","net_unit_amount","quantity"]},PayLaterPlanObject:{description:"",type:"object","x-examples":{Example:{id:"plp_3d88d952-9505-4ed7-84d3-e8639e99e9c4",customer_id:"49d056bd-21e5-4997-85f2-2127544c2196",channel_code:"PH_BILLEASE",currency:"PHP",amount:1234.56,order_items:[{type:"PRODUCT",reference_id:"SKU_123-456-789",name:"Dyson Vacuum",net_unit_amount:1234.56,quantity:1,url:"https://www.zngmyhome.com/dyson_vacuum",category:"Electronics",subcategory:"Appliances",description:"A very powerful vacuum",metadata:null}],options:[{downpayment_amount:400,installment_amount:100,interest_rate:.025,total_amount:1015,interval:"MONTH",interval_count:1,total_recurrence:6,description:"6-month installment plan"}],created:"2020-11-11T16:23:52Z"}},properties:{id:{type:"string",description:"Unique identifier for PayLater Plan Object\n\nIt will always have the prefix of `plp_`, followed by a UUIDv4",example:"plp_3d88d952-9505-4ed7-84d3-e8639e99e9c4"},customer_id:{type:"string",description:"Unique identifier for customer",example:"49d056bd-21e5-4997-85f2-2127544c2196"},channel_code:{type:"string",description:"Channel code for PayLater provider",enum:["PH_BILLEASE"],example:"PH_BILLEASE"},currency:{type:"string",description:"ISO 4217 currency code of PayLater transaction",enum:["PHP"],example:"PHP",format:"ISO 4217"},amount:{type:"number",description:"Aggregated transaction amount equivalent to the sum of `net_unit_amount` multiplied by `quantity` in the `order_items` array",example:1234.56},order_items:{type:"array",uniqueItems:!1,description:"Array of objects describing the item/s purchased using PayLater\n",items:{$ref:"#/components/schemas/OrderItems"}},options:{type:"array",uniqueItems:!1,description:"Available payment plans users can view to purchase your goods/services. Provided by PayLater providers directly",items:{type:"object",properties:{downpayment_amount:{type:"number",description:"Amount required to be paid upfront",example:400},installment_amount:{type:"number",description:"Amount to be paid via at every payment interval specified",example:100},interest_rate:{type:"number",description:"Interest rates charged\n\nExample: 0.2 for twenty percent",example:.025},total_amount:{type:"number",description:"Grand total of installment your customers will pay. This is a sum of down payment amount, installment amount, interest fee, and service fee",example:1015},interval:{type:"string",description:"The frequency with which a recurring payment invoice should be billed",enum:["DAY","WEEK","MONTH"],example:"MONTH"},interval_count:{type:"number",description:"The number of intervals (specified in the interval property) between installments\n\nExample: interval=MONTH and interval_count=3 bills every 3 months",example:1},total_recurrence:{type:"number",description:"The number of times installments will be charged to the end user with the specified intervals",example:6},description:{type:"string",description:"Name or descriptor of installment option as given by lender",example:"6-month installment plan"}},required:["downpayment_amount","installment_amount","interest_rate","total_amount","interval","interval_count","total_recurrence","description"]}},created:{type:"string",example:"2020-11-11T16:23:52Z",format:"date-time",description:"ISO 8601 Timestamp for creation of plan object\n\nTimezone UTC+0"}},required:["id","customer_id","channel_code","currency","amount","order_items","options","created"]},PayLaterChargeObject:{description:"",type:"object","x-examples":{Example:{id:"plc_8cb12305-9bcf-4441-a087-ee0d446e297b",customer_id:"49d056bd-21e5-4997-85f2-2127544c2196",plan_id:"plp_3d88d952-9505-4ed7-84d3-e8639e99e9c4",business_id:"5f27a14a9bf05c73dd040bc8",reference_id:"order_id_123",channel_code:"PH_BILLEASE",checkout_method:"ONE_TIME_PAYMENT",currency:"PHP",amount:1234.56,order_items:[{type:"PRODUCT",reference_id:"SKU_123-456-789",name:"Dyson Vacuum",net_unit_amount:1234.56,quantity:1,url:"https://www.zngmyhome.com/home_cleaning",category:"Electronics",subcategory:"Appliances",description:"A powerful vacuum cleaner",metadata:null}],success_redirect_url:"https://www.xendit.co",status:"SUCCEEDED",created:"2020-11-11T16:23:52Z",updated:"2020-11-11T16:23:52Z",actions:{desktop_web_checkout_url:"https://webcheckout.this/",mobile_web_checkout_url:"https://webcheckout.this/",mobile_deeplink_checkout_url:"app://deeplinkcheckout.this/"},callback_url:"https://webhook.me/gethooked",payment_method_id:null,voided_at:null,metadata:null}},properties:{id:{type:"string",description:"Unique identifier for charge request transaction\n\nIt will always have the prefix of `plc_`, followed by a UUIDv4",example:"plc_8cb12305-9bcf-4441-a087-ee0d446e297b"},customer_id:{type:"string",description:"Unique identifier for customer",example:"49d056bd-21e5-4997-85f2-2127544c2196"},plan_id:{type:"string",description:"Unique identifier for payment plan created",example:"plp_3d88d952-9505-4ed7-84d3-e8639e99e9c4"},business_id:{type:"string",description:"Business ID of the merchant",example:"5f27a14a9bf05c73dd040bc8"},reference_id:{type:"string",description:"Reference ID provided by merchant",example:"order_id_123"},channel_code:{type:"string",description:"Channel code for PayLater provider",enum:["PH_BILLEASE"],example:"PH_BILLEASE"},checkout_method:{type:"string",description:"Supported checkout method: ONE_TIME_PAYMENT",enum:["ONE_TIME_PAYMENT"],example:"ONE_TIME_PAYMENT"},currency:{type:"string",description:"ISO 4217 currency code of PayLater transaction\n\nSupported currency: PHP",enum:["PHP"],example:"PHP",format:"ISO 4217"},amount:{type:"number",description:"Aggregated transaction amount equivalent to the sum of `net_unit_amount` multiplied by `quantity` in the `order_items` array\n\nMin PHP: 50",example:1234.56,minimum:50},order_items:{type:"array",description:"Array of objects describing the item/s purchased using PayLater",items:{$ref:"#/components/schemas/OrderItems"}},success_redirect_url:{type:"string",description:"URL where the customer is redirected after completing transaction",example:"https://www.xendit.co"},status:{type:"string",description:"Charge status",enum:["PENDING","SUCCEEDED","FAILED"],example:"SUCCEEDED"},created:{type:"string",description:"ISO 8601 Timestamp for transaction creation\n\nTimezone UTC+0",format:"date-time",example:"2020-11-11T16:23:52Z"},updated:{type:"string",description:"ISO 8601 Timestamp for latest object update\n\nTimezone UTC+0",format:"date-time",example:"2020-11-11T16:23:52Z"},actions:{type:"object",description:"PayLater Partner’s checkout URL where end-user will be redirected to complete payment",properties:{desktop_web_checkout_url:{type:"string",description:"Generated URL for web checkout on devices with a stand-alone screen",example:"https://webcheckout.this/"},mobile_web_checkout_url:{type:"string",description:"Generated URL for web checkout on mobile devices",example:"https://webcheckout.this/"},mobile_deeplink_checkout_url:{type:"string",description:"Generated URL for deeplink checkout on mobile devices (jumps directly into PayLater partner's app for payment confirmation)",example:"app://deeplinkcheckout.this/"}}},callback_url:{type:"string",description:"Default to callback URL in dashboard where the charge status will be notified\n\nHTTPS is required",example:"https://webhook.me/gethooked"},payment_method_id:{type:"string",nullable:!0,description:"Payment method ID of end-customer source of funds\n\nRequired when checkout_method = TOKENIZED_PAYMENT (currently not supported)",example:null},voided_at:{description:"ISO 8601 Timestamp for void of transaction\n\nTimezone UTC+0",type:"string",nullable:!0,example:null},metadata:{type:"object",nullable:!0,example:null,description:"Object of additional information the user may use. Users define the JSON properties and values.\n\nYou can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long\n\nThis will only be used by the user and not Xendit."}},required:["id","customer_id","plan_id","business_id","reference_id","channel_code","checkout_method","currency","amount","order_items","success_redirect_url","status","created","updated","callback_url"]},"401InvalidAPIKey":{description:"",type:"object","x-examples":{INVALID_API_KEY:{error_code:"INVALID_API_KEY",message:"API key is not authorized for this API service"}},title:"INVALID_API_KEY",properties:{error_code:{type:"string",example:"INVALID_API_KEY",enum:["INVALID_API_KEY"]},message:{type:"string",example:"API key is not authorized for this API service",enum:["API key is not authorized for this API service"]}},required:["error_code","message"]},"403RequestForbiddenError":{description:"",type:"object","x-examples":{REQUEST_FORBIDDEN_ERROR:{error_code:"REQUEST_FORBIDDEN_ERROR",message:"The API key is forbidden to perform this request"}},title:"REQUEST_FORBIDDEN_ERROR",properties:{error_code:{type:"string",example:"REQUEST_FORBIDDEN_ERROR",enum:["REQUEST_FORBIDDEN_ERROR"]},message:{type:"string",enum:["The API key is forbidden to perform this request"]}},required:["error_code","message"]},"403ChannelNotActivated":{description:"",type:"object","x-examples":{CHANNEL_NOT_ACTIVATED:{error_code:"CHANNEL_NOT_ACTIVATED",message:"Payment channel has not been activated through Xendit. Please activate via Xendit dashboard or contact our customer service."}},title:"CHANNEL_NOT_ACTIVATED",properties:{error_code:{type:"string",example:"CHANNEL_NOT_ACTIVATED",enum:["CHANNEL_NOT_ACTIVATED"]},message:{type:"string",enum:["Payment channel has not been activated through Xendit. Please activate via Xendit dashboard or contact our customer service."]}},required:["error_code","message"]},"404DataNotFound":{description:"",type:"object","x-examples":{DATA_NOT_FOUND:{error_code:"DATA_NOT_FOUND",message:"Customer ID is invalid. Please check the ID again or create an ID using Customer API."}},title:"DATA_NOT_FOUND",properties:{error_code:{type:"string",example:"DATA_NOT_FOUND",enum:["DATA_NOT_FOUND"]},message:{type:"string",example:"Customer ID is invalid. Please check the ID again or create an ID using Customer API."}},required:["error_code","message"]},"500ServerError":{description:"",type:"object","x-examples":{SERVER_ERROR:{error_code:"SERVER_ERROR",message:"An unexpected error occured. Our team has been notified and will troubleshoot the issue."}},properties:{error_code:{type:"string",example:"SERVER_ERROR",enum:["SERVER_ERROR"]},message:{type:"string",example:"An unexpected error occured. Our team has been notified and will troubleshoot the issue.",enum:["An unexpected error occured. Our team has been notified and will troubleshoot the issue."]}},required:["error_code","message"]},"503ChannelUnavailable":{description:"",type:"object","x-examples":{CHANNEL_UNAVAILABLE:{error_code:"CHANNEL_UNAVAILABLE",message:"The payment channel requested is currently experiencing unexpected issues. The PayLater partner will be notified to resolve this issue."}},properties:{error_code:{type:"string",example:"CHANNEL_UNAVAILABLE",enum:["CHANNEL_UNAVAILABLE"]},message:{type:"string",example:"The payment channel requested is currently experiencing unexpected issues. The PayLater partner will be notified to resolve this issue.",enum:["The payment channel requested is currently experiencing unexpected issues. The PayLater partner will be notified to resolve this issue."]}},required:["error_code","message"]},"404PayLaterPlanDataNotFound":{description:"",type:"object","x-examples":{PAYLATER_PLAN_DATA_NOT_FOUND:{error_code:"PAYLATER_PLAN_DATA_NOT_FOUND",message:"PayLater Plan ID is invalid. Please check the ID again, or create an ID using PayLater Plans API."}},title:"PAYLATER_PLAN_DATA_NOT_FOUND",properties:{error_code:{type:"string",example:"PAYLATER_PLAN_DATA_NOT_FOUND",enum:["PAYLATER_PLAN_DATA_NOT_FOUND"]},message:{type:"string",example:"PayLater Plan ID is invalid. Please check the ID again or create an ID using PayLater Plans API.",enum:["PayLater Plan ID is invalid. Please check the ID again or create an ID using PayLater Plans API."]}},required:["error_code","message"]},"400APIValidationError":{description:"",type:"object","x-examples":{API_VALIDATION_ERROR:{error_code:"API_VALIDATION_ERROR",message:"request.body should have required property 'customer_id'",errors:[{path:".body.customer_id",message:"should have required property 'customer_id'",errorCode:"required.openapi.validation"}]}},title:"API_VALIDATION_ERROR",properties:{error_code:{type:"string",enum:["API_VALIDATION_ERROR"],example:"API_VALIDATION_ERROR"},message:{type:"string",default:"Refer to Response Samples for negative scenarios"},errors:{type:"array",items:{type:"object",properties:{path:{type:"string"},message:{type:"string"},errorCode:{type:"string"},doc_url:{type:"string",format:"url"}}}}},required:["message","error_code"]},"400InvalidCustomerID":{description:"",type:"object","x-examples":{INVALID_CUSTOMER_ID:{error_code:"INVALID_CUSTOMER_ID",message:"Missing or invalid parameter(s) in customer_id: given_names, postcode"}},title:"INVALID_CUSTOMER_ID",properties:{error_code:{type:"string",enum:["INVALID_CUSTOMER_ID"],example:"INVALID_CUSTOMER_ID"},message:{type:"string",default:"Missing or invalid parameter(s) in customer_id",example:"Missing or invalid parameter(s) in customer_id: given_names, postcode"}},required:["message","error_code"]},"400UnsupportedCurrency":{description:"",type:"object","x-examples":{UNSUPPORTED_CURRENCY:{error_code:"UNSUPPORTED_CURRENCY",message:"The payment currency request is not supported by PayLater partner. Please refer to our API reference or docs for available currencies."}},title:"UNSUPPORTED_CURRENCY",properties:{error_code:{type:"string",enum:["UNSUPPORTED_CURRENCY"],example:"UNSUPPORTED_CURRENCY"},message:{type:"string",enum:["The payment currency request is not supported by PayLater partner. Please refer to our API reference or docs for available currencies."]}},required:["message","error_code"]}},requestBodies:{CreateCustomer:{description:"A JSON object containing customer information. While most fields are marked as optional, note that some parameters may be required if you are offering PayLater as a payment channel in your platform. Please pay attention to the parameter descriptions.",required:!0,content:{"application/json":{schema:{allOf:[{required:["reference_id","given_names"]},{$ref:"#/components/schemas/Customer"}]}}}},UpdateCustomer:{description:"A JSON object containing customer information",required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/Customer"}}}},InitiateAccountAuth:{description:"A JSON object containing information for initial account authorization",required:!0,content:{"application/json":{schema:{$ref:"#/components/schemas/AccountAuth"}}}},DebitCardValidateOtp:{content:{"application/json":{schema:{type:"object",required:["otp_code"],properties:{otp_code:{type:"string",description:"One-time password sent by the channel to the end-customer",example:"12345"}}}}}},ActivatePaymentMethod:{description:"A JSON object containing data for activating account as payment method",required:!0,content:{"application/json":{schema:{type:"object",required:["type","customer_id","properties"],properties:{type:{type:"string",description:"Type of payment method",enum:["BANK_ACCOUNT","DEBIT_CARD"],example:"BANK_ACCOUNT"},customer_id:{type:"string",description:"Xendit-generated ID for the customer",format:"uuid",example:"7205eb90-ce35-436d-8fa1-3695ecc5889a"},properties:{type:"object",description:"JSON that contains information that identifies the payment method",required:["id"],properties:{id:{type:"string",description:"Linked token account ID provided by '/linked_account_tokens/:id/accounts'",example:"la-2ed8da9a-96de-4818-ab17-4fc809ad50fa"}}},metadata:{type:"object",description:"A free-format JSON for additional information that you may use.",example:{}}}}}}},UpdatePaymentMethod:{description:"A JSON object containing the attributes to be updated for the payment method",required:!0,content:{"application/json":{schema:{type:"object",required:["status","metadata"],properties:{status:{type:"string",description:"Status of the payment method whether or not it is active for creating payments",enum:["ACTIVE","INACTIVE"],example:"ACTIVE"},metadata:{type:"object",description:"A free-format JSON for additional information that you may use.",example:{}}}}}}},CreateDirectDebit:{description:"A JSON object containing information to initiate the direct debit flow",required:!0,content:{"application/json":{schema:{type:"object",required:["reference_id","payment_method_id","currency","amount"],properties:{reference_id:{type:"string",description:"Merchant-provided identifier for the transaction",example:"5162749123"},payment_method_id:{type:"string",description:"Xendit-generated identifier for payment method",example:"pm-6d1c8be4-f4d9-421c-9f0b-ab3b2b6bbc39"},currency:{type:"string",description:"Currency code of the amount to debit in ISO 4217",format:"ISO 4217",example:"PHP"},amount:{type:"number",description:"Amount to debit from the end-customer's account",example:500.99},basket:{type:"array",description:"Array of objects describing the item/s purchased using direct debit",items:{type:"object",required:["reference_id","name","market","type"],properties:{reference_id:{type:"string",description:"Merchant-provided identifier for the item",example:"5162749123"},name:{type:"string",description:"Name of product",example:"Wallet Top Up"},market:{type:"string",description:"2-letter ISO 3166-2 country code where the transaction was made",format:"ISO 3166-2",example:"PH"},type:{type:"string",description:"Type of product",enum:["GOOD","SERVICE"],example:"GOOD"},description:{type:"string",description:"Description of product",example:""},category:{type:"string",description:"Merchant category for item",example:""},"sub-category":{type:"string",description:"Merchant sub-category for item",example:""},price:{type:"string",description:"Price per unit in basket currency",example:""},quantity:{type:"string",description:"Number of units of this item in the basket",example:""},image:{type:"string",description:"Image of the product",format:"base64 enc jpeg",example:""},url:{type:"string",description:"Link to the product",example:""},metadata:{type:"object",example:{}}}}},description:{type:"string",description:"Description for the specifc direct debit transaction",example:"This is a description"},callback_url:{type:"string",format:"url",description:"URL where response will be sent after transaction process. This overwrites the default `callback_url` set.",example:"http://callback.url"},metadata:{type:"object",description:"Object of additional information the user may use. User defines the JSON properties and values. You can specify up to 50 keys, with key names up to 40 characters long and values up to 500 characters long This will only be used by the user and not Xendit. ",example:{}}}}}}},ValidateOTP:{description:"A JSON object containing information to validate OTP",required:!0,content:{"application/json":{schema:{type:"object",required:["otp_code"],properties:{otp_code:{type:"string",description:"One-time password input from user",example:"654321"}}}}}},LinkedAccountTokenSuccessfulCallback:{content:{"application/json":{schema:{type:"object",properties:{event:{type:"string",description:"Callback event - `linked_account_token.successful`",example:"linked_account_token.successful"},timestamp:{type:"string",description:"Timestamp when the event was triggered",example:"2020-08-29T09:12:33.001Z"},id:{type:"string",description:"ID of the linked account token",example:"lat-aa620619-124f-41db-995b-66a52abe036a"},channel_code:{type:"string",description:"Payment channel code for linking",example:"BA_BPI"},type:{type:"string",description:"Type of linked account token. Will always be `BANK_ACCOUNT`",example:"BANK_ACCOUNT"},accounts:{type:"array",description:"Array of object with properties containing information about the accessible accounts by the linked account token",items:{type:"object",properties:{id:{type:"string",description:"Xendit idenfier for the specific bank account",example:"la-7f2bc3ad-8049-42ff-8b57-6578088e9641"},account_details:{type:"string",description:"Potentially masked account detail, for display purposes only",example:"XXXXXX2487"},account_hash:{type:"string",description:"Unique hash for specific account. This does not change across different authorizations.",example:"233eca40ff303ba15bf39052ca3102c6"},currency:{type:"string",format:"ISO 4217",description:"ISO 4217 Currency Code of the bank account",example:"PHP"},account_type:{type:"string",description:"Type of account as provided by the partner channel",example:"SAVINGS"},description:{type:"string",description:"Description provided by the partner channel for the particular bank account",nullable:!0,example:null}}}},unlinked_token_id:{type:"string",default:null,description:"If authorization is triggered by the Reset Authorization API, this contains the previous linked account token ID. This linked account token is now expired. Else, this will be `null`.",nullable:!0,example:null}}}}}},PaymentMethodExpiringCallback:{content:{"application/json":{schema:{type:"object",properties:{event:{type:"string",description:"Callback event - `payment_method.expiry.expiring`",example:"payment_method.expiry.expiring"},timestamp:{type:"string",description:"Timestamp when the event was triggered",example:"2020-08-29T09:12:33.001Z"},id:{type:"string",description:"ID of the expiring payment method",example:"pm-94c3acfd-b8f5-4237-a4bb-3702195729d1"},customer_id:{type:"string",description:"ID of the customer object that owns the particular payment method",example:"7205eb90-ce35-436d-8fa1-3695ecc5889a"},expiration_timestamp:{type:"string",description:"Timestamp when the payment method is expected to be expired",example:"2020-09-19T05:34:55+0000"}}}}}},PaymentMethodExpiredCallback:{content:{"application/json":{schema:{type:"object",properties:{event:{type:"string",description:"Callback event - `payment_method.expiry.expired`",example:"payment_method.expiry.expired"},timestamp:{type:"string",description:"Timestamp when the event was triggered",example:"2020-08-29T09:12:33.001Z"},id:{type:"string",description:"ID of the expired payment method",example:"pm-94c3acfd-b8f5-4237-a4bb-3702195729d1"},customer_id:{type:"string",description:"ID of the customer object that owns the particular payment method",example:"7205eb90-ce35-436d-8fa1-3695ecc5889a"}}}}}},DirectDebitPaymentCallback:{content:{"application/json":{schema:{type:"object",properties:{event:{type:"string",description:"Callback event - `direct_debit.payment`",example:"direct_debit.payment"},timestamp:{type:"string",description:"Timestamp when the event was triggered",example:"2020-08-29T09:12:33.001Z"},id:{type:"string",description:"ID of the direct debit payment",example:"ddpy-d290f1ee-6c54-4b01-90e6-d701748f0851"},reference_id:{type:"string",description:"Unique identifier supplied by the merchant",example:"5162749123"},channel_code:{type:"string",enum:["BA_BPI","BA_UBP","DC_BRI"],description:"Payment channel used for the direct debit transaction",example:"BA_BPI"},payment_method_id:{type:"string",description:"ID of the payment method used in the transaction",example:"pm-6d1c8be4-f4d9-421c-9f0b-ab3b2b6bbc39"},currency:{type:"string",format:"ISO 4217",description:"Currency of the transaction in ISO 4217",example:"PHP"},amount:{type:"number",description:"Transaction amount",example:500.99},description:{type:"string",description:"Description for the specifc direct debit transaction",example:"This is a descriptionI"},status:{type:"string",description:"Status of the direct debit transaction",enum:["COMPLETED","FAILED"],example:"COMPLETED"},failure_code:{type:"string",description:"If the status is `FAILED`, the specific failure reason is supplied here.",nullable:!0,example:null},metadata:{type:"object",description:"Metadata object provided by merchant",example:{}}}}}}},PayLaterCallback:{content:{"application/json":{schema:{type:"object","x-examples":{"Successful Payment":{event:"paylater.payment",business_id:"5f27a14a9bf05c73dd040bc8",created:"2020-11-11T16:28:52Z",data:{id:"plc_8cb12305-9bcf-4441-a087-ee0d446e297b",customer_id:"49d056bd-21e5-4997-85f2-2127544c2196",plan_id:"plp_3d88d952-9505-4ed7-84d3-e8639e99e9c4",business_id:"5f27a14a9bf05c73dd040bc8",reference_id:"order_id_123",channel_code:"PH_BILLEASE",checkout_method:"ONE_TIME_PAYMENT",currency:"PHP",amount:1234.56,order_items:[{type:"PRODUCT",reference_id:"SKU_123-456-789",name:"Dyson Vacuum",net_unit_amount:1234.56,quantity:1,url:"https://www.zngmyhome.com/dyson_vacuum",category:"Electronics",subcategory:"Appliances",description:"A very powerful vacuum",metadata:null}],success_redirect_url:"https://www.xendit.co",status:"SUCCEEDED",created:"2020-11-11T16:23:52Z",updated:"2020-11-11T16:23:52Z",actions:{desktop_web_checkout_url:"https://webcheckout.this/",mobile_web_checkout_url:"https://webcheckout.this/",mobile_deeplink_checkout_url:"app://deeplinkcheckout.this/"},callback_url:"https://webhook.me/gethooked",payment_method_id:null,voided_at:null,metadata:null}},"Failed Payment":{event:"paylater.payment",business_id:"5f27a14a9bf05c73dd040bc8",created:"2020-11-11T16:28:52Z",data:{id:"plc_8cb12305-9bcf-4441-a087-ee0d446e297b",customer_id:"49d056bd-21e5-4997-85f2-2127544c2196",plan_id:"plp_3d88d952-9505-4ed7-84d3-e8639e99e9c4",business_id:"5f27a14a9bf05c73dd040bc8",reference_id:"order_id_123",channel_code:"PH_BILLEASE",checkout_method:"ONE_TIME_PAYMENT",currency:"PHP",amount:1234.56,order_items:[{type:"PRODUCT",reference_id:"SKU_123-456-789",name:"Dyson Vacuum",net_unit_amount:1234.56,quantity:1,url:"https://www.zngmyhome.com/dyson_vacuum",category:"Electronics",subcategory:"Appliances",description:"A very powerful vacuum",metadata:null}],success_redirect_url:"https://www.xendit.co",status:"FAILED",created:"2020-11-11T16:23:52Z",updated:"2020-11-11T16:23:52Z",actions:{desktop_web_checkout_url:"https://webcheckout.this/",mobile_web_checkout_url:"https://webcheckout.this/",mobile_deeplink_checkout_url:"app://deeplinkcheckout.this/"},callback_url:"https://webhook.me/gethooked",payment_method_id:null,voided_at:null,metadata:null}}},properties:{event:{type:"string",example:"paylater.payment",enum:["paylater.payment"],description:"Identifies the event triggering a notification to merchant.\n\n`paylater.payment` occurs when PayLater partner confirms the payment status of a transaction"},business_id:{type:"string",example:"5f27a14a9bf05c73dd040bc8",description:"Business ID of the merchant"},created:{type:"string",example:"2020-11-11T16:28:52Z",description:"ISO 8601 Timestamp for payment creation\n\nTimezone UTC+0"},data:{$ref:"#/components/schemas/PayLaterChargeObject"}},description:"Payment notification sent to Merchant"}}}}},responses:{Unauthorized:{description:"Invalid authorization details was provided.",content:{"application/json":{schema:{type:"object",required:["error_code","message"],properties:{error_code:{type:"string",enum:["INVALID_API_KEY"]},message:{type:"string",example:"API key format is invalid"}}}}}},NotFound:{description:"The resource you are trying to reach does not exist.",content:{"application/json":{schema:{type:"object",required:["error_code","message"],properties:{error_code:{type:"string",enum:["DATA_NOT_FOUND"],example:"DATA_NOT_FOUND"},message:{type:"string",example:"Resource not found. Please check your request again."}}}}}},CustomerNotFound:{description:"The provided `customer_id` does not match any of our records.",content:{"application/json":{schema:{type:"object",required:["error_code","message"],properties:{error_code:{type:"string",enum:["CUSTOMER_NOT_FOUND"],example:"CUSTOMER_NOT_FOUND"},message:{type:"string",example:"The customer_id provided was not found. Please make sure that the customer_id exists."}}}}}},DuplicateReference:{description:"Error 409 sample response",content:{"application/json":{schema:{type:"object",required:["error_code","message"],properties:{error_code:{description:"Xendit code specifying the error encountered",type:"string",enum:["DUPLICATE_ERROR","IDEMPOTENCY_ERROR"]},message:{description:"Additional explanation regarding the error",type:"string",example:"The reference_id entered has been used before. Please enter a unique reference_id and try again."}}}}}},IdempotencyError:{description:"Error 409 sample response",content:{"application/json":{schema:{type:"object",required:["error_code","message"],properties:{error_code:{type:"string",example:"IDEMPOTENCY_ERROR"},message:{type:"string",example:"Given Idempotency-Key value has been used before. Please enter a unique value and try again."}}}}}},ValidationError:{description:"Some values provided in the request did not pass validation rules.",content:{"application/json":{schema:{type:"object",required:["error_code","message"],properties:{error_code:{type:"string",enum:["API_VALIDATION_ERROR"],example:"API_VALIDATION_ERROR"},message:{type:"string",example:"There was an error with the values submitted in the request."}}}}}},InternalServerError:{description:"An unexpected error has occurred.",content:{"application/json":{schema:{type:"object",required:["error_code","message"],properties:{error_code:{type:"string",example:"SERVER_ERROR"},message:{type:"string",example:"An unexpected error occurred. The appropriate team has already been notified to look into this."}}}}}},ChannelUnavailable:{description:"Error caused due to unexpected error from target partner channel. Usually caused by partner channel downtime.",content:{"application/json":{schema:{type:"object",required:["error_code","message"],properties:{error_code:{type:"string",enum:["CHANNEL_UNAVAILABLE"]},message:{type:"string",example:"The partner channel is currently experiencing unexpected issues."}}}}}}},examples:{APIValidationError:{value:{error_code:"API_VALIDATION_ERROR",message:"There was an error with the values submitted in the request."}},DuplicateError:{value:{error_code:"DUPLICATE_ERROR",message:"The reference_id provided has been used before. Please enter a unique reference_id and try again."}},IdempotencyError:{value:{error_code:"IDEMPOTENCY_ERROR",message:"The Idempotency-key provided has been used before. Please enter a unique Idempotency-key and try again."}},CustomerNotFoundError:{value:{error_code:"CUSTOMER_NOT_FOUND_ERROR",message:"The customer_id provided was not found. Please make sure that the customer_id exists."}},InvalidAccountDetails:{value:{error_code:"INVALID_ACCOUNT_DETAILS",message:"Given account details do not match any records on the channel’s side."}},OTPDeliveryError:{value:{error_code:"OTP_DELIVERY_ERROR",message:"Partner channel cannot send the OTP to the end-customer."}},InvalidOTPError:{value:{error_code:"INVALID_OTP_ERROR",message:"The `otp_code` provided is invalid or incorrect."}},ExpiredOTPError:{value:{error_code:"EXPIRED_OTP_ERROR",message:"The `otp_code` provided has expired."}},MaxOTPAttemptsError:{value:{error_code:"MAX_OTP_ATTEMPTS_ERROR",message:"The channel's allowed maximum attempts for OTP validation for a transaction has been reached."}},LinkedAccountNotFoundError:{value:{error_code:"LINKED_ACCOUNT_NOT_FOUND_ERROR",message:"Provided properties and type combination in the request does not exist or access is unauthorized."}},PaymentMethodNotFoundError:{value:{error_code:"PAYMENT_METHOD_NOT_FOUND_ERROR",message:"Provided `payment_method_id` is invalid, not found or access is unauthorized"}},InvalidPaymentMethodError:{value:{error_code:"INVALID_PAYMENT_METHOD_ERROR",message:"The payment method has expired or has been invalidated."}},InsufficientBalanceError:{value:{error_code:"INSUFFICIENT_BALANCE",message:"There is insufficient balance in the end-customer’s account to complete the transaction."}},AccountAccessBlockedError:{value:{error_code:"ACCOUNT_ACCESS_BLOCKED",message:"Access to the target account has been blocked by the channel."}},MaxAmountLimitError:{value:{error_code:"MAX_AMOUNT_LIMIT_ERROR",message:"Cannot proceed with the transaction since the amount is above the maximum cumulative transaction limit set by the channel."}},DirectDebitAlreadyCompletedError:{value:{error_code:"DIRECT_DEBIT_ALREADY_COMPLETED",message:"The direct_debit_id provided has already been processed and successfully completed."}},DirectDebitAlreadyFailedError:{value:{error_code:"DIRECT_DEBIT_ALREADY_FAILED",message:"The direct_debit_id provided has already been processed and has failed."}},CustomerArray:{value:[{id:"7205eb90-ce35-436d-8fa1-3695ecc5889a",reference_id:"19283661",description:"Buyer",given_names:"John",middle_name:null,surname:"Doe",mobile_number:"+639123456789",phone_number:"+639123456789",email:"john.doe@xendit.co",nationality:"PH",addresses:[{country:"PH",street_line1:"25X Tall Building",street_line2:null,city:"Taguig City",province:"Taguig",state:"Metro Manila",postal_code:"1600",description:"home",metadata:null}],employment:{employer_name:"Xendit",nature_of_business:"Financial Tech",role_description:"Software Engineer"},date_of_birth:"1990-01-01",source_of_wealth:"Salary",metadata:{customer_device_id:1234567890}}]},Customer:{value:[{id:"7205eb90-ce35-436d-8fa1-3695ecc5889a",reference_id:19283661,description:"Buyer",given_names:"John",middle_name:null,surname:"Doe",mobile_number:639123456789,phone_number:639123456789,email:"john.doe@xendit.co",nationality:"PH",addresses:[{country:"PH",street_line1:"25X Tall Building",street_line2:null,city:"Taguig City",province:"Taguig",state:"Metro Manila",postal_code:1600,description:"home",metadata:null}],employment:{employer_name:"Xendit",nature_of_business:"Financial Tech",role_description:"Software Engineer"},date_of_birth:"1990-01-01",source_of_wealth:"Salary",metadata:{customer_device_id:1234567890}}]},LinkBankAccountRequest:{value:{customer_id:"7205eb90-ce35-436d-8fa1-3695ecc5889a",channel_code:"BA_BPI",properties:{success_redirect_url:"https://company.co/success",failure_redirect_url:"https://company.co/failure",callback_url:"https://company.co/callback"},metadata:{origin:"mobile_app"}}},LinkDebitCardRequest:{value:{customer_id:"7205eb90-ce35-436d-8fa1-3695ecc5889a",channel_code:"DC_BRI",properties:{account_mobile_number:"+62818555988",card_last_four:"1234",card_expiry:"06/24",account_email:"email@email.com"},metadata:{origin:"mobile_app"}}},LATAuthBankAccountResponse:{value:{id:"lat-aa620619-124f-41db-995b-66a52abe036a",customer_id:"7205eb90-ce35-436d-8fa1-3695ecc5889a",channel_code:"BA_BPI",authorizer_url:"https://link-web.xendit.co/auth/d88ede5dd016?state=",status:"PENDING",metadata:{origin:"mobile_app"}}},LATAuthDebitCardResponse:{value:{id:"lat-aa620619-124f-41db-995b-66a52abe036a",customer_id:"7205eb90-ce35-436d-8fa1-3695ecc5889a",channel_code:"DC_BRI",authorizer_url:null,status:"PENDING",metadata:{origin:"mobile_app"}}},BankAccountsArrayResponse:{value:[{id:"la-7f2bc3ad-8049-42ff-8b57-6578088e9641",channel_code:"BA_BPI",type:"BANK_ACCOUNT",properties:{account_details:"XXXXXX2487",account_hash:"233eca40ff303ba15bf39052ca3102c6",currency:"PHP",account_type:"SAVINGS",description:null}},{id:"la-0c98dd28-ba70-4f5f-9cbf-b55f015caaee",channel_code:"BA_BPI",type:"BANK_ACCOUNT",properties:{account_details:"XXXXXX8413",account_hash:"463ef8e8722b0761cdc8efba0dd40b9a",currency:"PHP",account_type:"SAVINGS",description:null}}]},DebitCardAccountsArrayResponse:{value:[{id:"la-1c0bd626-5e34-4aef-9f88-cea045c8535d",channel_code:"DC_BRI",type:"DEBIT_CARD",properties:{currency:"IDR",card_last_four:"1234",card_expiry:"06/24",description:"Sample description"}}]},BankAccountPaymentMethod:{value:{id:"pm-94c3acfd-b8f5-4237-a4bb-3702195729d1",type:"BANK_ACCOUNT",customer_id:"7205eb90-ce35-436d-8fa1-3695ecc5889a",properties:{id:"la-7f2bc3ad-8049-42ff-8b57-6578088e9641",channel_code:"BA_BPI",account_details:"XXXXXX2487",account_hash:"233eca40ff303ba15bf39052ca3102c6",currency:"PHP",account_type:"SAVINGS",description:null},status:"ACTIVE",created:"2020-03-19T05:34:55+0000",updated:"2020-03-19T05:34:55+0000",metadata:null}},BankAccountPaymentMethodArray:{value:[{id:"pm-94c3acfd-b8f5-4237-a4bb-3702195729d1",type:"BANK_ACCOUNT",customer_id:"7205eb90-ce35-436d-8fa1-3695ecc5889a",properties:{id:"la-7f2bc3ad-8049-42ff-8b57-6578088e9641",channel_code:"BA_BPI",account_details:"XXXXXX2487",account_hash:"233eca40ff303ba15bf39052ca3102c6",currency:"PHP",account_type:"SAVINGS",description:null},status:"ACTIVE",created:"2020-03-19T05:34:55+0000",updated:"2020-03-19T05:34:55+0000",metadata:null}]},DebitCardPaymentMethod:{value:{id:"pm-c30d4800-afe4-4e58-ad5f-cc006d169139",type:"DEBIT_CARD",customer_id:"ba830b92-4177-476e-b097-2ad5ae4d3e55",properties:{id:"la-1c0bd626-5e34-4aef-9f88-cea045c8535d",channel_code:"DC_BRI",currency:"IDR",card_last_four:"1234",card_expiry:"06/24",description:"Sample description"},status:"ACTIVE",created:"2020-03-19T05:34:55+0000",updated:"2020-03-19T05:34:55+0000",metadata:{}}},DirectDebitArray:{value:[{id:"ddpy-d290f1ee-6c54-4b01-90e6-d701748f0851",reference_id:"5162749123",payment_method_id:"pm-6d1c8be4-f4d9-421c-9f0b-ab3b2b6bbc39",currency:"PHP",amount:500.99,channel_code:"BA_BPI",basket:[{reference_id:"5162749123",name:"Wallet Top Up",market:"PH",type:"GOOD",description:"Assorted set",category:"Bundles","sub-category":"Special sets",price:"500.99",quantity:"1",url:"",metadata:{}}],description:"This is a description",callback_url:"http://callback.url",status:"COMPLETED",failure_reason:"INSUFFICIENT_BALANCE",is_otp_required:!0,otp_expiration_timestamp:"2006-08-29T09:12:33.001Z",created:"2006-08-29T09:12:33.001Z",updated:"2006-08-29T09:12:33.001Z",metadata:{}}]}}}},Redoc.init(e(t),{scrollYOffset:"#navbar"},document.getElementById("redoc-container"));