diff --git a/ballerina/Ballerina.toml b/ballerina/Ballerina.toml index b36e92a..8352416 100644 --- a/ballerina/Ballerina.toml +++ b/ballerina/Ballerina.toml @@ -5,8 +5,8 @@ name = "paypal.orders" version = "2.0.0" license = ["Apache-2.0"] authors = ["Ballerina"] -keywords = [] -# icon = "icon.png" # TODO: update icon.png +keywords = ["Paypal", "Payments", "Orders"] +icon = "icon.png" repository = "https://github.com/ballerina-platform/module-ballerinax-paypal.orders" [build-options] diff --git a/ballerina/Dependencies.toml b/ballerina/Dependencies.toml new file mode 100644 index 0000000..9e77ec3 --- /dev/null +++ b/ballerina/Dependencies.toml @@ -0,0 +1,370 @@ +# AUTO-GENERATED FILE. DO NOT MODIFY. + +# This file is auto-generated by Ballerina for managing dependency versions. +# It should not be modified by hand. + +[ballerina] +dependencies-toml-version = "2" +distribution-version = "2201.12.7" + +[[package]] +org = "ballerina" +name = "auth" +version = "2.14.0" +dependencies = [ + {org = "ballerina", name = "crypto"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.array"}, + {org = "ballerina", name = "lang.string"}, + {org = "ballerina", name = "log"} +] + +[[package]] +org = "ballerina" +name = "cache" +version = "3.10.0" +dependencies = [ + {org = "ballerina", name = "constraint"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "task"}, + {org = "ballerina", name = "time"} +] + +[[package]] +org = "ballerina" +name = "constraint" +version = "1.7.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] +modules = [ + {org = "ballerina", packageName = "constraint", moduleName = "constraint"} +] + +[[package]] +org = "ballerina" +name = "crypto" +version = "2.9.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "time"} +] + +[[package]] +org = "ballerina" +name = "data.jsondata" +version = "1.1.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.object"} +] +modules = [ + {org = "ballerina", packageName = "data.jsondata", moduleName = "data.jsondata"} +] + +[[package]] +org = "ballerina" +name = "file" +version = "1.12.0" +dependencies = [ + {org = "ballerina", name = "io"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "os"}, + {org = "ballerina", name = "time"} +] + +[[package]] +org = "ballerina" +name = "http" +version = "2.14.2" +dependencies = [ + {org = "ballerina", name = "auth"}, + {org = "ballerina", name = "cache"}, + {org = "ballerina", name = "constraint"}, + {org = "ballerina", name = "crypto"}, + {org = "ballerina", name = "data.jsondata"}, + {org = "ballerina", name = "file"}, + {org = "ballerina", name = "io"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "jwt"}, + {org = "ballerina", name = "lang.array"}, + {org = "ballerina", name = "lang.decimal"}, + {org = "ballerina", name = "lang.int"}, + {org = "ballerina", name = "lang.regexp"}, + {org = "ballerina", name = "lang.runtime"}, + {org = "ballerina", name = "lang.string"}, + {org = "ballerina", name = "lang.value"}, + {org = "ballerina", name = "log"}, + {org = "ballerina", name = "mime"}, + {org = "ballerina", name = "oauth2"}, + {org = "ballerina", name = "observe"}, + {org = "ballerina", name = "time"}, + {org = "ballerina", name = "url"} +] +modules = [ + {org = "ballerina", packageName = "http", moduleName = "http"}, + {org = "ballerina", packageName = "http", moduleName = "http.httpscerr"} +] + +[[package]] +org = "ballerina" +name = "io" +version = "1.8.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.value"} +] + +[[package]] +org = "ballerina" +name = "jballerina.java" +version = "0.0.0" + +[[package]] +org = "ballerina" +name = "jwt" +version = "2.15.0" +dependencies = [ + {org = "ballerina", name = "cache"}, + {org = "ballerina", name = "crypto"}, + {org = "ballerina", name = "io"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.int"}, + {org = "ballerina", name = "lang.string"}, + {org = "ballerina", name = "log"}, + {org = "ballerina", name = "time"} +] + +[[package]] +org = "ballerina" +name = "lang.__internal" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.object"} +] + +[[package]] +org = "ballerina" +name = "lang.array" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.__internal"} +] + +[[package]] +org = "ballerina" +name = "lang.decimal" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "lang.error" +version = "0.0.0" +scope = "testOnly" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "lang.int" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.__internal"}, + {org = "ballerina", name = "lang.object"} +] + +[[package]] +org = "ballerina" +name = "lang.object" +version = "0.0.0" + +[[package]] +org = "ballerina" +name = "lang.regexp" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "lang.runtime" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] +modules = [ + {org = "ballerina", packageName = "lang.runtime", moduleName = "lang.runtime"} +] + +[[package]] +org = "ballerina" +name = "lang.string" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.regexp"} +] + +[[package]] +org = "ballerina" +name = "lang.value" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "log" +version = "2.12.0" +dependencies = [ + {org = "ballerina", name = "io"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.value"}, + {org = "ballerina", name = "observe"} +] +modules = [ + {org = "ballerina", packageName = "log", moduleName = "log"} +] + +[[package]] +org = "ballerina" +name = "mime" +version = "2.12.0" +dependencies = [ + {org = "ballerina", name = "io"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.int"}, + {org = "ballerina", name = "log"} +] + +[[package]] +org = "ballerina" +name = "oauth2" +version = "2.14.0" +dependencies = [ + {org = "ballerina", name = "cache"}, + {org = "ballerina", name = "crypto"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "log"}, + {org = "ballerina", name = "time"}, + {org = "ballerina", name = "url"} +] + +[[package]] +org = "ballerina" +name = "observe" +version = "1.5.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "os" +version = "1.10.0" +dependencies = [ + {org = "ballerina", name = "io"}, + {org = "ballerina", name = "jballerina.java"} +] +modules = [ + {org = "ballerina", packageName = "os", moduleName = "os"} +] + +[[package]] +org = "ballerina" +name = "task" +version = "2.7.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "time"} +] + +[[package]] +org = "ballerina" +name = "test" +version = "0.0.0" +scope = "testOnly" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.array"}, + {org = "ballerina", name = "lang.error"} +] +modules = [ + {org = "ballerina", packageName = "test", moduleName = "test"} +] + +[[package]] +org = "ballerina" +name = "time" +version = "2.7.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] + +[[package]] +org = "ballerina" +name = "url" +version = "2.6.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"} +] +modules = [ + {org = "ballerina", packageName = "url", moduleName = "url"} +] + +[[package]] +org = "ballerina" +name = "uuid" +version = "1.10.0" +scope = "testOnly" +dependencies = [ + {org = "ballerina", name = "crypto"}, + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "lang.int"}, + {org = "ballerina", name = "time"} +] +modules = [ + {org = "ballerina", packageName = "uuid", moduleName = "uuid"} +] + +[[package]] +org = "ballerinai" +name = "observe" +version = "0.0.0" +dependencies = [ + {org = "ballerina", name = "jballerina.java"}, + {org = "ballerina", name = "observe"} +] +modules = [ + {org = "ballerinai", packageName = "observe", moduleName = "observe"} +] + +[[package]] +org = "ballerinax" +name = "paypal.orders" +version = "2.0.0" +dependencies = [ + {org = "ballerina", name = "constraint"}, + {org = "ballerina", name = "data.jsondata"}, + {org = "ballerina", name = "http"}, + {org = "ballerina", name = "lang.runtime"}, + {org = "ballerina", name = "log"}, + {org = "ballerina", name = "os"}, + {org = "ballerina", name = "test"}, + {org = "ballerina", name = "url"}, + {org = "ballerina", name = "uuid"}, + {org = "ballerinai", name = "observe"} +] +modules = [ + {org = "ballerinax", packageName = "paypal.orders", moduleName = "paypal.orders"} +] + diff --git a/ballerina/client.bal b/ballerina/client.bal index c000777..47cb40d 100644 --- a/ballerina/client.bal +++ b/ballerina/client.bal @@ -1,3 +1,6 @@ +// AUTO-GENERATED FILE. DO NOT MODIFY. +// This file is auto-generated by the Ballerina OpenAPI tool. + // Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). // // WSO2 LLC. licenses this file to you under the Apache License, @@ -13,3 +16,128 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. + +import ballerina/data.jsondata; +import ballerina/http; + +# An order represents a payment between two or more parties. Use the Orders API to create, update, retrieve, authorize, and capture orders. +public isolated client class Client { + final http:Client clientEp; + # Gets invoked to initialize the `connector`. + # + # + config - The configurations to be used when initializing the `connector` + # + serviceUrl - URL of the target service + # + return - An error if connector initialization failed + public isolated function init(ConnectionConfig config, string serviceUrl = "https://api-m.sandbox.paypal.com/v2/checkout") returns error? { + http:ClientConfiguration httpClientConfig = {auth: config.auth, httpVersion: config.httpVersion, http1Settings: config.http1Settings, http2Settings: config.http2Settings, timeout: config.timeout, forwarded: config.forwarded, followRedirects: config.followRedirects, poolConfig: config.poolConfig, cache: config.cache, compression: config.compression, circuitBreaker: config.circuitBreaker, retryConfig: config.retryConfig, cookieConfig: config.cookieConfig, responseLimits: config.responseLimits, secureSocket: config.secureSocket, proxy: config.proxy, socketConfig: config.socketConfig, validation: config.validation, laxDataBinding: config.laxDataBinding}; + self.clientEp = check new (serviceUrl, httpClientConfig); + } + + # Create order + # + # + headers - Headers to be sent with the request + # + return - A successful response to an idempotent request returns the HTTP `200 OK` status code with a JSON response body that shows order details + resource isolated function post orders(OrderRequest payload, OrdersCreateHeaders headers = {}) returns Order|error { + string resourcePath = string `/orders`; + map httpHeaders = http:getHeaderMap(headers); + http:Request request = new; + json jsonBody = jsondata:toJson(payload); + request.setPayload(jsonBody, "application/json"); + return self.clientEp->post(resourcePath, request, httpHeaders); + } + + # Show order details + # + # + id - The ID of the order that the tracking information is associated with + # + headers - Headers to be sent with the request + # + queries - Queries to be sent with the request + # + return - A successful request returns the HTTP `200 OK` status code and a JSON response body that shows order details + resource isolated function get orders/[string id](map headers = {}, *OrdersGetQueries queries) returns Order|error { + string resourcePath = string `/orders/${getEncodedUri(id)}`; + resourcePath = resourcePath + check getPathForQueryParam(queries); + return self.clientEp->get(resourcePath, headers); + } + + # Update order + # + # + id - The ID of the order that the tracking information is associated with + # + headers - Headers to be sent with the request + # + return - A successful request returns the HTTP `204 No Content` status code with an empty object in the JSON response body + resource isolated function patch orders/[string id](PatchRequest payload, map headers = {}) returns error? { + string resourcePath = string `/orders/${getEncodedUri(id)}`; + http:Request request = new; + json jsonBody = jsondata:toJson(payload); + request.setPayload(jsonBody, "application/json"); + return self.clientEp->patch(resourcePath, request, headers); + } + + # Confirm the Order + # + # + id - The ID of the order that the tracking information is associated with + # + headers - Headers to be sent with the request + # + return - A successful request indicates that the payment source was added to the Order. A successful request returns the HTTP `200 OK` status code with a JSON response body that shows order details + resource isolated function post orders/[string id]/confirm\-payment\-source(ConfirmOrderRequest payload, OrdersConfirmHeaders headers = {}) returns Order|error { + string resourcePath = string `/orders/${getEncodedUri(id)}/confirm-payment-source`; + map httpHeaders = http:getHeaderMap(headers); + http:Request request = new; + json jsonBody = jsondata:toJson(payload); + request.setPayload(jsonBody, "application/json"); + return self.clientEp->post(resourcePath, request, httpHeaders); + } + + # Authorize payment for order + # + # + id - The ID of the order that the tracking information is associated with + # + headers - Headers to be sent with the request + # + return - A successful response to an idempotent request returns the HTTP `200 OK` status code with a JSON response body that shows authorized payment details + resource isolated function post orders/[string id]/authorize(OrderAuthorizeRequest payload, OrdersAuthorizeHeaders headers = {}) returns OrderAuthorizeResponse|error { + string resourcePath = string `/orders/${getEncodedUri(id)}/authorize`; + map httpHeaders = http:getHeaderMap(headers); + http:Request request = new; + json jsonBody = jsondata:toJson(payload); + request.setPayload(jsonBody, "application/json"); + return self.clientEp->post(resourcePath, request, httpHeaders); + } + + # Capture payment for order + # + # + id - The ID of the order that the tracking information is associated with + # + headers - Headers to be sent with the request + # + return - A successful response to an idempotent request returns the HTTP `200 OK` status code with a JSON response body that shows captured payment details + resource isolated function post orders/[string id]/capture(OrderCaptureRequest payload, OrdersCaptureHeaders headers = {}) returns Order|error { + string resourcePath = string `/orders/${getEncodedUri(id)}/capture`; + map httpHeaders = http:getHeaderMap(headers); + http:Request request = new; + json jsonBody = jsondata:toJson(payload); + request.setPayload(jsonBody, "application/json"); + return self.clientEp->post(resourcePath, request, httpHeaders); + } + + # Add tracking information for an Order. + # + # + id - The ID of the order that the tracking information is associated with + # + headers - Headers to be sent with the request + # + return - A successful response to an idempotent request returns the HTTP `200 OK` status code with a JSON response body that shows tracker details + resource isolated function post orders/[string id]/track(OrderTrackerRequest payload, OrdersTrackCreateHeaders headers = {}) returns Order|error { + string resourcePath = string `/orders/${getEncodedUri(id)}/track`; + map httpHeaders = http:getHeaderMap(headers); + http:Request request = new; + json jsonBody = jsondata:toJson(payload); + request.setPayload(jsonBody, "application/json"); + return self.clientEp->post(resourcePath, request, httpHeaders); + } + + # Update or cancel tracking information for a PayPal order + # + # + id - The ID of the order that the tracking information is associated with + # + trackerId - The order tracking ID + # + headers - Headers to be sent with the request + # + return - A successful request returns the HTTP `204 No Content` status code with an empty object in the JSON response body + resource isolated function patch orders/[string id]/trackers/[string trackerId](PatchRequest payload, map headers = {}) returns error? { + string resourcePath = string `/orders/${getEncodedUri(id)}/trackers/${getEncodedUri(trackerId)}`; + http:Request request = new; + json jsonBody = jsondata:toJson(payload); + request.setPayload(jsonBody, "application/json"); + return self.clientEp->patch(resourcePath, request, headers); + } +} diff --git a/ballerina/icon.png b/ballerina/icon.png new file mode 100644 index 0000000..224668c Binary files /dev/null and b/ballerina/icon.png differ diff --git a/ballerina/tests/mock_service.bal b/ballerina/tests/mock_service.bal new file mode 100644 index 0000000..d5b56f9 --- /dev/null +++ b/ballerina/tests/mock_service.bal @@ -0,0 +1,204 @@ +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +import ballerina/http; + +const pUnits = [ + { + reference_id: "default", + amount: { + currency_code: "USD", + value: "200.00", + breakdown: { + item_total: { + currency_code: "USD", + value: "180.00" + }, + shipping: { + currency_code: "USD", + value: "20.00" + } + } + }, + payee: { + email_address: "sb-wrafi36853704@business.example.com", + merchant_id: "M6V5C6A45Z32W" + } + } +]; + +const sampleCaptureOrder = { + id: "6JE657202M751084B", + intent: "CAPTURE", + status: "CREATED", + purchase_units: pUnits, + create_time: "2025-06-17T08:53:19Z" +}; + +const sampleAuthorizeOrder = { + id: "6JE657202M751084C", + intent: "AUTHORIZE", + status: "CREATED", + purchase_units: pUnits, + create_time: "2025-06-17T08:53:19Z" +}; + +service on new http:Listener(9090) { + resource isolated function post orders(OrderRequest payload) returns Order { + return payload.intent == "CAPTURE" ? sampleCaptureOrder : sampleAuthorizeOrder; + } + + resource isolated function get orders/[string id]() returns Order { + return id == sampleCaptureOrder.id ? sampleCaptureOrder : sampleAuthorizeOrder; + } + + resource isolated function patch orders/[string id](PatchRequest payload) {} + + resource isolated function post orders/[string id]/confirm\-payment\-source(ConfirmOrderRequest payload) returns Order { + PaymentSourceResponse ps = { + card: { + name: "John Doe", + last_digits: "8131", + expiry: "2035-12", + brand: "VISA", + available_networks: ["VISA"], + 'type: "CREDIT", + bin_details: { + bin: "403203", + issuing_bank: "Baxter Credit Union", + bin_country_code: "US" + } + } + }; + + if id == sampleCaptureOrder.id { + return { + id: sampleCaptureOrder.id, + intent: sampleCaptureOrder.intent, + status: "APPROVED", + purchase_units: sampleCaptureOrder.purchase_units, + payment_source: ps, + create_time: sampleCaptureOrder.create_time + }; + } + + return { + id: sampleAuthorizeOrder.id, + intent: sampleAuthorizeOrder.intent, + status: "APPROVED", + purchase_units: sampleAuthorizeOrder.purchase_units, + payment_source: ps, + create_time: sampleAuthorizeOrder.create_time + }; + } + + resource isolated function post orders/[string id]/capture(OrderCaptureRequest payload) returns Order|http:NotFound|error { + if id != sampleCaptureOrder.id { + return http:NOT_FOUND; + } + + Order capturedOrder = check sampleCaptureOrder.cloneWithType(); + PurchaseUnit[]? ps = capturedOrder.purchase_units; + if ps is PurchaseUnit[] { + ps[0].payments = { + captures: [ + { + id: "6JE657202M751084D", + status: "COMPLETED", + amount: { + currency_code: "USD", + value: "200.00" + }, + create_time: "2025-06-17T08:53:19Z" + } + ] + }; + } + + return { + id: capturedOrder.id, + intent: capturedOrder.intent, + status: "COMPLETED", + purchase_units: capturedOrder.purchase_units, + create_time: capturedOrder.create_time + }; + + } + + resource isolated function post orders/[string id]/authorize(OrderAuthorizeRequest payload) returns OrderAuthorizeResponse|http:NotFound|error { + if id != sampleAuthorizeOrder.id { + return http:NOT_FOUND; + } + + Order authorizedOrder = check sampleAuthorizeOrder.cloneWithType(); + PurchaseUnit[]? ps = authorizedOrder.purchase_units; + if ps is PurchaseUnit[] { + ps[0].payments = { + authorizations: [ + { + id: "6JE657202M751084E", + status: "CREATED", + amount: { + currency_code: "USD", + value: "200.00" + }, + create_time: "2025-06-17T08:53:19Z" + } + ] + }; + } + + return { + id: authorizedOrder.id, + intent: authorizedOrder.intent, + status: "COMPLETED", + purchase_units: authorizedOrder.purchase_units, + create_time: authorizedOrder.create_time + }; + + } + + resource isolated function post orders/[string id]/track(OrderTrackerRequest payload) returns Order|http:NotFound|error { + if id != sampleCaptureOrder.id { + return http:NOT_FOUND; + } + + Order trackedOrder = check sampleCaptureOrder.cloneWithType(); + PurchaseUnit[]? ps = trackedOrder.purchase_units; + if ps is PurchaseUnit[] { + ps[0].shipping = { + trackers: [ + { + id: "TRACKER123456", + "tracking_number": payload.tracking_number, + "status": payload.status + } + ] + }; + } + + return { + id: trackedOrder.id, + intent: trackedOrder.intent, + status: trackedOrder.status, + purchase_units: trackedOrder.purchase_units, + create_time: trackedOrder.create_time + }; + + } + + resource isolated function patch orders/[string id]/trackers/[string trackerId](PatchRequest payload) {} +}; diff --git a/ballerina/tests/sts_service.bal b/ballerina/tests/sts_service.bal new file mode 100644 index 0000000..428bd65 --- /dev/null +++ b/ballerina/tests/sts_service.bal @@ -0,0 +1,52 @@ +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +import ballerina/http; + +configurable int HTTP_SERVER_PORT = 9444; +configurable int TOKEN_VALIDITY_PERIOD = 10000; + +http:Listener stsListener = check new (HTTP_SERVER_PORT); + +http:Service sts = service object { + resource function post token() returns json { + return { + "access_token": "test-access-token", + "token_type": "example", + "expires_in": TOKEN_VALIDITY_PERIOD, + "example_parameter": "example_value" + }; + } + + resource function post introspect() returns json { + return { + "active": true, + "scope": "read write", + "client_id": "test-client-id", + "username": "test-user", + "token_type": "example", + "exp": TOKEN_VALIDITY_PERIOD, + "iat": 1419350238, + "nbf": 1419350238, + "sub": "Z5O3upPC88QrAjx00dis", + "aud": "https://protected.example.net/resource", + "iss": "https://server.example.com/", + "jti": "JlbmMiOiJBMTI4Q0JDLUhTMjU2In", + "extension_field": "twenty-seven", + "scp": "admin" + }; + } +}; diff --git a/ballerina/tests/tests.bal b/ballerina/tests/tests.bal new file mode 100644 index 0000000..d202334 --- /dev/null +++ b/ballerina/tests/tests.bal @@ -0,0 +1,332 @@ +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +import ballerina/lang.runtime; +import ballerina/log; +import ballerina/os; +import ballerina/test; +import ballerina/uuid; + +configurable boolean isLiveServer = os:getEnv("IS_LIVE_SERVER") == "true"; + +configurable string clientId = os:getEnv("PAYPAL_CLIENT_ID"); +configurable string clientSecret = os:getEnv("PAYPAL_CLIENT_SECRET"); + +final string serviceUrl = isLiveServer ? "https://api-m.sandbox.paypal.com/v2/checkout" : "http://localhost:9090"; +final string tokenUrl = isLiveServer ? "https://api-m.sandbox.paypal.com/v1/oauth2/token" : "http://localhost:9444/oauth2/token"; + +Client paypal = test:mock(Client); + +string captureOrderId = ""; +string captureOrderPaymentCaptureId = ""; +string captureOrderTrackingId = ""; + +string authorizeOrderId = ""; + +const purchaseUnits = [ + { + amount: { + value: "200.00", + currency_code: "USD", + breakdown: { + item_total: { + currency_code: "USD", + value: "180.00" + }, + shipping: { + value: "20.00", + currency_code: "USD" + } + } + } + } +]; + +@test:BeforeSuite +function initClient() returns error? { + if isLiveServer { + paypal = check new ({auth: {clientId, clientSecret, tokenUrl}}, serviceUrl); + } else { + check stsListener.attach(sts, "/oauth2"); + check stsListener.'start(); + + runtime:registerListener(stsListener); + log:printInfo(string `STS started on port: ${HTTP_SERVER_PORT} (HTTP)`); + + paypal = check new ({auth: {clientId, clientSecret, tokenUrl}}, serviceUrl); + } +} + +@test:Config { + groups: ["live_tests", "mock_tests"] +} +function createCaptureOrder() returns error? { + Order response = check paypal->/orders.post({ + intent: "CAPTURE", + purchase_units: purchaseUnits + }); + + test:assertNotEquals(response.id, ()); + + captureOrderId = check response.id.ensureType(); + + test:assertEquals(response.intent, "CAPTURE"); + test:assertEquals(response.status, "CREATED"); +} + +@test:Config { + groups: ["live_tests", "mock_tests"], + dependsOn: [createCaptureOrder] +} +function getCaptureOrder() returns error? { + Order response = check paypal->/orders/[captureOrderId].get(); + + test:assertEquals(response.id, captureOrderId); + test:assertEquals(response.intent, "CAPTURE"); + test:assertEquals(response.status, "CREATED"); + + test:assertNotEquals(response.create_time, ()); +} + +@test:Config { + groups: ["live_tests", "mock_tests"], + dependsOn: [getCaptureOrder] +} +function updateCaptureOrder() returns error? { + string invoiceId = uuid:createRandomUuid(); + + check paypal->/orders/[captureOrderId].patch([ + { + op: "add", + path: "/purchase_units/@reference_id=='default'/invoice_id", + value: invoiceId + } + ]); + + if isLiveServer { + Order response = check paypal->/orders/[captureOrderId].get(); + + PurchaseUnit[]? purchaseUnits = response.purchase_units; + if purchaseUnits is () { + test:assertFail("purchase units should be present in order response"); + } + + test:assertEquals(purchaseUnits.length(), 1, "the purchase units length should be one"); + + PurchaseUnit pu = purchaseUnits[0]; + test:assertEquals(pu.reference_id, "default"); + + test:assertEquals(pu.invoice_id, invoiceId, "the invoice id should be updated"); + } +} + +@test:Config { + groups: ["live_tests", "mock_tests"], + dependsOn: [updateCaptureOrder] +} +function confirmCaptureOrderPaymentSource() returns error? { + Order response = check paypal->/orders/[captureOrderId]/confirm\-payment\-source.post({ + payment_source: { + card: { + number: "4032037064388131", + expiry: "2035-12" + } + } + }); + + test:assertEquals(response.id, captureOrderId); + test:assertEquals(response.status, "APPROVED"); + + PaymentSourceResponse ps = check response.payment_source.ensureType(); + CardResponse cr = check ps.card.ensureType(); + + test:assertEquals(cr.last_digits, "8131"); + test:assertEquals(cr.expiry, "2035-12"); +} + +@test:Config { + groups: ["live_tests", "mock_tests"], + dependsOn: [confirmCaptureOrderPaymentSource] +} +function captureOrder() returns error? { + Order response = check paypal->/orders/[captureOrderId]/capture.post({ + payment_source: { + card: { + name: "John Doe", + number: "4032037064388131", + expiry: "2035-12" + } + } + }); + + test:assertEquals(response.id, captureOrderId); + test:assertEquals(response.status, "COMPLETED"); + + PurchaseUnit[]? purchaseUnits = response.purchase_units; + if purchaseUnits is () { + test:assertFail("purchase units should be present in order response"); + } + + test:assertEquals(purchaseUnits.length(), 1, "the purchase units length should be one"); + + PurchaseUnit pu = purchaseUnits[0]; + test:assertEquals(pu.reference_id, "default"); + + PaymentCollection pc = check pu.payments.ensureType(); + Capture[] captures = check pc.captures.ensureType(); + test:assertEquals(captures.length(), 1, "the captures length should be one"); + + Capture cap = captures[0]; + test:assertEquals(cap.status, "COMPLETED"); + test:assertNotEquals(cap.id, ()); + + captureOrderPaymentCaptureId = check cap.id.ensureType(); +} + +@test:Config { + groups: ["live_tests", "mock_tests"], + dependsOn: [captureOrder] +} +function addTrackingInfo() returns error? { + string trackingNumber = uuid:createRandomUuid(); + + Order response = check paypal->/orders/[captureOrderId]/track.post({ + transaction_id: captureOrderId, + capture_id: captureOrderPaymentCaptureId, + tracking_number: trackingNumber, + status: "IN_TRANSIT", + carrier: "DPD_RU" + }); + + PurchaseUnit[]? purchaseUnits = response.purchase_units; + if purchaseUnits is () { + test:assertFail("purchase units should be present in order response"); + } + + test:assertEquals(purchaseUnits.length(), 1, "the purchase units length should be one"); + + PurchaseUnit pu = purchaseUnits[0]; + test:assertEquals(pu.reference_id, "default"); + + ShippingWithTrackingDetails? trackingDetails = pu.shipping; + if trackingDetails is () { + test:assertFail("shipping tracking details should be present in order response"); + } + + Tracker[] trackers = check trackingDetails.trackers.ensureType(); + test:assertEquals(trackers.length(), 1); + + Tracker tr = trackers[0]; + captureOrderTrackingId = check tr.id.ensureType(); +} + +@test:Config { + groups: ["live_tests", "mock_tests"], + dependsOn: [addTrackingInfo] +} +function updateTrackingInfo() returns error? { + check paypal->/orders/[captureOrderId]/trackers/[captureOrderTrackingId].patch([ + { + op: "replace", + path: "/status", + value: "CANCELLED" + } + ]); +} + +@test:Config { + groups: ["live_tests", "mock_tests"] +} +function createAuthorizeOrder() returns error? { + Order response = check paypal->/orders.post({ + intent: "AUTHORIZE", + purchase_units: purchaseUnits + }); + + test:assertNotEquals(response.id, ()); + + authorizeOrderId = check response.id.ensureType(); + + test:assertEquals(response.intent, "AUTHORIZE"); + test:assertEquals(response.status, "CREATED"); +} + +@test:Config { + groups: ["live_tests", "mock_tests"], + dependsOn: [createAuthorizeOrder] +} +function getAuthorizeOrder() returns error? { + Order response = check paypal->/orders/[authorizeOrderId].get(); + + test:assertEquals(response.id, authorizeOrderId); + test:assertEquals(response.intent, "AUTHORIZE"); + test:assertEquals(response.status, "CREATED"); + + test:assertNotEquals(response.create_time, ()); +} + +@test:Config { + groups: ["live_tests", "mock_tests"], + dependsOn: [getAuthorizeOrder] +} +function confirmAuthorizeOrderPaymentSource() returns error? { + Order response = check paypal->/orders/[authorizeOrderId]/confirm\-payment\-source.post({ + payment_source: { + card: { + number: "4032037064388131", + expiry: "2035-12" + } + } + }); + + test:assertEquals(response.id, authorizeOrderId); + test:assertEquals(response.status, "APPROVED"); + + PaymentSourceResponse ps = check response.payment_source.ensureType(); + CardResponse cr = check ps.card.ensureType(); + + test:assertEquals(cr.last_digits, "8131"); + test:assertEquals(cr.expiry, "2035-12"); +} + +@test:Config { + groups: ["live_tests", "mock_tests"], + dependsOn: [confirmAuthorizeOrderPaymentSource] +} +function authorizeOrder() returns error? { + OrderAuthorizeResponse response = check paypal->/orders/[authorizeOrderId]/authorize.post({}); + + test:assertEquals(response.id, authorizeOrderId); + test:assertEquals(response.status, "COMPLETED"); + + PurchaseUnit[]? purchaseUnits = response.purchase_units; + if purchaseUnits is () { + test:assertFail("purchase units should be present in order response"); + } + + test:assertEquals(purchaseUnits.length(), 1, "the purchase units length should be one"); + + PurchaseUnit pu = purchaseUnits[0]; + test:assertEquals(pu.reference_id, "default"); + + PaymentCollection pc = check pu.payments.ensureType(); + AuthorizationWithAdditionalData[] authorizations = check pc.authorizations.ensureType(); + test:assertEquals(authorizations.length(), 1); + + AuthorizationWithAdditionalData auth = authorizations[0]; + test:assertEquals(auth.status, "CREATED"); + test:assertNotEquals(auth.id, ()); +} diff --git a/ballerina/types.bal b/ballerina/types.bal new file mode 100644 index 0000000..eca991e --- /dev/null +++ b/ballerina/types.bal @@ -0,0 +1,1979 @@ +// AUTO-GENERATED FILE. DO NOT MODIFY. +// This file is auto-generated by the Ballerina OpenAPI tool. + +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +import ballerina/constraint; +import ballerina/http; + +# The details about a customer in PayPal's system of record +public type Customer record { + Email email_address?; + # The phone information + PhoneWithType phone?; + # The unique ID for a customer generated by PayPal + MerchantPartnerCustomerId id?; +}; + +# Information used to pay using iDEAL +public type Ideal record { + CountryCode country_code?; + # The full name representation like Mr J Smith + FullName name?; + AltpayRecurringAttributes attributes?; + # The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank + Bic bic?; + IbanLastChars iban_last_chars?; +}; + +# Information needed to pay using giropay +public type Giropay record { + CountryCode country_code?; + # The full name representation like Mr J Smith + FullName name?; + # The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank + Bic bic?; +}; + +# The phone type +public type PhoneType2 "FAX"|"HOME"|"MOBILE"|"OTHER"|"PAGER"|"WORK"; + +public type AltpayRecurringAttributesRequest anydata; + +public type PaypalWalletVaultResponseAllOf2 record { + # The details about a customer in PayPal's system of record + PaypalWalletCustomer customer?; + VaultOwnerId owner_id?; +}; + +# Information needed to pay using eps +public type EpsRequest record { + ExperienceContextBase experience_context?; + CountryCode country_code; + # The full name representation like Mr J Smith + FullName name; +}; + +# The [three-character ISO-4217 currency code](/api/rest/reference/currency-codes/) that identifies the currency +@constraint:String {maxLength: 3, minLength: 3} +public type CurrencyCode string; + +# The phone information +public type PhoneWithType record { + PhoneType phone_type?; + Phone phone_number; +}; + +# Customizes the buyer experience during the approval process for payment with Venmo.
Note: Partners and Marketplaces might configure shipping_preference during partner account setup, which overrides the request values.
+public type VenmoWalletExperienceContext record { + # The business name of the merchant. The pattern is defined by an external party and supports Unicode + @constraint:String {maxLength: 127, minLength: 1, pattern: re `^.*$`} + string brand_name?; + # The location from which the shipping address is derived + "GET_FROM_FILE"|"NO_SHIPPING"|"SET_PROVIDED_ADDRESS" shipping_preference = "GET_FROM_FILE"; +}; + +# The details about a saved payment source +public type VaultResponse record { + # An array of request-related HATEOAS links + @constraint:Array {maxLength: 10, minLength: 1} + LinkDescription[] links?; + # The PayPal-generated ID for the saved payment source + @constraint:String {maxLength: 255, minLength: 1} + string id?; + # The vault status + # + # # Deprecated + @deprecated + "VAULTED"|"CREATED"|"APPROVED" status?; + # The details about a customer in PayPal's system of record + Customer customer?; +}; + +# Information about the decrypted apple pay payment data for the token like cryptogram, eci indicator +public type ApplePayPaymentData record { + # Bank Key encrypted Apple Pay PIN. The pattern is defined by an external party and supports Unicode + @constraint:String {maxLength: 2000, minLength: 1, pattern: re `^.*$`} + string pin?; + # Encoded Apple Pay EMV Payment Structure used for payments in China. The pattern is defined by an external party and supports Unicode + @constraint:String {maxLength: 2000, minLength: 1, pattern: re `^.*$`} + string emv_data?; + # ECI indicator, as defined by 3- Secure. The pattern is defined by an external party and supports Unicode + @constraint:String {maxLength: 256, minLength: 1, pattern: re `^.*$`} + string eci_indicator?; + # Online payment cryptogram, as defined by 3D Secure. The pattern is defined by an external party and supports Unicode + @constraint:String {maxLength: 2000, minLength: 1, pattern: re `^.*$`} + string cryptogram?; +}; + +# The carrier for the shipment. Some carriers have a global version as well as local subsidiaries. The subsidiaries are repeated over many countries and might also have an entry in the global list. Choose the carrier for your country. If the carrier is not available for your country, choose the global version of the carrier. If your carrier name is not in the list, set `carrier` to `OTHER` and set carrier name in `carrier_name_other`. For allowed values, see Carriers +public type ShipmentCarrier "DPD_RU"|"BG_BULGARIAN_POST"|"KR_KOREA_POST"|"ZA_COURIERIT"|"FR_EXAPAQ"|"ARE_EMIRATES_POST"|"GAC"|"GEIS"|"SF_EX"|"PAGO"|"MYHERMES"|"DIAMOND_EUROGISTICS"|"CORPORATECOURIERS_WEBHOOK"|"BOND"|"OMNIPARCEL"|"SK_POSTA"|"PUROLATOR"|"FETCHR_WEBHOOK"|"THEDELIVERYGROUP"|"CELLO_SQUARE"|"TARRIVE"|"COLLIVERY"|"MAINFREIGHT"|"IND_FIRSTFLIGHT"|"ACSWORLDWIDE"|"AMSTAN"|"OKAYPARCEL"|"ENVIALIA_REFERENCE"|"SEUR_ES"|"CONTINENTAL"|"FDSEXPRESS"|"AMAZON_FBA_SWISHIP"|"WYNGS"|"DHL_ACTIVE_TRACING"|"ZYLLEM"|"RUSTON"|"XPOST"|"CORREOS_ES"|"DHL_FR"|"PAN_ASIA"|"BRT_IT"|"SRE_KOREA"|"SPEEDEE"|"TNT_UK"|"VENIPAK"|"SHREENANDANCOURIER"|"CROSHOT"|"NIPOST_NG"|"EPST_GLBL"|"NEWGISTICS"|"POST_SLOVENIA"|"JERSEY_POST"|"BOMBINOEXP"|"WMG"|"XQ_EXPRESS"|"FURDECO"|"LHT_EXPRESS"|"SOUTH_AFRICAN_POST_OFFICE"|"SPOTON"|"DIMERCO"|"CYPRUS_POST_CYP"|"ABCUSTOM"|"IND_DELIVREE"|"CN_BESTEXPRESS"|"DX_SFTP"|"PICKUPP_MYS"|"FMX"|"HELLMANN"|"SHIP_IT_ASIA"|"KERRY_ECOMMERCE"|"FRETERAPIDO"|"PITNEY_BOWES"|"XPRESSEN_DK"|"SEUR_SP_API"|"DELIVERYONTIME"|"JINSUNG"|"TRANS_KARGO"|"SWISHIP_DE"|"IVOY_WEBHOOK"|"AIRMEE_WEBHOOK"|"DHL_BENELUX"|"FIRSTMILE"|"FASTWAY_IR"|"HH_EXP"|"MYS_MYPOST_ONLINE"|"TNT_NL"|"TIPSA"|"TAQBIN_MY"|"KGMHUB"|"INTEXPRESS"|"OVERSE_EXP"|"ONECLICK"|"ROADRUNNER_FREIGHT"|"GLS_CROTIA"|"MRW_FTP"|"BLUEX"|"DYLT"|"DPD_IR"|"SIN_GLBL"|"TUFFNELLS_REFERENCE"|"CJPACKET"|"MILKMAN"|"ASIGNA"|"ONEWORLDEXPRESS"|"ROYAL_MAIL"|"VIA_EXPRESS"|"TIGFREIGHT"|"ZTO_EXPRESS"|"TWO_GO"|"IML"|"INTEL_VALLEY"|"EFS"|"UK_UK_MAIL"|"RAM"|"ALLIEDEXPRESS"|"APC_OVERNIGHT"|"SHIPPIT"|"TFM"|"M_XPRESS"|"HDB_BOX"|"CLEVY_LINKS"|"IBEONE"|"FIEGE_NL"|"KWE_GLOBAL"|"CTC_EXPRESS"|"LAO_POST"|"AMAZON"|"MORE_LINK"|"JX"|"EASY_MAIL"|"ADUIEPYLE"|"GB_PANTHER"|"EXPRESSSALE"|"SG_DETRACK"|"TRUNKRS_WEBHOOK"|"MATDESPATCH"|"DICOM"|"MBW"|"KHM_CAMBODIA_POST"|"SINOTRANS"|"BRT_IT_PARCELID"|"DHL_SUPPLY_CHAIN"|"DHL_PL"|"TOPYOU"|"PALEXPRESS"|"DHL_SG"|"CN_WEDO"|"FULFILLME"|"DPD_DELISTRACK"|"UPS_REFERENCE"|"CARIBOU"|"LOCUS_WEBHOOK"|"DSV"|"CN_GOFLY"|"P2P_TRC"|"DIRECTPARCELS"|"NOVA_POSHTA_INT"|"FEDEX_POLAND"|"CN_JCEX"|"FAR_INTERNATIONAL"|"IDEXPRESS"|"GANGBAO"|"NEWAY"|"POSTNL_INT_3_S"|"RPX_ID"|"DESIGNERTRANSPORT_WEBHOOK"|"GLS_SLOVEN"|"PARCELLED_IN"|"GSI_EXPRESS"|"CON_WAY"|"BROUWER_TRANSPORT"|"CPEX"|"ISRAEL_POST"|"DTDC_IN"|"PTT_POST"|"XDE_WEBHOOK"|"TOLOS"|"GIAO_HANG"|"GEODIS_ESPACE"|"MAGYAR_HU"|"DOORDASH_WEBHOOK"|"TIKI_ID"|"CJ_HK_INTERNATIONAL"|"STAR_TRACK_EXPRESS"|"HELTHJEM"|"SFB2C"|"FREIGHTQUOTE"|"LANDMARK_GLOBAL_REFERENCE"|"PARCEL2GO"|"DELNEXT"|"RCL"|"CGS_EXPRESS"|"HK_POST"|"SAP_EXPRESS"|"PARCELPOST_SG"|"HERMES"|"IND_SAFEEXPRESS"|"TOPHATTEREXPRESS"|"MGLOBAL"|"AVERITT"|"LEADER"|"_2EBOX"|"SG_SPEEDPOST"|"DBSCHENKER_SE"|"ISR_POST_DOMESTIC"|"BESTWAYPARCEL"|"ASENDIA_DE"|"NIGHTLINE_UK"|"TAQBIN_SG"|"TCK_EXPRESS"|"ENDEAVOUR_DELIVERY"|"NANJINGWOYUAN"|"HEPPNER_FR"|"EMPS_CN"|"FONSEN"|"PICKRR"|"APC_OVERNIGHT_CONNUM"|"STAR_TRACK_NEXT_FLIGHT"|"DAJIN"|"UPS_FREIGHT"|"POSTA_PLUS"|"CEVA"|"ANSERX"|"JS_EXPRESS"|"PADTF"|"UPS_MAIL_INNOVATIONS"|"EZSHIP"|"SYPOST"|"AMAZON_SHIP_MCF"|"YUSEN"|"BRING"|"SDA_IT"|"GBA"|"NEWEGGEXPRESS"|"SPEEDCOURIERS_GR"|"FORRUN"|"PICKUP"|"ECMS"|"INTELIPOST"|"FLASHEXPRESS"|"CN_STO"|"SEKO_SFTP"|"HOME_DELIVERY_SOLUTIONS"|"DPD_HGRY"|"KERRYTTC_VN"|"JOYING_BOX"|"TOTAL_EXPRESS"|"ZJS_EXPRESS"|"STARKEN"|"DEMANDSHIP"|"CN_DPEX"|"AUPOST_CN"|"LOGISTERS"|"GOGLOBALPOST"|"GLS_CZ"|"PAACK_WEBHOOK"|"GRAB_WEBHOOK"|"PARCELPOINT"|"ICUMULUS"|"DAIGLOBALTRACK"|"GLOBAL_IPARCEL"|"YURTICI_KARGO"|"CN_PAYPAL_PACKAGE"|"PARCEL_2_POST"|"GLS_IT"|"PIL_LOGISTICS"|"HEPPNER"|"GENERAL_OVERNIGHT"|"HAPPY2POINT"|"CHITCHATS"|"SMOOTH"|"CLE_LOGISTICS"|"FIEGE"|"MX_CARGO"|"ZIINGFINALMILE"|"DAYTON_FREIGHT"|"TCS"|"AEX"|"HERMES_DE"|"ROUTIFIC_WEBHOOK"|"GLOBAVEND"|"CJ_LOGISTICS"|"PALLET_NETWORK"|"RAF_PH"|"UK_XDP"|"PAPER_EXPRESS"|"LA_POSTE_SUIVI"|"PAQUETEXPRESS"|"LIEFERY"|"STRECK_TRANSPORT"|"PONY_EXPRESS"|"ALWAYS_EXPRESS"|"GBS_BROKER"|"CITYLINK_MY"|"ALLJOY"|"YODEL"|"YODEL_DIR"|"STONE3PL"|"PARCELPAL_WEBHOOK"|"DHL_ECOMERCE_ASA"|"SIMPLYPOST"|"KY_EXPRESS"|"SHENZHEN"|"US_LASERSHIP"|"UC_EXPRE"|"DIDADI"|"CJ_KR"|"DBSCHENKER_B2B"|"MXE"|"CAE_DELIVERS"|"PFCEXPRESS"|"WHISTL"|"WEPOST"|"DHL_PARCEL_ES"|"DDEXPRESS"|"ARAMEX_AU"|"BNEED"|"HK_TGX"|"LATVIJAS_PASTS"|"VIAEUROPE"|"CORREO_UY"|"CHRONOPOST_FR"|"J_NET"|"_6LS"|"BLR_BELPOST"|"BIRDSYSTEM"|"DOBROPOST"|"WAHANA_ID"|"WEASHIP"|"SONICTL"|"KWT"|"AFLLOG_FTP"|"SKYNET_WORLDWIDE"|"NOVA_POSHTA"|"SEINO"|"SZENDEX"|"BPOST_INT"|"DBSCHENKER_SV"|"AO_DEUTSCHLAND"|"EU_FLEET_SOLUTIONS"|"PCFCORP"|"LINKBRIDGE"|"PRIMAMULTICIPTA"|"COUREX"|"ZAJIL_EXPRESS"|"COLLECTCO"|"JTEXPRESS"|"FEDEX_UK"|"USHIP"|"PIXSELL"|"SHIPTOR"|"CDEK"|"VNM_VIETTELPOST"|"CJ_CENTURY"|"GSO"|"VIWO"|"SKYBOX"|"KERRYTJ"|"NTLOGISTICS_VN"|"SDH_SCM"|"ZINC"|"DPE_SOUTH_AFRC"|"CESKA_CZ"|"ACS_GR"|"DEALERSEND"|"JOCOM"|"CSE"|"TFORCE_FINALMILE"|"SHIP_GATE"|"SHIPTER"|"NATIONAL_SAMEDAY"|"YUNEXPRESS"|"CAINIAO"|"DMS_MATRIX"|"DIRECTLOG"|"ASENDIA_US"|"_3JMSLOGISTICS"|"LICCARDI_EXPRESS"|"SKY_POSTAL"|"CNWANGTONG"|"POSTNORD_LOGISTICS_DK"|"LOGISTIKA"|"CELERITAS"|"PRESSIODE"|"SHREE_MARUTI"|"LOGISTICSWORLDWIDE_HK"|"EFEX"|"LOTTE"|"LONESTAR"|"APRISAEXPRESS"|"BEL_RS"|"OSM_WORLDWIDE"|"WESTGATE_GL"|"FASTRACK"|"DTD_EXPR"|"ALFATREX"|"PROMEDDELIVERY"|"THABIT_LOGISTICS"|"HCT_LOGISTICS"|"CARRY_FLAP"|"US_OLD_DOMINION"|"ANICAM_BOX"|"WANBEXPRESS"|"AN_POST"|"DPD_LOCAL"|"STALLIONEXPRESS"|"RAIDEREX"|"SHOPFANS"|"KYUNGDONG_PARCEL"|"CHAMPION_LOGISTICS"|"PICKUPP_SGP"|"MORNING_EXPRESS"|"NACEX"|"THENILE_WEBHOOK"|"HOLISOL"|"LBCEXPRESS_FTP"|"KURASI"|"USF_REDDAWAY"|"APG"|"CN_BOXC"|"ECOSCOOTING"|"MAINWAY"|"PAPERFLY"|"HOUNDEXPRESS"|"BOX_BERRY"|"EP_BOX"|"PLUS_LOG_UK"|"FULFILLA"|"ASE"|"MAIL_PLUS"|"XPO_LOGISTICS"|"WNDIRECT"|"CLOUDWISH_ASIA"|"ZELERIS"|"GIO_EXPRESS"|"OCS_WORLDWIDE"|"ARK_LOGISTICS"|"AQUILINE"|"PILOT_FREIGHT"|"QWINTRY"|"DANSKE_FRAGT"|"CARRIERS"|"AIR_CANADA_GLOBAL"|"PRESIDENT_TRANS"|"STEPFORWARDFS"|"SKYNET_UK"|"PITTOHIO"|"CORREOS_EXPRESS"|"RL_US"|"MARA_XPRESS"|"DESTINY"|"UK_YODEL"|"COMET_TECH"|"DHL_PARCEL_RU"|"TNT_REFR"|"SHREE_ANJANI_COURIER"|"MIKROPAKKET_BE"|"ETS_EXPRESS"|"COLIS_PRIVE"|"CN_YUNDA"|"AAA_COOPER"|"ROCKET_PARCEL"|"_360LION"|"PANDU"|"PROFESSIONAL_COURIERS"|"FLYTEXPRESS"|"LOGISTICSWORLDWIDE_MY"|"CORREOS_DE_ESPANA"|"IMX"|"FOUR_PX_EXPRESS"|"XPRESSBEES"|"PICKUPP_VNM"|"STARTRACK_EXPRESS"|"FR_COLISSIMO"|"NACEX_SPAIN_REFERENCE"|"DHL_SUPPLY_CHAIN_AU"|"ESHIPPING"|"SHREETIRUPATI"|"HX_EXPRESS"|"INDOPAKET"|"CN_17POST"|"K1_EXPRESS"|"CJ_GLS"|"MYS_GDEX"|"NATIONEX"|"ANJUN"|"FARGOOD"|"SMG_EXPRESS"|"RZYEXPRESS"|"SEFL"|"TNT_CLICK_IT"|"HDB"|"HIPSHIPPER"|"RPXLOGISTICS"|"KUEHNE"|"IT_NEXIVE"|"PTS"|"SWISS_POST_FTP"|"FASTRK_SERV"|"_4_72"|"US_YRC"|"POSTNL_INTL_3S"|"ELIAN_POST"|"CUBYN"|"SAU_SAUDI_POST"|"ABXEXPRESS_MY"|"HUAHAN_EXPRESS"|"IND_JAYONEXPRESS"|"ZES_EXPRESS"|"ZEPTO_EXPRESS"|"SKYNET_ZA"|"ZEEK_2_DOOR"|"BLINKLASTMILE"|"POSTA_UKR"|"CHROBINSON"|"CN_POST56"|"COURANT_PLUS"|"SCUDEX_EXPRESS"|"SHIPENTEGRA"|"B_TWO_C_EUROPE"|"COPE"|"IND_GATI"|"CN_WISHPOST"|"NACEX_ES"|"TAQBIN_HK"|"GLOBALTRANZ"|"HKD"|"BJSHOMEDELIVERY"|"OMNIVA"|"SUTTON"|"PANTHER_REFERENCE"|"SFCSERVICE"|"LTL"|"PARKNPARCEL"|"SPRING_GDS"|"ECEXPRESS"|"INTERPARCEL_AU"|"AGILITY"|"XL_EXPRESS"|"ADERONLINE"|"DIRECTCOURIERS"|"PLANZER"|"SENDING"|"NINJAVAN_WB"|"NATIONWIDE_MY"|"SENDIT"|"GB_ARROW"|"IND_GOJAVAS"|"KPOST"|"DHL_FREIGHT"|"BLUECARE"|"JINDOUYUN"|"TRACKON"|"GB_TUFFNELLS"|"TRUMPCARD"|"ETOTAL"|"SFPLUS_WEBHOOK"|"SEKOLOGISTICS"|"HERMES_2MANN_HANDLING"|"DPD_LOCAL_REF"|"UDS"|"ZA_SPECIALISED_FREIGHT"|"THA_KERRY"|"PRT_INT_SEUR"|"BRA_CORREIOS"|"NZ_NZ_POST"|"CN_EQUICK"|"MYS_EMS"|"GB_NORSK"|"ESP_MRW"|"ESP_PACKLINK"|"KANGAROO_MY"|"RPX"|"XDP_UK_REFERENCE"|"NINJAVAN_MY"|"ADICIONAL"|"NINJAVAN_ID"|"ROADBULL"|"YAKIT"|"MAILAMERICAS"|"MIKROPAKKET"|"DYNALOGIC"|"DHL_ES"|"DHL_PARCEL_NL"|"DHL_GLOBAL_MAIL_ASIA"|"DAWN_WING"|"GENIKI_GR"|"HERMESWORLD_UK"|"ALPHAFAST"|"BUYLOGIC"|"EKART"|"MEX_SENDA"|"SFC_LOGISTICS"|"POST_SERBIA"|"IND_DELHIVERY"|"DE_DPD_DELISTRACK"|"RPD2MAN"|"CN_SF_EXPRESS"|"YANWEN"|"MYS_SKYNET"|"CORREOS_DE_MEXICO"|"CBL_LOGISTICA"|"MEX_ESTAFETA"|"AU_AUSTRIAN_POST"|"RINCOS"|"NLD_DHL"|"RUSSIAN_POST"|"COURIERS_PLEASE"|"POSTNORD_LOGISTICS"|"FEDEX"|"DPE_EXPRESS"|"DPD"|"ADSONE"|"IDN_JNE"|"THECOURIERGUY"|"CNEXPS"|"PRT_CHRONOPOST"|"LANDMARK_GLOBAL"|"IT_DHL_ECOMMERCE"|"ESP_NACEX"|"PRT_CTT"|"BE_KIALA"|"ASENDIA_UK"|"GLOBAL_TNT"|"POSTUR_IS"|"EPARCEL_KR"|"INPOST_PACZKOMATY"|"IT_POSTE_ITALIA"|"BE_BPOST"|"PL_POCZTA_POLSKA"|"MYS_MYS_POST"|"SG_SG_POST"|"THA_THAILAND_POST"|"LEXSHIP"|"FASTWAY_NZ"|"DHL_AU"|"COSTMETICSNOW"|"PFLOGISTICS"|"LOOMIS_EXPRESS"|"GLS_ITALY"|"LINE"|"GEL_EXPRESS"|"HUODULL"|"NINJAVAN_SG"|"JANIO"|"AO_COURIER"|"BRT_IT_SENDER_REF"|"SAILPOST"|"LALAMOVE"|"NEWZEALAND_COURIERS"|"ETOMARS"|"VIRTRANSPORT"|"WIZMO"|"PALLETWAYS"|"I_DIKA"|"CFL_LOGISTICS"|"GEMWORLDWIDE"|"GLOBAL_EXPRESS"|"LOGISTYX_TRANSGROUP"|"WESTBANK_COURIER"|"ARCO_SPEDIZIONI"|"YDH_EXPRESS"|"PARCELINKLOGISTICS"|"CNDEXPRESS"|"NOX_NIGHT_TIME_EXPRESS"|"AERONET"|"LTIANEXP"|"INTEGRA2_FTP"|"PARCELONE"|"NOX_NACHTEXPRESS"|"CN_CHINA_POST_EMS"|"CHUKOU1"|"GLS_SLOV"|"ORANGE_DS"|"JOOM_LOGIS"|"AUS_STARTRACK"|"DHL"|"GB_APC"|"BONDSCOURIERS"|"JPN_JAPAN_POST"|"USPS"|"WINIT"|"ARG_OCA"|"TW_TAIWAN_POST"|"DMM_NETWORK"|"TNT"|"BH_POSTA"|"SWE_POSTNORD"|"CA_CANADA_POST"|"WISELOADS"|"ASENDIA_HK"|"NLD_GLS"|"MEX_REDPACK"|"JET_SHIP"|"DE_DHL_EXPRESS"|"NINJAVAN_THAI"|"RABEN_GROUP"|"ESP_ASM"|"HRV_HRVATSKA"|"GLOBAL_ESTES"|"LTU_LIETUVOS"|"BEL_DHL"|"AU_AU_POST"|"SPEEDEXCOURIER"|"FR_COLIS"|"ARAMEX"|"DPEX"|"MYS_AIRPAK"|"CUCKOOEXPRESS"|"DPD_POLAND"|"NLD_POSTNL"|"NIM_EXPRESS"|"QUANTIUM"|"SENDLE"|"ESP_REDUR"|"MATKAHUOLTO"|"CPACKET"|"POSTI"|"HUNTER_EXPRESS"|"CHOIR_EXP"|"LEGION_EXPRESS"|"AUSTRIAN_POST_EXPRESS"|"GRUPO"|"POSTA_RO"|"INTERPARCEL_UK"|"GLOBAL_ABF"|"POSTEN_NORGE"|"XPERT_DELIVERY"|"DHL_REFR"|"DHL_HK"|"SKYNET_UAE"|"GOJEK"|"YODEL_INTNL"|"JANCO"|"YTO"|"WISE_EXPRESS"|"JTEXPRESS_VN"|"FEDEX_INTL_MLSERV"|"VAMOX"|"AMS_GRP"|"DHL_JP"|"HRPARCEL"|"GESWL"|"BLUESTAR"|"CDEK_TR"|"DESCARTES"|"DELTEC_UK"|"DTDC_EXPRESS"|"TOURLINE"|"BH_WORLDWIDE"|"OCS"|"YINGNUO_LOGISTICS"|"UPS"|"TOLL"|"PRT_SEUR"|"DTDC_AU"|"THA_DYNAMIC_LOGISTICS"|"UBI_LOGISTICS"|"FEDEX_CROSSBORDER"|"A1POST"|"TAZMANIAN_FREIGHT"|"CJ_INT_MY"|"SAIA_FREIGHT"|"SG_QXPRESS"|"NHANS_SOLUTIONS"|"DPD_FR"|"COORDINADORA"|"ANDREANI"|"DOORA"|"INTERPARCEL_NZ"|"PHL_JAMEXPRESS"|"BEL_BELGIUM_POST"|"US_APC"|"IDN_POS"|"FR_MONDIAL"|"DE_DHL"|"HK_RPX"|"DHL_PIECEID"|"VNPOST_EMS"|"RRDONNELLEY"|"DPD_DE"|"DELCART_IN"|"IMEXGLOBALSOLUTIONS"|"ACOMMERCE"|"EURODIS"|"CANPAR"|"GLS"|"IND_ECOM"|"ESP_ENVIALIA"|"DHL_UK"|"SMSA_EXPRESS"|"TNT_FR"|"DEX_I"|"BUDBEE_WEBHOOK"|"COPA_COURIER"|"VNM_VIETNAM_POST"|"DPD_HK"|"TOLL_NZ"|"ECHO"|"FEDEX_FR"|"BORDEREXPRESS"|"MAILPLUS_JPN"|"TNT_UK_REFR"|"KEC"|"DPD_RO"|"TNT_JP"|"TH_CJ"|"EC_CN"|"FASTWAY_UK"|"FASTWAY_US"|"GLS_DE"|"GLS_ES"|"GLS_FR"|"MONDIAL_BE"|"SGT_IT"|"TNT_CN"|"TNT_DE"|"TNT_ES"|"TNT_PL"|"PARCELFORCE"|"SWISS_POST"|"TOLL_IPEC"|"AIR_21"|"AIRSPEED"|"BERT"|"BLUEDART"|"COLLECTPLUS"|"COURIERPLUS"|"COURIER_POST"|"DHL_GLOBAL_MAIL"|"DPD_UK"|"DELTEC_DE"|"DEUTSCHE_DE"|"DOTZOT"|"ELTA_GR"|"EMS_CN"|"ECARGO"|"ENSENDA"|"FERCAM_IT"|"FASTWAY_ZA"|"FASTWAY_AU"|"FIRST_LOGISITCS"|"GEODIS"|"GLOBEGISTICS"|"GREYHOUND"|"JETSHIP_MY"|"LION_PARCEL"|"AEROFLASH"|"ONTRAC"|"SAGAWA"|"SIODEMKA"|"STARTRACK"|"TNT_AU"|"TNT_IT"|"TRANSMISSION"|"YAMATO"|"DHL_IT"|"DHL_AT"|"LOGISTICSWORLDWIDE_KR"|"GLS_SPAIN"|"AMAZON_UK_API"|"DPD_FR_REFERENCE"|"DHLPARCEL_UK"|"MEGASAVE"|"QUALITYPOST"|"IDS_LOGISTICS"|"JOYINGBOX"|"PANTHER_ORDER_NUMBER"|"WATKINS_SHEPARD"|"FASTTRACK"|"UP_EXPRESS"|"ELOGISTICA"|"ECOURIER"|"CJ_PHILIPPINES"|"SPEEDEX"|"ORANGECONNEX"|"TECOR"|"SAEE"|"GLS_ITALY_FTP"|"DELIVERE"|"YYCOM"|"ADICIONAL_PT"|"DKSH"|"NIPPON_EXPRESS_FTP"|"GOLS"|"FUJEXP"|"QTRACK"|"OMLOGISTICS_API"|"GDPHARM"|"MISUMI_CN"|"AIR_CANADA"|"CITY56_WEBHOOK"|"SAGAWA_API"|"KEDAEX"|"PGEON_API"|"WEWORLDEXPRESS"|"JT_LOGISTICS"|"TRUSK"|"VIAXPRESS"|"DHL_SUPPLYCHAIN_ID"|"ZUELLIGPHARMA_SFTP"|"MEEST"|"TOLL_PRIORITY"|"MOTHERSHIP_API"|"CAPITAL"|"EUROPAKET_API"|"HFD"|"TOURLINE_REFERENCE"|"GIO_ECOURIER"|"CN_LOGISTICS"|"PANDION"|"BPOST_API"|"PASSPORTSHIPPING"|"PAKAJO"|"DACHSER"|"YUSEN_SFTP"|"SHYPLITE"|"XYY"|"MWD"|"FAXECARGO"|"MAZET"|"FIRST_LOGISTICS_API"|"SPRINT_PACK"|"HERMES_DE_FTP"|"CONCISE"|"KERRY_EXPRESS_TW_API"|"EWE"|"FASTDESPATCH"|"ABCUSTOM_SFTP"|"CHAZKI"|"SHIPPIE"|"GEODIS_API"|"NAQEL_EXPRESS"|"PAPA_WEBHOOK"|"FORWARDAIR"|"DIALOGO_LOGISTICA_API"|"LALAMOVE_API"|"TOMYDOOR"|"KRONOS_WEBHOOK"|"JTCARGO"|"T_CAT"|"CONCISE_WEBHOOK"|"TELEPORT_WEBHOOK"|"CUSTOMCO_API"|"SPX_TH"|"BOLLORE_LOGISTICS"|"CLICKLINK_SFTP"|"M3LOGISTICS"|"VNPOST_API"|"AXLEHIRE_FTP"|"SHADOWFAX"|"MYHERMES_UK_API"|"DAIICHI"|"MENSAJEROSURBANOS_API"|"POLARSPEED"|"IDEXPRESS_ID"|"PAYO"|"WHISTL_SFTP"|"INTEX_DE"|"TRANS2U"|"PRODUCTCAREGROUP_SFTP"|"BIGSMART"|"EXPEDITORS_API_REF"|"AITWORLDWIDE_API"|"WORLDCOURIER"|"QUIQUP"|"AGEDISS_SFTP"|"ANDREANI_API"|"CRLEXPRESS"|"SMARTCAT"|"CROSSFLIGHT"|"PROCARRIER"|"DHL_REFERENCE_API"|"SEINO_API"|"WSPEXPRESS"|"KRONOS"|"TOTAL_EXPRESS_API"|"PARCLL"|"XPEDIGO"|"STAR_TRACK_WEBHOOK"|"GPOST"|"UCS"|"DMFGROUP"|"COORDINADORA_API"|"MARKEN"|"NTL"|"REDJEPAKKETJE"|"ALLIED_EXPRESS_FTP"|"MONDIALRELAY_ES"|"NAEKO_FTP"|"MHI"|"SHIPPIFY"|"MALCA_AMIT_API"|"JTEXPRESS_SG_API"|"DACHSER_WEB"|"FLIGHTLG"|"CAGO"|"COM1EXPRESS"|"TONAMI_FTP"|"PACKFLEET"|"PUROLATOR_INTERNATIONAL"|"WINESHIPPING_WEBHOOK"|"DHL_ES_SFTP"|"PCHOME_API"|"CESKAPOSTA_API"|"GORUSH"|"HOMERUNNER"|"AMAZON_ORDER"|"EFWNOW_API"|"CBL_LOGISTICA_API"|"NIMBUSPOST"|"LOGWIN_LOGISTICS"|"NOWLOG_API"|"DPD_NL"|"GODEPENDABLE"|"ESDEX"|"LOGISYSTEMS_SFTP"|"EXPEDITORS"|"SNTGLOBAL_API"|"SHIPX"|"QINTL_API"|"PACKS"|"POSTNL_INTERNATIONAL"|"AMAZON_EMAIL_PUSH"|"DHL_API"|"SPX"|"AXLEHIRE"|"ICSCOURIER"|"DIALOGO_LOGISTICA"|"SHUNBANG_EXPRESS"|"TCS_API"|"SF_EXPRESS_CN"|"PACKETA"|"SIC_TELIWAY"|"MONDIALRELAY_FR"|"INTIME_FTP"|"JD_EXPRESS"|"FASTBOX"|"PATHEON"|"INDIA_POST"|"TIPSA_REF"|"ECOFREIGHT"|"VOX"|"DIRECTFREIGHT_AU_REF"|"BESTTRANSPORT_SFTP"|"AUSTRALIA_POST_API"|"FRAGILEPAK_SFTP"|"FLIPXP"|"VALUE_WEBHOOK"|"DAESHIN"|"SHERPA"|"MWD_API"|"SMARTKARGO"|"DNJ_EXPRESS"|"GOPEOPLE"|"MYSENDLE_API"|"ARAMEX_API"|"PIDGE"|"THAIPARCELS"|"PANTHER_REFERENCE_API"|"POSTAPLUS"|"BUFFALO"|"U_ENVIOS"|"ELITE_CO"|"BARQEXP"|"ROCHE_INTERNAL_SFTP"|"DBSCHENKER_ICELAND"|"TNT_FR_REFERENCE"|"NEWGISTICSAPI"|"GLOVO"|"GWLOGIS_API"|"SPREETAIL_API"|"MOOVA"|"PLYCONGROUP"|"USPS_WEBHOOK"|"REIMAGINEDELIVERY"|"EDF_FTP"|"DAO365"|"BIOCAIR_FTP"|"RANSA_WEBHOOK"|"SHIPXPRES"|"COURANT_PLUS_API"|"SHIPA"|"HOMELOGISTICS"|"DX"|"POSTE_ITALIANE_PACCOCELERE"|"TOLL_WEBHOOK"|"LCTBR_API"|"DX_FREIGHT"|"DHL_SFTP"|"SHIPROCKET"|"UBER_WEBHOOK"|"STATOVERNIGHT"|"BURD"|"FASTSHIP"|"IBVENTURE_WEBHOOK"|"GATI_KWE_API"|"CRYOPDP_FTP"|"HUBBED"|"TIPSA_API"|"ARASKARGO"|"THIJS_NL"|"ATSHEALTHCARE_REFERENCE"|"99MINUTOS"|"HELLENIC_POST"|"HSM_GLOBAL"|"MNX"|"NMTRANSFER"|"LOGYSTO"|"INDIA_POST_INT"|"AMAZON_FBA_SWISHIP_IN"|"SRT_TRANSPORT"|"BOMI"|"DELIVERR_SFTP"|"HSDEXPRESS"|"SIMPLETIRE_WEBHOOK"|"HUNTER_EXPRESS_SFTP"|"UPS_API"|"WOOYOUNG_LOGISTICS_SFTP"|"PHSE_API"|"WISH_EMAIL_PUSH"|"NORTHLINE"|"MEDAFRICA"|"DPD_AT_SFTP"|"ANTERAJA"|"DHL_GLOBAL_FORWARDING_API"|"LBCEXPRESS_API"|"SIMSGLOBAL"|"CDLDELIVERS"|"TYP"|"TESTING_COURIER_WEBHOOK"|"PANDAGO_API"|"ROYAL_MAIL_FTP"|"THUNDEREXPRESS"|"SECRETLAB_WEBHOOK"|"SETEL"|"JD_WORLDWIDE"|"DPD_RU_API"|"ARGENTS_WEBHOOK"|"POSTONE"|"TUSKLOGISTICS"|"RHENUS_UK_API"|"TAQBIN_SG_API"|"INNTRALOG_SFTP"|"DAYROSS"|"CORREOSEXPRESS_API"|"INTERNATIONAL_SEUR_API"|"YODEL_API"|"HEROEXPRESS"|"DHL_SUPPLYCHAIN_IN"|"URGENT_CARGUS"|"FRONTDOORCORP"|"JTEXPRESS_PH"|"PARCELSTARS_WEBHOOK"|"DPD_SK_SFTP"|"MOVIANTO"|"OZEPARTS_SHIPPING"|"KARGOMKOLAY"|"TRUNKRS"|"OMNIRPS_WEBHOOK"|"CHILEXPRESS"|"TESTING_COURIER"|"JNE_API"|"BJSHOMEDELIVERY_FTP"|"DEXPRESS_WEBHOOK"|"USPS_API"|"TRANSVIRTUAL"|"SOLISTICA_API"|"CHIENVENTURE_WEBHOOK"|"DPD_UK_SFTP"|"INPOST_UK"|"JAVIT"|"ZTO_DOMESTIC"|"DHL_GT_API"|"CEVA_TRACKING"|"KOMON_EXPRESS"|"EASTWESTCOURIER_FTP"|"DANNIAO"|"SPECTRAN"|"DELIVER_IT"|"RELAISCOLIS"|"GLS_SPAIN_API"|"POSTPLUS"|"AIRTERRA"|"GIO_ECOURIER_API"|"DPD_CH_SFTP"|"FEDEX_API"|"INTERSMARTTRANS"|"HERMES_UK_SFTP"|"EXELOT_FTP"|"DHL_PA_API"|"VIRTRANSPORT_SFTP"|"WORLDNET"|"INSTABOX_WEBHOOK"|"KNG"|"FLASHEXPRESS_WEBHOOK"|"MAGYAR_POSTA_API"|"WESHIP_API"|"OHI_WEBHOOK"|"MUDITA"|"BLUEDART_API"|"T_CAT_API"|"ADS"|"HERMES_IT"|"FITZMARK_API"|"POSTI_API"|"SMSA_EXPRESS_WEBHOOK"|"TAMERGROUP_WEBHOOK"|"LIVRAPIDE"|"NIPPON_EXPRESS"|"BETTERTRUCKS"|"FAN"|"PB_USPSFLATS_FTP"|"PARCELRIGHT"|"ITHINKLOGISTICS"|"KERRY_EXPRESS_TH_WEBHOOK"|"ECOUTIER"|"SHOWL"|"BRT_IT_API"|"RIXONHK_API"|"DBSCHENKER_API"|"ILYANGLOGIS"|"MAIL_BOX_ETC"|"WESHIP"|"DHL_GLOBAL_MAIL_API"|"ACTIVOS24_API"|"ATSHEALTHCARE"|"LUWJISTIK"|"GW_WORLD"|"FAIRSENDEN_API"|"SERVIP_WEBHOOK"|"SWISHIP"|"TANET"|"HOTSIN_CARGO"|"DIREX"|"HUANTONG"|"IMILE_API"|"BDMNET"|"AUEXPRESS"|"NYTLOGISTICS"|"DSV_REFERENCE"|"NOVOFARMA_WEBHOOK"|"AITWORLDWIDE_SFTP"|"SHOPOLIVE"|"FNF_ZA"|"DHL_ECOMMERCE_GC"|"FETCHR"|"STARLINKS_API"|"YYEXPRESS"|"SERVIENTREGA"|"HANJIN"|"SPANISH_SEUR_FTP"|"DX_B2B_CONNUM"|"HELTHJEM_API"|"INEXPOST"|"A2B_BA"|"RHENUS_GROUP"|"SBERLOGISTICS_RU"|"MALCA_AMIT"|"PPL"|"OSM_WORLDWIDE_SFTP"|"ACILOGISTIX"|"OPTIMACOURIER"|"NOVA_POSHTA_API"|"LOGGI"|"YIFAN"|"MYDYNALOGIC"|"MORNINGLOBAL"|"CONCISE_API"|"FXTRAN"|"DELIVERYOURPARCEL_ZA"|"UPARCEL"|"MOBI_BR"|"LOGINEXT_WEBHOOK"|"EMS"|"SPEEDY"; + +# Provides a set of configurations for controlling the behaviours when communicating with a remote HTTP endpoint. +@display {label: "Connection Config"} +public type ConnectionConfig record {| + # Configurations related to client authentication + OAuth2ClientCredentialsGrantConfig auth; + # The HTTP version understood by the client + http:HttpVersion httpVersion = http:HTTP_2_0; + # Configurations related to HTTP/1.x protocol + http:ClientHttp1Settings http1Settings = {}; + # Configurations related to HTTP/2 protocol + http:ClientHttp2Settings http2Settings = {}; + # The maximum time to wait (in seconds) for a response before closing the connection + decimal timeout = 30; + # The choice of setting `forwarded`/`x-forwarded` header + string forwarded = "disable"; + # Configurations associated with Redirection + http:FollowRedirects followRedirects?; + # Configurations associated with request pooling + http:PoolConfiguration poolConfig?; + # HTTP caching related configurations + http:CacheConfig cache = {}; + # Specifies the way of handling compression (`accept-encoding`) header + http:Compression compression = http:COMPRESSION_AUTO; + # Configurations associated with the behaviour of the Circuit Breaker + http:CircuitBreakerConfig circuitBreaker?; + # Configurations associated with retrying + http:RetryConfig retryConfig?; + # Configurations associated with cookies + http:CookieConfig cookieConfig?; + # Configurations associated with inbound response size limits + http:ResponseLimitConfigs responseLimits = {}; + # SSL/TLS-related options + http:ClientSecureSocket secureSocket?; + # Proxy server related options + http:ProxyConfig proxy?; + # Provides settings related to client socket configuration + http:ClientSocketConfig socketConfig = {}; + # Enables the inbound payload validation functionality which provided by the constraint package. Enabled by default + boolean validation = true; + # Enables relaxed data binding on the client side. When enabled, `nil` values are treated as optional, + # and absent fields are handled as `nilable` types. Enabled by default. + boolean laxDataBinding = true; +|}; + +public type BlikExperienceContextAllOf2 record { + # An Internet Protocol address (IP address). This address assigns a numerical label to each device that is connected to a computer network through the Internet Protocol. Supports IPv4 and IPv6 addresses + IpAddress consumer_ip?; + # The payer's User Agent. For example, Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0). + @constraint:String {maxLength: 256, minLength: 1, pattern: re `^.*$`} + string consumer_user_agent?; +}; + +# A classification for the method of purchase fulfillment +public type ShippingType "SHIPPING"|"PICKUP"|"PICKUP_IN_STORE"|"PICKUP_FROM_PERSON"; + +# Represents the Headers record for the operation: orders.capture +public type OrdersCaptureHeaders record { + # The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager + string PayPal\-Request\-Id?; + # An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion + string PayPal\-Auth\-Assertion?; + # The preferred server response upon successful completion of the request. Value is:
  • return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links.
  • return=representation. The server returns a complete resource representation, including the current state of the resource.
+ @constraint:String {maxLength: 25, minLength: 1, pattern: re `^[a-zA-Z=]*$`} + string Prefer = "return=representation"; + string PayPal\-Client\-Metadata\-Id?; +}; + +# Customizes the payer experience during the approval process for the payment with PayPal.
Note: Partners and Marketplaces might configure brand_name and shipping_preference during partner account setup, which overrides the request values.
+public type OrderApplicationContext record { + # DEPRECATED. Configures a Continue or Pay Now checkout flow. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.user_action`). Please specify this field in the `experience_context` object instead of the `application_context` object + "CONTINUE"|"PAY_NOW" user_action = "CONTINUE"; + # DEPRECATED. DEPRECATED. The type of landing page to show on the PayPal site for customer checkout. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.landing_page`). Please specify this field in the `experience_context` object instead of the `application_context` object + # + # # Deprecated + @deprecated + "LOGIN"|"BILLING"|"NO_PREFERENCE" landing_page = "NO_PREFERENCE"; + # DEPRECATED. The URL where the customer is redirected after the customer approves the payment. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.return_url`). Please specify this field in the `experience_context` object instead of the `application_context` object + string return_url?; + # DEPRECATED. The label that overrides the business name in the PayPal account on the PayPal site. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.brand_name`). Please specify this field in the `experience_context` object instead of the `application_context` object + @constraint:String {maxLength: 127, minLength: 1} + string brand_name?; + # The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the [ISO 639-2 language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the optional [ISO-15924 script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region code](https://unstats.un.org/unsd/methodology/m49/) + Language locale?; + # DEPRECATED. The URL where the customer is redirected after the customer cancels the payment. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.cancel_url`). Please specify this field in the `experience_context` object instead of the `application_context` object + string cancel_url?; + StoredPaymentSource stored_payment_source?; + # DEPRECATED. DEPRECATED. The shipping preference:
  • Displays the shipping address to the customer.
  • Enables the customer to choose an address on the PayPal site.
  • Restricts the customer from changing the address during the payment-approval process.
. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.shipping_preference`). Please specify this field in the `experience_context` object instead of the `application_context` object + # + # # Deprecated + @deprecated + "GET_FROM_FILE"|"NO_SHIPPING"|"SET_PROVIDED_ADDRESS" shipping_preference = "GET_FROM_FILE"; + PaymentMethod payment_method?; +}; + +# Information used to pay using MyBank +public type Mybank record { + CountryCode country_code?; + # The full name representation like Mr J Smith + FullName name?; + # The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank + Bic bic?; + IbanLastChars iban_last_chars?; +}; + +# The refund information +public type Refund record { + *RefundStatus; + *RefundAllOf2; + *ActivityTimestamps; +}; + +# The stand-alone date, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). To represent special legal values, such as a date of birth, you should use dates with no associated time or time-zone data. Whenever possible, use the standard `date_time` type. This regular expression does not validate all dates. For example, February 31 is valid and nothing is known about leap years +@constraint:String {maxLength: 10, minLength: 10, pattern: re `^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$`} +public type DateNoTime string; + +# The status of a captured payment +public type CaptureStatus record { + CaptureStatusDetails status_details?; + # The status of the captured payment + "COMPLETED"|"DECLINED"|"PARTIALLY_REFUNDED"|"PENDING"|"REFUNDED"|"FAILED" status?; +}; + +public type TrackerAllOf1 record { + # The tracker id. + string id?; + TrackerStatus status?; + # An array of details of items in the shipment. + TrackerItem[] items?; + # An array of request-related HATEOAS links. + LinkDescription[] links?; +}; + +# Represents the Headers record for the operation: orders.track.create +public type OrdersTrackCreateHeaders record { + # An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion + string PayPal\-Auth\-Assertion?; +}; + +# Customizes the payer experience during the approval process for payment with PayPal.
Note: Partners and Marketplaces might configure brand_name and shipping_preference during partner account setup, which overrides the request values.
+public type PaypalWalletExperienceContext record { + # Configures a Continue or Pay Now checkout flow + "CONTINUE"|"PAY_NOW" user_action = "CONTINUE"; + Url return_url?; + # The type of landing page to show on the PayPal site for customer checkout + "LOGIN"|"GUEST_CHECKOUT"|"NO_PREFERENCE" landing_page = "NO_PREFERENCE"; + # The label that overrides the business name in the PayPal account on the PayPal site. The pattern is defined by an external party and supports Unicode + @constraint:String {maxLength: 127, minLength: 1, pattern: re `^.*$`} + string brand_name?; + # The merchant-preferred payment methods + "UNRESTRICTED"|"IMMEDIATE_PAYMENT_REQUIRED" payment_method_preference = "UNRESTRICTED"; + # The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the [ISO 639-2 language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the optional [ISO-15924 script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region code](https://unstats.un.org/unsd/methodology/m49/) + Language locale?; + Url cancel_url?; + # The location from which the shipping address is derived + "GET_FROM_FILE"|"NO_SHIPPING"|"SET_PROVIDED_ADDRESS" shipping_preference = "GET_FROM_FILE"; +}; + +# Information needed to pay using BLIK +public type BlikRequest record { + BlikExperienceContext experience_context?; + CountryCode country_code; + # The full name representation like Mr J Smith + FullName name; + BlikOneClick one_click?; + BlikSeamless level_0?; + # The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.
+ EmailAddress email?; +}; + +# Information needed to pay using giropay +public type GiropayRequest record { + ExperienceContextBase experience_context?; + CountryCode country_code; + # The full name representation like Mr J Smith + FullName name; +}; + +# Information used to pay using BLIK level_0 flow +public type BlikSeamless record { + # The 6-digit code used to authenticate a consumer within BLIK + @constraint:String {maxLength: 6, minLength: 6, pattern: re `^[0-9]{6}$`} + string auth_code; +}; + +# Additional attributes associated with the use of a PayPal Wallet +public type PaypalWalletAttributesResponse record { + # An array of merchant cobranded cards used by buyer to complete an order. This array will be present if a merchant has onboarded their cobranded card with PayPal and provided corresponding label(s) + @constraint:Array {maxLength: 25} + CobrandedCard[] cobranded_cards?; + # The details about a saved PayPal Wallet payment source + PaypalWalletVaultResponse vault?; +}; + +# The order status +public type OrderStatus "CREATED"|"SAVED"|"APPROVED"|"VOIDED"|"COMPLETED"|"PAYER_ACTION_REQUIRED"; + +# The detailed breakdown of the capture activity. This is not available for transactions that are in pending state +public type SellerReceivableBreakdown record { + # An array of platform or partner fees, commissions, or brokerage fees that associated with the captured payment + @constraint:Array {maxLength: 1} + PlatformFee[] platform_fees?; + ExchangeRate exchange_rate?; + Money paypal_fee?; + Money gross_amount; + Money paypal_fee_in_receivable_currency?; + Money net_amount?; + Money receivable_amount?; +}; + +public type UniversalProductCode anydata; + +# Information needed to pay using Venmo +public type VenmoWalletRequest record { + VenmoWalletExperienceContext experience_context?; + Email email_address?; + # Additional attributes associated with the use of this Venmo Wallet + VenmoWalletAttributes attributes?; + VaultId vault_id?; +}; + +# Provides additional details to process a payment using a `card` that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file).
Parameter compatibility:
  • `payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only with `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`.
  • Only one of the parameters - `previous_transaction_reference` and `previous_network_transaction_reference` - can be present in the request.
+public type CardStoredCredential record { + StoredPaymentSourcePaymentType payment_type; + # Indicates if this is a `first` or `subsequent` payment using a stored payment source (also referred to as stored credential or card on file) + StoredPaymentSourceUsageType usage?; + PaymentInitiator payment_initiator; + NetworkTransactionReference previous_network_transaction_reference?; +}; + +# The level 3 card processing data collections, If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf. Please contact your PayPal Technical Account Manager to define level 3 data for your business +public type Level3CardProcessingData record { + Money shipping_amount?; + Money duty_amount?; + # Use this field to specify the postal code of the shipping location + @constraint:String {maxLength: 60, minLength: 1, pattern: re `^[a-zA-Z0-9_'.-]*$`} + string ships_from_postal_code?; + Money discount_amount?; + AddressPortable shipping_address?; + # A list of the items that were purchased with this payment. If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf + @constraint:Array {maxLength: 100, minLength: 1} + LineItem[] line_items?; +}; + +# The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third party and open source. Redundant with core fields.
For example, `address_portable.address_line_1` is usually a combination of `address_details.street_number`, `street_name`, and `street_type` +public type AddressDetails record { + # A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House + @constraint:String {maxLength: 100} + string building_name?; + # The street number + @constraint:String {maxLength: 100} + string street_number?; + # The street type. For example, avenue, boulevard, road, or expressway + @constraint:String {maxLength: 100} + string street_type?; + # The first-order entity below a named building or location that represents the sub-premises. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment + @constraint:String {maxLength: 100} + string sub_building?; + # The delivery service. Post office box, bag number, or post office name + @constraint:String {maxLength: 100} + string delivery_service?; + # The street name. Just `Drury` in `Drury Lane` + @constraint:String {maxLength: 100} + string street_name?; +}; + +# Defines how and when the payment source gets vaulted +public type StoreInVaultInstruction "ON_SUCCESS"; + +# The PayPal Wallet response +public type PaypalWalletResponse record { + PhoneType2 phone_type?; + Email email_address?; + AccountId2 account_id?; + # The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute) + AddressPortable2 address?; + TaxInfo tax_info?; + DateNoTime birth_date?; + # The name of the party + Name2 name?; + Phone2 phone_number?; + # Additional attributes associated with the use of a PayPal Wallet + PaypalWalletAttributesResponse attributes?; + # The account status indicates whether the buyer has verified the financial details associated with their PayPal account + "VERIFIED"|"UNVERIFIED" account_status?; +}; + +# The merchant-preferred payment methods +public type PayeePaymentMethodPreference "UNRESTRICTED"|"IMMEDIATE_PAYMENT_REQUIRED"; + +# The person or party who initiated or triggered the payment +public type PaymentInitiator "CUSTOMER"|"MERCHANT"; + +# An Internet Protocol address (IP address). This address assigns a numerical label to each device that is connected to a computer network through the Internet Protocol. Supports IPv4 and IPv6 addresses +@constraint:String {maxLength: 39, minLength: 7, pattern: re `^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9])\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\-]*[A-Za-z0-9])$|^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$`} +public type IpAddress string; + +public type PayeeAllOf2 record { +}; + +public type VaultVenmoWalletBaseAllOf2 record { + # The description displayed to Venmo consumer on the approval flow for Venmo, as well as on the Venmo payment token management experience on Venmo.com. + @constraint:String {maxLength: 128, minLength: 1} + string description?; + # Expected business/pricing model for the billing agreement. + "IMMEDIATE"|"DEFERRED"|"RECURRING_PREPAID"|"RECURRING_POSTPAID"|"THRESHOLD_PREPAID"|"THRESHOLD_POSTPAID" usage_pattern?; + # The usage type associated with the Venmo payment token. + "MERCHANT"|"PLATFORM" usage_type?; + # The customer type associated with the Venmo payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer. + "CONSUMER"|"BUSINESS" customer_type = "CONSUMER"; + # Create multiple payment tokens for the same payer, merchant/platform combination. Use this when the customer has not logged in at merchant/platform. The payment token thus generated, can then also be used to create the customer account at merchant/platform. Use this also when multiple payment tokens are required for the same payer, different customer at merchant/platform. This helps to identify customers distinctly even though they may share the same Venmo account. + boolean permit_multiple_payment_tokens = false; +}; + +public type PayerAllOf2 record { + # The name of the party + Name name?; + # The phone information + PhoneWithType phone?; + # The stand-alone date, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). To represent special legal values, such as a date of birth, you should use dates with no associated time or time-zone data. Whenever possible, use the standard `date_time` type. This regular expression does not validate all dates. For example, February 31 is valid and nothing is known about leap years + DateNoTime birth_date?; + # The tax ID of the customer. The customer is also known as the payer. Both `tax_id` and `tax_id_type` are required + TaxInfo tax_info?; + # The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute) + AddressPortable address?; +}; + +# OAuth2 Client Credentials Grant Configs +public type OAuth2ClientCredentialsGrantConfig record {| + *http:OAuth2ClientCredentialsGrantConfig; + # Token URL + string tokenUrl = "https://api-m.sandbox.paypal.com/v1/oauth2/token"; +|}; + +public type AuthenticationFlow anydata; + +# The tracking response on creation of tracker +public type Tracker record { + *TrackerAllOf1; + *ActivityTimestamps; +}; + +# The [2-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.
+@constraint:String {maxLength: 2, minLength: 2, pattern: re `^([A-Z]{2}|C2)$`} +public type CountryCode2 string; + +# The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.
+@constraint:String {maxLength: 254, minLength: 3} +public type Email string; + +# The account identifier for a PayPal account +@constraint:String {maxLength: 13, minLength: 13, pattern: re `^[2-9A-HJ-NP-Z]{13}$`} +public type AccountId string; + +# The tracking details of an order +public type OrderTrackerRequest record { + *ShipmentTracker; + *OrderTrackerRequestAllOf2; +}; + +# Additional attributes associated with the use of this card +public type CardAttributes record { + # Basic vault instruction specification that can be extended by specific payment sources that supports vaulting + VaultInstructionBase vault?; + # The details about a customer in PayPal's system of record + Customer customer?; +}; + +# The intent to either capture payment immediately or authorize a payment for an order after order creation +public type CheckoutPaymentIntent "CAPTURE"|"AUTHORIZE"; + +public type AuthorizationAllOf2 record { + # The PayPal-generated ID for the authorized payment. + string id?; + # The currency and amount for a financial transaction, such as a balance or payment due + Money amount?; + # The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives. + string invoice_id?; + # The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports. + @constraint:String {maxLength: 127} + string custom_id?; + # Reference values used by the card network to identify a transaction + NetworkTransactionReference network_transaction_reference?; + # The level of protection offered as defined by [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection) + SellerProtection seller_protection?; + # The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.
+ DateTime expiration_time?; + # An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). + LinkDescription[] links?; +}; + +# Bank Identification Number (BIN) details used to fund a payment +public type BinDetails record { + # The Bank Identification Number (BIN) signifies the number that is being used to identify the granular level details (except the PII information) of the card + @constraint:String {maxLength: 25, minLength: 1, pattern: re `^[0-9]+$`} + string bin?; + CountryCode bin_country_code?; + # The issuer of the card instrument + @constraint:String {maxLength: 64, minLength: 1} + string issuing_bank?; + # The type of card product assigned to the BIN by the issuer. These values are defined by the issuer and may change over time. Some examples include: PREPAID_GIFT, CONSUMER, CORPORATE + @constraint:Array {maxLength: 256, minLength: 1} + BinDetailsProductsItemsString[] products?; +}; + +# Basic vault instruction specification that can be extended by specific payment sources that supports vaulting +public type VaultInstructionBase record { + StoreInVaultInstruction store_in_vault?; +}; + +# The name of the party +public type Name record { + # When the party is a person, the party's full name + @constraint:String {maxLength: 300} + string full_name?; + # The prefix, or title, to the party's name + @constraint:String {maxLength: 140} + string prefix?; + # When the party is a person, the party's surname or family name. Also known as the last name. Required when the party is a person. Use also to store multiple surnames including the matronymic, or mother's, surname + @constraint:String {maxLength: 140} + string surname?; + # When the party is a person, the party's given, or first, name + @constraint:String {maxLength: 140} + string given_name?; + # When the party is a person, the party's middle name. Use also to store multiple middle names including the patronymic, or father's, middle name + @constraint:String {maxLength: 140} + string middle_name?; + # The suffix for the party's name + @constraint:String {maxLength: 140} + string suffix?; + # DEPRECATED. The party's alternate name. Can be a business name, nickname, or any other name that cannot be split into first, last name. Required when the party is a business + @constraint:String {maxLength: 300} + string alternate_full_name?; +}; + +# Status of Authentication eligibility +public type Enrolled "Y"|"N"|"U"|"B"; + +# Information used to pay using P24(Przelewy24) +public type P24 record { + CountryCode country_code?; + # P24 generated payment description + @constraint:String {maxLength: 2000, minLength: 1} + string payment_descriptor?; + # Numeric identifier of the payment scheme or bank used for the payment + @constraint:String {maxLength: 300, minLength: 1} + string method_id?; + # Friendly name of the payment scheme or bank used for the payment + @constraint:String {maxLength: 2000, minLength: 1} + string method_description?; + # The full name representation like Mr J Smith + FullName name?; + # The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.
+ EmailAddress email?; +}; + +# The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee +public type PayeeBase record { + Email email_address?; + AccountId merchant_id?; +}; + +# Information used to pay using BLIK one-click flow +public type BlikOneClickResponse record { + # The merchant generated, unique reference serving as a primary identifier for accounts connected between Blik and a merchant + @constraint:String {maxLength: 64, minLength: 3, pattern: re `^[ -~]{3,64}$`} + string consumer_reference?; +}; + +public type AmountWithBreakdownAllOf2 record { + # The breakdown of the amount. Breakdown provides details such as total item amount, total tax amount, shipping, handling, insurance, and discounts, if any + AmountBreakdown breakdown?; +}; + +# The payment source used to fund the payment +public type PaymentSourceResponse record { + # Information needed to pay using giropay + Giropay giropay?; + # Information used to pay Bancontact + Bancontact bancontact?; + # Information used to pay using BLIK + Blik blik?; + # Information used to pay using iDEAL + Ideal ideal?; + # Information used to pay using P24(Przelewy24) + P24 p24?; + # Information needed to pay using Trustly + Trustly trustly?; + # Information used to pay using eps + Eps eps?; + # The PayPal Wallet response + PaypalWalletResponse paypal?; + # The payment card to use to fund a payment. Card can be a credit or debit card + CardResponse card?; + # Information used to pay using Sofort + Sofort sofort?; + # Information used to pay using MyBank + Mybank mybank?; + # Venmo wallet response + VenmoWalletResponse venmo?; +}; + +# The name of the party +public type Name2 record { + # When the party is a person, the party's full name + @constraint:String {maxLength: 300} + string full_name?; + # The prefix, or title, to the party's name + @constraint:String {maxLength: 140} + string prefix?; + # When the party is a person, the party's surname or family name. Also known as the last name. Required when the party is a person. Use also to store multiple surnames including the matronymic, or mother's, surname + @constraint:String {maxLength: 140} + string surname?; + # When the party is a person, the party's given, or first, name + @constraint:String {maxLength: 140} + string given_name?; + # When the party is a person, the party's middle name. Use also to store multiple middle names including the patronymic, or father's, middle name + @constraint:String {maxLength: 140} + string middle_name?; + # The suffix for the party's name + @constraint:String {maxLength: 140} + string suffix?; +}; + +# Additional attributes associated with the use of this PayPal Wallet +public type PaypalWalletAttributes record { + # Resource consolidating common request and response attributes for vaulting PayPal Wallet + VaultPaypalWalletBase vault?; + # The details about a customer in PayPal's system of record + PaypalWalletCustomer customer?; +}; + +public type AuthorizationWithAdditionalDataAllOf2 record { + # The processor response information for payment requests, such as direct credit card transactions + ProcessorResponse processor_response?; +}; + +# The details of the authorized payment status +public type AuthorizationStatusDetails record { + # The reason why the authorized status is `PENDING` + "PENDING_REVIEW" reason?; +}; + +# Results of 3D Secure Authentication +public type ThreeDSecureAuthenticationResponse record { + ParesStatus authentication_status?; + Enrolled enrollment_status?; +}; + +# A resource that identifies a PayPal Wallet is used for payment +public type PaypalWallet record { + PaypalWalletExperienceContext experience_context?; + BillingAgreementId billing_agreement_id?; + Email email_address?; + # The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute) + AddressPortable2 address?; + TaxInfo tax_info?; + # The phone information + PhoneWithType phone?; + DateNoTime birth_date?; + # The name of the party + Name2 name?; + # Additional attributes associated with the use of this PayPal Wallet + PaypalWalletAttributes attributes?; + VaultId vault_id?; +}; + +# Additional attributes associated with the use of this card +public type CardAttributesResponse record { + # The details about a saved payment source + VaultResponse vault?; +}; + +# Information used to pay using Sofort +public type Sofort record { + CountryCode country_code?; + # The full name representation like Mr J Smith + FullName name?; + # The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank + Bic bic?; + IbanLastChars iban_last_chars?; +}; + +# Indicates if this is a `first` or `subsequent` payment using a stored payment source (also referred to as stored credential or card on file) +public type StoredPaymentSourceUsageType "FIRST"|"SUBSEQUENT"|"DERIVED"; + +# An array of JSON patch objects to apply partial updates to resources +public type PatchRequest Patch[]; + +# The identifier of the instrument +@constraint:String {maxLength: 256, minLength: 1, pattern: re `^[A-Za-z0-9-_.+=]+$`} +public type InstrumentId string; + +# Completes an capture payment for an order +public type OrderCaptureRequest record { + PaymentSource payment_source?; +}; + +# Customizes the payer experience during the approval process for the payment +public type ExperienceContextBase record { + Url return_url?; + # The label that overrides the business name in the PayPal account on the PayPal site. The pattern is defined by an external party and supports Unicode + @constraint:String {maxLength: 127, minLength: 1, pattern: re `^.*$`} + string brand_name?; + # The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the [ISO 639-2 language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the optional [ISO-15924 script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region code](https://unstats.un.org/unsd/methodology/m49/) + Language locale?; + Url cancel_url?; + # The location from which the shipping address is derived + "GET_FROM_FILE"|"NO_SHIPPING"|"SET_PROVIDED_ADDRESS" shipping_preference = "GET_FROM_FILE"; +}; + +# Represents the Headers record for the operation: orders.authorize +public type OrdersAuthorizeHeaders record { + # The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager + string PayPal\-Request\-Id?; + # An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion + string PayPal\-Auth\-Assertion?; + # The preferred server response upon successful completion of the request. Value is:
  • return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links.
  • return=representation. The server returns a complete resource representation, including the current state of the resource.
+ @constraint:String {maxLength: 25, minLength: 1, pattern: re `^[a-zA-Z=]*$`} + string Prefer = "return=representation"; + string PayPal\-Client\-Metadata\-Id?; +}; + +# Information needed to pay using ApplePay +public type ApplePayRequest record { + EmailAddress email_address?; + ApplePayDecryptedTokenData decrypted_token?; + CardStoredCredential stored_credential?; + # The full name representation like Mr J Smith + FullName name?; + Phone phone_number?; + ApplePayAttributes attributes?; + # ApplePay transaction identifier, this will be the unique identifier for this transaction provided by Apple. The pattern is defined by an external party and supports Unicode + @constraint:String {maxLength: 250, minLength: 1, pattern: re `^.*$`} + string id?; + VaultId vault_id?; +}; + +# The payment card to use to fund a payment. Card can be a credit or debit card +public type CardResponse record { + CardFromRequest from_request?; + AuthenticationResponse authentication_result?; + BinDetails bin_details?; + # The card holder's name as it appears on the card + @constraint:String {maxLength: 300, minLength: 2} + string name?; + # Array of brands or networks associated with the card + @constraint:Array {maxLength: 256, minLength: 1} + CardBrand[] available_networks?; + # Additional attributes associated with the use of this card + CardAttributesResponse attributes?; + # The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6) + DateYearMonth expiry?; + # The payment card type + "CREDIT"|"DEBIT"|"PREPAID"|"UNKNOWN" 'type?; + # The last digits of the payment card + @constraint:String {pattern: re `[0-9]{2,}`} + string last_digits?; + # The card network or brand. Applies to credit, debit, gift, and payment cards + CardBrand brand?; +}; + +# The JSON patch object to apply partial updates to resources +public type Patch record { + # The operation + "add"|"remove"|"replace"|"move"|"copy"|"test" op; + # The JSON Pointer to the target document location at which to complete the operation + string path?; + # The JSON Pointer to the target document location from which to move the value. Required for the move operation + string 'from?; + # The value to apply. The remove, copy, and move operations do not require a value. Since JSON Patch allows any type for value, the type property is not specified + anydata value?; +}; + +# The authorization of an order request +public type OrderAuthorizeRequest record { + PaymentSource payment_source?; +}; + +# The details about a saved PayPal Wallet payment source +public type PaypalWalletVaultResponse record { + *VaultResponse; + *PaypalWalletVaultResponseAllOf2; + Customer customer?; +}; + +# The exchange rate that determines the amount to convert from one currency to another currency +public type ExchangeRate record { + CurrencyCode source_currency?; + CurrencyCode target_currency?; + # The target currency amount. Equivalent to one unit of the source currency. Formatted as integer or decimal value with one to 15 digits to the right of the decimal point + string value?; +}; + +# Reference values used by the card network to identify a transaction +public type NetworkTransactionReference record { + # The date that the transaction was authorized by the scheme. This field may not be returned for all networks. MasterCard refers to this field as "BankNet reference date + @constraint:String {maxLength: 4, minLength: 4, pattern: re `^[0-9]+$`} + string date?; + # Reference ID issued for the card transaction. This ID can be used to track the transaction across processors, card brands and issuing banks + @constraint:String {maxLength: 36, minLength: 1, pattern: re `^[a-zA-Z0-9]+$`} + string acquirer_reference_number?; + # Transaction reference id returned by the scheme. For Visa and Amex, this is the "Tran id" field in response. For MasterCard, this is the "BankNet reference id" field in response. For Discover, this is the "NRID" field in response. The pattern we expect for this field from Visa/Amex/CB/Discover is numeric, Mastercard/BNPP is alphanumeric and Paysecure is alphanumeric with special character - + @constraint:String {maxLength: 36, minLength: 9, pattern: re `^[a-zA-Z0-9-_@.:&+=*^'~#!$%()]+$`} + string id; + # The card network or brand. Applies to credit, debit, gift, and payment cards + CardBrand network?; +}; + +# The processor response information for payment requests, such as direct credit card transactions +public type ProcessorResponse record { + # The card verification value code for for Visa, Discover, Mastercard, or American Express + "E"|"I"|"M"|"N"|"P"|"S"|"U"|"X"|"All others"|"0"|"1"|"2"|"3"|"4" cvv_code?; + # Processor response code for the non-PayPal payment processor errors + "0000"|"00N7"|"0100"|"0390"|"0500"|"0580"|"0800"|"0880"|"0890"|"0960"|"0R00"|"1000"|"10BR"|"1300"|"1310"|"1312"|"1317"|"1320"|"1330"|"1335"|"1340"|"1350"|"1352"|"1360"|"1370"|"1380"|"1382"|"1384"|"1390"|"1393"|"5100"|"5110"|"5120"|"5130"|"5135"|"5140"|"5150"|"5160"|"5170"|"5180"|"5190"|"5200"|"5210"|"5400"|"5500"|"5650"|"5700"|"5710"|"5800"|"5900"|"5910"|"5920"|"5930"|"5950"|"6300"|"7600"|"7700"|"7710"|"7800"|"7900"|"8000"|"8010"|"8020"|"8030"|"8100"|"8110"|"8220"|"9100"|"9500"|"9510"|"9520"|"9530"|"9540"|"9600"|"PCNR"|"PCVV"|"PP06"|"PPRN"|"PPAD"|"PPAB"|"PPAE"|"PPAG"|"PPAI"|"PPAR"|"PPAU"|"PPAV"|"PPAX"|"PPBG"|"PPC2"|"PPCE"|"PPCO"|"PPCR"|"PPCT"|"PPCU"|"PPD3"|"PPDC"|"PPDI"|"PPDV"|"PPDT"|"PPEF"|"PPEL"|"PPER"|"PPEX"|"PPFE"|"PPFI"|"PPFR"|"PPFV"|"PPGR"|"PPH1"|"PPIF"|"PPII"|"PPIM"|"PPIT"|"PPLR"|"PPLS"|"PPMB"|"PPMC"|"PPMD"|"PPNC"|"PPNL"|"PPNM"|"PPNT"|"PPPH"|"PPPI"|"PPPM"|"PPQC"|"PPRE"|"PPRF"|"PPRR"|"PPS0"|"PPS1"|"PPS2"|"PPS3"|"PPS4"|"PPS5"|"PPS6"|"PPSC"|"PPSD"|"PPSE"|"PPTE"|"PPTF"|"PPTI"|"PPTR"|"PPTT"|"PPTV"|"PPUA"|"PPUC"|"PPUE"|"PPUI"|"PPUP"|"PPUR"|"PPVC"|"PPVE"|"PPVT" response_code?; + # The declined payment transactions might have payment advice codes. The card networks, like Visa and Mastercard, return payment advice codes + "01"|"02"|"03"|"21" payment_advice_code?; + # The address verification code for Visa, Discover, Mastercard, or American Express transactions + "A"|"B"|"C"|"D"|"E"|"F"|"G"|"I"|"M"|"N"|"P"|"R"|"S"|"U"|"W"|"X"|"Y"|"Z"|"Null"|"0"|"1"|"2"|"3"|"4" avs_code?; +}; + +# The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information +public type LinkDescription record { + # The HTTP method required to make the related call + "GET"|"POST"|"PUT"|"DELETE"|"HEAD"|"CONNECT"|"OPTIONS"|"PATCH" method?; + # The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml) + string rel; + # The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call + string href; +}; + +# Customizes the payer confirmation experience +public type OrderConfirmApplicationContext record { + # The URL where the customer is redirected after the customer approves the payment + @constraint:String {maxLength: 4000, minLength: 10} + string return_url?; + # Label to present to your payer as part of the PayPal hosted web experience + @constraint:String {maxLength: 127, minLength: 1} + string brand_name?; + # The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the [ISO 639-2 language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the optional [ISO-15924 script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region code](https://unstats.un.org/unsd/methodology/m49/) + Language locale?; + # The URL where the customer is redirected after the customer cancels the payment + @constraint:String {maxLength: 4000, minLength: 10} + string cancel_url?; + StoredPaymentSource stored_payment_source?; +}; + +# The shipping details +public type ShippingDetail record { + # The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute) + AddressPortable address?; + # The name of the party + Name name?; + # An array of shipping options that the payee or merchant offers to the payer to ship or pick up their items + @constraint:Array {maxLength: 10} + ShippingOption[] options?; + # A classification for the method of purchase fulfillment (e.g shipping, in-store pickup, etc). Either `type` or `options` may be present, but not both + "SHIPPING"|"PICKUP_IN_PERSON"|"PICKUP_IN_STORE"|"PICKUP_FROM_PERSON" 'type?; +}; + +# The level 2 card processing data collections. If your merchant account has been configured for Level 2 processing this field will be passed to the processor on your behalf. Please contact your PayPal Technical Account Manager to define level 2 data for your business +public type Level2CardProcessingData record { + Money tax_total?; + # Use this field to pass a purchase identification value of up to 12 ASCII characters for AIB and 17 ASCII characters for all other processors + @constraint:String {maxLength: 17, minLength: 1} + string invoice_id?; +}; + +# The total order amount with an optional breakdown that provides details, such as the total item amount, total tax amount, shipping, handling, insurance, and discounts, if any.
If you specify `amount.breakdown`, the amount equals `item_total` plus `tax_total` plus `shipping` plus `handling` plus `insurance` minus `shipping_discount` minus discount.
The amount must be a positive number. For listed of supported currencies and decimal precision, see the PayPal REST APIs Currency Codes +public type AmountWithBreakdown record { + *Money; + *AmountWithBreakdownAllOf2; +}; + +# Liability shift indicator. The outcome of the issuer's authentication +public type LiabilityShift "NO"|"POSSIBLE"|"UNKNOWN"; + +# The currency and amount for a financial transaction, such as a balance or payment due +public type Money record { + # The value, which might be:
  • An integer for currencies like `JPY` that are not typically fractional.
  • A decimal fraction for currencies like `TND` that are subdivided into thousandths.
For the required number of decimal places for a currency code, see [Currency Codes](/api/rest/reference/currency-codes/) + @constraint:String {maxLength: 32, pattern: re `^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$`} + string value; + CurrencyCode currency_code; +}; + +# Resource consolidating common request and response attirbutes for vaulting Venmo Wallet +public type VaultVenmoWalletBase record { + *V3VaultInstructionBase; + *VaultVenmoWalletBaseAllOf2; + "MERCHANT"|"PLATFORM" usage_type; +}; + +# The Third Party Network token used to fund a payment +public type NetworkTokenRequest record { + # Third party network token number + @constraint:String {maxLength: 19, minLength: 13, pattern: re `^[0-9]{13,19}$`} + string number; + EciFlag eci_flag?; + # The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6) + DateYearMonth expiry; + # A TRID, or a Token Requestor ID, is an identifier used by merchants to request network tokens from card networks. A TRID is a precursor to obtaining a network token for a credit card primary account number (PAN), and will aid in enabling secure card on file (COF) payments and reducing fraud + @constraint:String {maxLength: 11, minLength: 1, pattern: re `^[0-9A-Z_]+$`} + string token_requestor_id?; + # An Encrypted one-time use value that's sent along with Network Token. This field is not required to be present for recurring transactions + @constraint:String {maxLength: 32, minLength: 28, pattern: re `^.*$`} + string cryptogram?; +}; + +# The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the [ISO 639-2 language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the optional [ISO-15924 script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region code](https://unstats.un.org/unsd/methodology/m49/) +@constraint:String {maxLength: 10, minLength: 2, pattern: re `^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}|[0-9]{3}))?$`} +public type Language string; + +public type CardRequestAllOf2 record { + # The PayPal-generated ID for the vaulted payment source. This ID should be stored on the merchant's server so the saved payment source can be used for future transactions + VaultId vault_id?; + # Provides additional details to process a payment using a `card` that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file).
Parameter compatibility:
  • `payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only with `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`.
  • Only one of the parameters - `previous_transaction_reference` and `previous_network_transaction_reference` - can be present in the request.
+ CardStoredCredential stored_credential?; + # The Third Party Network token used to fund a payment + NetworkTokenRequest network_token?; + # Customizes the payer experience during the 3DS Approval for payment + CardExperienceContext experience_context?; +}; + +# The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en) +public type Phone2 record { + # The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN) + @constraint:String {maxLength: 14, minLength: 1, pattern: re `^[0-9]{1,14}?$`} + string national_number; +}; + +# The order authorize response +public type OrderAuthorizeResponse record { + *ActivityTimestamps; + *OrderAuthorizeResponseAllOf2; +}; + +# The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank +@constraint:String {maxLength: 11, minLength: 8, pattern: re `^[A-Z-a-z0-9]{4}[A-Z-a-z]{2}[A-Z-a-z0-9]{2}([A-Z-a-z0-9]{3})?$`} +public type Bic string; + +# The authorization with additional payment details, such as risk assessment and processor response. These details are populated only for certain payment methods +public type AuthorizationWithAdditionalData record { + *Authorization; + *AuthorizationWithAdditionalDataAllOf2; +}; + +# The customer who approves and pays for the order. The customer is also known as the payer +public type PayerBase record { + Email email_address?; + AccountId payer_id?; +}; + +# Additional attributes associated with the use of a Venmo Wallet +public type VenmoWalletAttributesResponse record { + # The details about a saved payment source + VaultResponse vault?; +}; + +@constraint:String {maxLength: 256, minLength: 1} +public type CobrandedCardLabelsItemsString string; + +# The breakdown of the refund +public type MerchantPayableBreakdown record { + # An array of platform or partner fees, commissions, or brokerage fees for the refund + @constraint:Array {maxLength: 1} + PlatformFee[] platform_fees?; + Money net_amount_in_receivable_currency?; + Money total_refunded_amount?; + Money paypal_fee?; + Money gross_amount?; + Money paypal_fee_in_receivable_currency?; + Money net_amount?; + # An array of breakdown values for the net amount. Returned when the currency of the refund is different from the currency of the PayPal account where the payee holds their funds + NetAmountBreakdownItem[] net_amount_breakdown?; +}; + +# The details of the items in the shipment +public type TrackerItem record { + # The item quantity. Must be a whole number + @constraint:String {maxLength: 10, minLength: 1, pattern: re `^[1-9][0-9]{0,9}$`} + string quantity?; + # The URL of the item's image. File type and size restrictions apply. An image that violates these restrictions will not be honored + @constraint:String {maxLength: 2048, minLength: 1, pattern: re `^(https:)([/|.|\w|\s|-])*\.(?:jpg|gif|png|jpeg|JPG|GIF|PNG|JPEG)`} + string image_url?; + # The item name or title + @constraint:String {maxLength: 127, minLength: 1} + string name?; + UniversalProductCode upc?; + # The stock keeping unit (SKU) for the item. This can contain unicode characters + @constraint:String {maxLength: 127, minLength: 1} + string sku?; + # The URL to the item being purchased. Visible to buyer and used in buyer experiences + @constraint:String {maxLength: 2048, minLength: 1} + string url?; +}; + +# The full name representation like Mr J Smith +@constraint:String {maxLength: 300, minLength: 3} +public type FullName string; + +public type RefundAllOf2 record { + # The PayPal-generated ID for the refund. + string id?; + # The currency and amount for a financial transaction, such as a balance or payment due + Money amount?; + # The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives. + string invoice_id?; + # The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports. + @constraint:String {maxLength: 127, minLength: 1, pattern: re `^[A-Za-z0-9-_.,]*$`} + string custom_id?; + # Reference ID issued for the card transaction. This ID can be used to track the transaction across processors, card brands and issuing banks. + @constraint:String {maxLength: 36, minLength: 1, pattern: re `^[a-zA-Z0-9]+$`} + string acquirer_reference_number?; + # The reason for the refund. Appears in both the payer's transaction history and the emails that the payer receives. + string note_to_payer?; + # The breakdown of the refund + MerchantPayableBreakdown seller_payable_breakdown?; + # The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee + PayeeBase payer?; + # An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). + LinkDescription[] links?; +}; + +# Transactions status result identifier. The outcome of the issuer's authentication +public type ParesStatus "Y"|"N"|"U"|"A"|"C"|"R"|"D"|"I"; + +# The funds that are held on behalf of the merchant +public type DisbursementMode "INSTANT"|"DELAYED"; + +public type LineItemAllOf2 record { + # Code used to classify items purchased and track the total amount spent across various categories of products and services. Different corporate purchasing organizations may use different standards, but the United Nations Standard Products and Services Code (UNSPSC) is frequently used. + @constraint:String {maxLength: 12, minLength: 1, pattern: re `^[a-zA-Z0-9_'.-]*$`} + string commodity_code?; + # The currency and amount for a financial transaction, such as a balance or payment due + Money discount_amount?; + # The currency and amount for a financial transaction, such as a balance or payment due + Money total_amount?; + # Unit of measure is a standard used to express the magnitude of a quantity in international trade. Most commonly used (but not limited to) examples are: Acre (ACR), Ampere (AMP), Centigram (CGM), Centimetre (CMT), Cubic inch (INQ), Cubic metre (MTQ), Fluid ounce (OZA), Foot (FOT), Hour (HUR), Item (ITM), Kilogram (KGM), Kilometre (KMT), Kilowatt (KWT), Liquid gallon (GLL), Liter (LTR), Pounds (LBS), Square foot (FTK). + @constraint:String {maxLength: 12, minLength: 1, pattern: re `^[a-zA-Z0-9_'.-]*$`} + string unit_of_measure?; +}; + +# Information used to pay Bancontact +public type Bancontact record { + CountryCode country_code?; + # The full name representation like Mr J Smith + FullName name?; + AltpayRecurringAttributes attributes?; + # The last digits of the card used to fund the Bancontact payment + @constraint:String {maxLength: 4, minLength: 4, pattern: re `[0-9]{4}`} + string card_last_digits?; + # The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank + Bic bic?; + IbanLastChars iban_last_chars?; +}; + +public type VaultPaypalWalletBaseAllOf2 record { + # The description displayed to PayPal consumer on the approval flow for PayPal, as well as on the PayPal payment token management experience on PayPal.com. + @constraint:String {maxLength: 128, minLength: 1} + string description?; + # Expected business/pricing model for the billing agreement. + "IMMEDIATE"|"DEFERRED"|"RECURRING_PREPAID"|"RECURRING_POSTPAID"|"THRESHOLD_PREPAID"|"THRESHOLD_POSTPAID" usage_pattern?; + # The shipping details + ShippingDetail shipping?; + # The usage type associated with the PayPal payment token. + "MERCHANT"|"PLATFORM" usage_type?; + VaultOwnerId owner_id?; + # The customer type associated with the PayPal payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer. + "CONSUMER"|"BUSINESS" customer_type = "CONSUMER"; + # Create multiple payment tokens for the same payer, merchant/platform combination. Use this when the customer has not logged in at merchant/platform. The payment token thus generated, can then also be used to create the customer account at merchant/platform. Use this also when multiple payment tokens are required for the same payer, different customer at merchant/platform. This helps to identify customers distinctly even though they may share the same PayPal account. This only applies to PayPal payment source. + boolean permit_multiple_payment_tokens = false; +}; + +# Information needed to pay using P24 (Przelewy24) +public type P24Request record { + ExperienceContextBase experience_context?; + CountryCode country_code; + # The full name representation like Mr J Smith + FullName name; + # The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.
+ EmailAddress email; +}; + +# The tracking information for a shipment +public type ShipmentTracker record { + # The PayPal transaction ID + @constraint:String {maxLength: 50, minLength: 1, pattern: re `^[a-zA-Z0-9]*$`} + string transaction_id; + # The quantity of items shipped + @constraint:Int {minValue: 1, maxValue: 100} + int quantity?; + # If true, sends an email notification to the buyer of the PayPal transaction. The email contains the tracking information that was uploaded through the API + boolean notify_buyer = false; + ShipmentTrackingNumberType tracking_number_type?; + DateNoTime shipment_date?; + # Indicates whether the carrier validated the tracking number + boolean tracking_number_validated?; + # To denote whether the shipment is sent forward to the receiver or returned back + "FORWARD"|"RETURN" shipment_direction?; + # The postage payment ID. This property supports Unicode + @constraint:String {maxLength: 64, minLength: 1} + string postage_payment_id?; + # The carrier for the shipment. Some carriers have a global version as well as local subsidiaries. The subsidiaries are repeated over many countries and might also have an entry in the global list. Choose the carrier for your country. If the carrier is not available for your country, choose the global version of the carrier. If your carrier name is not in the list, set `carrier` to `OTHER` and set carrier name in `carrier_name_other`. For allowed values, see Carriers + ShipmentCarrier carrier?; + # To denote which party uploaded the shipment tracking info + "MERCHANT"|"CONSUMER"|"PARTNER" shipment_uploader?; + DateTime last_updated_time?; + # The name of the carrier for the shipment. Provide this value only if the carrier parameter is OTHER. This property supports Unicode + @constraint:String {maxLength: 64, minLength: 1} + string carrier_name_other?; + # The tracking number for the shipment. This property supports Unicode + @constraint:String {maxLength: 64, minLength: 1} + string tracking_number?; + # The status of the item shipment. For allowed values, see Shipping Statuses + ShipmentTrackingStatus status; +}; + +# The payment source definition +public type PaymentSource record { + # Information needed to pay using giropay + GiropayRequest giropay?; + # Information needed to pay using BLIK + BlikRequest blik?; + # Information needed to pay using iDEAL + IdealRequest ideal?; + GooglePayRequest google_pay?; + # Information needed to pay using Trustly + TrustlyRequest trustly?; + # Information needed to pay using eps + EpsRequest eps?; + # Information needed to pay using Sofort + SofortRequest sofort?; + # The tokenized payment source to fund a payment + Token token?; + # Information needed to pay using Venmo + VenmoWalletRequest venmo?; + ApplePayRequest apple_pay?; + # Information needed to pay using Bancontact + BancontactRequest bancontact?; + # Information needed to pay using P24 (Przelewy24) + P24Request p24?; + # A resource that identifies a PayPal Wallet is used for payment + PaypalWallet paypal?; + # The payment card to use to fund a payment. Can be a credit or debit card.
Note: Passing card number, cvv and expiry directly via the API requires PCI SAQ D compliance.
*PayPal offers a mechanism by which you do not have to take on the PCI SAQ D burden by using hosted fields - refer to this Integration Guide*.
+ CardRequest card?; + # Information needed to pay using MyBank + MybankRequest mybank?; +}; + +# Information used to pay using eps +public type Eps record { + CountryCode country_code?; + # The full name representation like Mr J Smith + FullName name?; + # The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank + Bic bic?; +}; + +@constraint:String {maxLength: 255, minLength: 1} +public type BinDetailsProductsItemsString string; + +# The collection of payments, or transactions, for a purchase unit in an order. For example, authorized payments, captured payments, and refunds +public type PaymentCollection record { + # An array of captured payments for a purchase unit. A purchase unit can have zero or more captured payments + Capture[] captures?; + # An array of authorized payments for a purchase unit. A purchase unit can have zero or more authorized payments + AuthorizationWithAdditionalData[] authorizations?; + # An array of refunds for a purchase unit. A purchase unit can have zero or more refunds + Refund[] refunds?; +}; + +# The card network or brand. Applies to credit, debit, gift, and payment cards +public type CardBrand "VISA"|"MASTERCARD"|"DISCOVER"|"AMEX"|"SOLO"|"JCB"|"STAR"|"DELTA"|"SWITCH"|"MAESTRO"|"CB_NATIONALE"|"CONFIGOGA"|"CONFIDIS"|"ELECTRON"|"CETELEM"|"CHINA_UNION_PAY"; + +# The tokenized payment source to fund a payment +public type Token record { + # The PayPal-generated ID for the token + @constraint:String {maxLength: 255, minLength: 1, pattern: re `^[0-9a-zA-Z_-]+$`} + string id; + # The tokenization method that generated the ID + "BILLING_AGREEMENT" 'type; +}; + +# The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.
+@constraint:String {maxLength: 64, minLength: 20, pattern: re `^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$`} +public type DateTime string; + +# A captured payment +public type Capture record { + *CaptureStatus; + *CaptureAllOf2; + *ActivityTimestamps; +}; + +public type OrderTrackerRequestAllOf2 record { + # The PayPal capture ID. + @constraint:String {maxLength: 50, minLength: 1, pattern: re `^[a-zA-Z0-9]*$`} + string capture_id; + # If true, sends an email notification to the payer of the PayPal transaction. The email contains the tracking information that was uploaded through the API. + boolean notify_payer = false; + # An array of details of items in the shipment. + TrackerItem[] items?; +}; + +# The details for the items to be purchased +public type Item record { + # The item quantity. Must be a whole number + @constraint:String {maxLength: 10, pattern: re `^[1-9][0-9]{0,9}$`} + string quantity; + # The item name or title + @constraint:String {maxLength: 127, minLength: 1} + string name; + # The detailed item description + @constraint:String {maxLength: 127} + string description?; + # The currency and amount for a financial transaction, such as a balance or payment due + Money tax?; + Money unit_amount; + # The stock keeping unit (SKU) for the item + @constraint:String {maxLength: 127} + string sku?; + # The item category type + "DIGITAL_GOODS"|"PHYSICAL_GOODS"|"DONATION" category?; +}; + +# Information used to pay using BLIK +public type Blik record { + CountryCode country_code?; + # The full name representation like Mr J Smith + FullName name?; + BlikOneClickResponse one_click?; + # The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.
+ EmailAddress email?; +}; + +# The tax ID of the customer. The customer is also known as the payer. Both `tax_id` and `tax_id_type` are required +public type TaxInfo record { + # The customer's tax ID type + "BR_CPF"|"BR_CNPJ" tax_id_type; + # The customer's tax ID value + @constraint:String {maxLength: 14, minLength: 1, pattern: re `([a-zA-Z0-9])`} + string tax_id; +}; + +# The last characters of the IBAN used to pay +@constraint:String {maxLength: 34, minLength: 4, pattern: re `[a-zA-Z0-9]{4}`} +public type IbanLastChars string; + +# Venmo wallet response +public type VenmoWalletResponse record { + Email email_address?; + AccountId2 account_id?; + # The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute) + AddressPortable2 address?; + # The Venmo user name chosen by the user, also know as a Venmo handle + @constraint:String {maxLength: 50, minLength: 1, pattern: re `^[-a-zA-Z0-9_]*$`} + string user_name?; + # The name of the party + Name2 name?; + Phone2 phone_number?; + # Additional attributes associated with the use of a Venmo Wallet + VenmoWalletAttributesResponse attributes?; +}; + +# The refund status +public type RefundStatus record { + RefundStatusDetails status_details?; + # The status of the refund + "CANCELLED"|"FAILED"|"PENDING"|"COMPLETED" status?; +}; + +public type ShippingWithTrackingDetailsAllOf2 record { + # An array of trackers for a transaction. + Tracker[] trackers?; +}; + +# Information needed to pay using Trustly +public type TrustlyRequest record { + ExperienceContextBase experience_context?; + CountryCode country_code; + # The full name representation like Mr J Smith + FullName name; +}; + +# The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.
+@constraint:String {maxLength: 254, minLength: 3} +public type EmailAddress string; + +# The payment card to use to fund a payment. Can be a credit or debit card +public type Card record { + # The primary account number (PAN) for the payment card + @constraint:String {maxLength: 19, minLength: 13, pattern: re `^[0-9]{13,19}$`} + string number?; + # The three- or four-digit security code of the card. Also known as the CVV, CVC, CVN, CVE, or CID. This parameter cannot be present in the request when `payment_initiator=MERCHANT` + @constraint:String {maxLength: 4, minLength: 3, pattern: re `^[0-9]{3,4}$`} + string security_code?; + # The card holder's name as it appears on the card + @constraint:String {maxLength: 300, minLength: 1, pattern: re `^.{1,300}$`} + string name?; + AddressPortable billing_address?; + # Additional attributes associated with the use of this card + CardAttributes attributes?; + # The identifier of the instrument + InstrumentId id?; + # The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6) + DateYearMonth expiry?; + CardBrand card_type?; + # Type of card. i.e Credit, Debit and so on + CardType 'type?; + # The last digits of the payment card + @constraint:String {maxLength: 4, minLength: 2, pattern: re `^[0-9]{2,4}$`} + string last_digits?; + # The card network or brand. Applies to credit, debit, gift, and payment cards + CardBrand brand?; +}; + +# The options that the payee or merchant offers to the payer to ship or pick up their items +public type ShippingOption record { + # The currency and amount for a financial transaction, such as a balance or payment due + Money amount?; + # A unique ID that identifies a payer-selected shipping option + @constraint:String {maxLength: 127} + string id; + # A description that the payer sees, which helps them choose an appropriate shipping option. For example, `Free Shipping`, `USPS Priority Shipping`, `Expédition prioritaire USPS`, or `USPS yōuxiān fā huò`. Localize this description to the payer's locale + @constraint:String {maxLength: 127} + string label; + # A classification for the method of purchase fulfillment + ShippingType 'type?; + # If the API request sets `selected = true`, it represents the shipping option that the payee or merchant expects to be pre-selected for the payer when they first view the `shipping.options` in the PayPal Checkout experience. As part of the response if a `shipping.option` contains `selected=true`, it represents the shipping option that the payer selected during the course of checkout with PayPal. Only one `shipping.option` can be set to `selected=true` + boolean selected; +}; + +public type ExemptionDetails anydata; + +# The status of the item shipment. For allowed values, see Shipping Statuses +public type ShipmentTrackingStatus "CANCELLED"|"DELIVERED"|"LOCAL_PICKUP"|"ON_HOLD"|"SHIPPED"|"SHIPMENT_CREATED"|"DROPPED_OFF"|"IN_TRANSIT"|"RETURNED"|"LABEL_PRINTED"|"ERROR"|"UNCONFIRMED"|"PICKUP_FAILED"|"DELIVERY_DELAYED"|"DELIVERY_SCHEDULED"|"DELIVERY_FAILED"|"INRETURN"|"IN_PROCESS"|"NEW"|"VOID"|"PROCESSED"|"NOT_SHIPPED"|"COMPLETED"; + +public type PaypalWalletCustomerAllOf2 record { +}; + +# The instruction to process an order +public type ProcessingInstruction "ORDER_COMPLETE_ON_PAYMENT_APPROVAL"|"NO_INSTRUCTION"; + +# Supplementary data about a payment. This object passes information that can be used to improve risk assessments and processing costs, for example, by providing Level 2 and Level 3 payment data +public type SupplementaryData record { + # Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see checkout or multiparty checkout + CardSupplementaryData card?; +}; + +# Information needed to pay using Bancontact +public type BancontactRequest record { + ExperienceContextBase experience_context?; + CountryCode country_code; + # The full name representation like Mr J Smith + FullName name; + AltpayRecurringAttributesRequest attributes?; +}; + +# Information used to pay using BLIK one-click flow +public type BlikOneClick record { + # The merchant generated, unique reference serving as a primary identifier for accounts connected between Blik and a merchant + @constraint:String {maxLength: 64, minLength: 3, pattern: re `^[ -~]{3,64}$`} + string consumer_reference; + # A Blik-defined identifier for a specific Blik-enabled bank account that is associated with a given merchant. Used only in conjunction with a Consumer Reference + @constraint:String {maxLength: 19, minLength: 1, pattern: re `^[0-9]+$`} + string alias_key?; + # A bank defined identifier used as a display name to allow the payer to differentiate between multiple registered bank accounts + @constraint:String {maxLength: 35, minLength: 8, pattern: re `^[ -~]{8,35}$`} + string alias_label?; + # The 6-digit code used to authenticate a consumer within BLIK + @constraint:String {maxLength: 6, minLength: 6, pattern: re `^[0-9]{6}$`} + string auth_code?; +}; + +# Customizes the payer experience during the approval process for the BLIK payment +public type BlikExperienceContext record { + *ExperienceContextBase; + *BlikExperienceContextAllOf2; +}; + +# The PayPal-generated ID for the vaulted payment source. This ID should be stored on the merchant's server so the saved payment source can be used for future transactions +@constraint:String {maxLength: 255, minLength: 1, pattern: re `^[0-9a-zA-Z_-]+$`} +public type VaultId string; + +# The details about a customer in PayPal's system of record +public type PaypalWalletCustomer record { + *Customer; + *PaypalWalletCustomerAllOf2; +}; + +# Describes the URL +public type Url string; + +# The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute) +public type AddressPortable2 record { + CountryCode2 country_code; + # The highest-level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision. This data is formatted for postal delivery, for example, `CA` and not `California`. Value, by country, is:
  • UK. A county.
  • US. A state.
  • Canada. A province.
  • Japan. A prefecture.
  • Switzerland. A *kanton*.
+ @constraint:String {maxLength: 300} + string admin_area_1?; + # The first line of the address, such as number and street, for example, `173 Drury Lane`. Needed for data entry, and Compliance and Risk checks. This field needs to pass the full address + @constraint:String {maxLength: 300} + string address_line_1?; + # The sub-locality, suburb, neighborhood, or district. This is smaller than `admin_area_level_2`. Value is:
  • Brazil. Suburb, *bairro*, or neighborhood.
  • India. Sub-locality or district. Street name information isn't always available, but a sub-locality or district can be a very small area.
+ @constraint:String {maxLength: 100} + string admin_area_3?; + AddressDetails1 address_details?; + # A city, town, or village. Smaller than `admin_area_level_1` + @constraint:String {maxLength: 120} + string admin_area_2?; + # The third line of the address, if needed. Examples include a street complement for Brazil, direction text, such as `next to Walmart`, or a landmark in an Indian address + @constraint:String {maxLength: 100} + string address_line_3?; + # The second line of the address, for example, a suite or apartment number + @constraint:String {maxLength: 300} + string address_line_2?; + # The neighborhood, ward, or district. This is smaller than `admin_area_level_3` or `sub_locality`. Value is:
  • The postal sorting code that is used in Guernsey and many French territories, such as French Guiana.
  • The fine-grained administrative levels in China.
+ @constraint:String {maxLength: 100} + string admin_area_4?; + # The postal code, which is the ZIP code or equivalent. Typically required for countries with a postal code or an equivalent. See [postal code](https://en.wikipedia.org/wiki/Postal_code) + @constraint:String {maxLength: 60} + string postal_code?; +}; + +# Resource consolidating common request and response attributes for vaulting PayPal Wallet +public type VaultPaypalWalletBase record { + *VaultInstructionBase; + *VaultPaypalWalletBaseAllOf2; + "MERCHANT"|"PLATFORM" usage_type; +}; + +# The authorized payment transaction +public type Authorization record { + *AuthorizationStatus; + *AuthorizationAllOf2; + *ActivityTimestamps; +}; + +# Represents the Headers record for the operation: orders.create +public type OrdersCreateHeaders record { + # The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager + string PayPal\-Request\-Id?; + string PayPal\-Client\-Metadata\-Id?; + # The preferred server response upon successful completion of the request. Value is:
  • return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links.
  • return=representation. The server returns a complete resource representation, including the current state of the resource.
+ @constraint:String {maxLength: 25, minLength: 1, pattern: re `^[a-zA-Z=]*$`} + string Prefer = "return=representation"; + string PayPal\-Partner\-Attribution\-Id?; +}; + +# The unique ID for a customer generated by PayPal +@constraint:String {maxLength: 22, minLength: 1, pattern: re `^[0-9a-zA-Z_-]+$`} +public type MerchantPartnerCustomerId string; + +# Results of Authentication such as 3D Secure +public type AuthenticationResponse record { + AuthenticationFlow authentication_flow?; + LiabilityShift liability_shift?; + ExemptionDetails exemption_details?; + ThreeDSecureAuthenticationResponse three_d_secure?; +}; + +# Provides additional details to process a payment using a `payment_source` that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file).
Parameter compatibility:
  • `payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only with `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`.
  • Only one of the parameters - `previous_transaction_reference` and `previous_network_transaction_reference` - can be present in the request.
+public type StoredPaymentSource record { + StoredPaymentSourcePaymentType payment_type; + # Indicates if this is a `first` or `subsequent` payment using a stored payment source (also referred to as stored credential or card on file) + StoredPaymentSourceUsageType usage?; + PaymentInitiator payment_initiator; + NetworkTransactionReference previous_network_transaction_reference?; +}; + +public type AltpayRecurringAttributes anydata; + +public type TrackerStatus anydata; + +# The order shipping details +public type ShippingWithTrackingDetails record { + *ShippingDetail; + *ShippingWithTrackingDetailsAllOf2; +}; + +public type GooglePayRequest anydata; + +# Information needed to pay using Trustly +public type Trustly record { + CountryCode country_code?; + # The full name representation like Mr J Smith + FullName name?; + # The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank + Bic bic?; + IbanLastChars iban_last_chars?; +}; + +# The breakdown of the amount. Breakdown provides details such as total item amount, total tax amount, shipping, handling, insurance, and discounts, if any +public type AmountBreakdown record { + # The currency and amount for a financial transaction, such as a balance or payment due + Money insurance?; + Money tax_total?; + # The currency and amount for a financial transaction, such as a balance or payment due + Money shipping?; + Money shipping_discount?; + # The currency and amount for a financial transaction, such as a balance or payment due + Money discount?; + Money item_total?; + # The currency and amount for a financial transaction, such as a balance or payment due + Money handling?; +}; + +# Payer confirms the intent to pay for the Order using the provided payment source +public type ConfirmOrderRequest record { + # The payment source definition + PaymentSource payment_source; + # The instruction to process an order + ProcessingInstruction processing_instruction?; + # Customizes the payer confirmation experience + OrderConfirmApplicationContext application_context?; +}; + +# Customizes the payer experience during the 3DS Approval for payment +public type CardExperienceContext record { + Url return_url?; + Url cancel_url?; +}; + +# Electronic Commerce Indicator (ECI). The ECI value is part of the 2 data elements that indicate the transaction was processed electronically. This should be passed on the authorization transaction to the Gateway/Processor +public type EciFlag "MASTERCARD_NON_3D_SECURE_TRANSACTION"|"MASTERCARD_ATTEMPTED_AUTHENTICATION_TRANSACTION"|"MASTERCARD_FULLY_AUTHENTICATED_TRANSACTION"|"FULLY_AUTHENTICATED_TRANSACTION"|"ATTEMPTED_AUTHENTICATION_TRANSACTION"|"NON_3D_SECURE_TRANSACTION"; + +# The status fields for an authorized payment +public type AuthorizationStatus record { + AuthorizationStatusDetails status_details?; + # The status for the authorized payment + "CREATED"|"CAPTURED"|"DENIED"|"PARTIALLY_CAPTURED"|"VOIDED"|"PENDING" status?; +}; + +public type ApplePayAttributes anydata; + +# The details of the captured payment status +public type CaptureStatusDetails record { + # The reason why the captured payment status is `PENDING` or `DENIED` + "BUYER_COMPLAINT"|"CHARGEBACK"|"ECHECK"|"INTERNATIONAL_WITHDRAWAL"|"OTHER"|"PENDING_REVIEW"|"RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION"|"REFUNDED"|"TRANSACTION_APPROVED_AWAITING_FUNDING"|"UNILATERAL"|"VERIFICATION_REQUIRED" reason?; +}; + +# The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6) +@constraint:String {maxLength: 7, minLength: 7, pattern: re `^[0-9]{4}-(0[1-9]|1[0-2])$`} +public type DateYearMonth string; + +# The payment card to use to fund a payment. Can be a credit or debit card.
Note: Passing card number, cvv and expiry directly via the API requires PCI SAQ D compliance.
*PayPal offers a mechanism by which you do not have to take on the PCI SAQ D burden by using hosted fields - refer to this Integration Guide*.
+public type CardRequest record { + *Card; + *CardRequestAllOf2; +}; + +# Represents the Queries record for the operation: orders.get +public type OrdersGetQueries record { + # A comma-separated list of fields that should be returned for the order. Valid filter field is `payment_source` + @constraint:String {pattern: re `^[a-z_]*$`} + string fields?; +}; + +# The non-portable additional address details include fine-grain address information for Compliance, Risk, and other scenarios. This isn't portable with common third-party and open source applications. This can include data that is redundant with core fields. For example, `address_portable.address_line_1` is usually a combination of `address_details.street_number`, `street_name`, and `street_type` +public type AddressDetails1 record { + # A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House + @constraint:String {maxLength: 100} + string building_name?; + # The street number + @constraint:String {maxLength: 100} + string street_number?; + # The street type. For example, avenue, boulevard, road, or expressway + @constraint:String {maxLength: 100} + string street_type?; + # The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment + @constraint:String {maxLength: 100} + string sub_building?; + # The delivery service. Post office box, bag number, or post office name + @constraint:String {maxLength: 100} + string delivery_service?; + # The street name. Just `Drury` in `Drury Lane` + @constraint:String {maxLength: 100} + string street_name?; +}; + +public type VaultOwnerId anydata; + +# The customer who approves and pays for the order. The customer is also known as the payer +public type Payer record { + *PayerBase; + *PayerAllOf2; +}; + +# The order details +public type Order record { + *ActivityTimestamps; + *OrderAllOf2; +}; + +# Details about the merchant cobranded card used for order purchase +public type CobrandedCard record { + # The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee + PayeeBase payee?; + # The currency and amount for a financial transaction, such as a balance or payment due + Money amount?; + # Array of labels for the cobranded card + @constraint:Array {maxLength: 25, minLength: 1} + CobrandedCardLabelsItemsString[] labels?; +}; + +# The purchase unit details. Used to capture required information for the payment contract +public type PurchaseUnit record { + # The total order amount with an optional breakdown that provides details, such as the total item amount, total tax amount, shipping, handling, insurance, and discounts, if any.
If you specify `amount.breakdown`, the amount equals `item_total` plus `tax_total` plus `shipping` plus `handling` plus `insurance` minus `shipping_discount` minus discount.
The amount must be a positive number. For listed of supported currencies and decimal precision, see the PayPal REST APIs Currency Codes + AmountWithBreakdown amount?; + # The API caller-provided external ID for the purchase unit. Required for multiple purchase units when you must update the order through `PATCH`. If you omit this value and the order contains only one purchase unit, PayPal sets this value to `default`.
Note: If there are multiple purchase units, reference_id is required for each purchase unit.
+ @constraint:String {maxLength: 256, minLength: 1} + string reference_id?; + # The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports + @constraint:String {maxLength: 127, minLength: 1} + string custom_id?; + # The collection of payments, or transactions, for a purchase unit in an order. For example, authorized payments, captured payments, and refunds + PaymentCollection payments?; + # The purchase description + @constraint:String {maxLength: 127, minLength: 1} + string description?; + PaymentInstruction payment_instruction?; + # The merchant who receives the funds and fulfills the order. The merchant is also known as the payee + Payee payee?; + SupplementaryData supplementary_data?; + # The order shipping details + ShippingWithTrackingDetails shipping?; + # The payment descriptor on account transactions on the customer's credit card statement, that PayPal sends to processors. The maximum length of the soft descriptor information that you can pass in the API field is 22 characters, in the following format:22 - len(PAYPAL * (8)) - len(Descriptor in Payment Receiving Preferences of Merchant account + 1)The PAYPAL prefix uses 8 characters.

The soft descriptor supports the following ASCII characters:
  • Alphanumeric characters
  • Dashes
  • Asterisks
  • Periods (.)
  • Spaces
For Wallet payments marketplace integrations:
  • The merchant descriptor in the Payment Receiving Preferences must be the marketplace name.
  • You can't use the remaining space to show the customer service number.
  • The remaining spaces can be a combination of seller name and country.

For unbranded payments (Direct Card) marketplace integrations, use a combination of the seller name and phone number + @constraint:String {maxLength: 22, minLength: 1} + string soft_descriptor?; + # The API caller-provided external invoice ID for this order + @constraint:String {maxLength: 127, minLength: 1} + string invoice_id?; + # The PayPal-generated ID for the purchase unit. This ID appears in both the payer's transaction history and the emails that the payer receives. In addition, this ID is available in transaction and settlement reports that merchants and API callers can use to reconcile transactions. This ID is only available when an order is saved by calling v2/checkout/orders/id/save + @constraint:String {maxLength: 19, minLength: 1} + string id?; + # An array of items that the customer purchases from the merchant + Item[] items?; +}; + +# Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see checkout or multiparty checkout +public type CardSupplementaryData record { + Level3CardProcessingData level_3?; + Level2CardProcessingData level_2?; +}; + +# The order request details +public type OrderRequest record { + OrderApplicationContext application_context?; + # An array of purchase units. Each purchase unit establishes a contract between a payer and the payee. Each purchase unit represents either a full or partial order that the payer intends to purchase from the payee + @constraint:Array {maxLength: 10, minLength: 1} + PurchaseUnitRequest[] purchase_units; + PaymentSource payment_source?; + # The intent to either capture payment immediately or authorize a payment for an order after order creation + CheckoutPaymentIntent intent; + # The customer who approves and pays for the order. The customer is also known as the payer + Payer payer?; +}; + +# Information needed to pay using MyBank +public type MybankRequest record { + ExperienceContextBase experience_context?; + CountryCode country_code; + # The full name representation like Mr J Smith + FullName name; +}; + +# The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute) +public type AddressPortable record { + CountryCode country_code; + # The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision. Format for postal delivery. For example, `CA` and not `California`. Value, by country, is:
  • UK. A county.
  • US. A state.
  • Canada. A province.
  • Japan. A prefecture.
  • Switzerland. A kanton.
+ @constraint:String {maxLength: 300} + string admin_area_1?; + # The first line of the address. For example, number or street. For example, `173 Drury Lane`. Required for data entry and compliance and risk checks. Must contain the full address + @constraint:String {maxLength: 300} + string address_line_1?; + # A sub-locality, suburb, neighborhood, or district. Smaller than `admin_area_level_2`. Value is:
  • Brazil. Suburb, bairro, or neighborhood.
  • India. Sub-locality or district. Street name information is not always available but a sub-locality or district can be a very small area.
+ @constraint:String {maxLength: 100} + string admin_area_3?; + AddressDetails address_details?; + # A city, town, or village. Smaller than `admin_area_level_1` + @constraint:String {maxLength: 120} + string admin_area_2?; + # The third line of the address, if needed. For example, a street complement for Brazil, direction text, such as `next to Walmart`, or a landmark in an Indian address + @constraint:String {maxLength: 100} + string address_line_3?; + # The second line of the address. For example, suite or apartment number + @constraint:String {maxLength: 300} + string address_line_2?; + # The neighborhood, ward, or district. Smaller than `admin_area_level_3` or `sub_locality`. Value is:
  • The postal sorting code for Guernsey and many French territories, such as French Guiana.
  • The fine-grained administrative levels in China.
+ @constraint:String {maxLength: 100} + string admin_area_4?; + # The postal code, which is the zip code or equivalent. Typically required for countries with a postal code or an equivalent. See [postal code](https://en.wikipedia.org/wiki/Postal_code) + @constraint:String {maxLength: 60} + string postal_code?; +}; + +# Representation of card details as received in the request +public type CardFromRequest record { + # The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6) + DateYearMonth expiry?; + # The last digits of the payment card + @constraint:String {maxLength: 4, minLength: 2, pattern: re `[0-9]{2,}`} + string last_digits?; +}; + +# The phone type +public type PhoneType "FAX"|"HOME"|"MOBILE"|"OTHER"|"PAGER"; + +# Represents the Headers record for the operation: orders.confirm +public type OrdersConfirmHeaders record { + string PayPal\-Client\-Metadata\-Id?; + # The preferred server response upon successful completion of the request. Value is:
  • return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links.
  • return=representation. The server returns a complete resource representation, including the current state of the resource.
+ @constraint:String {maxLength: 25, minLength: 1, pattern: re `^[a-zA-Z=]*$`} + string Prefer = "return=representation"; +}; + +# The customer and merchant payment preferences +public type PaymentMethod record { + PayeePaymentMethodPreference payee_preferred?; + # NACHA (the regulatory body governing the ACH network) requires that API callers (merchants, partners) obtain the consumer’s explicit authorization before initiating a transaction. To stay compliant, you’ll need to make sure that you retain a compliant authorization for each transaction that you originate to the ACH Network using this API. ACH transactions are categorized (using SEC codes) by how you capture authorization from the Receiver (the person whose bank account is being debited or credited). PayPal supports the following SEC codes + "TEL"|"WEB"|"CCD"|"PPD" standard_entry_class_code = "WEB"; +}; + +# The purchase unit request. Includes required information for the payment contract +public type PurchaseUnitRequest record { + # The merchant who receives the funds and fulfills the order. The merchant is also known as the payee + Payee payee?; + # The total order amount with an optional breakdown that provides details, such as the total item amount, total tax amount, shipping, handling, insurance, and discounts, if any.
If you specify `amount.breakdown`, the amount equals `item_total` plus `tax_total` plus `shipping` plus `handling` plus `insurance` minus `shipping_discount` minus discount.
The amount must be a positive number. For listed of supported currencies and decimal precision, see the PayPal REST APIs Currency Codes + AmountWithBreakdown amount; + SupplementaryData supplementary_data?; + # The API caller-provided external ID for the purchase unit. Required for multiple purchase units when you must update the order through `PATCH`. If you omit this value and the order contains only one purchase unit, PayPal sets this value to `default` + @constraint:String {maxLength: 256, minLength: 1} + string reference_id?; + # The shipping details + ShippingDetail shipping?; + # The soft descriptor is the dynamic text used to construct the statement descriptor that appears on a payer's card statement.

If an Order is paid using the "PayPal Wallet", the statement descriptor will appear in following format on the payer's card statement: PAYPAL_prefix+(space)+merchant_descriptor+(space)+ soft_descriptor
Note: The merchant descriptor is the descriptor of the merchant’s payment receiving preferences which can be seen by logging into the merchant account https://www.sandbox.paypal.com/businessprofile/settings/info/edit
The PAYPAL prefix uses 8 characters. Only the first 22 characters will be displayed in the statement.
For example, if:
  • The PayPal prefix toggle is PAYPAL *.
  • The merchant descriptor in the profile is Janes Gift.
  • The soft descriptor is 800-123-1234.
Then, the statement descriptor on the card is PAYPAL * Janes Gift 80 + @constraint:String {maxLength: 22, minLength: 1} + string soft_descriptor?; + # The API caller-provided external ID. Used to reconcile client transactions with PayPal transactions. Appears in transaction and settlement reports but is not visible to the payer + @constraint:String {maxLength: 127, minLength: 1} + string custom_id?; + # The purchase description. The maximum length of the character is dependent on the type of characters used. The character length is specified assuming a US ASCII character. Depending on type of character; (e.g. accented character, Japanese characters) the number of characters that that can be specified as input might not equal the permissible max length + @constraint:String {maxLength: 127, minLength: 1} + string description?; + # The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives + @constraint:String {maxLength: 127, minLength: 1} + string invoice_id?; + PaymentInstruction payment_instruction?; + # An array of items that the customer purchases from the merchant + Item[] items?; +}; + +# The date and time stamps that are common to authorized payment, captured payment, and refund transactions +public type ActivityTimestamps record { + DateTime update_time?; + DateTime create_time?; +}; + +# The merchant who receives the funds and fulfills the order. The merchant is also known as the payee +public type Payee record { + *PayeeBase; + *PayeeAllOf2; +}; + +public type CaptureAllOf2 record { + # The PayPal-generated ID for the captured payment. + string id?; + # The currency and amount for a financial transaction, such as a balance or payment due + Money amount?; + # The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives. + string invoice_id?; + # The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports. + @constraint:String {maxLength: 127} + string custom_id?; + # Reference values used by the card network to identify a transaction + NetworkTransactionReference network_transaction_reference?; + # The level of protection offered as defined by [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection) + SellerProtection seller_protection?; + # Indicates whether you can make additional captures against the authorized payment. Set to `true` if you do not intend to capture additional payments against the authorization. Set to `false` if you intend to capture additional payments against the authorization. + boolean final_capture = false; + # The detailed breakdown of the capture activity. This is not available for transactions that are in pending state + SellerReceivableBreakdown seller_receivable_breakdown?; + # The funds that are held on behalf of the merchant + DisbursementMode disbursement_mode?; + # An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links). + LinkDescription[] links?; + # The processor response information for payment requests, such as direct credit card transactions + ProcessorResponse processor_response?; +}; + +# Indicates the type of the stored payment_source payment +public type StoredPaymentSourcePaymentType "ONE_TIME"|"RECURRING"|"UNSCHEDULED"; + +# Information about the Payment data obtained by decrypting Apple Pay token +public type ApplePayDecryptedTokenData record { + Money transaction_amount?; + Card tokenized_card; + ApplePayPaymentData payment_data?; + # Apple Pay Hex-encoded device manufacturer identifier. The pattern is defined by an external party and supports Unicode + @constraint:String {maxLength: 2000, minLength: 1, pattern: re `^.*$`} + string device_manufacturer_id?; + # Indicates the type of payment data passed, in case of Non China the payment data is 3DSECURE and for China it is EMV + "3DSECURE"|"EMV" payment_data_type?; +}; + +# The PayPal payer ID, which is a masked version of the PayPal account number intended for use with third parties. The account number is reversibly encrypted and a proprietary variant of Base32 is used to encode the result +@constraint:String {maxLength: 13, minLength: 13, pattern: re `^[2-9A-HJ-NP-Z]{13}$`} +public type AccountId2 string; + +# The tracking number type +public type ShipmentTrackingNumberType "CARRIER_PROVIDED"|"E2E_PARTNER_PROVIDED"; + +public type OrderAllOf2 record { + # The ID of the order. + string id?; + # The payment source used to fund the payment + PaymentSourceResponse payment_source?; + # The intent to either capture payment immediately or authorize a payment for an order after order creation + CheckoutPaymentIntent intent?; + # The instruction to process an order + ProcessingInstruction processing_instruction?; + # The customer who approves and pays for the order. The customer is also known as the payer + Payer payer?; + # An array of purchase units. Each purchase unit establishes a contract between a customer and merchant. Each purchase unit represents either a full or partial order that the customer intends to purchase from the merchant. + @constraint:Array {maxLength: 10, minLength: 1} + PurchaseUnit[] purchase_units?; + # The order status + OrderStatus status?; + # An array of request-related HATEOAS links. To complete payer approval, use the `approve` link to redirect the payer. The API caller has 3 hours (default setting, this which can be changed by your account manager to 24/48/72 hours to accommodate your use case) from the time the order is created, to redirect your payer. Once redirected, the API caller has 3 hours for the payer to approve the order and either authorize or capture the order. If you are not using the PayPal JavaScript SDK to initiate PayPal Checkout (in context) ensure that you include `application_context.return_url` is specified or you will get "We're sorry, Things don't appear to be working at the moment" after the payer approves the payment. + LinkDescription[] links?; +}; + +# Any additional payment instructions to be consider during payment processing. This processing instruction is applicable for Capturing an order or Authorizing an Order +public type PaymentInstruction record { + DisbursementMode disbursement_mode?; + # An array of various fees, commissions, tips, or donations. This field is only applicable to merchants that been enabled for PayPal Commerce Platform for Marketplaces and Platforms capability + @constraint:Array {maxLength: 1} + PlatformFee[] platform_fees?; + # FX identifier generated returned by PayPal to be used for payment processing in order to honor FX rate (for eligible integrations) to be used when amount is settled/received into the payee account + @constraint:String {maxLength: 4000, minLength: 1, pattern: re `^.*$`} + string payee_receivable_fx_rate_id?; + # This field is only enabled for selected merchants/partners to use and provides the ability to trigger a specific pricing rate/plan for a payment transaction. The list of eligible 'payee_pricing_tier_id' would be provided to you by your Account Manager. Specifying values other than the one provided to you by your account manager would result in an error + @constraint:String {maxLength: 20, minLength: 1, pattern: re `^.*$`} + string payee_pricing_tier_id?; +}; + +public type OrderAuthorizeResponseAllOf2 record { + # The ID of the order. + string id?; + # The payment source used to fund the payment + PaymentSourceResponse payment_source?; + # The intent to either capture payment immediately or authorize a payment for an order after order creation + CheckoutPaymentIntent intent?; + # The instruction to process an order + ProcessingInstruction processing_instruction?; + # The customer who approves and pays for the order. The customer is also known as the payer + Payer payer?; + # An array of purchase units. Each purchase unit establishes a contract between a customer and merchant. Each purchase unit represents either a full or partial order that the customer intends to purchase from the merchant. + @constraint:Array {maxLength: 10, minLength: 1} + PurchaseUnit[] purchase_units?; + # The order status + OrderStatus status?; + # An array of request-related HATEOAS links. To complete payer approval, use the `approve` link to redirect the payer. The API caller has 3 hours (default setting, this which can be changed by your account manager to 24/48/72 hours to accommodate your use case) from the time the order is created, to redirect your payer. Once redirected, the API caller has 3 hours for the payer to approve the order and either authorize or capture the order. If you are not using the PayPal JavaScript SDK to initiate PayPal Checkout (in context) ensure that you include `application_context.return_url` is specified or you will get "We're sorry, Things don't appear to be working at the moment" after the payer approves the payment. + LinkDescription[] links?; +}; + +# Information needed to pay using Sofort +public type SofortRequest record { + ExperienceContextBase experience_context?; + CountryCode country_code; + # The full name representation like Mr J Smith + FullName name; +}; + +# Additional attributes associated with the use of this Venmo Wallet +public type VenmoWalletAttributes record { + # Resource consolidating common request and response attirbutes for vaulting Venmo Wallet + VaultVenmoWalletBase vault?; + # The details about a customer in PayPal's system of record + Customer customer?; +}; + +# Base vaulting specification. The object can be extended for specific use cases within each payment_source that supports vaulting +public type V3VaultInstructionBase record { + StoreInVaultInstruction store_in_vault; +}; + +# The PayPal billing agreement ID. References an approved recurring payment for goods or services +@constraint:String {maxLength: 128, minLength: 2, pattern: re `^[a-zA-Z0-9-]+$`} +public type BillingAgreementId string; + +# The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en) +public type Phone record { + # The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN) + @constraint:String {maxLength: 3, minLength: 1, pattern: re `^[0-9]{1,3}?$`} + string country_code; + # The extension number + @constraint:String {maxLength: 15, minLength: 1, pattern: re `^[0-9]{1,15}?$`} + string extension_number?; + # The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN) + @constraint:String {maxLength: 14, minLength: 1, pattern: re `^[0-9]{1,14}?$`} + string national_number; +}; + +# Type of card. i.e Credit, Debit and so on +public type CardType "CREDIT"|"DEBIT"|"PREPAID"|"STORE"|"UNKNOWN"; + +# The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.
+@constraint:String {maxLength: 2, minLength: 2, pattern: re `^([A-Z]{2}|C2)$`} +public type CountryCode string; + +# The level of protection offered as defined by [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection) +public type SellerProtection record { + # An array of conditions that are covered for the transaction + ("ITEM_NOT_RECEIVED"|"UNAUTHORIZED_TRANSACTION")[] dispute_categories?; + # Indicates whether the transaction is eligible for seller protection. For information, see [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection) + "ELIGIBLE"|"PARTIALLY_ELIGIBLE"|"NOT_ELIGIBLE" status?; +}; + +# The net amount. Returned when the currency of the refund is different from the currency of the PayPal account where the merchant holds their funds +public type NetAmountBreakdownItem record { + ExchangeRate exchange_rate?; + Money converted_amount?; + Money payable_amount?; +}; + +# The line items for this purchase. If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf +public type LineItem record { + *Item; + *LineItemAllOf2; +}; + +# The details of the refund status +public type RefundStatusDetails record { + # The reason why the refund has the `PENDING` or `FAILED` status + "ECHECK" reason?; +}; + +# Information needed to pay using iDEAL +public type IdealRequest record { + ExperienceContextBase experience_context?; + CountryCode country_code; + # The full name representation like Mr J Smith + FullName name; + AltpayRecurringAttributesRequest attributes?; + # The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank + Bic bic?; +}; + +# The platform or partner fee, commission, or brokerage fee that is associated with the transaction. Not a separate or isolated transaction leg from the external perspective. The platform fee is limited in scope and is always associated with the original payment for the purchase unit +public type PlatformFee record { + # The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee + PayeeBase payee?; + # The currency and amount for a financial transaction, such as a balance or payment due + Money amount; +}; diff --git a/ballerina/utils.bal b/ballerina/utils.bal new file mode 100644 index 0000000..8269f00 --- /dev/null +++ b/ballerina/utils.bal @@ -0,0 +1,219 @@ +// AUTO-GENERATED FILE. DO NOT MODIFY. +// This file is auto-generated by the Ballerina OpenAPI tool. + +// Copyright (c) 2025, WSO2 LLC. (http://www.wso2.com). +// +// WSO2 LLC. licenses this file to you under the Apache License, +// Version 2.0 (the "License"); you may not use this file except +// in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +import ballerina/http; +import ballerina/url; + +type SimpleBasicType string|boolean|int|float|decimal; + +# Represents encoding mechanism details. +type Encoding record { + # Defines how multiple values are delimited + string style = FORM; + # Specifies whether arrays and objects should generate as separate fields + boolean explode = true; + # Specifies the custom content type + string contentType?; + # Specifies the custom headers + map headers?; +}; + +enum EncodingStyle { + DEEPOBJECT, FORM, SPACEDELIMITED, PIPEDELIMITED +} + +final Encoding & readonly defaultEncoding = {}; + +# Serialize the record according to the deepObject style. +# +# + parent - Parent record name +# + anyRecord - Record to be serialized +# + return - Serialized record as a string +isolated function getDeepObjectStyleRequest(string parent, record {} anyRecord) returns string { + string[] recordArray = []; + foreach [string, anydata] [key, value] in anyRecord.entries() { + if value is SimpleBasicType { + recordArray.push(parent + "[" + key + "]" + "=" + getEncodedUri(value.toString())); + } else if value is SimpleBasicType[] { + recordArray.push(getSerializedArray(parent + "[" + key + "]" + "[]", value, DEEPOBJECT, true)); + } else if value is record {} { + string nextParent = parent + "[" + key + "]"; + recordArray.push(getDeepObjectStyleRequest(nextParent, value)); + } else if value is record {}[] { + string nextParent = parent + "[" + key + "]"; + recordArray.push(getSerializedRecordArray(nextParent, value, DEEPOBJECT)); + } + recordArray.push("&"); + } + _ = recordArray.pop(); + return string:'join("", ...recordArray); +} + +# Serialize the record according to the form style. +# +# + parent - Parent record name +# + anyRecord - Record to be serialized +# + explode - Specifies whether arrays and objects should generate separate parameters +# + return - Serialized record as a string +isolated function getFormStyleRequest(string parent, record {} anyRecord, boolean explode = true) returns string { + string[] recordArray = []; + if explode { + foreach [string, anydata] [key, value] in anyRecord.entries() { + if value is SimpleBasicType { + recordArray.push(key, "=", getEncodedUri(value.toString())); + } else if value is SimpleBasicType[] { + recordArray.push(getSerializedArray(key, value, explode = explode)); + } else if value is record {} { + recordArray.push(getFormStyleRequest(parent, value, explode)); + } + recordArray.push("&"); + } + _ = recordArray.pop(); + } else { + foreach [string, anydata] [key, value] in anyRecord.entries() { + if value is SimpleBasicType { + recordArray.push(key, ",", getEncodedUri(value.toString())); + } else if value is SimpleBasicType[] { + recordArray.push(getSerializedArray(key, value, explode = false)); + } else if value is record {} { + recordArray.push(getFormStyleRequest(parent, value, explode)); + } + recordArray.push(","); + } + _ = recordArray.pop(); + } + return string:'join("", ...recordArray); +} + +# Serialize arrays. +# +# + arrayName - Name of the field with arrays +# + anyArray - Array to be serialized +# + style - Defines how multiple values are delimited +# + explode - Specifies whether arrays and objects should generate separate parameters +# + return - Serialized array as a string +isolated function getSerializedArray(string arrayName, anydata[] anyArray, string style = "form", boolean explode = true) returns string { + string key = arrayName; + string[] arrayValues = []; + if anyArray.length() > 0 { + if style == FORM && !explode { + arrayValues.push(key, "="); + foreach anydata i in anyArray { + arrayValues.push(getEncodedUri(i.toString()), ","); + } + } else if style == SPACEDELIMITED && !explode { + arrayValues.push(key, "="); + foreach anydata i in anyArray { + arrayValues.push(getEncodedUri(i.toString()), "%20"); + } + } else if style == PIPEDELIMITED && !explode { + arrayValues.push(key, "="); + foreach anydata i in anyArray { + arrayValues.push(getEncodedUri(i.toString()), "|"); + } + } else if style == DEEPOBJECT { + foreach anydata i in anyArray { + arrayValues.push(key, "[]", "=", getEncodedUri(i.toString()), "&"); + } + } else { + foreach anydata i in anyArray { + arrayValues.push(key, "=", getEncodedUri(i.toString()), "&"); + } + } + _ = arrayValues.pop(); + } + return string:'join("", ...arrayValues); +} + +# Serialize the array of records according to the form style. +# +# + parent - Parent record name +# + value - Array of records to be serialized +# + style - Defines how multiple values are delimited +# + explode - Specifies whether arrays and objects should generate separate parameters +# + return - Serialized record as a string +isolated function getSerializedRecordArray(string parent, record {}[] value, string style = FORM, boolean explode = true) returns string { + string[] serializedArray = []; + if style == DEEPOBJECT { + int arayIndex = 0; + foreach var recordItem in value { + serializedArray.push(getDeepObjectStyleRequest(parent + "[" + arayIndex.toString() + "]", recordItem), "&"); + arayIndex = arayIndex + 1; + } + } else { + if !explode { + serializedArray.push(parent, "="); + } + foreach var recordItem in value { + serializedArray.push(getFormStyleRequest(parent, recordItem, explode), ","); + } + } + _ = serializedArray.pop(); + return string:'join("", ...serializedArray); +} + +# Get Encoded URI for a given value. +# +# + value - Value to be encoded +# + return - Encoded string +isolated function getEncodedUri(anydata value) returns string { + string|error encoded = url:encode(value.toString(), "UTF8"); + if encoded is string { + return encoded; + } else { + return value.toString(); + } +} + +# Generate query path with query parameter. +# +# + queryParam - Query parameter map +# + encodingMap - Details on serialization mechanism +# + return - Returns generated Path or error at failure of client initialization +isolated function getPathForQueryParam(map queryParam, map encodingMap = {}) returns string|error { + map queriesMap = http:getQueryMap(queryParam); + string[] param = []; + if queriesMap.length() > 0 { + param.push("?"); + foreach var [key, value] in queriesMap.entries() { + if value is () { + _ = queriesMap.remove(key); + continue; + } + Encoding encodingData = encodingMap.hasKey(key) ? encodingMap.get(key) : defaultEncoding; + if value is SimpleBasicType { + param.push(key, "=", getEncodedUri(value.toString())); + } else if value is SimpleBasicType[] { + param.push(getSerializedArray(key, value, encodingData.style, encodingData.explode)); + } else if value is record {} { + if encodingData.style == DEEPOBJECT { + param.push(getDeepObjectStyleRequest(key, value)); + } else { + param.push(getFormStyleRequest(key, value, encodingData.explode)); + } + } else { + param.push(key, "=", value.toString()); + } + param.push("&"); + } + _ = param.pop(); + } + string restOfPath = string:'join("", ...param); + return restOfPath; +} diff --git a/build-config/resources/Ballerina.toml b/build-config/resources/Ballerina.toml index 3d967c7..e34a7ae 100644 --- a/build-config/resources/Ballerina.toml +++ b/build-config/resources/Ballerina.toml @@ -5,8 +5,8 @@ name = "paypal.orders" version = "@toml.version@" license = ["Apache-2.0"] authors = ["Ballerina"] -keywords = [] # TODO: Add keywords -# icon = "icon.png" # TODO: Add icon +keywords = ["Paypal", "Payments", "Orders"] +icon = "icon.png" repository = "https://github.com/ballerina-platform/module-ballerinax-paypal.orders" [build-options] diff --git a/docs/spec/openapi.json b/docs/spec/openapi.json new file mode 100644 index 0000000..b3190dc --- /dev/null +++ b/docs/spec/openapi.json @@ -0,0 +1,15271 @@ +{ + "openapi": "3.0.3", + "info": { + "title": "Orders", + "description": "An order represents a payment between two or more parties. Use the Orders API to create, update, retrieve, authorize, and capture orders.", + "contact": {}, + "version": "2.13" + }, + "externalDocs": { + "url": "https://developer.paypal.com/docs/api/orders/v2/" + }, + "servers": [ + { + "url": "https://api-m.sandbox.paypal.com/v2/checkout", + "description": "PayPal Sandbox Environment" + }, + { + "url": "https://api-m.paypal.com/v2/checkout", + "description": "PayPal Live Environment" + } + ], + "tags": [ + { + "name": "orders", + "description": "Use the `/orders` resource to create, update, retrieve, authorize, capture and track orders." + }, + { + "name": "trackers", + "description": "Use the `/trackers` resource to update and retrieve tracking information for PayPal orders." + } + ], + "paths": { + "/orders": { + "post": { + "tags": ["orders"], + "summary": "Create order", + "description": "Creates an order. Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see checkout or multiparty checkout.
Note: For error handling and troubleshooting, see Orders v2 errors.
", + "operationId": "orders.create", + "parameters": [ + { + "$ref": "#/components/parameters/paypal_request_id" + }, + { + "$ref": "#/components/parameters/paypal_partner_attribution_id" + }, + { + "$ref": "#/components/parameters/paypal_client_metadata_id" + }, + { + "$ref": "#/components/parameters/prefer" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrderRequest" + }, + "examples": { + "order_request": { + "value": { + "intent": "CAPTURE", + "purchase_units": [ + { + "reference_id": "d9f80740-38f0-11e8-b467-0ed5f89f718b", + "amount": { + "currency_code": "USD", + "value": "100.00" + } + } + ], + "payment_source": { + "paypal": { + "experience_context": { + "payment_method_preference": "IMMEDIATE_PAYMENT_REQUIRED", + "payment_method_selected": "PAYPAL", + "brand_name": "EXAMPLE INC", + "locale": "en-US", + "landing_page": "LOGIN", + "user_action": "PAY_NOW", + "return_url": "https://example.com/returnUrl", + "cancel_url": "https://example.com/cancelUrl" + } + } + } + } + } + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "A successful response to an idempotent request returns the HTTP `200 OK` status code with a JSON response body that shows order details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Order" + } + } + } + }, + "201": { + "description": "A successful request returns the HTTP `201 Created` status code and a JSON response body that includes by default a minimal response with the ID, status, and HATEOAS links. If you require the complete order resource representation, you must pass the Prefer: return=representation request header. This header value is not the default.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Order" + }, + "examples": { + "orders_request_create": { + "value": { + "intent": "CAPTURE", + "purchase_units": [ + { + "reference_id": "d9f80740-38f0-11e8-b467-0ed5f89f718b", + "amount": { + "currency_code": "USD", + "value": "100.00" + } + } + ] + } + } + } + } + } + }, + "400": { + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse400" + } + } + } + }, + "401": { + "description": "Authentication failed due to missing authorization header, or invalid authentication credentials.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse401" + } + } + } + }, + "422": { + "description": "The requested action could not be performed, semantically incorrect, or failed business validation.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse422" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "Oauth2": [ + "https://uri.paypal.com/services/payments/payment", + "https://uri.paypal.com/services/payments/orders/client-side-integration" + ] + } + ] + } + }, + "/orders/{id}": { + "get": { + "tags": ["orders"], + "summary": "Show order details", + "description": "Shows details for an order, by ID.
Note: For error handling and troubleshooting, see Orders v2 errors.
", + "operationId": "orders.get", + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/fields" + } + ], + "responses": { + "200": { + "description": "A successful request returns the HTTP `200 OK` status code and a JSON response body that shows order details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Order" + } + } + } + }, + "401": { + "description": "Authentication failed due to missing authorization header, or invalid authentication credentials.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse401" + } + } + } + }, + "404": { + "description": "The specified resource does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse404" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "Oauth2": [ + "https://uri.paypal.com/services/payments/payment", + "https://uri.paypal.com/services/payments/orders/client-side-integration" + ] + } + ] + }, + "patch": { + "tags": ["orders"], + "summary": "Update order", + "description": "Updates an order with a `CREATED` or `APPROVED` status. You cannot update an order with the `COMPLETED` status.

To make an update, you must provide a `reference_id`. If you omit this value with an order that contains only one purchase unit, PayPal sets the value to `default` which enables you to use the path: \\\"/purchase_units/@reference_id=='default'/{attribute-or-object}\\\". Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see checkout or multiparty checkout.
Note: For error handling and troubleshooting, see Orders v2 errors.
Patchable attributes or objects:

AttributeOpNotes
intentreplace
payerreplace, addUsing replace op for payer will replace the whole payer object with the value sent in request.
purchase_unitsreplace, add
purchase_units[].custom_idreplace, add, remove
purchase_units[].descriptionreplace, add, remove
purchase_units[].payee.emailreplace
purchase_units[].shipping.namereplace, add
purchase_units[].shipping.addressreplace, add
purchase_units[].shipping.typereplace, add
purchase_units[].soft_descriptorreplace, remove
purchase_units[].amountreplace
purchase_units[].itemsreplace, add, remove
purchase_units[].invoice_idreplace, add, remove
purchase_units[].payment_instructionreplace
purchase_units[].payment_instruction.disbursement_modereplaceBy default, disbursement_mode is INSTANT.
purchase_units[].payment_instruction.platform_feesreplace, add, remove
purchase_units[].supplementary_data.airlinereplace, add, remove
purchase_units[].supplementary_data.cardreplace, add, remove
application_context.client_configurationreplace, add
", + "operationId": "orders.patch", + "parameters": [ + { + "$ref": "#/components/parameters/id" + } + ], + "requestBody": { + "$ref": "#/components/requestBodies/patch_request" + }, + "responses": { + "204": { + "description": "A successful request returns the HTTP `204 No Content` status code with an empty object in the JSON response body" + }, + "400": { + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse4001" + } + } + } + }, + "401": { + "description": "Authentication failed due to missing authorization header, or invalid authentication credentials.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse401" + } + } + } + }, + "404": { + "description": "The specified resource does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse404" + } + } + } + }, + "422": { + "description": "The requested action could not be performed, semantically incorrect, or failed business validation.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse4221" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "Oauth2": [ + "https://uri.paypal.com/services/payments/payment", + "https://uri.paypal.com/services/payments/orders/client-side-integration" + ] + } + ] + } + }, + "/orders/{id}/confirm-payment-source": { + "post": { + "tags": ["orders"], + "summary": "Confirm the Order", + "description": "Payer confirms their intent to pay for the the Order with the given payment source.", + "operationId": "orders.confirm", + "parameters": [ + { + "$ref": "#/components/parameters/paypal_client_metadata_id" + }, + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/prefer" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConfirmOrderRequest" + }, + "examples": { + "confirm_order_request": { + "value": { + "payment_source": { + "paypal": { + "name": { + "given_name": "John", + "surname": "Doe" + }, + "email_address": "customer@example.com", + "experience_context": { + "payment_method_preference": "IMMEDIATE_PAYMENT_REQUIRED", + "payment_method_selected": "PAYPAL", + "brand_name": "EXAMPLE INC", + "locale": "en-US", + "landing_page": "LOGIN", + "shipping_preference": "SET_PROVIDED_ADDRESS", + "user_action": "PAY_NOW", + "return_url": "https://example.com/returnUrl", + "cancel_url": "https://example.com/cancelUrl" + } + } + } + } + } + } + } + } + }, + "responses": { + "200": { + "description": "A successful request indicates that the payment source was added to the Order. A successful request returns the HTTP `200 OK` status code with a JSON response body that shows order details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Order" + } + } + } + }, + "400": { + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse4002" + } + } + } + }, + "403": { + "description": "Authorization failed due to insufficient permissions.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse403" + } + } + } + }, + "422": { + "description": "The requested action could not be performed, semantically incorrect, or failed business validation.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse4222" + } + } + } + }, + "500": { + "description": "An internal server error has occurred.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error500" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "Oauth2": [ + "https://uri.paypal.com/services/payments/payment", + "https://uri.paypal.com/services/payments/initiatepayment" + ] + } + ] + } + }, + "/orders/{id}/authorize": { + "post": { + "tags": ["orders"], + "summary": "Authorize payment for order", + "description": "Authorizes payment for an order. To successfully authorize payment for an order, the buyer must first approve the order or a valid payment_source must be provided in the request. A buyer can approve the order upon being redirected to the rel:approve URL that was returned in the HATEOAS links in the create order response.
Note: For error handling and troubleshooting, see Orders v2 errors.
", + "operationId": "orders.authorize", + "parameters": [ + { + "$ref": "#/components/parameters/paypal_request_id" + }, + { + "$ref": "#/components/parameters/prefer" + }, + { + "$ref": "#/components/parameters/paypal_client_metadata_id" + }, + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/paypal_auth_assertion" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrderAuthorizeRequest" + } + } + } + }, + "responses": { + "200": { + "description": "A successful response to an idempotent request returns the HTTP `200 OK` status code with a JSON response body that shows authorized payment details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrderAuthorizeResponse" + } + } + } + }, + "201": { + "description": "A successful response to a non-idempotent request returns the HTTP `201 Created` status code with a JSON response body that shows authorized payment details. If a duplicate response is retried, returns the HTTP `200 OK` status code. By default, the response is minimal. If you need the complete resource representation, you must pass the Prefer: return=representation request header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrderAuthorizeResponse" + } + } + } + }, + "400": { + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse4003" + } + } + } + }, + "401": { + "description": "Authentication failed due to missing authorization header, or invalid authentication credentials.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse401" + } + } + } + }, + "403": { + "description": "The authorized payment failed due to insufficient permissions.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse4031" + } + } + } + }, + "404": { + "description": "The specified resource does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse404" + } + } + } + }, + "422": { + "description": "The requested action could not be performed, semantically incorrect, or failed business validation.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse4223" + } + } + } + }, + "500": { + "description": "An internal server error has occurred.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error500" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "Oauth2": [ + "https://uri.paypal.com/services/payments/payment", + "https://uri.paypal.com/services/payments/orders/client-side-integration" + ] + } + ] + } + }, + "/orders/{id}/capture": { + "post": { + "tags": ["orders"], + "summary": "Capture payment for order", + "description": "Captures payment for an order. To successfully capture payment for an order, the buyer must first approve the order or a valid payment_source must be provided in the request. A buyer can approve the order upon being redirected to the rel:approve URL that was returned in the HATEOAS links in the create order response.
Note: For error handling and troubleshooting, see Orders v2 errors.
", + "operationId": "orders.capture", + "parameters": [ + { + "$ref": "#/components/parameters/paypal_request_id" + }, + { + "$ref": "#/components/parameters/prefer" + }, + { + "$ref": "#/components/parameters/paypal_client_metadata_id" + }, + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/paypal_auth_assertion" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrderCaptureRequest" + } + } + } + }, + "responses": { + "200": { + "description": "A successful response to an idempotent request returns the HTTP `200 OK` status code with a JSON response body that shows captured payment details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Order" + } + } + } + }, + "201": { + "description": "A successful response to a non-idempotent request returns the HTTP `201 Created` status code with a JSON response body that shows captured payment details. If a duplicate response is retried, returns the HTTP `200 OK` status code. By default, the response is minimal. If you need the complete resource representation, pass the Prefer: return=representation request header.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Order" + } + } + } + }, + "400": { + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse4004" + } + } + } + }, + "401": { + "description": "Authentication failed due to missing authorization header, or invalid authentication credentials.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse401" + } + } + } + }, + "403": { + "description": "The authorized payment failed due to insufficient permissions.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse4032" + } + } + } + }, + "404": { + "description": "The specified resource does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse404" + } + } + } + }, + "422": { + "description": "The requested action could not be performed, semantically incorrect, or failed business validation.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse4224" + } + } + } + }, + "500": { + "description": "An internal server error has occurred.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error500" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "Oauth2": [ + "https://uri.paypal.com/services/payments/payment", + "https://uri.paypal.com/services/payments/orders/client-side-integration" + ] + } + ] + } + }, + "/orders/{id}/track": { + "post": { + "tags": ["orders"], + "summary": "Add tracking information for an Order.", + "description": "Adds tracking information for an Order.", + "operationId": "orders.track.create", + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/paypal_auth_assertion" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrderTrackerRequest" + } + } + }, + "required": true + }, + "responses": { + "200": { + "description": "A successful response to an idempotent request returns the HTTP `200 OK` status code with a JSON response body that shows tracker details", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Order" + } + } + } + }, + "201": { + "description": "A successful response to a non-idempotent request returns the HTTP `201 Created` status code with a JSON response body that shows tracker details. If a duplicate response is retried, returns the HTTP `200 OK` status code.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Order" + } + } + } + }, + "400": { + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse4005" + } + } + } + }, + "403": { + "description": "Authorization failed due to insufficient permissions.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse4033" + } + } + } + }, + "404": { + "description": "The specified resource does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse404" + } + } + } + }, + "422": { + "description": "The requested action could not be performed, semantically incorrect, or failed business validation.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse4225" + } + } + } + }, + "500": { + "description": "An internal server error has occurred.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error500" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "Oauth2": ["https://uri.paypal.com/services/payments/payment"] + } + ] + } + }, + "/orders/{id}/trackers/{trackerId}": { + "patch": { + "tags": ["trackers"], + "summary": "Update or cancel tracking information for a PayPal order", + "description": "Updates or cancels the tracking information for a PayPal order, by ID. Updatable attributes or objects:

AttributeOpNotes
itemsreplaceUsing replace op for items will replace the entire items object with the value sent in request.
notify_payerreplace, add
statusreplaceOnly patching status to CANCELLED is currently supported.
", + "operationId": "orders.trackers.patch", + "parameters": [ + { + "$ref": "#/components/parameters/id" + }, + { + "$ref": "#/components/parameters/tracker_id" + } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchRequest" + }, + "examples": { + "orders_patch_request": { + "value": [ + { + "op": "replace", + "path": "/purchase_units/@reference_id=='PUHF'/shipping/address", + "value": { + "address_line_1": "2211 N First Street", + "address_line_2": "Building 17", + "admin_area_2": "San Jose", + "admin_area_1": "CA", + "postal_code": "95131", + "country_code": "US" + } + } + ] + } + } + } + } + }, + "responses": { + "204": { + "description": "A successful request returns the HTTP `204 No Content` status code with an empty object in the JSON response body" + }, + "400": { + "description": "Request is not well-formed, syntactically incorrect, or violates schema.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse4006" + } + } + } + }, + "403": { + "description": "Authorization failed due to insufficient permissions.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse4034" + } + } + } + }, + "404": { + "description": "The specified resource does not exist.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse4041" + } + } + } + }, + "422": { + "description": "The requested action could not be performed, semantically incorrect, or failed business validation.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/InlineResponse4226" + } + } + } + }, + "500": { + "description": "An internal server error has occurred.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Error500" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + }, + "security": [ + { + "Oauth2": ["https://uri.paypal.com/services/payments/payment"] + } + ] + } + } + }, + "components": { + "schemas": { + "Orderstrackerspatch422Details": { + "anyOf": [ + { + "$ref": "#/components/schemas/INVALIDJSONPOINTERFORMAT1" + }, + { + "$ref": "#/components/schemas/NOTPATCHABLE1" + }, + { + "$ref": "#/components/schemas/PATCHVALUEREQUIRED1" + }, + { + "$ref": "#/components/schemas/PATCHPATHREQUIRED1" + }, + { + "$ref": "#/components/schemas/ITEMSKUMISMATCH1" + } + ] + }, + "TRANSACTIONRECEIVINGLIMITEXCEEDED2": { + "title": "TRANSACTION_RECEIVING_LIMIT_EXCEEDED", + "properties": { + "issue": { + "type": "string", + "enum": ["TRANSACTION_RECEIVING_LIMIT_EXCEEDED"] + }, + "description": { + "type": "string", + "enum": ["The transaction exceeds the receiver's receiving limit."] + } + } + }, + "Customer": { + "title": "Customer information based on PayPal's system of record", + "type": "object", + "properties": { + "email_address": { + "allOf": [ + { + "$ref": "#/components/schemas/Email" + } + ], + "x-ballerina-name-ignore": "emailAddress" + }, + "phone": { + "$ref": "#/components/schemas/PhoneWithType" + }, + "id": { + "$ref": "#/components/schemas/MerchantPartnerCustomerId" + } + }, + "description": "The details about a customer in PayPal's system of record" + }, + "TRANSACTIONRECEIVINGLIMITEXCEEDED1": { + "title": "TRANSACTION_RECEIVING_LIMIT_EXCEEDED", + "properties": { + "issue": { + "type": "string", + "enum": ["TRANSACTION_RECEIVING_LIMIT_EXCEEDED"] + }, + "description": { + "type": "string", + "enum": ["The transaction exceeds the receiver's receiving limit."] + } + } + }, + "Ideal": { + "title": "The iDEAL payment object", + "type": "object", + "properties": { + "country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/CountryCode" + } + ], + "x-ballerina-name-ignore": "countryCode" + }, + "name": { + "$ref": "#/components/schemas/FullName" + }, + "attributes": { + "$ref": "#/components/schemas/AltpayRecurringAttributes" + }, + "bic": { + "$ref": "#/components/schemas/Bic" + }, + "iban_last_chars": { + "allOf": [ + { + "$ref": "#/components/schemas/IbanLastChars" + } + ], + "x-ballerina-name-ignore": "ibanLastChars" + } + }, + "description": "Information used to pay using iDEAL" + }, + "Giropay": { + "title": "A giropay payment object", + "type": "object", + "properties": { + "country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/CountryCode" + } + ], + "x-ballerina-name-ignore": "countryCode" + }, + "name": { + "$ref": "#/components/schemas/FullName" + }, + "bic": { + "$ref": "#/components/schemas/Bic" + } + }, + "description": "Information needed to pay using giropay" + }, + "EpsRequest": { + "title": "An eps payment object", + "required": ["country_code", "name"], + "type": "object", + "properties": { + "experience_context": { + "allOf": [ + { + "$ref": "#/components/schemas/ExperienceContextBase" + } + ], + "x-ballerina-name-ignore": "experienceContext" + }, + "country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/CountryCode" + } + ], + "x-ballerina-name-ignore": "countryCode" + }, + "name": { + "$ref": "#/components/schemas/FullName" + } + }, + "description": "Information needed to pay using eps" + }, + "CurrencyCode": { + "maxLength": 3, + "minLength": 3, + "type": "string", + "description": "The [three-character ISO-4217 currency code](/api/rest/reference/currency-codes/) that identifies the currency", + "format": "ppaas_common_currency_code_v2" + }, + "ORDERALREADYCAPTURED": { + "title": "ORDER_ALREADY_CAPTURED", + "properties": { + "issue": { + "type": "string", + "enum": ["ORDER_ALREADY_CAPTURED"] + }, + "description": { + "type": "string", + "enum": [ + "Order already captured. If 'intent=CAPTURE' only one capture per order is allowed." + ] + } + } + }, + "VenmoWalletExperienceContext": { + "title": "Venmo Wallet Experience Context", + "type": "object", + "properties": { + "brand_name": { + "maxLength": 127, + "minLength": 1, + "pattern": "^.*$", + "type": "string", + "description": "The business name of the merchant. The pattern is defined by an external party and supports Unicode", + "x-ballerina-name-ignore": "brandName" + }, + "shipping_preference": { + "maxLength": 24, + "minLength": 1, + "pattern": "^[A-Z_]+$", + "type": "string", + "description": "The location from which the shipping address is derived", + "default": "GET_FROM_FILE", + "enum": ["GET_FROM_FILE", "NO_SHIPPING", "SET_PROVIDED_ADDRESS"], + "x-ballerina-name-ignore": "shippingPreference" + } + }, + "description": "Customizes the buyer experience during the approval process for payment with Venmo.
Note: Partners and Marketplaces might configure shipping_preference during partner account setup, which overrides the request values.
" + }, + "VaultResponse": { + "title": "Saved Payment Source Response", + "type": "object", + "properties": { + "links": { + "maxItems": 10, + "minItems": 1, + "type": "array", + "description": "An array of request-related HATEOAS links", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/LinkDescription" + } + }, + "id": { + "maxLength": 255, + "minLength": 1, + "type": "string", + "description": "The PayPal-generated ID for the saved payment source" + }, + "status": { + "maxLength": 255, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "The vault status", + "deprecated": true, + "enum": ["VAULTED", "CREATED", "APPROVED"] + }, + "customer": { + "$ref": "#/components/schemas/Customer" + } + }, + "description": "The details about a saved payment source" + }, + "OrdersPatch400": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Orderspatch400Details" + } + } + } + }, + "ApplePayPaymentData": { + "title": "Decrypted Apple Pay Payment details data.", + "type": "object", + "properties": { + "pin": { + "maxLength": 2000, + "minLength": 1, + "pattern": "^.*$", + "type": "string", + "description": "Bank Key encrypted Apple Pay PIN. The pattern is defined by an external party and supports Unicode" + }, + "emv_data": { + "maxLength": 2000, + "minLength": 1, + "pattern": "^.*$", + "type": "string", + "description": "Encoded Apple Pay EMV Payment Structure used for payments in China. The pattern is defined by an external party and supports Unicode", + "x-ballerina-name-ignore": "emvData" + }, + "eci_indicator": { + "maxLength": 256, + "minLength": 1, + "pattern": "^.*$", + "type": "string", + "description": "ECI indicator, as defined by 3- Secure. The pattern is defined by an external party and supports Unicode", + "x-ballerina-name-ignore": "eciIndicator" + }, + "cryptogram": { + "maxLength": 2000, + "minLength": 1, + "pattern": "^.*$", + "type": "string", + "description": "Online payment cryptogram, as defined by 3D Secure. The pattern is defined by an external party and supports Unicode" + } + }, + "description": "Information about the decrypted apple pay payment data for the token like cryptogram, eci indicator" + }, + "ShipmentCarrier": { + "title": "Carrier.", + "maxLength": 64, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "The carrier for the shipment. Some carriers have a global version as well as local subsidiaries. The subsidiaries are repeated over many countries and might also have an entry in the global list. Choose the carrier for your country. If the carrier is not available for your country, choose the global version of the carrier. If your carrier name is not in the list, set `carrier` to `OTHER` and set carrier name in `carrier_name_other`. For allowed values, see Carriers", + "enum": [ + "DPD_RU", + "BG_BULGARIAN_POST", + "KR_KOREA_POST", + "ZA_COURIERIT", + "FR_EXAPAQ", + "ARE_EMIRATES_POST", + "GAC", + "GEIS", + "SF_EX", + "PAGO", + "MYHERMES", + "DIAMOND_EUROGISTICS", + "CORPORATECOURIERS_WEBHOOK", + "BOND", + "OMNIPARCEL", + "SK_POSTA", + "PUROLATOR", + "FETCHR_WEBHOOK", + "THEDELIVERYGROUP", + "CELLO_SQUARE", + "TARRIVE", + "COLLIVERY", + "MAINFREIGHT", + "IND_FIRSTFLIGHT", + "ACSWORLDWIDE", + "AMSTAN", + "OKAYPARCEL", + "ENVIALIA_REFERENCE", + "SEUR_ES", + "CONTINENTAL", + "FDSEXPRESS", + "AMAZON_FBA_SWISHIP", + "WYNGS", + "DHL_ACTIVE_TRACING", + "ZYLLEM", + "RUSTON", + "XPOST", + "CORREOS_ES", + "DHL_FR", + "PAN_ASIA", + "BRT_IT", + "SRE_KOREA", + "SPEEDEE", + "TNT_UK", + "VENIPAK", + "SHREENANDANCOURIER", + "CROSHOT", + "NIPOST_NG", + "EPST_GLBL", + "NEWGISTICS", + "POST_SLOVENIA", + "JERSEY_POST", + "BOMBINOEXP", + "WMG", + "XQ_EXPRESS", + "FURDECO", + "LHT_EXPRESS", + "SOUTH_AFRICAN_POST_OFFICE", + "SPOTON", + "DIMERCO", + "CYPRUS_POST_CYP", + "ABCUSTOM", + "IND_DELIVREE", + "CN_BESTEXPRESS", + "DX_SFTP", + "PICKUPP_MYS", + "FMX", + "HELLMANN", + "SHIP_IT_ASIA", + "KERRY_ECOMMERCE", + "FRETERAPIDO", + "PITNEY_BOWES", + "XPRESSEN_DK", + "SEUR_SP_API", + "DELIVERYONTIME", + "JINSUNG", + "TRANS_KARGO", + "SWISHIP_DE", + "IVOY_WEBHOOK", + "AIRMEE_WEBHOOK", + "DHL_BENELUX", + "FIRSTMILE", + "FASTWAY_IR", + "HH_EXP", + "MYS_MYPOST_ONLINE", + "TNT_NL", + "TIPSA", + "TAQBIN_MY", + "KGMHUB", + "INTEXPRESS", + "OVERSE_EXP", + "ONECLICK", + "ROADRUNNER_FREIGHT", + "GLS_CROTIA", + "MRW_FTP", + "BLUEX", + "DYLT", + "DPD_IR", + "SIN_GLBL", + "TUFFNELLS_REFERENCE", + "CJPACKET", + "MILKMAN", + "ASIGNA", + "ONEWORLDEXPRESS", + "ROYAL_MAIL", + "VIA_EXPRESS", + "TIGFREIGHT", + "ZTO_EXPRESS", + "TWO_GO", + "IML", + "INTEL_VALLEY", + "EFS", + "UK_UK_MAIL", + "RAM", + "ALLIEDEXPRESS", + "APC_OVERNIGHT", + "SHIPPIT", + "TFM", + "M_XPRESS", + "HDB_BOX", + "CLEVY_LINKS", + "IBEONE", + "FIEGE_NL", + "KWE_GLOBAL", + "CTC_EXPRESS", + "LAO_POST", + "AMAZON", + "MORE_LINK", + "JX", + "EASY_MAIL", + "ADUIEPYLE", + "GB_PANTHER", + "EXPRESSSALE", + "SG_DETRACK", + "TRUNKRS_WEBHOOK", + "MATDESPATCH", + "DICOM", + "MBW", + "KHM_CAMBODIA_POST", + "SINOTRANS", + "BRT_IT_PARCELID", + "DHL_SUPPLY_CHAIN", + "DHL_PL", + "TOPYOU", + "PALEXPRESS", + "DHL_SG", + "CN_WEDO", + "FULFILLME", + "DPD_DELISTRACK", + "UPS_REFERENCE", + "CARIBOU", + "LOCUS_WEBHOOK", + "DSV", + "CN_GOFLY", + "P2P_TRC", + "DIRECTPARCELS", + "NOVA_POSHTA_INT", + "FEDEX_POLAND", + "CN_JCEX", + "FAR_INTERNATIONAL", + "IDEXPRESS", + "GANGBAO", + "NEWAY", + "POSTNL_INT_3_S", + "RPX_ID", + "DESIGNERTRANSPORT_WEBHOOK", + "GLS_SLOVEN", + "PARCELLED_IN", + "GSI_EXPRESS", + "CON_WAY", + "BROUWER_TRANSPORT", + "CPEX", + "ISRAEL_POST", + "DTDC_IN", + "PTT_POST", + "XDE_WEBHOOK", + "TOLOS", + "GIAO_HANG", + "GEODIS_ESPACE", + "MAGYAR_HU", + "DOORDASH_WEBHOOK", + "TIKI_ID", + "CJ_HK_INTERNATIONAL", + "STAR_TRACK_EXPRESS", + "HELTHJEM", + "SFB2C", + "FREIGHTQUOTE", + "LANDMARK_GLOBAL_REFERENCE", + "PARCEL2GO", + "DELNEXT", + "RCL", + "CGS_EXPRESS", + "HK_POST", + "SAP_EXPRESS", + "PARCELPOST_SG", + "HERMES", + "IND_SAFEEXPRESS", + "TOPHATTEREXPRESS", + "MGLOBAL", + "AVERITT", + "LEADER", + "_2EBOX", + "SG_SPEEDPOST", + "DBSCHENKER_SE", + "ISR_POST_DOMESTIC", + "BESTWAYPARCEL", + "ASENDIA_DE", + "NIGHTLINE_UK", + "TAQBIN_SG", + "TCK_EXPRESS", + "ENDEAVOUR_DELIVERY", + "NANJINGWOYUAN", + "HEPPNER_FR", + "EMPS_CN", + "FONSEN", + "PICKRR", + "APC_OVERNIGHT_CONNUM", + "STAR_TRACK_NEXT_FLIGHT", + "DAJIN", + "UPS_FREIGHT", + "POSTA_PLUS", + "CEVA", + "ANSERX", + "JS_EXPRESS", + "PADTF", + "UPS_MAIL_INNOVATIONS", + "EZSHIP", + "SYPOST", + "AMAZON_SHIP_MCF", + "YUSEN", + "BRING", + "SDA_IT", + "GBA", + "NEWEGGEXPRESS", + "SPEEDCOURIERS_GR", + "FORRUN", + "PICKUP", + "ECMS", + "INTELIPOST", + "FLASHEXPRESS", + "CN_STO", + "SEKO_SFTP", + "HOME_DELIVERY_SOLUTIONS", + "DPD_HGRY", + "KERRYTTC_VN", + "JOYING_BOX", + "TOTAL_EXPRESS", + "ZJS_EXPRESS", + "STARKEN", + "DEMANDSHIP", + "CN_DPEX", + "AUPOST_CN", + "LOGISTERS", + "GOGLOBALPOST", + "GLS_CZ", + "PAACK_WEBHOOK", + "GRAB_WEBHOOK", + "PARCELPOINT", + "ICUMULUS", + "DAIGLOBALTRACK", + "GLOBAL_IPARCEL", + "YURTICI_KARGO", + "CN_PAYPAL_PACKAGE", + "PARCEL_2_POST", + "GLS_IT", + "PIL_LOGISTICS", + "HEPPNER", + "GENERAL_OVERNIGHT", + "HAPPY2POINT", + "CHITCHATS", + "SMOOTH", + "CLE_LOGISTICS", + "FIEGE", + "MX_CARGO", + "ZIINGFINALMILE", + "DAYTON_FREIGHT", + "TCS", + "AEX", + "HERMES_DE", + "ROUTIFIC_WEBHOOK", + "GLOBAVEND", + "CJ_LOGISTICS", + "PALLET_NETWORK", + "RAF_PH", + "UK_XDP", + "PAPER_EXPRESS", + "LA_POSTE_SUIVI", + "PAQUETEXPRESS", + "LIEFERY", + "STRECK_TRANSPORT", + "PONY_EXPRESS", + "ALWAYS_EXPRESS", + "GBS_BROKER", + "CITYLINK_MY", + "ALLJOY", + "YODEL", + "YODEL_DIR", + "STONE3PL", + "PARCELPAL_WEBHOOK", + "DHL_ECOMERCE_ASA", + "SIMPLYPOST", + "KY_EXPRESS", + "SHENZHEN", + "US_LASERSHIP", + "UC_EXPRE", + "DIDADI", + "CJ_KR", + "DBSCHENKER_B2B", + "MXE", + "CAE_DELIVERS", + "PFCEXPRESS", + "WHISTL", + "WEPOST", + "DHL_PARCEL_ES", + "DDEXPRESS", + "ARAMEX_AU", + "BNEED", + "HK_TGX", + "LATVIJAS_PASTS", + "VIAEUROPE", + "CORREO_UY", + "CHRONOPOST_FR", + "J_NET", + "_6LS", + "BLR_BELPOST", + "BIRDSYSTEM", + "DOBROPOST", + "WAHANA_ID", + "WEASHIP", + "SONICTL", + "KWT", + "AFLLOG_FTP", + "SKYNET_WORLDWIDE", + "NOVA_POSHTA", + "SEINO", + "SZENDEX", + "BPOST_INT", + "DBSCHENKER_SV", + "AO_DEUTSCHLAND", + "EU_FLEET_SOLUTIONS", + "PCFCORP", + "LINKBRIDGE", + "PRIMAMULTICIPTA", + "COUREX", + "ZAJIL_EXPRESS", + "COLLECTCO", + "JTEXPRESS", + "FEDEX_UK", + "USHIP", + "PIXSELL", + "SHIPTOR", + "CDEK", + "VNM_VIETTELPOST", + "CJ_CENTURY", + "GSO", + "VIWO", + "SKYBOX", + "KERRYTJ", + "NTLOGISTICS_VN", + "SDH_SCM", + "ZINC", + "DPE_SOUTH_AFRC", + "CESKA_CZ", + "ACS_GR", + "DEALERSEND", + "JOCOM", + "CSE", + "TFORCE_FINALMILE", + "SHIP_GATE", + "SHIPTER", + "NATIONAL_SAMEDAY", + "YUNEXPRESS", + "CAINIAO", + "DMS_MATRIX", + "DIRECTLOG", + "ASENDIA_US", + "_3JMSLOGISTICS", + "LICCARDI_EXPRESS", + "SKY_POSTAL", + "CNWANGTONG", + "POSTNORD_LOGISTICS_DK", + "LOGISTIKA", + "CELERITAS", + "PRESSIODE", + "SHREE_MARUTI", + "LOGISTICSWORLDWIDE_HK", + "EFEX", + "LOTTE", + "LONESTAR", + "APRISAEXPRESS", + "BEL_RS", + "OSM_WORLDWIDE", + "WESTGATE_GL", + "FASTRACK", + "DTD_EXPR", + "ALFATREX", + "PROMEDDELIVERY", + "THABIT_LOGISTICS", + "HCT_LOGISTICS", + "CARRY_FLAP", + "US_OLD_DOMINION", + "ANICAM_BOX", + "WANBEXPRESS", + "AN_POST", + "DPD_LOCAL", + "STALLIONEXPRESS", + "RAIDEREX", + "SHOPFANS", + "KYUNGDONG_PARCEL", + "CHAMPION_LOGISTICS", + "PICKUPP_SGP", + "MORNING_EXPRESS", + "NACEX", + "THENILE_WEBHOOK", + "HOLISOL", + "LBCEXPRESS_FTP", + "KURASI", + "USF_REDDAWAY", + "APG", + "CN_BOXC", + "ECOSCOOTING", + "MAINWAY", + "PAPERFLY", + "HOUNDEXPRESS", + "BOX_BERRY", + "EP_BOX", + "PLUS_LOG_UK", + "FULFILLA", + "ASE", + "MAIL_PLUS", + "XPO_LOGISTICS", + "WNDIRECT", + "CLOUDWISH_ASIA", + "ZELERIS", + "GIO_EXPRESS", + "OCS_WORLDWIDE", + "ARK_LOGISTICS", + "AQUILINE", + "PILOT_FREIGHT", + "QWINTRY", + "DANSKE_FRAGT", + "CARRIERS", + "AIR_CANADA_GLOBAL", + "PRESIDENT_TRANS", + "STEPFORWARDFS", + "SKYNET_UK", + "PITTOHIO", + "CORREOS_EXPRESS", + "RL_US", + "MARA_XPRESS", + "DESTINY", + "UK_YODEL", + "COMET_TECH", + "DHL_PARCEL_RU", + "TNT_REFR", + "SHREE_ANJANI_COURIER", + "MIKROPAKKET_BE", + "ETS_EXPRESS", + "COLIS_PRIVE", + "CN_YUNDA", + "AAA_COOPER", + "ROCKET_PARCEL", + "_360LION", + "PANDU", + "PROFESSIONAL_COURIERS", + "FLYTEXPRESS", + "LOGISTICSWORLDWIDE_MY", + "CORREOS_DE_ESPANA", + "IMX", + "FOUR_PX_EXPRESS", + "XPRESSBEES", + "PICKUPP_VNM", + "STARTRACK_EXPRESS", + "FR_COLISSIMO", + "NACEX_SPAIN_REFERENCE", + "DHL_SUPPLY_CHAIN_AU", + "ESHIPPING", + "SHREETIRUPATI", + "HX_EXPRESS", + "INDOPAKET", + "CN_17POST", + "K1_EXPRESS", + "CJ_GLS", + "MYS_GDEX", + "NATIONEX", + "ANJUN", + "FARGOOD", + "SMG_EXPRESS", + "RZYEXPRESS", + "SEFL", + "TNT_CLICK_IT", + "HDB", + "HIPSHIPPER", + "RPXLOGISTICS", + "KUEHNE", + "IT_NEXIVE", + "PTS", + "SWISS_POST_FTP", + "FASTRK_SERV", + "_4_72", + "US_YRC", + "POSTNL_INTL_3S", + "ELIAN_POST", + "CUBYN", + "SAU_SAUDI_POST", + "ABXEXPRESS_MY", + "HUAHAN_EXPRESS", + "IND_JAYONEXPRESS", + "ZES_EXPRESS", + "ZEPTO_EXPRESS", + "SKYNET_ZA", + "ZEEK_2_DOOR", + "BLINKLASTMILE", + "POSTA_UKR", + "CHROBINSON", + "CN_POST56", + "COURANT_PLUS", + "SCUDEX_EXPRESS", + "SHIPENTEGRA", + "B_TWO_C_EUROPE", + "COPE", + "IND_GATI", + "CN_WISHPOST", + "NACEX_ES", + "TAQBIN_HK", + "GLOBALTRANZ", + "HKD", + "BJSHOMEDELIVERY", + "OMNIVA", + "SUTTON", + "PANTHER_REFERENCE", + "SFCSERVICE", + "LTL", + "PARKNPARCEL", + "SPRING_GDS", + "ECEXPRESS", + "INTERPARCEL_AU", + "AGILITY", + "XL_EXPRESS", + "ADERONLINE", + "DIRECTCOURIERS", + "PLANZER", + "SENDING", + "NINJAVAN_WB", + "NATIONWIDE_MY", + "SENDIT", + "GB_ARROW", + "IND_GOJAVAS", + "KPOST", + "DHL_FREIGHT", + "BLUECARE", + "JINDOUYUN", + "TRACKON", + "GB_TUFFNELLS", + "TRUMPCARD", + "ETOTAL", + "SFPLUS_WEBHOOK", + "SEKOLOGISTICS", + "HERMES_2MANN_HANDLING", + "DPD_LOCAL_REF", + "UDS", + "ZA_SPECIALISED_FREIGHT", + "THA_KERRY", + "PRT_INT_SEUR", + "BRA_CORREIOS", + "NZ_NZ_POST", + "CN_EQUICK", + "MYS_EMS", + "GB_NORSK", + "ESP_MRW", + "ESP_PACKLINK", + "KANGAROO_MY", + "RPX", + "XDP_UK_REFERENCE", + "NINJAVAN_MY", + "ADICIONAL", + "NINJAVAN_ID", + "ROADBULL", + "YAKIT", + "MAILAMERICAS", + "MIKROPAKKET", + "DYNALOGIC", + "DHL_ES", + "DHL_PARCEL_NL", + "DHL_GLOBAL_MAIL_ASIA", + "DAWN_WING", + "GENIKI_GR", + "HERMESWORLD_UK", + "ALPHAFAST", + "BUYLOGIC", + "EKART", + "MEX_SENDA", + "SFC_LOGISTICS", + "POST_SERBIA", + "IND_DELHIVERY", + "DE_DPD_DELISTRACK", + "RPD2MAN", + "CN_SF_EXPRESS", + "YANWEN", + "MYS_SKYNET", + "CORREOS_DE_MEXICO", + "CBL_LOGISTICA", + "MEX_ESTAFETA", + "AU_AUSTRIAN_POST", + "RINCOS", + "NLD_DHL", + "RUSSIAN_POST", + "COURIERS_PLEASE", + "POSTNORD_LOGISTICS", + "FEDEX", + "DPE_EXPRESS", + "DPD", + "ADSONE", + "IDN_JNE", + "THECOURIERGUY", + "CNEXPS", + "PRT_CHRONOPOST", + "LANDMARK_GLOBAL", + "IT_DHL_ECOMMERCE", + "ESP_NACEX", + "PRT_CTT", + "BE_KIALA", + "ASENDIA_UK", + "GLOBAL_TNT", + "POSTUR_IS", + "EPARCEL_KR", + "INPOST_PACZKOMATY", + "IT_POSTE_ITALIA", + "BE_BPOST", + "PL_POCZTA_POLSKA", + "MYS_MYS_POST", + "SG_SG_POST", + "THA_THAILAND_POST", + "LEXSHIP", + "FASTWAY_NZ", + "DHL_AU", + "COSTMETICSNOW", + "PFLOGISTICS", + "LOOMIS_EXPRESS", + "GLS_ITALY", + "LINE", + "GEL_EXPRESS", + "HUODULL", + "NINJAVAN_SG", + "JANIO", + "AO_COURIER", + "BRT_IT_SENDER_REF", + "SAILPOST", + "LALAMOVE", + "NEWZEALAND_COURIERS", + "ETOMARS", + "VIRTRANSPORT", + "WIZMO", + "PALLETWAYS", + "I_DIKA", + "CFL_LOGISTICS", + "GEMWORLDWIDE", + "GLOBAL_EXPRESS", + "LOGISTYX_TRANSGROUP", + "WESTBANK_COURIER", + "ARCO_SPEDIZIONI", + "YDH_EXPRESS", + "PARCELINKLOGISTICS", + "CNDEXPRESS", + "NOX_NIGHT_TIME_EXPRESS", + "AERONET", + "LTIANEXP", + "INTEGRA2_FTP", + "PARCELONE", + "NOX_NACHTEXPRESS", + "CN_CHINA_POST_EMS", + "CHUKOU1", + "GLS_SLOV", + "ORANGE_DS", + "JOOM_LOGIS", + "AUS_STARTRACK", + "DHL", + "GB_APC", + "BONDSCOURIERS", + "JPN_JAPAN_POST", + "USPS", + "WINIT", + "ARG_OCA", + "TW_TAIWAN_POST", + "DMM_NETWORK", + "TNT", + "BH_POSTA", + "SWE_POSTNORD", + "CA_CANADA_POST", + "WISELOADS", + "ASENDIA_HK", + "NLD_GLS", + "MEX_REDPACK", + "JET_SHIP", + "DE_DHL_EXPRESS", + "NINJAVAN_THAI", + "RABEN_GROUP", + "ESP_ASM", + "HRV_HRVATSKA", + "GLOBAL_ESTES", + "LTU_LIETUVOS", + "BEL_DHL", + "AU_AU_POST", + "SPEEDEXCOURIER", + "FR_COLIS", + "ARAMEX", + "DPEX", + "MYS_AIRPAK", + "CUCKOOEXPRESS", + "DPD_POLAND", + "NLD_POSTNL", + "NIM_EXPRESS", + "QUANTIUM", + "SENDLE", + "ESP_REDUR", + "MATKAHUOLTO", + "CPACKET", + "POSTI", + "HUNTER_EXPRESS", + "CHOIR_EXP", + "LEGION_EXPRESS", + "AUSTRIAN_POST_EXPRESS", + "GRUPO", + "POSTA_RO", + "INTERPARCEL_UK", + "GLOBAL_ABF", + "POSTEN_NORGE", + "XPERT_DELIVERY", + "DHL_REFR", + "DHL_HK", + "SKYNET_UAE", + "GOJEK", + "YODEL_INTNL", + "JANCO", + "YTO", + "WISE_EXPRESS", + "JTEXPRESS_VN", + "FEDEX_INTL_MLSERV", + "VAMOX", + "AMS_GRP", + "DHL_JP", + "HRPARCEL", + "GESWL", + "BLUESTAR", + "CDEK_TR", + "DESCARTES", + "DELTEC_UK", + "DTDC_EXPRESS", + "TOURLINE", + "BH_WORLDWIDE", + "OCS", + "YINGNUO_LOGISTICS", + "UPS", + "TOLL", + "PRT_SEUR", + "DTDC_AU", + "THA_DYNAMIC_LOGISTICS", + "UBI_LOGISTICS", + "FEDEX_CROSSBORDER", + "A1POST", + "TAZMANIAN_FREIGHT", + "CJ_INT_MY", + "SAIA_FREIGHT", + "SG_QXPRESS", + "NHANS_SOLUTIONS", + "DPD_FR", + "COORDINADORA", + "ANDREANI", + "DOORA", + "INTERPARCEL_NZ", + "PHL_JAMEXPRESS", + "BEL_BELGIUM_POST", + "US_APC", + "IDN_POS", + "FR_MONDIAL", + "DE_DHL", + "HK_RPX", + "DHL_PIECEID", + "VNPOST_EMS", + "RRDONNELLEY", + "DPD_DE", + "DELCART_IN", + "IMEXGLOBALSOLUTIONS", + "ACOMMERCE", + "EURODIS", + "CANPAR", + "GLS", + "IND_ECOM", + "ESP_ENVIALIA", + "DHL_UK", + "SMSA_EXPRESS", + "TNT_FR", + "DEX_I", + "BUDBEE_WEBHOOK", + "COPA_COURIER", + "VNM_VIETNAM_POST", + "DPD_HK", + "TOLL_NZ", + "ECHO", + "FEDEX_FR", + "BORDEREXPRESS", + "MAILPLUS_JPN", + "TNT_UK_REFR", + "KEC", + "DPD_RO", + "TNT_JP", + "TH_CJ", + "EC_CN", + "FASTWAY_UK", + "FASTWAY_US", + "GLS_DE", + "GLS_ES", + "GLS_FR", + "MONDIAL_BE", + "SGT_IT", + "TNT_CN", + "TNT_DE", + "TNT_ES", + "TNT_PL", + "PARCELFORCE", + "SWISS_POST", + "TOLL_IPEC", + "AIR_21", + "AIRSPEED", + "BERT", + "BLUEDART", + "COLLECTPLUS", + "COURIERPLUS", + "COURIER_POST", + "DHL_GLOBAL_MAIL", + "DPD_UK", + "DELTEC_DE", + "DEUTSCHE_DE", + "DOTZOT", + "ELTA_GR", + "EMS_CN", + "ECARGO", + "ENSENDA", + "FERCAM_IT", + "FASTWAY_ZA", + "FASTWAY_AU", + "FIRST_LOGISITCS", + "GEODIS", + "GLOBEGISTICS", + "GREYHOUND", + "JETSHIP_MY", + "LION_PARCEL", + "AEROFLASH", + "ONTRAC", + "SAGAWA", + "SIODEMKA", + "STARTRACK", + "TNT_AU", + "TNT_IT", + "TRANSMISSION", + "YAMATO", + "DHL_IT", + "DHL_AT", + "LOGISTICSWORLDWIDE_KR", + "GLS_SPAIN", + "AMAZON_UK_API", + "DPD_FR_REFERENCE", + "DHLPARCEL_UK", + "MEGASAVE", + "QUALITYPOST", + "IDS_LOGISTICS", + "JOYINGBOX", + "PANTHER_ORDER_NUMBER", + "WATKINS_SHEPARD", + "FASTTRACK", + "UP_EXPRESS", + "ELOGISTICA", + "ECOURIER", + "CJ_PHILIPPINES", + "SPEEDEX", + "ORANGECONNEX", + "TECOR", + "SAEE", + "GLS_ITALY_FTP", + "DELIVERE", + "YYCOM", + "ADICIONAL_PT", + "DKSH", + "NIPPON_EXPRESS_FTP", + "GOLS", + "FUJEXP", + "QTRACK", + "OMLOGISTICS_API", + "GDPHARM", + "MISUMI_CN", + "AIR_CANADA", + "CITY56_WEBHOOK", + "SAGAWA_API", + "KEDAEX", + "PGEON_API", + "WEWORLDEXPRESS", + "JT_LOGISTICS", + "TRUSK", + "VIAXPRESS", + "DHL_SUPPLYCHAIN_ID", + "ZUELLIGPHARMA_SFTP", + "MEEST", + "TOLL_PRIORITY", + "MOTHERSHIP_API", + "CAPITAL", + "EUROPAKET_API", + "HFD", + "TOURLINE_REFERENCE", + "GIO_ECOURIER", + "CN_LOGISTICS", + "PANDION", + "BPOST_API", + "PASSPORTSHIPPING", + "PAKAJO", + "DACHSER", + "YUSEN_SFTP", + "SHYPLITE", + "XYY", + "MWD", + "FAXECARGO", + "MAZET", + "FIRST_LOGISTICS_API", + "SPRINT_PACK", + "HERMES_DE_FTP", + "CONCISE", + "KERRY_EXPRESS_TW_API", + "EWE", + "FASTDESPATCH", + "ABCUSTOM_SFTP", + "CHAZKI", + "SHIPPIE", + "GEODIS_API", + "NAQEL_EXPRESS", + "PAPA_WEBHOOK", + "FORWARDAIR", + "DIALOGO_LOGISTICA_API", + "LALAMOVE_API", + "TOMYDOOR", + "KRONOS_WEBHOOK", + "JTCARGO", + "T_CAT", + "CONCISE_WEBHOOK", + "TELEPORT_WEBHOOK", + "CUSTOMCO_API", + "SPX_TH", + "BOLLORE_LOGISTICS", + "CLICKLINK_SFTP", + "M3LOGISTICS", + "VNPOST_API", + "AXLEHIRE_FTP", + "SHADOWFAX", + "MYHERMES_UK_API", + "DAIICHI", + "MENSAJEROSURBANOS_API", + "POLARSPEED", + "IDEXPRESS_ID", + "PAYO", + "WHISTL_SFTP", + "INTEX_DE", + "TRANS2U", + "PRODUCTCAREGROUP_SFTP", + "BIGSMART", + "EXPEDITORS_API_REF", + "AITWORLDWIDE_API", + "WORLDCOURIER", + "QUIQUP", + "AGEDISS_SFTP", + "ANDREANI_API", + "CRLEXPRESS", + "SMARTCAT", + "CROSSFLIGHT", + "PROCARRIER", + "DHL_REFERENCE_API", + "SEINO_API", + "WSPEXPRESS", + "KRONOS", + "TOTAL_EXPRESS_API", + "PARCLL", + "XPEDIGO", + "STAR_TRACK_WEBHOOK", + "GPOST", + "UCS", + "DMFGROUP", + "COORDINADORA_API", + "MARKEN", + "NTL", + "REDJEPAKKETJE", + "ALLIED_EXPRESS_FTP", + "MONDIALRELAY_ES", + "NAEKO_FTP", + "MHI", + "SHIPPIFY", + "MALCA_AMIT_API", + "JTEXPRESS_SG_API", + "DACHSER_WEB", + "FLIGHTLG", + "CAGO", + "COM1EXPRESS", + "TONAMI_FTP", + "PACKFLEET", + "PUROLATOR_INTERNATIONAL", + "WINESHIPPING_WEBHOOK", + "DHL_ES_SFTP", + "PCHOME_API", + "CESKAPOSTA_API", + "GORUSH", + "HOMERUNNER", + "AMAZON_ORDER", + "EFWNOW_API", + "CBL_LOGISTICA_API", + "NIMBUSPOST", + "LOGWIN_LOGISTICS", + "NOWLOG_API", + "DPD_NL", + "GODEPENDABLE", + "ESDEX", + "LOGISYSTEMS_SFTP", + "EXPEDITORS", + "SNTGLOBAL_API", + "SHIPX", + "QINTL_API", + "PACKS", + "POSTNL_INTERNATIONAL", + "AMAZON_EMAIL_PUSH", + "DHL_API", + "SPX", + "AXLEHIRE", + "ICSCOURIER", + "DIALOGO_LOGISTICA", + "SHUNBANG_EXPRESS", + "TCS_API", + "SF_EXPRESS_CN", + "PACKETA", + "SIC_TELIWAY", + "MONDIALRELAY_FR", + "INTIME_FTP", + "JD_EXPRESS", + "FASTBOX", + "PATHEON", + "INDIA_POST", + "TIPSA_REF", + "ECOFREIGHT", + "VOX", + "DIRECTFREIGHT_AU_REF", + "BESTTRANSPORT_SFTP", + "AUSTRALIA_POST_API", + "FRAGILEPAK_SFTP", + "FLIPXP", + "VALUE_WEBHOOK", + "DAESHIN", + "SHERPA", + "MWD_API", + "SMARTKARGO", + "DNJ_EXPRESS", + "GOPEOPLE", + "MYSENDLE_API", + "ARAMEX_API", + "PIDGE", + "THAIPARCELS", + "PANTHER_REFERENCE_API", + "POSTAPLUS", + "BUFFALO", + "U_ENVIOS", + "ELITE_CO", + "BARQEXP", + "ROCHE_INTERNAL_SFTP", + "DBSCHENKER_ICELAND", + "TNT_FR_REFERENCE", + "NEWGISTICSAPI", + "GLOVO", + "GWLOGIS_API", + "SPREETAIL_API", + "MOOVA", + "PLYCONGROUP", + "USPS_WEBHOOK", + "REIMAGINEDELIVERY", + "EDF_FTP", + "DAO365", + "BIOCAIR_FTP", + "RANSA_WEBHOOK", + "SHIPXPRES", + "COURANT_PLUS_API", + "SHIPA", + "HOMELOGISTICS", + "DX", + "POSTE_ITALIANE_PACCOCELERE", + "TOLL_WEBHOOK", + "LCTBR_API", + "DX_FREIGHT", + "DHL_SFTP", + "SHIPROCKET", + "UBER_WEBHOOK", + "STATOVERNIGHT", + "BURD", + "FASTSHIP", + "IBVENTURE_WEBHOOK", + "GATI_KWE_API", + "CRYOPDP_FTP", + "HUBBED", + "TIPSA_API", + "ARASKARGO", + "THIJS_NL", + "ATSHEALTHCARE_REFERENCE", + "99MINUTOS", + "HELLENIC_POST", + "HSM_GLOBAL", + "MNX", + "NMTRANSFER", + "LOGYSTO", + "INDIA_POST_INT", + "AMAZON_FBA_SWISHIP_IN", + "SRT_TRANSPORT", + "BOMI", + "DELIVERR_SFTP", + "HSDEXPRESS", + "SIMPLETIRE_WEBHOOK", + "HUNTER_EXPRESS_SFTP", + "UPS_API", + "WOOYOUNG_LOGISTICS_SFTP", + "PHSE_API", + "WISH_EMAIL_PUSH", + "NORTHLINE", + "MEDAFRICA", + "DPD_AT_SFTP", + "ANTERAJA", + "DHL_GLOBAL_FORWARDING_API", + "LBCEXPRESS_API", + "SIMSGLOBAL", + "CDLDELIVERS", + "TYP", + "TESTING_COURIER_WEBHOOK", + "PANDAGO_API", + "ROYAL_MAIL_FTP", + "THUNDEREXPRESS", + "SECRETLAB_WEBHOOK", + "SETEL", + "JD_WORLDWIDE", + "DPD_RU_API", + "ARGENTS_WEBHOOK", + "POSTONE", + "TUSKLOGISTICS", + "RHENUS_UK_API", + "TAQBIN_SG_API", + "INNTRALOG_SFTP", + "DAYROSS", + "CORREOSEXPRESS_API", + "INTERNATIONAL_SEUR_API", + "YODEL_API", + "HEROEXPRESS", + "DHL_SUPPLYCHAIN_IN", + "URGENT_CARGUS", + "FRONTDOORCORP", + "JTEXPRESS_PH", + "PARCELSTARS_WEBHOOK", + "DPD_SK_SFTP", + "MOVIANTO", + "OZEPARTS_SHIPPING", + "KARGOMKOLAY", + "TRUNKRS", + "OMNIRPS_WEBHOOK", + "CHILEXPRESS", + "TESTING_COURIER", + "JNE_API", + "BJSHOMEDELIVERY_FTP", + "DEXPRESS_WEBHOOK", + "USPS_API", + "TRANSVIRTUAL", + "SOLISTICA_API", + "CHIENVENTURE_WEBHOOK", + "DPD_UK_SFTP", + "INPOST_UK", + "JAVIT", + "ZTO_DOMESTIC", + "DHL_GT_API", + "CEVA_TRACKING", + "KOMON_EXPRESS", + "EASTWESTCOURIER_FTP", + "DANNIAO", + "SPECTRAN", + "DELIVER_IT", + "RELAISCOLIS", + "GLS_SPAIN_API", + "POSTPLUS", + "AIRTERRA", + "GIO_ECOURIER_API", + "DPD_CH_SFTP", + "FEDEX_API", + "INTERSMARTTRANS", + "HERMES_UK_SFTP", + "EXELOT_FTP", + "DHL_PA_API", + "VIRTRANSPORT_SFTP", + "WORLDNET", + "INSTABOX_WEBHOOK", + "KNG", + "FLASHEXPRESS_WEBHOOK", + "MAGYAR_POSTA_API", + "WESHIP_API", + "OHI_WEBHOOK", + "MUDITA", + "BLUEDART_API", + "T_CAT_API", + "ADS", + "HERMES_IT", + "FITZMARK_API", + "POSTI_API", + "SMSA_EXPRESS_WEBHOOK", + "TAMERGROUP_WEBHOOK", + "LIVRAPIDE", + "NIPPON_EXPRESS", + "BETTERTRUCKS", + "FAN", + "PB_USPSFLATS_FTP", + "PARCELRIGHT", + "ITHINKLOGISTICS", + "KERRY_EXPRESS_TH_WEBHOOK", + "ECOUTIER", + "SHOWL", + "BRT_IT_API", + "RIXONHK_API", + "DBSCHENKER_API", + "ILYANGLOGIS", + "MAIL_BOX_ETC", + "WESHIP", + "DHL_GLOBAL_MAIL_API", + "ACTIVOS24_API", + "ATSHEALTHCARE", + "LUWJISTIK", + "GW_WORLD", + "FAIRSENDEN_API", + "SERVIP_WEBHOOK", + "SWISHIP", + "TANET", + "HOTSIN_CARGO", + "DIREX", + "HUANTONG", + "IMILE_API", + "BDMNET", + "AUEXPRESS", + "NYTLOGISTICS", + "DSV_REFERENCE", + "NOVOFARMA_WEBHOOK", + "AITWORLDWIDE_SFTP", + "SHOPOLIVE", + "FNF_ZA", + "DHL_ECOMMERCE_GC", + "FETCHR", + "STARLINKS_API", + "YYEXPRESS", + "SERVIENTREGA", + "HANJIN", + "SPANISH_SEUR_FTP", + "DX_B2B_CONNUM", + "HELTHJEM_API", + "INEXPOST", + "A2B_BA", + "RHENUS_GROUP", + "SBERLOGISTICS_RU", + "MALCA_AMIT", + "PPL", + "OSM_WORLDWIDE_SFTP", + "ACILOGISTIX", + "OPTIMACOURIER", + "NOVA_POSHTA_API", + "LOGGI", + "YIFAN", + "MYDYNALOGIC", + "MORNINGLOBAL", + "CONCISE_API", + "FXTRAN", + "DELIVERYOURPARCEL_ZA", + "UPARCEL", + "MOBI_BR", + "LOGINEXT_WEBHOOK", + "EMS", + "SPEEDY" + ] + }, + "BlikExperienceContextAllOf2": { + "properties": { + "consumer_ip": { + "$ref": "#/components/schemas/IpAddress" + }, + "consumer_user_agent": { + "maxLength": 256, + "minLength": 1, + "pattern": "^.*$", + "type": "string", + "description": "The payer's User Agent. For example, Mozilla/5.0 (Macintosh; Intel Mac OS X x.y; rv:42.0)." + } + } + }, + "DECIMALPRECISION1": { + "title": "DECIMAL_PRECISION", + "properties": { + "issue": { + "type": "string", + "enum": ["DECIMAL_PRECISION"] + }, + "description": { + "type": "string", + "enum": [ + "If the currency supports decimals, only two decimal place precision is supported." + ] + } + } + }, + "ShippingType": { + "title": "Shipping Type", + "type": "string", + "description": "A classification for the method of purchase fulfillment", + "enum": ["SHIPPING", "PICKUP", "PICKUP_IN_STORE", "PICKUP_FROM_PERSON"] + }, + "TAXTOTALREQUIRED1": { + "title": "TAX_TOTAL_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["TAX_TOTAL_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "If item details are specified (items.tax_total and items.quantity) corresponding amount.breakdown.tax_total is required." + ] + } + } + }, + "PAYEEFXRATEIDEXPIRED2": { + "title": "PAYEE_FX_RATE_ID_EXPIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYEE_FX_RATE_ID_EXPIRED"] + }, + "description": { + "type": "string", + "enum": [ + "The specified FX Rate ID has expired. Please specify a different FX Rate Id and try the request again. Alternately, remove the FX Rate ID to process the request using the default exchange rate." + ] + } + } + }, + "PAYEEFXRATEIDEXPIRED3": { + "title": "PAYEE_FX_RATE_ID_EXPIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYEE_FX_RATE_ID_EXPIRED"] + }, + "description": { + "type": "string", + "enum": [ + "The specified FX Rate ID has expired. Please specify a different FX Rate Id and try the request again. Alternately, remove the FX Rate ID to process the request using the default exchange rate." + ] + } + } + }, + "PAYEEFXRATEIDEXPIRED1": { + "title": "PAYEE_FX_RATE_ID_EXPIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYEE_FX_RATE_ID_EXPIRED"] + }, + "description": { + "type": "string", + "enum": [ + "The specified FX Rate ID has expired. Please specify a different FX Rate Id and try the request again. Alternately, remove the FX Rate ID to process the request using the default exchange rate." + ] + } + } + }, + "ORDERNOTAPPROVED1": { + "title": "ORDER_NOT_APPROVED", + "properties": { + "issue": { + "type": "string", + "enum": ["ORDER_NOT_APPROVED"] + }, + "description": { + "type": "string", + "enum": [ + "Payer has not yet approved the Order for payment. Please redirect the payer to the 'rel':'approve' url returned as part of the HATEOAS links within the Create Order call or provide a valid `payment_source` in the request." + ] + } + } + }, + "OrderApplicationContext": { + "title": "Application Context", + "type": "object", + "properties": { + "user_action": { + "maxLength": 8, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "DEPRECATED. Configures a Continue or Pay Now checkout flow. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.user_action`). Please specify this field in the `experience_context` object instead of the `application_context` object", + "default": "CONTINUE", + "enum": ["CONTINUE", "PAY_NOW"], + "x-ballerina-name-ignore": "userAction" + }, + "landing_page": { + "maxLength": 13, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "DEPRECATED. DEPRECATED. The type of landing page to show on the PayPal site for customer checkout. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.landing_page`). Please specify this field in the `experience_context` object instead of the `application_context` object", + "deprecated": true, + "default": "NO_PREFERENCE", + "enum": ["LOGIN", "BILLING", "NO_PREFERENCE"], + "x-ballerina-name-ignore": "landingPage" + }, + "return_url": { + "type": "string", + "description": "DEPRECATED. The URL where the customer is redirected after the customer approves the payment. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.return_url`). Please specify this field in the `experience_context` object instead of the `application_context` object", + "format": "uri", + "x-ballerina-name-ignore": "returnUrl" + }, + "brand_name": { + "maxLength": 127, + "minLength": 1, + "type": "string", + "description": "DEPRECATED. The label that overrides the business name in the PayPal account on the PayPal site. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.brand_name`). Please specify this field in the `experience_context` object instead of the `application_context` object", + "x-ballerina-name-ignore": "brandName" + }, + "locale": { + "$ref": "#/components/schemas/Language" + }, + "cancel_url": { + "type": "string", + "description": "DEPRECATED. The URL where the customer is redirected after the customer cancels the payment. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.cancel_url`). Please specify this field in the `experience_context` object instead of the `application_context` object", + "format": "uri", + "x-ballerina-name-ignore": "cancelUrl" + }, + "stored_payment_source": { + "allOf": [ + { + "$ref": "#/components/schemas/StoredPaymentSource" + } + ], + "x-ballerina-name-ignore": "storedPaymentSource" + }, + "shipping_preference": { + "maxLength": 20, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "DEPRECATED. DEPRECATED. The shipping preference:
  • Displays the shipping address to the customer.
  • Enables the customer to choose an address on the PayPal site.
  • Restricts the customer from changing the address during the payment-approval process.
. The fields in `application_context` are now available in the `experience_context` object under the `payment_source` which supports them (eg. `payment_source.paypal.experience_context.shipping_preference`). Please specify this field in the `experience_context` object instead of the `application_context` object", + "deprecated": true, + "default": "GET_FROM_FILE", + "enum": ["GET_FROM_FILE", "NO_SHIPPING", "SET_PROVIDED_ADDRESS"], + "x-ballerina-name-ignore": "shippingPreference" + }, + "payment_method": { + "allOf": [ + { + "$ref": "#/components/schemas/PaymentMethod" + } + ], + "x-ballerina-name-ignore": "paymentMethod" + } + }, + "description": "Customizes the payer experience during the approval process for the payment with PayPal.
Note: Partners and Marketplaces might configure brand_name and shipping_preference during partner account setup, which overrides the request values.
" + }, + "PAYERACTIONREQUIRED1": { + "title": "PAYER_ACTION_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYER_ACTION_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "Transaction cannot complete successfully, instruct the buyer to return to PayPal." + ] + } + } + }, + "Mybank": { + "title": "MyBank payment object", + "type": "object", + "properties": { + "country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/CountryCode" + } + ], + "x-ballerina-name-ignore": "countryCode" + }, + "name": { + "$ref": "#/components/schemas/FullName" + }, + "bic": { + "$ref": "#/components/schemas/Bic" + }, + "iban_last_chars": { + "allOf": [ + { + "$ref": "#/components/schemas/IbanLastChars" + } + ], + "x-ballerina-name-ignore": "ibanLastChars" + } + }, + "description": "Information used to pay using MyBank" + }, + "Orderspatch422Details": { + "anyOf": [ + { + "$ref": "#/components/schemas/AMOUNTMISMATCH1" + }, + { + "$ref": "#/components/schemas/CANNOTBENEGATIVE1" + }, + { + "$ref": "#/components/schemas/CANNOTBEZEROORNEGATIVE1" + }, + { + "$ref": "#/components/schemas/CITYREQUIRED1" + }, + { + "$ref": "#/components/schemas/DECIMALPRECISION1" + }, + { + "$ref": "#/components/schemas/DONATIONITEMSNOTSUPPORTED1" + }, + { + "$ref": "#/components/schemas/DUPLICATEREFERENCEID1" + }, + { + "$ref": "#/components/schemas/INVALIDCURRENCYCODE1" + }, + { + "$ref": "#/components/schemas/ITEMTOTALMISMATCH1" + }, + { + "$ref": "#/components/schemas/ITEMTOTALREQUIRED1" + }, + { + "$ref": "#/components/schemas/MAXVALUEEXCEEDED1" + }, + { + "$ref": "#/components/schemas/INVALIDJSONPOINTERFORMAT" + }, + { + "$ref": "#/components/schemas/INVALIDPARAMETER" + }, + { + "$ref": "#/components/schemas/NOTPATCHABLE" + }, + { + "$ref": "#/components/schemas/TAXTOTALMISMATCH1" + }, + { + "$ref": "#/components/schemas/TAXTOTALREQUIRED1" + }, + { + "$ref": "#/components/schemas/UNSUPPORTEDINTENT1" + }, + { + "$ref": "#/components/schemas/UNSUPPORTEDPATCHPARAMETERVALUE" + }, + { + "$ref": "#/components/schemas/PATCHVALUEREQUIRED" + }, + { + "$ref": "#/components/schemas/PATCHPATHREQUIRED" + }, + { + "$ref": "#/components/schemas/PAYEEACCOUNTLOCKEDORCLOSED1" + }, + { + "$ref": "#/components/schemas/PAYEEACCOUNTRESTRICTED1" + }, + { + "$ref": "#/components/schemas/PAYEEFXRATEIDEXPIRED1" + }, + { + "$ref": "#/components/schemas/PAYEEFXRATEIDCURRENCYMISMATCH1" + }, + { + "$ref": "#/components/schemas/INVALIDFXRATEID1" + }, + { + "$ref": "#/components/schemas/PLATFORMFEESNOTSUPPORTED1" + }, + { + "$ref": "#/components/schemas/INVALIDPLATFORMFEESACCOUNT1" + }, + { + "$ref": "#/components/schemas/INVALIDPLATFORMFEESAMOUNT1" + }, + { + "$ref": "#/components/schemas/POSTALCODEREQUIRED1" + }, + { + "$ref": "#/components/schemas/REFERENCEIDNOTFOUND" + }, + { + "$ref": "#/components/schemas/REFERENCEIDREQUIRED1" + }, + { + "$ref": "#/components/schemas/MULTICURRENCYORDER1" + }, + { + "$ref": "#/components/schemas/SHIPPINGOPTIONNOTSELECTED1" + }, + { + "$ref": "#/components/schemas/SHIPPINGOPTIONSNOTSUPPORTED2" + }, + { + "$ref": "#/components/schemas/MULTIPLESHIPPINGOPTIONSELECTED1" + }, + { + "$ref": "#/components/schemas/ORDERALREADYCOMPLETED" + }, + { + "$ref": "#/components/schemas/PREFERREDSHIPPINGOPTIONAMOUNTMISMATCH1" + }, + { + "$ref": "#/components/schemas/AMOUNTCHANGENOTALLOWED" + } + ] + }, + "DateNoTime": { + "maxLength": 10, + "minLength": 10, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$", + "type": "string", + "description": "The stand-alone date, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). To represent special legal values, such as a date of birth, you should use dates with no associated time or time-zone data. Whenever possible, use the standard `date_time` type. This regular expression does not validate all dates. For example, February 31 is valid and nothing is known about leap years", + "format": "ppaas_date_notime_v2" + }, + "REFERENCEIDREQUIRED": { + "title": "REFERENCE_ID_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["REFERENCE_ID_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "'reference_id' is required for each 'purchase_unit' if multiple 'purchase_unit' are provided." + ] + } + } + }, + "TRANSACTIONREFUSED": { + "title": "TRANSACTION_REFUSED", + "properties": { + "issue": { + "type": "string", + "enum": ["TRANSACTION_REFUSED"] + }, + "description": { + "type": "string", + "enum": ["The request was refused."] + } + } + }, + "PERMISSIONDENIEDFORDONATIONITEMS1": { + "title": "PERMISSION_DENIED_FOR_DONATION_ITEMS", + "properties": { + "issue": { + "type": "string", + "enum": ["PERMISSION_DENIED_FOR_DONATION_ITEMS"] + }, + "description": { + "type": "string", + "enum": [ + "The API Caller or Payee have not been granted appropriate permissions to send 'items.category' as 'DONATION'. Please speak to your account manager if you want to process these type of items." + ] + } + } + }, + "CRYPTOGRAMREQUIRED": { + "title": "CRYPTOGRAM_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["CRYPTOGRAM_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "Cryptogram is required if authentication method is CRYPTOGRAM 3DS." + ] + } + } + }, + "ONEOFPARAMETERSREQUIRED1": { + "title": "ONE_OF_PARAMETERS_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["ONE_OF_PARAMETERS_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "One or more field is required to continue with this request." + ] + } + } + }, + "PaypalWalletExperienceContext": { + "title": "PayPal Wallet Experience Context", + "type": "object", + "properties": { + "user_action": { + "maxLength": 8, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "Configures a Continue or Pay Now checkout flow", + "default": "CONTINUE", + "enum": ["CONTINUE", "PAY_NOW"], + "x-ballerina-name-ignore": "userAction" + }, + "return_url": { + "allOf": [ + { + "$ref": "#/components/schemas/Url" + } + ], + "x-ballerina-name-ignore": "returnUrl" + }, + "landing_page": { + "maxLength": 13, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "The type of landing page to show on the PayPal site for customer checkout", + "default": "NO_PREFERENCE", + "enum": ["LOGIN", "GUEST_CHECKOUT", "NO_PREFERENCE"], + "x-ballerina-name-ignore": "landingPage" + }, + "brand_name": { + "maxLength": 127, + "minLength": 1, + "pattern": "^.*$", + "type": "string", + "description": "The label that overrides the business name in the PayPal account on the PayPal site. The pattern is defined by an external party and supports Unicode", + "x-ballerina-name-ignore": "brandName" + }, + "payment_method_preference": { + "maxLength": 255, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "The merchant-preferred payment methods", + "default": "UNRESTRICTED", + "enum": ["UNRESTRICTED", "IMMEDIATE_PAYMENT_REQUIRED"], + "x-ballerina-name-ignore": "paymentMethodPreference" + }, + "locale": { + "$ref": "#/components/schemas/Language" + }, + "cancel_url": { + "allOf": [ + { + "$ref": "#/components/schemas/Url" + } + ], + "x-ballerina-name-ignore": "cancelUrl" + }, + "shipping_preference": { + "maxLength": 24, + "minLength": 1, + "pattern": "^[A-Z_]+$", + "type": "string", + "description": "The location from which the shipping address is derived", + "default": "GET_FROM_FILE", + "enum": ["GET_FROM_FILE", "NO_SHIPPING", "SET_PROVIDED_ADDRESS"], + "x-ballerina-name-ignore": "shippingPreference" + } + }, + "description": "Customizes the payer experience during the approval process for payment with PayPal.
Note: Partners and Marketplaces might configure brand_name and shipping_preference during partner account setup, which overrides the request values.
" + }, + "InlineResponse401": { + "allOf": [ + { + "$ref": "#/components/schemas/Error401" + }, + { + "$ref": "#/components/schemas/Unauthorized" + } + ] + }, + "InlineResponse400": { + "allOf": [ + { + "$ref": "#/components/schemas/Error400" + }, + { + "$ref": "#/components/schemas/BadRequest" + } + ] + }, + "BlikRequest": { + "title": "BLIK payment object", + "required": ["country_code", "name"], + "type": "object", + "properties": { + "experience_context": { + "allOf": [ + { + "$ref": "#/components/schemas/BlikExperienceContext" + } + ], + "x-ballerina-name-ignore": "experienceContext" + }, + "country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/CountryCode" + } + ], + "x-ballerina-name-ignore": "countryCode" + }, + "name": { + "$ref": "#/components/schemas/FullName" + }, + "one_click": { + "allOf": [ + { + "$ref": "#/components/schemas/BlikOneClick" + } + ], + "x-ballerina-name-ignore": "oneClick" + }, + "level_0": { + "allOf": [ + { + "$ref": "#/components/schemas/BlikSeamless" + } + ], + "x-ballerina-name-ignore": "level0" + }, + "email": { + "$ref": "#/components/schemas/EmailAddress" + } + }, + "description": "Information needed to pay using BLIK" + }, + "InlineResponse403": { + "allOf": [ + { + "$ref": "#/components/schemas/Error403" + }, + { + "$ref": "#/components/schemas/Forbidden" + } + ] + }, + "INSTRUMENTDECLINED1": { + "title": "INSTRUMENT_DECLINED", + "properties": { + "issue": { + "type": "string", + "enum": ["INSTRUMENT_DECLINED"] + }, + "description": { + "type": "string", + "enum": [ + "The instrument presented was either declined by the processor or bank, or it can't be used for this payment." + ] + } + } + }, + "NOTENABLEDFORBANKPROCESSING": { + "title": "NOT_ENABLED_FOR_BANK_PROCESSING", + "properties": { + "issue": { + "type": "string", + "enum": ["NOT_ENABLED_FOR_BANK_PROCESSING"] + }, + "description": { + "type": "string", + "enum": [ + "The API Caller account is not setup to be able to process bank payments. Please contact your PayPal account manager." + ] + } + } + }, + "GiropayRequest": { + "title": "A giropay payment object", + "required": ["country_code", "name"], + "type": "object", + "properties": { + "experience_context": { + "allOf": [ + { + "$ref": "#/components/schemas/ExperienceContextBase" + } + ], + "x-ballerina-name-ignore": "experienceContext" + }, + "country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/CountryCode" + } + ], + "x-ballerina-name-ignore": "countryCode" + }, + "name": { + "$ref": "#/components/schemas/FullName" + } + }, + "description": "Information needed to pay using giropay" + }, + "InlineResponse404": { + "allOf": [ + { + "$ref": "#/components/schemas/Error404" + }, + { + "$ref": "#/components/schemas/NotFound" + } + ] + }, + "MISMATCHEDVAULTIDTOPAYMENTSOURCE": { + "title": "MISMATCHED_VAULT_ID_TO_PAYMENT_SOURCE", + "properties": { + "issue": { + "type": "string", + "enum": ["MISMATCHED_VAULT_ID_TO_PAYMENT_SOURCE"] + }, + "description": { + "type": "string", + "enum": [ + "The vault_id does not match the payment_source provided. Please verify that the vault_id token used refers to the matching payment_source and try again. For example, a PayPal token cannot be passed in the vault_id field in the payment_source.card object." + ] + } + } + }, + "OrderStatus": { + "title": "Order Status", + "maxLength": 255, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "The order status", + "enum": [ + "CREATED", + "SAVED", + "APPROVED", + "VOIDED", + "COMPLETED", + "PAYER_ACTION_REQUIRED" + ] + }, + "BLIKONECLICKMISSINGREQUIREDPARAMETER": { + "title": "BLIK_ONE_CLICK_MISSING_REQUIRED_PARAMETER", + "properties": { + "issue": { + "type": "string", + "enum": ["BLIK_ONE_CLICK_MISSING_REQUIRED_PARAMETER"] + }, + "description": { + "type": "string", + "enum": [ + "Blik's one_click flow requires one_click.auth_code and one_click.alias_label parameters for the buyer's first transaction. For all subsequent transactions,only the one_click.alias_key parameter is required." + ] + } + } + }, + "BlikSeamless": { + "title": "BLIK level_0 payment object", + "required": ["auth_code"], + "type": "object", + "properties": { + "auth_code": { + "maxLength": 6, + "minLength": 6, + "pattern": "^[0-9]{6}$", + "type": "string", + "description": "The 6-digit code used to authenticate a consumer within BLIK", + "x-ballerina-name-ignore": "authCode" + } + }, + "description": "Information used to pay using BLIK level_0 flow" + }, + "INVALIDPAYEEPRICINGTIERID": { + "title": "INVALID_PAYEE_PRICING_TIER_ID", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_PAYEE_PRICING_TIER_ID"] + }, + "description": { + "type": "string", + "enum": [ + "Please check the value specified or confirm with your Account Manager that the 'payee_pricing_tier_id' specified has been setup for the account." + ] + } + } + }, + "UNSUPPORTEDPROCESSINGINSTRUCTION1": { + "title": "UNSUPPORTED_PROCESSING_INSTRUCTION", + "properties": { + "issue": { + "type": "string", + "enum": ["UNSUPPORTED_PROCESSING_INSTRUCTION"] + }, + "description": { + "type": "string", + "enum": [ + "The specified processing_instruction is not supported for the given payment_source. Please refer to https://developer.paypal.com/api/orders/v2/#definition-processing_instruction for the list of payment_source that can be specified with this value." + ] + } + } + }, + "PAYEEACCOUNTLOCKEDORCLOSED": { + "title": "PAYEE_ACCOUNT_LOCKED_OR_CLOSED", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYEE_ACCOUNT_LOCKED_OR_CLOSED"] + }, + "description": { + "type": "string", + "enum": ["The merchant account is locked or closed."] + } + } + }, + "CAPTURESTATUSNOTVALID": { + "title": "CAPTURE_STATUS_NOT_VALID", + "properties": { + "issue": { + "type": "string", + "enum": ["CAPTURE_STATUS_NOT_VALID"] + }, + "description": { + "type": "string", + "enum": [ + "Invalid capture status. Tracker information can only be added to captures in `COMPLETED` state." + ] + } + } + }, + "UniversalProductCode": {}, + "Orderscapture403Details": { + "anyOf": [ + { + "$ref": "#/components/schemas/CONSENTNEEDED" + }, + { + "$ref": "#/components/schemas/NOTELIGIBLEFORTOKENPROCESSING1" + }, + { + "$ref": "#/components/schemas/PERMISSIONDENIED2" + }, + { + "$ref": "#/components/schemas/PERMISSIONDENIEDFORDONATIONITEMS1" + } + ] + }, + "OrdersPatch422": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Orderspatch422Details" + } + } + } + }, + "MAXAUTHORIZATIONCOUNTEXCEEDED": { + "title": "MAX_AUTHORIZATION_COUNT_EXCEEDED", + "properties": { + "issue": { + "type": "string", + "enum": ["MAX_AUTHORIZATION_COUNT_EXCEEDED"] + }, + "description": { + "type": "string", + "enum": [ + "Maximum number of authorization allowed for the order is reached. Please contact Customer Support if you need to increase your limit." + ] + } + } + }, + "CardStoredCredential": { + "title": "Card Stored Credential", + "required": ["payment_initiator", "payment_type"], + "type": "object", + "properties": { + "payment_type": { + "allOf": [ + { + "$ref": "#/components/schemas/StoredPaymentSourcePaymentType" + } + ], + "x-ballerina-name-ignore": "paymentType" + }, + "usage": { + "$ref": "#/components/schemas/StoredPaymentSourceUsageType" + }, + "payment_initiator": { + "allOf": [ + { + "$ref": "#/components/schemas/PaymentInitiator" + } + ], + "x-ballerina-name-ignore": "paymentInitiator" + }, + "previous_network_transaction_reference": { + "allOf": [ + { + "$ref": "#/components/schemas/NetworkTransactionReference" + } + ], + "x-ballerina-name-ignore": "previousNetworkTransactionReference" + } + }, + "description": "Provides additional details to process a payment using a `card` that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file).
Parameter compatibility:
  • `payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only with `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`.
  • Only one of the parameters - `previous_transaction_reference` and `previous_network_transaction_reference` - can be present in the request.
" + }, + "VenmoWalletRequest": { + "title": "Venmo payment request object", + "type": "object", + "properties": { + "experience_context": { + "allOf": [ + { + "$ref": "#/components/schemas/VenmoWalletExperienceContext" + } + ], + "x-ballerina-name-ignore": "experienceContext" + }, + "email_address": { + "allOf": [ + { + "$ref": "#/components/schemas/Email" + } + ], + "x-ballerina-name-ignore": "emailAddress" + }, + "attributes": { + "$ref": "#/components/schemas/VenmoWalletAttributes" + }, + "vault_id": { + "allOf": [ + { + "$ref": "#/components/schemas/VaultId" + } + ], + "x-ballerina-name-ignore": "vaultId" + } + }, + "description": "Information needed to pay using Venmo" + }, + "PAYEEACCOUNTINVALID": { + "title": "PAYEE_ACCOUNT_INVALID", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYEE_ACCOUNT_INVALID"] + }, + "description": { + "type": "string", + "enum": [ + "Payee account specified is invalid. Please check the `payee.email_address` or `payee.merchant_id` specified and try again. Ensure that either `payee.merchant_id` or `payee.email_address` is specified." + ] + } + } + }, + "ACTIONDOESNOTMATCHINTENT": { + "title": "ACTION_DOES_NOT_MATCH_INTENT", + "properties": { + "issue": { + "type": "string", + "enum": ["ACTION_DOES_NOT_MATCH_INTENT"] + }, + "description": { + "type": "string", + "enum": [ + "Order was created with an intent to 'CAPTURE'. Please use v2/checkout/orders/order_id/capture to complete the transaction or alternately Create an order with an intent of 'AUTHORIZE'." + ] + } + } + }, + "Level3CardProcessingData": { + "title": "Level 3 Card Processing Data", + "type": "object", + "properties": { + "shipping_amount": { + "allOf": [ + { + "$ref": "#/components/schemas/Money" + } + ], + "x-ballerina-name-ignore": "shippingAmount" + }, + "duty_amount": { + "allOf": [ + { + "$ref": "#/components/schemas/Money" + } + ], + "x-ballerina-name-ignore": "dutyAmount" + }, + "ships_from_postal_code": { + "maxLength": 60, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_'.-]*$", + "type": "string", + "description": "Use this field to specify the postal code of the shipping location", + "x-ballerina-name-ignore": "shipsFromPostalCode" + }, + "discount_amount": { + "allOf": [ + { + "$ref": "#/components/schemas/Money" + } + ], + "x-ballerina-name-ignore": "discountAmount" + }, + "shipping_address": { + "allOf": [ + { + "$ref": "#/components/schemas/AddressPortable" + } + ], + "x-ballerina-name-ignore": "shippingAddress" + }, + "line_items": { + "maxItems": 100, + "minItems": 1, + "type": "array", + "description": "A list of the items that were purchased with this payment. If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf", + "items": { + "$ref": "#/components/schemas/LineItem" + }, + "x-ballerina-name-ignore": "lineItems" + } + }, + "description": "The level 3 card processing data collections, If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf. Please contact your PayPal Technical Account Manager to define level 3 data for your business" + }, + "404Details": { + "anyOf": [ + { + "$ref": "#/components/schemas/INVALIDRESOURCEID" + } + ] + }, + "INVALIDIBAN1": { + "title": "INVALID_IBAN", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_IBAN"] + }, + "description": { + "type": "string", + "enum": ["IBAN provided is not a valid bank account number."] + } + } + }, + "AMOUNTNOTPATCHABLE": { + "title": "AMOUNT_NOT_PATCHABLE", + "properties": { + "issue": { + "type": "string", + "enum": ["AMOUNT_NOT_PATCHABLE"] + }, + "description": { + "type": "string", + "enum": [ + "The amount cannot be updated as the 'payer' has chosen and approved a specific financing offer for a given amount. Please Create a new Order with the updated Order amount and have the 'payer' approve the new payment terms." + ] + } + } + }, + "400Details": { + "anyOf": [ + { + "$ref": "#/components/schemas/INVALIDARRAYMAXITEMS" + }, + { + "$ref": "#/components/schemas/INVALIDARRAYMINITEMS" + }, + { + "$ref": "#/components/schemas/INVALIDCOUNTRYCODE" + }, + { + "$ref": "#/components/schemas/INVALIDPARAMETERSYNTAX" + }, + { + "$ref": "#/components/schemas/INVALIDSTRINGLENGTH" + }, + { + "$ref": "#/components/schemas/INVALIDPARAMETERVALUE" + }, + { + "$ref": "#/components/schemas/MISSINGREQUIREDPARAMETER" + }, + { + "$ref": "#/components/schemas/NOTSUPPORTED" + }, + { + "$ref": "#/components/schemas/PAYPALREQUESTIDREQUIRED" + }, + { + "$ref": "#/components/schemas/MALFORMEDREQUESTJSON" + } + ] + }, + "SHIPPINGOPTIONNOTSELECTED": { + "title": "SHIPPING_OPTION_NOT_SELECTED", + "properties": { + "issue": { + "type": "string", + "enum": ["SHIPPING_OPTION_NOT_SELECTED"] + }, + "description": { + "type": "string", + "enum": [ + "At least one of the shipping.option should be set to 'selected = true'." + ] + } + } + }, + "MERCHANTINITIATEDWITHSECURITYCODE": { + "title": "MERCHANT_INITIATED_WITH_SECURITY_CODE", + "properties": { + "issue": { + "type": "string", + "enum": ["MERCHANT_INITIATED_WITH_SECURITY_CODE"] + }, + "description": { + "type": "string", + "enum": [ + "`stored_payment_source.payment_initiator` = `MERCHANT` is not supported if `payment_source.card.security_code` is present in the order. `security_code` can be present in the order only when customer is the payment initiator. It is semantically incorrect to perform a merchant initiated payment with `security_code` is the order." + ] + } + } + }, + "StoreInVaultInstruction": { + "maxLength": 255, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "Defines how and when the payment source gets vaulted", + "enum": ["ON_SUCCESS"] + }, + "IBANCOUNTRYNOTSUPPORTED": { + "title": "IBAN_COUNTRY_NOT_SUPPORTED", + "properties": { + "issue": { + "type": "string", + "enum": ["IBAN_COUNTRY_NOT_SUPPORTED"] + }, + "description": { + "type": "string", + "enum": [ + "Country code of issuer bank for the provided IBAN is not supported for SEPA debit payments." + ] + } + } + }, + "INCOMPATIBLEPARAMETERVALUE": { + "title": "INCOMPATIBLE_PARAMETER_VALUE", + "properties": { + "issue": { + "type": "string", + "enum": ["INCOMPATIBLE_PARAMETER_VALUE"] + }, + "description": { + "type": "string", + "enum": [ + "The value of the field is incompatible/redundant with other fields in the order." + ] + } + } + }, + "PaypalWalletResponse": { + "title": "PayPal Wallet Response", + "type": "object", + "properties": { + "phone_type": { + "allOf": [ + { + "$ref": "#/components/schemas/PhoneType2" + } + ], + "x-ballerina-name-ignore": "phoneType" + }, + "email_address": { + "allOf": [ + { + "$ref": "#/components/schemas/Email" + } + ], + "x-ballerina-name-ignore": "emailAddress" + }, + "account_id": { + "allOf": [ + { + "$ref": "#/components/schemas/AccountId2" + } + ], + "x-ballerina-name-ignore": "accountId" + }, + "address": { + "$ref": "#/components/schemas/AddressPortable2" + }, + "tax_info": { + "allOf": [ + { + "$ref": "#/components/schemas/TaxInfo" + } + ], + "x-ballerina-name-ignore": "taxInfo" + }, + "birth_date": { + "allOf": [ + { + "$ref": "#/components/schemas/DateNoTime" + } + ], + "x-ballerina-name-ignore": "birthDate" + }, + "name": { + "$ref": "#/components/schemas/Name2" + }, + "phone_number": { + "allOf": [ + { + "$ref": "#/components/schemas/Phone2" + } + ], + "x-ballerina-name-ignore": "phoneNumber" + }, + "attributes": { + "$ref": "#/components/schemas/PaypalWalletAttributesResponse" + }, + "account_status": { + "maxLength": 255, + "minLength": 1, + "pattern": "^[A-Z_]+$", + "type": "string", + "description": "The account status indicates whether the buyer has verified the financial details associated with their PayPal account", + "readOnly": true, + "enum": ["VERIFIED", "UNVERIFIED"], + "x-ballerina-name-ignore": "accountStatus" + } + }, + "description": "The PayPal Wallet response" + }, + "CARDTYPENOTSUPPORTED": { + "title": "CARD_TYPE_NOT_SUPPORTED", + "properties": { + "issue": { + "type": "string", + "enum": ["CARD_TYPE_NOT_SUPPORTED"] + }, + "description": { + "type": "string", + "enum": [ + "Processing of this card type is not supported. Use another card type." + ] + } + } + }, + "REFERENCEDCARDEXPIRED": { + "title": "REFERENCED_CARD_EXPIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["REFERENCED_CARD_EXPIRED"] + }, + "description": { + "type": "string", + "enum": [ + "The card underlying the token has expired and hence cannot be used to process a payment." + ] + } + } + }, + "PayeePaymentMethodPreference": { + "maxLength": 255, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "The merchant-preferred payment methods", + "default": "UNRESTRICTED", + "enum": ["UNRESTRICTED", "IMMEDIATE_PAYMENT_REQUIRED"] + }, + "422Details": { + "anyOf": [ + { + "$ref": "#/components/schemas/AMOUNTMISMATCH" + }, + { + "$ref": "#/components/schemas/CANNOTBENEGATIVE" + }, + { + "$ref": "#/components/schemas/CANNOTBEZEROORNEGATIVE" + }, + { + "$ref": "#/components/schemas/CARDEXPIRED" + }, + { + "$ref": "#/components/schemas/MISSINGPREVIOUSREFERENCE" + }, + { + "$ref": "#/components/schemas/MISSINGCRYPTOGRAM" + }, + { + "$ref": "#/components/schemas/CITYREQUIRED" + }, + { + "$ref": "#/components/schemas/DECIMALPRECISION" + }, + { + "$ref": "#/components/schemas/DONATIONITEMSNOTSUPPORTED" + }, + { + "$ref": "#/components/schemas/DUPLICATEREFERENCEID" + }, + { + "$ref": "#/components/schemas/INVALIDCURRENCYCODE" + }, + { + "$ref": "#/components/schemas/INVALIDPAYERID" + }, + { + "$ref": "#/components/schemas/ITEMTOTALMISMATCH" + }, + { + "$ref": "#/components/schemas/ITEMTOTALREQUIRED" + }, + { + "$ref": "#/components/schemas/MAXVALUEEXCEEDED" + }, + { + "$ref": "#/components/schemas/MISSINGPICKUPADDRESS" + }, + { + "$ref": "#/components/schemas/MULTICURRENCYORDER" + }, + { + "$ref": "#/components/schemas/MULTIPLEITEMCATEGORIES" + }, + { + "$ref": "#/components/schemas/MULTIPLESHIPPINGADDRESSNOTSUPPORTED" + }, + { + "$ref": "#/components/schemas/MULTIPLESHIPPINGTYPENOTSUPPORTED" + }, + { + "$ref": "#/components/schemas/PAYEEACCOUNTINVALID" + }, + { + "$ref": "#/components/schemas/PAYEEACCOUNTLOCKEDORCLOSED" + }, + { + "$ref": "#/components/schemas/PAYEEACCOUNTRESTRICTED" + }, + { + "$ref": "#/components/schemas/PAYEEPRICINGTIERIDNOTENABLED" + }, + { + "$ref": "#/components/schemas/INVALIDPAYEEPRICINGTIERID" + }, + { + "$ref": "#/components/schemas/PAYEEFXRATEIDEXPIRED" + }, + { + "$ref": "#/components/schemas/PAYEEFXRATEIDCURRENCYMISMATCH" + }, + { + "$ref": "#/components/schemas/INVALIDFXRATEID" + }, + { + "$ref": "#/components/schemas/PLATFORMFEESNOTSUPPORTED" + }, + { + "$ref": "#/components/schemas/INVALIDPLATFORMFEESACCOUNT" + }, + { + "$ref": "#/components/schemas/INVALIDPLATFORMFEESAMOUNT" + }, + { + "$ref": "#/components/schemas/POSTALCODEREQUIRED" + }, + { + "$ref": "#/components/schemas/REFERENCEIDREQUIRED" + }, + { + "$ref": "#/components/schemas/SHIPPINGOPTIONSNOTSUPPORTED" + }, + { + "$ref": "#/components/schemas/TAXTOTALMISMATCH" + }, + { + "$ref": "#/components/schemas/TAXTOTALREQUIRED" + }, + { + "$ref": "#/components/schemas/UNSUPPORTEDINTENT" + }, + { + "$ref": "#/components/schemas/UNSUPPORTEDPAYMENTINSTRUCTION" + }, + { + "$ref": "#/components/schemas/SHIPPINGTYPENOTSUPPORTEDFORCLIENT" + }, + { + "$ref": "#/components/schemas/UNSUPPORTEDSHIPPINGTYPE" + }, + { + "$ref": "#/components/schemas/SHIPPINGOPTIONNOTSELECTED" + }, + { + "$ref": "#/components/schemas/SHIPPINGOPTIONSNOTSUPPORTED1" + }, + { + "$ref": "#/components/schemas/MULTIPLESHIPPINGOPTIONSELECTED" + }, + { + "$ref": "#/components/schemas/PREFERREDSHIPPINGOPTIONAMOUNTMISMATCH" + }, + { + "$ref": "#/components/schemas/AGREEMENTALREADYCANCELLED" + }, + { + "$ref": "#/components/schemas/BILLINGAGREEMENTNOTFOUND" + }, + { + "$ref": "#/components/schemas/COMPLIANCEVIOLATION" + }, + { + "$ref": "#/components/schemas/DOMESTICTRANSACTIONREQUIRED" + }, + { + "$ref": "#/components/schemas/DUPLICATEINVOICEID" + }, + { + "$ref": "#/components/schemas/INSTRUMENTDECLINED" + }, + { + "$ref": "#/components/schemas/MAXNUMBEROFPAYMENTATTEMPTSEXCEEDED" + }, + { + "$ref": "#/components/schemas/NOTENABLEDFORCARDPROCESSING1" + }, + { + "$ref": "#/components/schemas/PAYEEBLOCKEDTRANSACTION" + }, + { + "$ref": "#/components/schemas/PAYERACCOUNTLOCKEDORCLOSED" + }, + { + "$ref": "#/components/schemas/PAYERACCOUNTRESTRICTED" + }, + { + "$ref": "#/components/schemas/PAYERCANNOTPAY" + }, + { + "$ref": "#/components/schemas/TRANSACTIONBLOCKEDBYPAYEE" + }, + { + "$ref": "#/components/schemas/TRANSACTIONLIMITEXCEEDED" + }, + { + "$ref": "#/components/schemas/TRANSACTIONRECEIVINGLIMITEXCEEDED" + }, + { + "$ref": "#/components/schemas/TRANSACTIONREFUSED" + }, + { + "$ref": "#/components/schemas/AUTHCAPTURENOTENABLED" + }, + { + "$ref": "#/components/schemas/UNSUPPORTEDPROCESSINGINSTRUCTION" + }, + { + "$ref": "#/components/schemas/ORDERCOMPLETEONPAYMENTAPPROVAL" + }, + { + "$ref": "#/components/schemas/INVALIDEXPIRYDATE" + }, + { + "$ref": "#/components/schemas/INCOMPATIBLEPARAMETERVALUE" + }, + { + "$ref": "#/components/schemas/INVALIDPREVIOUSTRANSACTIONREFERENCE" + }, + { + "$ref": "#/components/schemas/PREVIOUSTRANSACTIONREFERENCEHASCHARGEBACK" + }, + { + "$ref": "#/components/schemas/PREVIOUSTRANSACTIONREFERENCEVOIDED" + }, + { + "$ref": "#/components/schemas/PAYMENTSOURCEMISMATCH" + }, + { + "$ref": "#/components/schemas/MERCHANTINITIATEDWITHSECURITYCODE" + }, + { + "$ref": "#/components/schemas/MERCHANTINITIATEDWITHAUTHENTICATIONRESULTS" + }, + { + "$ref": "#/components/schemas/MERCHANTINITIATEDWITHMULTIPLEPURCHASEUNITS" + }, + { + "$ref": "#/components/schemas/PAYMENTSOURCEINFOCANNOTBEVERIFIED" + }, + { + "$ref": "#/components/schemas/PAYMENTSOURCEDECLINEDBYPROCESSOR" + }, + { + "$ref": "#/components/schemas/PAYMENTSOURCECANNOTBEUSED" + }, + { + "$ref": "#/components/schemas/NOTENABLEDFORAPPLEPAY" + }, + { + "$ref": "#/components/schemas/NOTENABLEDFORGOOGLEPAY" + }, + { + "$ref": "#/components/schemas/APPLEPAYAMOUNTMISMATCH" + }, + { + "$ref": "#/components/schemas/BILLINGADDRESSINVALID" + }, + { + "$ref": "#/components/schemas/SHIPPINGADDRESSINVALID" + }, + { + "$ref": "#/components/schemas/VAULTINSTRUCTIONDUPLICATED" + }, + { + "$ref": "#/components/schemas/VAULTINSTRUCTIONREQUIRED" + }, + { + "$ref": "#/components/schemas/MISMATCHEDVAULTIDTOPAYMENTSOURCE" + }, + { + "$ref": "#/components/schemas/CRYPTOGRAMREQUIRED" + }, + { + "$ref": "#/components/schemas/EMVDATAREQUIRED" + }, + { + "$ref": "#/components/schemas/NOTELIGIBLEFORPNREFPROCESSING" + }, + { + "$ref": "#/components/schemas/NOTELIGIBLEFORPAYPALTRANSACTIONIDPROCESSING" + }, + { + "$ref": "#/components/schemas/PAYPALTRANSACTIONIDNOTFOUND" + }, + { + "$ref": "#/components/schemas/PNREFNOTFOUND" + }, + { + "$ref": "#/components/schemas/INVALIDSECURITYCODELENGTH" + }, + { + "$ref": "#/components/schemas/NOTENABLEDTOVAULTPAYMENTSOURCE" + }, + { + "$ref": "#/components/schemas/REQUIREDPARAMETERFORCUSTOMERINITIATEDPAYMENT" + }, + { + "$ref": "#/components/schemas/TOKENEXPIRED" + }, + { + "$ref": "#/components/schemas/INVALIDGOOGLEPAYTOKEN" + }, + { + "$ref": "#/components/schemas/GOOGLEPAYGATEWAYMERCHANTIDMISMATCH" + }, + { + "$ref": "#/components/schemas/CRYPTOGRAMREQUIRED1" + }, + { + "$ref": "#/components/schemas/ONEOFPARAMETERSREQUIRED" + }, + { + "$ref": "#/components/schemas/ALIASDECLINEDBYPROCESSOR" + }, + { + "$ref": "#/components/schemas/BLIKONECLICKMISSINGREQUIREDPARAMETER" + } + ] + }, + "AUTHORIZATIONCURRENCYMISMATCH": { + "title": "AUTHORIZATION_CURRENCY_MISMATCH", + "properties": { + "issue": { + "type": "string", + "enum": ["AUTHORIZATION_CURRENCY_MISMATCH"] + }, + "description": { + "type": "string", + "enum": [ + "The currency of the authorization should be same as that in which the Order was created and approved by the Payer. Please check the 'currency_code' and try again." + ] + } + } + }, + "IpAddress": { + "title": "IP Address", + "maxLength": 39, + "minLength": 7, + "pattern": "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^(([a-zA-Z]|[a-zA-Z][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z]|[A-Za-z][A-Za-z0-9\\-]*[A-Za-z0-9])$|^\\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))(%.+)?\\s*$", + "type": "string", + "description": "An Internet Protocol address (IP address). This address assigns a numerical label to each device that is connected to a computer network through the Internet Protocol. Supports IPv4 and IPv6 addresses", + "format": "ppaas_ip_address_v1" + }, + "PaymentInitiator": { + "maxLength": 255, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "The person or party who initiated or triggered the payment", + "enum": ["CUSTOMER", "MERCHANT"] + }, + "NOTELIGIBLEFORPAYPALTRANSACTIONIDPROCESSING": { + "title": "NOT_ELIGIBLE_FOR_PAYPAL_TRANSACTION_ID_PROCESSING", + "properties": { + "issue": { + "type": "string", + "enum": ["NOT_ELIGIBLE_FOR_PAYPAL_TRANSACTION_ID_PROCESSING"] + }, + "description": { + "type": "string", + "enum": [ + "API caller is not enable to process payments using `paypal_transaction_id`. Please contact customer support to request permissions to process transactions with PayPal transaction ID." + ] + } + } + }, + "PayerAllOf2": { + "properties": { + "name": { + "$ref": "#/components/schemas/Name" + }, + "phone": { + "$ref": "#/components/schemas/PhoneWithType" + }, + "birth_date": { + "$ref": "#/components/schemas/DateNoTime" + }, + "tax_info": { + "$ref": "#/components/schemas/TaxInfo" + }, + "address": { + "$ref": "#/components/schemas/AddressPortable" + } + } + }, + "AuthenticationFlow": {}, + "Tracker": { + "title": "Order Tracker Response.", + "type": "object", + "description": "The tracking response on creation of tracker", + "allOf": [ + { + "$ref": "#/components/schemas/TrackerAllOf1" + }, + { + "$ref": "#/components/schemas/ActivityTimestamps" + } + ] + }, + "CARDBRANDNOTSUPPORTED1": { + "title": "CARD_BRAND_NOT_SUPPORTED", + "properties": { + "issue": { + "type": "string", + "enum": ["CARD_BRAND_NOT_SUPPORTED"] + }, + "description": { + "type": "string", + "enum": [ + "Processing of this card brand is not supported. Please use another card to continue with this transaction." + ] + } + } + }, + "OrderTrackerRequest": { + "title": "Order Tracker Request.", + "type": "object", + "description": "The tracking details of an order", + "allOf": [ + { + "$ref": "#/components/schemas/ShipmentTracker" + }, + { + "$ref": "#/components/schemas/OrderTrackerRequestAllOf2" + } + ] + }, + "Email": { + "maxLength": 254, + "minLength": 3, + "pattern": "(?:[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*|(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?\\.)+[a-zA-Z0-9](?:[a-zA-Z0-9-]*[a-zA-Z0-9])?|\\[(?:(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9]))\\.){3}(?:(2(5[0-5]|[0-4][0-9])|1[0-9][0-9]|[1-9]?[0-9])|[a-zA-Z0-9-]*[a-zA-Z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])", + "type": "string", + "description": "The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.
", + "format": "merchant_common_email_address_v2" + }, + "CheckoutPaymentIntent": { + "title": "Checkout Payment Intent", + "type": "string", + "description": "The intent to either capture payment immediately or authorize a payment for an order after order creation", + "enum": ["CAPTURE", "AUTHORIZE"] + }, + "INSTRUMENTDECLINED": { + "title": "INSTRUMENT_DECLINED", + "properties": { + "issue": { + "type": "string", + "enum": ["INSTRUMENT_DECLINED"] + }, + "description": { + "type": "string", + "enum": [ + "The instrument presented was either declined by the processor or bank, or it can't be used for this payment." + ] + } + } + }, + "GOOGLEPAYGATEWAYMERCHANTIDMISMATCH1": { + "title": "GOOGLE_PAY_GATEWAY_MERCHANT_ID_MISMATCH", + "properties": { + "issue": { + "type": "string", + "enum": ["GOOGLE_PAY_GATEWAY_MERCHANT_ID_MISMATCH"] + }, + "description": { + "type": "string", + "enum": [ + "The gateway merchant ID in Google Pay token is not valid. This could be because the gateway merchant Id that was authorized by payer/buyer on Google Pay does not match with the API caller of the order." + ] + } + } + }, + "PAYMENTSOURCEDECLINEDBYPROCESSOR1": { + "title": "PAYMENT_SOURCE_DECLINED_BY_PROCESSOR", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYMENT_SOURCE_DECLINED_BY_PROCESSOR"] + }, + "description": { + "type": "string", + "enum": [ + "The provided payment source is declined by the processor. Please try again with a different payment source by creating a new order." + ] + } + } + }, + "NOTSUPPORTED": { + "title": "NOT_SUPPORTED", + "properties": { + "issue": { + "type": "string", + "enum": ["NOT_SUPPORTED"] + }, + "description": { + "type": "string", + "enum": ["This field is not currently supported."] + } + } + }, + "INVALIDPATCHOPERATION1": { + "title": "INVALID_PATCH_OPERATION", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_PATCH_OPERATION"] + }, + "description": { + "type": "string", + "enum": [ + "The operation cannot be honored. Cannot add a property that's already present, use replace. Cannot remove a property thats not present, use add. Cannot replace a property thats not present, use add." + ] + } + } + }, + "SHIPPINGOPTIONSNOTSUPPORTED": { + "title": "SHIPPING_OPTIONS_NOT_SUPPORTED", + "properties": { + "issue": { + "type": "string", + "enum": ["SHIPPING_OPTIONS_NOT_SUPPORTED"] + }, + "description": { + "type": "string", + "enum": [ + "Shipping options are not supported when `shipping.type` is specified or when 'application_context.shipping_preference' is set as 'NO_SHIPPING' or 'SET_PROVIDED_ADDRESS'." + ] + } + } + }, + "Enrolled": { + "maxLength": 255, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "Status of Authentication eligibility", + "enum": ["Y", "N", "U", "B"] + }, + "PNREFNOTFOUND": { + "title": "PNREF_NOT_FOUND", + "properties": { + "issue": { + "type": "string", + "enum": ["PNREF_NOT_FOUND"] + }, + "description": { + "type": "string", + "enum": [ + "Specified `pnref` was not found. Verify the value and try the request again." + ] + } + } + }, + "ORDERCOMPLETEONPAYMENTAPPROVAL": { + "title": "ORDER_COMPLETE_ON_PAYMENT_APPROVAL", + "properties": { + "issue": { + "type": "string", + "enum": ["ORDER_COMPLETE_ON_PAYMENT_APPROVAL"] + }, + "description": { + "type": "string", + "enum": [ + "A processing_instruction of `ORDER_COMPLETE_ON_PAYMENT_APPROVAL` is required for the specified payment_source. Please refer to the integration guide https://developer.paypal.com/docs/limited-release/alternative-payment-methods-with-orders/ for more details" + ] + } + } + }, + "BlikOneClickResponse": { + "title": "BLIK one-click payment object", + "type": "object", + "properties": { + "consumer_reference": { + "maxLength": 64, + "minLength": 3, + "pattern": "^[ -~]{3,64}$", + "type": "string", + "description": "The merchant generated, unique reference serving as a primary identifier for accounts connected between Blik and a merchant", + "x-ballerina-name-ignore": "consumerReference" + } + }, + "description": "Information used to pay using BLIK one-click flow" + }, + "PaymentSourceResponse": { + "title": "Payment Source", + "type": "object", + "properties": { + "giropay": { + "$ref": "#/components/schemas/Giropay" + }, + "bancontact": { + "$ref": "#/components/schemas/Bancontact" + }, + "blik": { + "$ref": "#/components/schemas/Blik" + }, + "ideal": { + "$ref": "#/components/schemas/Ideal" + }, + "p24": { + "$ref": "#/components/schemas/P24" + }, + "trustly": { + "$ref": "#/components/schemas/Trustly" + }, + "eps": { + "$ref": "#/components/schemas/Eps" + }, + "paypal": { + "$ref": "#/components/schemas/PaypalWalletResponse" + }, + "card": { + "$ref": "#/components/schemas/CardResponse" + }, + "sofort": { + "$ref": "#/components/schemas/Sofort" + }, + "mybank": { + "$ref": "#/components/schemas/Mybank" + }, + "venmo": { + "$ref": "#/components/schemas/VenmoWalletResponse" + } + }, + "description": "The payment source used to fund the payment" + }, + "Orderstrackerspatch403Details": { + "anyOf": [ + { + "$ref": "#/components/schemas/PERMISSIONDENIED4" + } + ] + }, + "Orderstrackerspatch404Details": { + "anyOf": [ + { + "$ref": "#/components/schemas/TRACKERIDNOTFOUND" + } + ] + }, + "INVALIDPATCHOPERATION": { + "title": "INVALID_PATCH_OPERATION", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_PATCH_OPERATION"] + }, + "description": { + "type": "string", + "enum": [ + "The operation cannot be honored. Cannot add a property that's already present, use replace. Cannot remove a property thats not present, use add. Cannot replace a property thats not present, use add." + ] + } + } + }, + "INVALIDPLATFORMFEESAMOUNT1": { + "title": "INVALID_PLATFORM_FEES_AMOUNT", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_PLATFORM_FEES_AMOUNT"] + }, + "description": { + "type": "string", + "enum": [ + "The platform_fees amount cannot be greater than order amount." + ] + } + } + }, + "INVALIDSTRINGLENGTH3": { + "title": "INVALID_STRING_LENGTH", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_STRING_LENGTH"] + }, + "description": { + "type": "string", + "enum": ["The value of a field is either too short or too long"] + } + } + }, + "INVALIDSTRINGLENGTH2": { + "title": "INVALID_STRING_LENGTH", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_STRING_LENGTH"] + }, + "description": { + "type": "string", + "enum": ["The value of a field is either too short or too long"] + } + } + }, + "INVALIDSTRINGLENGTH5": { + "title": "INVALID_STRING_LENGTH", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_STRING_LENGTH"] + }, + "description": { + "type": "string", + "enum": ["The value of a field is either too short or too long."] + } + } + }, + "INVALIDSTRINGLENGTH4": { + "title": "INVALID_STRING_LENGTH", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_STRING_LENGTH"] + }, + "description": { + "type": "string", + "enum": ["The value of a field is either too short or too long"] + } + } + }, + "AuthorizationStatusDetails": { + "title": "Auhorization Status Details", + "type": "object", + "properties": { + "reason": { + "maxLength": 24, + "minLength": 1, + "pattern": "^[A-Z_]+$", + "type": "string", + "description": "The reason why the authorized status is `PENDING`", + "enum": ["PENDING_REVIEW"] + } + }, + "description": "The details of the authorized payment status" + }, + "ThreeDSecureAuthenticationResponse": { + "title": "The 3D Secure Authentication Response", + "type": "object", + "properties": { + "authentication_status": { + "allOf": [ + { + "$ref": "#/components/schemas/ParesStatus" + } + ], + "x-ballerina-name-ignore": "authenticationStatus" + }, + "enrollment_status": { + "allOf": [ + { + "$ref": "#/components/schemas/Enrolled" + } + ], + "x-ballerina-name-ignore": "enrollmentStatus" + } + }, + "description": "Results of 3D Secure Authentication" + }, + "403Details": { + "anyOf": [ + { + "$ref": "#/components/schemas/PERMISSIONDENIED" + }, + { + "$ref": "#/components/schemas/NOTENABLEDFORCARDPROCESSING" + }, + { + "$ref": "#/components/schemas/PAYEEACCOUNTNOTVERIFIED" + } + ] + }, + "INVALIDSTRINGLENGTH1": { + "title": "INVALID_STRING_LENGTH", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_STRING_LENGTH"] + }, + "description": { + "type": "string", + "enum": ["The value of a field is either too short or too long"] + } + } + }, + "CARDEXPIRYREQUIRED2": { + "title": "CARD_EXPIRY_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["CARD_EXPIRY_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "The card expiry is required when attempting to process payment with card." + ] + } + } + }, + "StoredPaymentSourceUsageType": { + "maxLength": 255, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "Indicates if this is a `first` or `subsequent` payment using a stored payment source (also referred to as stored credential or card on file)", + "default": "DERIVED", + "enum": ["FIRST", "SUBSEQUENT", "DERIVED"] + }, + "PatchRequest": { + "title": "Patch Request", + "type": "array", + "description": "An array of JSON patch objects to apply partial updates to resources", + "items": { + "$ref": "#/components/schemas/Patch" + } + }, + "OrdersCapture422": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Orderscapture422Details" + } + } + } + }, + "INVALIDSTRINGLENGTH6": { + "title": "INVALID_STRING_LENGTH", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_STRING_LENGTH"] + }, + "description": { + "type": "string", + "enum": ["The value of a field is either too short or too long."] + } + } + }, + "OrderCaptureRequest": { + "title": "Order Capture Request", + "type": "object", + "properties": { + "payment_source": { + "allOf": [ + { + "$ref": "#/components/schemas/PaymentSource" + } + ], + "x-ballerina-name-ignore": "paymentSource" + } + }, + "description": "Completes an capture payment for an order" + }, + "InstrumentId": { + "maxLength": 256, + "minLength": 1, + "pattern": "^[A-Za-z0-9-_.+=]+$", + "type": "string", + "description": "The identifier of the instrument" + }, + "MERCHANTINITIATEDWITHAUTHENTICATIONRESULTS1": { + "title": "MERCHANT_INITIATED_WITH_AUTHENTICATION_RESULTS", + "properties": { + "issue": { + "type": "string", + "enum": ["MERCHANT_INITIATED_WITH_AUTHENTICATION_RESULTS"] + }, + "description": { + "type": "string", + "enum": [ + "`stored_payment_source.payment_initiator` = `MERCHANT` is not supported if 3D-Secure authentication results are present in the order. 3D-Secure authentication results can be present in the order only when customer is the payment initiator. It is semantically incorrect to perform a merchant initiated payment with 3D-Secure authentication results is the order." + ] + } + } + }, + "CANNOTBENEGATIVE1": { + "title": "CANNOT_BE_NEGATIVE", + "properties": { + "issue": { + "type": "string", + "enum": ["CANNOT_BE_NEGATIVE"] + }, + "description": { + "type": "string", + "enum": [ + "Must be greater than or equal to 0. If the currency supports decimals, only two decimal place precision is supported." + ] + } + } + }, + "MERCHANTINITIATEDWITHAUTHENTICATIONRESULTS2": { + "title": "MERCHANT_INITIATED_WITH_AUTHENTICATION_RESULTS", + "properties": { + "issue": { + "type": "string", + "enum": ["MERCHANT_INITIATED_WITH_AUTHENTICATION_RESULTS"] + }, + "description": { + "type": "string", + "enum": [ + "`stored_payment_source.payment_initiator` = `MERCHANT` is not supported if 3D-Secure authentication results are present in the order. 3D-Secure authentication results can be present in the order only when customer is the payment initiator. It is semantically incorrect to perform a merchant initiated payment with 3D-Secure authentication results is the order." + ] + } + } + }, + "ExperienceContextBase": { + "title": "Experience Context", + "type": "object", + "properties": { + "return_url": { + "allOf": [ + { + "$ref": "#/components/schemas/Url" + } + ], + "x-ballerina-name-ignore": "returnUrl" + }, + "brand_name": { + "maxLength": 127, + "minLength": 1, + "pattern": "^.*$", + "type": "string", + "description": "The label that overrides the business name in the PayPal account on the PayPal site. The pattern is defined by an external party and supports Unicode", + "x-ballerina-name-ignore": "brandName" + }, + "locale": { + "$ref": "#/components/schemas/Language" + }, + "cancel_url": { + "allOf": [ + { + "$ref": "#/components/schemas/Url" + } + ], + "x-ballerina-name-ignore": "cancelUrl" + }, + "shipping_preference": { + "maxLength": 24, + "minLength": 1, + "pattern": "^[A-Z_]+$", + "type": "string", + "description": "The location from which the shipping address is derived", + "default": "GET_FROM_FILE", + "enum": ["GET_FROM_FILE", "NO_SHIPPING", "SET_PROVIDED_ADDRESS"], + "x-ballerina-name-ignore": "shippingPreference" + } + }, + "description": "Customizes the payer experience during the approval process for the payment" + }, + "MISSINGCRYPTOGRAM1": { + "title": "MISSING_CRYPTOGRAM", + "properties": { + "issue": { + "type": "string", + "enum": ["MISSING_CRYPTOGRAM"] + }, + "description": { + "type": "string", + "enum": [ + "Cryptogram is mandatory for any customer initiated network token transactions." + ] + } + } + }, + "CARDEXPIRYREQUIRED1": { + "title": "CARD_EXPIRY_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["CARD_EXPIRY_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "The card expiry is required when attempting to process payment with card." + ] + } + } + }, + "MISSINGCRYPTOGRAM3": { + "title": "MISSING_CRYPTOGRAM", + "properties": { + "issue": { + "type": "string", + "enum": ["MISSING_CRYPTOGRAM"] + }, + "description": { + "type": "string", + "enum": [ + "Cryptogram is mandatory for any customer initiated network token transactions." + ] + } + } + }, + "MISSINGCRYPTOGRAM2": { + "title": "MISSING_CRYPTOGRAM", + "properties": { + "issue": { + "type": "string", + "enum": ["MISSING_CRYPTOGRAM"] + }, + "description": { + "type": "string", + "enum": [ + "Cryptogram is mandatory for any customer initiated network token transactions." + ] + } + } + }, + "ApplePayRequest": { + "title": "ApplePay payment request object", + "type": "object", + "properties": { + "email_address": { + "allOf": [ + { + "$ref": "#/components/schemas/EmailAddress" + } + ], + "x-ballerina-name-ignore": "emailAddress" + }, + "decrypted_token": { + "allOf": [ + { + "$ref": "#/components/schemas/ApplePayDecryptedTokenData" + } + ], + "x-ballerina-name-ignore": "decryptedToken" + }, + "stored_credential": { + "allOf": [ + { + "$ref": "#/components/schemas/CardStoredCredential" + } + ], + "x-ballerina-name-ignore": "storedCredential" + }, + "name": { + "$ref": "#/components/schemas/FullName" + }, + "phone_number": { + "allOf": [ + { + "$ref": "#/components/schemas/Phone" + } + ], + "x-ballerina-name-ignore": "phoneNumber" + }, + "attributes": { + "$ref": "#/components/schemas/ApplePayAttributes" + }, + "id": { + "maxLength": 250, + "minLength": 1, + "pattern": "^.*$", + "type": "string", + "description": "ApplePay transaction identifier, this will be the unique identifier for this transaction provided by Apple. The pattern is defined by an external party and supports Unicode" + }, + "vault_id": { + "allOf": [ + { + "$ref": "#/components/schemas/VaultId" + } + ], + "x-ballerina-name-ignore": "vaultId" + } + }, + "description": "Information needed to pay using ApplePay" + }, + "INVALIDSECURITYCODELENGTH2": { + "title": "INVALID_SECURITY_CODE_LENGTH", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_SECURITY_CODE_LENGTH"] + }, + "description": { + "type": "string", + "enum": [ + "The security_code length is invalid for the specified card brand." + ] + } + } + }, + "PAYEENOTENABLEDFORCARDPROCESSING": { + "title": "PAYEE_NOT_ENABLED_FOR_CARD_PROCESSING", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYEE_NOT_ENABLED_FOR_CARD_PROCESSING"] + }, + "description": { + "type": "string", + "enum": [ + "Payee account is not setup to be able to process card payments. Please contact PayPal customer support." + ] + } + } + }, + "INVALIDSECURITYCODELENGTH3": { + "title": "INVALID_SECURITY_CODE_LENGTH", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_SECURITY_CODE_LENGTH"] + }, + "description": { + "type": "string", + "enum": [ + "The security_code length is invalid for the specified card brand." + ] + } + } + }, + "INVALIDSECURITYCODELENGTH1": { + "title": "INVALID_SECURITY_CODE_LENGTH", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_SECURITY_CODE_LENGTH"] + }, + "description": { + "type": "string", + "enum": [ + "The security_code length is invalid for the specified card brand." + ] + } + } + }, + "PATCHVALUEREQUIRED1": { + "title": "PATCH_VALUE_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["PATCH_VALUE_REQUIRED"] + }, + "description": { + "type": "string", + "enum": ["Specify a `value` for the field being patched."] + } + } + }, + "Patch": { + "title": "Patch", + "required": ["op"], + "type": "object", + "properties": { + "op": { + "type": "string", + "description": "The operation", + "enum": ["add", "remove", "replace", "move", "copy", "test"] + }, + "path": { + "type": "string", + "description": "The JSON Pointer to the target document location at which to complete the operation" + }, + "from": { + "type": "string", + "description": "The JSON Pointer to the target document location from which to move the value. Required for the move operation" + }, + "value": { + "title": "Patch Value", + "description": "The value to apply. The remove, copy, and move operations do not require a value. Since JSON Patch allows any type for value, the type property is not specified" + } + }, + "description": "The JSON patch object to apply partial updates to resources" + }, + "INVALIDSECURITYCODELENGTH": { + "title": "INVALID_SECURITY_CODE_LENGTH", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_SECURITY_CODE_LENGTH"] + }, + "description": { + "type": "string", + "enum": [ + "The security_code length is invalid for the specified card brand." + ] + } + } + }, + "OrderAuthorizeRequest": { + "title": "Authorize Request", + "type": "object", + "properties": { + "payment_source": { + "allOf": [ + { + "$ref": "#/components/schemas/PaymentSource" + } + ], + "x-ballerina-name-ignore": "paymentSource" + } + }, + "description": "The authorization of an order request" + }, + "CURRENCYNOTSUPPORTEDFORBANK": { + "title": "CURRENCY_NOT_SUPPORTED_FOR_BANK", + "properties": { + "issue": { + "type": "string", + "enum": ["CURRENCY_NOT_SUPPORTED_FOR_BANK"] + }, + "description": { + "type": "string", + "enum": [ + "The payment_source does not support the currency of the Order. For ACH debit, only USD is supported and for SEPA debit, only EUR is supported." + ] + } + } + }, + "PaypalWalletVaultResponse": { + "title": "Saved PayPal Wallet Payment Source Response", + "type": "object", + "description": "The details about a saved PayPal Wallet payment source", + "allOf": [ + { + "$ref": "#/components/schemas/VaultResponse" + }, + { + "$ref": "#/components/schemas/PaypalWalletVaultResponseAllOf2" + }, + { + "type": "object", + "properties": { + "customer": { + "allOf": [ + { + "$ref": "#/components/schemas/Customer" + } + ], + "x-ballerina-name-ignore-ignore": "customer" + } + } + } + ] + }, + "TOKENIDNOTFOUND1": { + "title": "TOKEN_ID_NOT_FOUND", + "properties": { + "issue": { + "type": "string", + "enum": ["TOKEN_ID_NOT_FOUND"] + }, + "description": { + "type": "string", + "enum": [ + "Specified token was not found. Verify the token and try the request again." + ] + } + } + }, + "ProcessorResponse": { + "title": "Processor Response", + "type": "object", + "properties": { + "cvv_code": { + "type": "string", + "description": "The card verification value code for for Visa, Discover, Mastercard, or American Express", + "readOnly": true, + "enum": [ + "E", + "I", + "M", + "N", + "P", + "S", + "U", + "X", + "All others", + "0", + "1", + "2", + "3", + "4" + ], + "x-ballerina-name-ignore": "cvvCode" + }, + "response_code": { + "type": "string", + "description": "Processor response code for the non-PayPal payment processor errors", + "readOnly": true, + "enum": [ + "0000", + "00N7", + "0100", + "0390", + "0500", + "0580", + "0800", + "0880", + "0890", + "0960", + "0R00", + "1000", + "10BR", + "1300", + "1310", + "1312", + "1317", + "1320", + "1330", + "1335", + "1340", + "1350", + "1352", + "1360", + "1370", + "1380", + "1382", + "1384", + "1390", + "1393", + "5100", + "5110", + "5120", + "5130", + "5135", + "5140", + "5150", + "5160", + "5170", + "5180", + "5190", + "5200", + "5210", + "5400", + "5500", + "5650", + "5700", + "5710", + "5800", + "5900", + "5910", + "5920", + "5930", + "5950", + "6300", + "7600", + "7700", + "7710", + "7800", + "7900", + "8000", + "8010", + "8020", + "8030", + "8100", + "8110", + "8220", + "9100", + "9500", + "9510", + "9520", + "9530", + "9540", + "9600", + "PCNR", + "PCVV", + "PP06", + "PPRN", + "PPAD", + "PPAB", + "PPAE", + "PPAG", + "PPAI", + "PPAR", + "PPAU", + "PPAV", + "PPAX", + "PPBG", + "PPC2", + "PPCE", + "PPCO", + "PPCR", + "PPCT", + "PPCU", + "PPD3", + "PPDC", + "PPDI", + "PPDV", + "PPDT", + "PPEF", + "PPEL", + "PPER", + "PPEX", + "PPFE", + "PPFI", + "PPFR", + "PPFV", + "PPGR", + "PPH1", + "PPIF", + "PPII", + "PPIM", + "PPIT", + "PPLR", + "PPLS", + "PPMB", + "PPMC", + "PPMD", + "PPNC", + "PPNL", + "PPNM", + "PPNT", + "PPPH", + "PPPI", + "PPPM", + "PPQC", + "PPRE", + "PPRF", + "PPRR", + "PPS0", + "PPS1", + "PPS2", + "PPS3", + "PPS4", + "PPS5", + "PPS6", + "PPSC", + "PPSD", + "PPSE", + "PPTE", + "PPTF", + "PPTI", + "PPTR", + "PPTT", + "PPTV", + "PPUA", + "PPUC", + "PPUE", + "PPUI", + "PPUP", + "PPUR", + "PPVC", + "PPVE", + "PPVT" + ], + "x-ballerina-name-ignore": "responseCode" + }, + "payment_advice_code": { + "type": "string", + "description": "The declined payment transactions might have payment advice codes. The card networks, like Visa and Mastercard, return payment advice codes", + "readOnly": true, + "enum": ["01", "02", "03", "21"], + "x-ballerina-name-ignore": "paymentAdviceCode" + }, + "avs_code": { + "type": "string", + "description": "The address verification code for Visa, Discover, Mastercard, or American Express transactions", + "readOnly": true, + "enum": [ + "A", + "B", + "C", + "D", + "E", + "F", + "G", + "I", + "M", + "N", + "P", + "R", + "S", + "U", + "W", + "X", + "Y", + "Z", + "Null", + "0", + "1", + "2", + "3", + "4" + ], + "x-ballerina-name-ignore": "avsCode" + } + }, + "description": "The processor response information for payment requests, such as direct credit card transactions" + }, + "NetworkTransactionReference": { + "title": "Network Transaction Reference", + "required": ["id"], + "type": "object", + "properties": { + "date": { + "maxLength": 4, + "minLength": 4, + "pattern": "^[0-9]+$", + "type": "string", + "description": "The date that the transaction was authorized by the scheme. This field may not be returned for all networks. MasterCard refers to this field as \"BankNet reference date" + }, + "acquirer_reference_number": { + "maxLength": 36, + "minLength": 1, + "pattern": "^[a-zA-Z0-9]+$", + "type": "string", + "description": "Reference ID issued for the card transaction. This ID can be used to track the transaction across processors, card brands and issuing banks", + "x-ballerina-name-ignore": "acquirerReferenceNumber" + }, + "id": { + "maxLength": 36, + "minLength": 9, + "pattern": "^[a-zA-Z0-9-_@.:&+=*^'~#!$%()]+$", + "type": "string", + "description": "Transaction reference id returned by the scheme. For Visa and Amex, this is the \"Tran id\" field in response. For MasterCard, this is the \"BankNet reference id\" field in response. For Discover, this is the \"NRID\" field in response. The pattern we expect for this field from Visa/Amex/CB/Discover is numeric, Mastercard/BNPP is alphanumeric and Paysecure is alphanumeric with special character -" + }, + "network": { + "$ref": "#/components/schemas/CardBrand" + } + }, + "description": "Reference values used by the card network to identify a transaction" + }, + "INVALIDPREVIOUSTRANSACTIONREFERENCE2": { + "title": "INVALID_PREVIOUS_TRANSACTION_REFERENCE", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_PREVIOUS_TRANSACTION_REFERENCE"] + }, + "description": { + "type": "string", + "enum": [ + "The authorization or capture referenced by `previous_transaction_reference` is not valid. This could be either because the previous_transaction_reference is not found or doesn't belong to the payee. Please use a valid `previous_transaction_reference`." + ] + } + } + }, + "ITEMTOTALMISMATCH1": { + "title": "ITEM_TOTAL_MISMATCH", + "properties": { + "issue": { + "type": "string", + "enum": ["ITEM_TOTAL_MISMATCH"] + }, + "description": { + "type": "string", + "enum": [ + "Should equal sum of (unit_amount * quantity) across all items for a given purchase_unit." + ] + } + } + }, + "INVALIDPREVIOUSTRANSACTIONREFERENCE1": { + "title": "INVALID_PREVIOUS_TRANSACTION_REFERENCE", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_PREVIOUS_TRANSACTION_REFERENCE"] + }, + "description": { + "type": "string", + "enum": [ + "The authorization or capture referenced by `previous_transaction_reference` is not valid. This could be either because the previous_transaction_reference is not found or doesn't belong to the payee. Please use a valid `previous_transaction_reference`." + ] + } + } + }, + "VAULTINSTRUCTIONREQUIRED": { + "title": "VAULT_INSTRUCTION_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["VAULT_INSTRUCTION_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "Vault instruction is required. Please use `vault.store_in_vault` to provide vault instruction." + ] + } + } + }, + "RETURNURLREQUIRED": { + "title": "RETURN_URL_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["RETURN_URL_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "The return url is required when attempting to vault this source." + ] + } + } + }, + "PNREFEXPIRED": { + "title": "PNREF_EXPIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["PNREF_EXPIRED"] + }, + "description": { + "type": "string", + "enum": [ + "Specified `pnref` has expired. PNREF expires 15 months after the date of the initial transaction." + ] + } + } + }, + "Level2CardProcessingData": { + "title": "Level 2 Card Processing Data", + "type": "object", + "properties": { + "tax_total": { + "allOf": [ + { + "$ref": "#/components/schemas/Money" + } + ], + "x-ballerina-name-ignore": "taxTotal" + }, + "invoice_id": { + "maxLength": 17, + "minLength": 1, + "pattern": "^[\\w‘\\-.,\":;\\!?]*$", + "type": "string", + "description": "Use this field to pass a purchase identification value of up to 12 ASCII characters for AIB and 17 ASCII characters for all other processors", + "x-ballerina-name-ignore": "invoiceId" + } + }, + "description": "The level 2 card processing data collections. If your merchant account has been configured for Level 2 processing this field will be passed to the processor on your behalf. Please contact your PayPal Technical Account Manager to define level 2 data for your business" + }, + "AmountWithBreakdown": { + "title": "Amount with Breakdown", + "type": "object", + "description": "The total order amount with an optional breakdown that provides details, such as the total item amount, total tax amount, shipping, handling, insurance, and discounts, if any.
If you specify `amount.breakdown`, the amount equals `item_total` plus `tax_total` plus `shipping` plus `handling` plus `insurance` minus `shipping_discount` minus discount.
The amount must be a positive number. For listed of supported currencies and decimal precision, see the PayPal REST APIs Currency Codes", + "allOf": [ + { + "$ref": "#/components/schemas/Money" + }, + { + "$ref": "#/components/schemas/AmountWithBreakdownAllOf2" + } + ] + }, + "Money": { + "title": "Money", + "required": ["currency_code", "value"], + "type": "object", + "properties": { + "value": { + "maxLength": 32, + "pattern": "^((-?[0-9]+)|(-?([0-9]+)?[.][0-9]+))$", + "type": "string", + "description": "The value, which might be:
  • An integer for currencies like `JPY` that are not typically fractional.
  • A decimal fraction for currencies like `TND` that are subdivided into thousandths.
For the required number of decimal places for a currency code, see [Currency Codes](/api/rest/reference/currency-codes/)" + }, + "currency_code": { + "allOf": [ + { + "$ref": "#/components/schemas/CurrencyCode" + } + ], + "x-ballerina-name-ignore": "currencyCode" + } + }, + "description": "The currency and amount for a financial transaction, such as a balance or payment due" + }, + "VaultVenmoWalletBase": { + "title": "Vaulted Venmo Wallet Common Attributes", + "required": ["usage_type"], + "type": "object", + "description": "Resource consolidating common request and response attirbutes for vaulting Venmo Wallet", + "allOf": [ + { + "$ref": "#/components/schemas/V3VaultInstructionBase" + }, + { + "$ref": "#/components/schemas/VaultVenmoWalletBaseAllOf2" + } + ] + }, + "Language": { + "maxLength": 10, + "minLength": 2, + "pattern": "^[a-z]{2}(?:-[A-Z][a-z]{3})?(?:-(?:[A-Z]{2}|[0-9]{3}))?$", + "type": "string", + "description": "The [language tag](https://tools.ietf.org/html/bcp47#section-2) for the language in which to localize the error-related strings, such as messages, issues, and suggested actions. The tag is made up of the [ISO 639-2 language code](https://www.loc.gov/standards/iso639-2/php/code_list.php), the optional [ISO-15924 script tag](https://www.unicode.org/iso15924/codelists.html), and the [ISO-3166 alpha-2 country code](/api/rest/reference/country-codes/) or [M49 region code](https://unstats.un.org/unsd/methodology/m49/)", + "format": "ppaas_common_language_v3" + }, + "INVALIDEXPIRYDATE1": { + "title": "INVALID_EXPIRY_DATE", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_EXPIRY_DATE"] + }, + "description": { + "type": "string", + "enum": [ + "Expiry date is invalid. Expiry date should be a date in future and within the threshold for the payment source." + ] + } + } + }, + "INVALIDPARAMETER": { + "title": "INVALID_PARAMETER", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_PARAMETER"] + }, + "description": { + "type": "string", + "enum": ["Cannot be specified as part of the request."] + } + } + }, + "AUTHCAPTURENOTENABLED1": { + "title": "AUTH_CAPTURE_NOT_ENABLED", + "properties": { + "issue": { + "type": "string", + "enum": ["AUTH_CAPTURE_NOT_ENABLED"] + }, + "description": { + "type": "string", + "enum": [ + "Authorization and Capture feature is not enabled for the merchant. Make sure that the recipient of the funds is a verified business account." + ] + } + } + }, + "Bic": { + "title": "BIC", + "maxLength": 11, + "minLength": 8, + "pattern": "^[A-Z-a-z0-9]{4}[A-Z-a-z]{2}[A-Z-a-z0-9]{2}([A-Z-a-z0-9]{3})?$", + "type": "string", + "description": "The business identification code (BIC). In payments systems, a BIC is used to identify a specific business, most commonly a bank" + }, + "AuthorizationWithAdditionalData": { + "title": "Authorization with Additional Data", + "type": "object", + "description": "The authorization with additional payment details, such as risk assessment and processor response. These details are populated only for certain payment methods", + "allOf": [ + { + "$ref": "#/components/schemas/Authorization" + }, + { + "$ref": "#/components/schemas/AuthorizationWithAdditionalDataAllOf2" + } + ] + }, + "AUTHCAPTURENOTENABLED2": { + "title": "AUTH_CAPTURE_NOT_ENABLED", + "properties": { + "issue": { + "type": "string", + "enum": ["AUTH_CAPTURE_NOT_ENABLED"] + }, + "description": { + "type": "string", + "enum": [ + "Authorization and Capture feature is not enabled for the merchant. Make sure that the recipient of the funds is a verified business account." + ] + } + } + }, + "IBANCOUNTRYNOTSUPPORTED1": { + "title": "IBAN_COUNTRY_NOT_SUPPORTED", + "properties": { + "issue": { + "type": "string", + "enum": ["IBAN_COUNTRY_NOT_SUPPORTED"] + }, + "description": { + "type": "string", + "enum": [ + "Country code of issuer bank for the provided IBAN is not supported for SEPA debit payments." + ] + } + } + }, + "INVALIDJSONPOINTERFORMAT": { + "title": "INVALID_JSON_POINTER_FORMAT", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_JSON_POINTER_FORMAT"] + }, + "description": { + "type": "string", + "enum": [ + "Path should be a valid JSON Pointer https://tools.ietf.org/html/rfc6901 that references a location within the request where the operation is performed." + ] + } + } + }, + "UNSUPPORTEDPROCESSINGINSTRUCTION": { + "title": "UNSUPPORTED_PROCESSING_INSTRUCTION", + "properties": { + "issue": { + "type": "string", + "enum": ["UNSUPPORTED_PROCESSING_INSTRUCTION"] + }, + "description": { + "type": "string", + "enum": [ + "The specified processing_instruction is not supported for the given payment_source. Please refer to https://developer.paypal.com/api/orders/v2/#definition-processing_instruction for the list of payment_source that can be specified with this value." + ] + } + } + }, + "UNSUPPORTEDINTENT1": { + "title": "UNSUPPORTED_INTENT", + "properties": { + "issue": { + "type": "string", + "enum": ["UNSUPPORTED_INTENT"] + }, + "description": { + "type": "string", + "enum": [ + "`intent=AUTHORIZE` is not supported for multiple purchase units. Only `intent=CAPTURE` is supported." + ] + } + } + }, + "OrdersCapture403": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Orderscapture403Details" + } + } + } + }, + "CURRENCYNOTSUPPORTEDFORCOUNTRY": { + "title": "CURRENCY_NOT_SUPPORTED_FOR_COUNTRY", + "properties": { + "issue": { + "type": "string", + "enum": ["CURRENCY_NOT_SUPPORTED_FOR_COUNTRY"] + }, + "description": { + "type": "string", + "enum": [ + " For the payment_source specified, the currency of the Order is restricted by the country in which the payee account is based. Please refer https://developer.paypal.com/api/rest/reference/currency-codes/ for list of supported currency codes." + ] + } + } + }, + "AGREEMENTALREADYCANCELLED": { + "title": "AGREEMENT_ALREADY_CANCELLED", + "properties": { + "issue": { + "type": "string", + "enum": ["AGREEMENT_ALREADY_CANCELLED"] + }, + "description": { + "type": "string", + "enum": ["The requested agreement is already canceled."] + } + } + }, + "OrdersCapture400": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Orderscapture400Details" + } + } + } + }, + "MERCHANTINITIATEDWITHAUTHENTICATIONRESULTS": { + "title": "MERCHANT_INITIATED_WITH_AUTHENTICATION_RESULTS", + "properties": { + "issue": { + "type": "string", + "enum": ["MERCHANT_INITIATED_WITH_AUTHENTICATION_RESULTS"] + }, + "description": { + "type": "string", + "enum": [ + "`stored_payment_source.payment_initiator` = `MERCHANT` is not supported if 3D-Secure authentication results are present in the order. 3D-Secure authentication results can be present in the order only when customer is the payment initiator. It is semantically incorrect to perform a merchant initiated payment with 3D-Secure authentication results is the order." + ] + } + } + }, + "PAYMENTSOURCEDECLINEDBYPROCESSOR": { + "title": "PAYMENT_SOURCE_DECLINED_BY_PROCESSOR", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYMENT_SOURCE_DECLINED_BY_PROCESSOR"] + }, + "description": { + "type": "string", + "enum": [ + "The provided payment source is declined by the processor. Please try again with a different payment source by creating a new order." + ] + } + } + }, + "VenmoWalletAttributesResponse": { + "title": "Venmo Wallet Attributes Response", + "type": "object", + "properties": { + "vault": { + "$ref": "#/components/schemas/VaultResponse" + } + }, + "description": "Additional attributes associated with the use of a Venmo Wallet" + }, + "PREFERREDPAYMENTSOURCEMISMATCH1": { + "title": "PREFERRED_PAYMENT_SOURCE_MISMATCH", + "properties": { + "issue": { + "type": "string", + "enum": ["PREFERRED_PAYMENT_SOURCE_MISMATCH"] + }, + "description": { + "type": "string", + "enum": [ + "Payment Source must exactly match the Preferred Payment Source that was provided during order creation." + ] + } + } + }, + "INVALIDCURRENCYCODE1": { + "title": "INVALID_CURRENCY_CODE", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_CURRENCY_CODE"] + }, + "description": { + "type": "string", + "enum": [ + "Currency code is invalid or is not currently supported. Please refer https://developer.paypal.com/api/rest/reference/currency-codes/ for list of supported currency codes." + ] + } + } + }, + "MerchantPayableBreakdown": { + "title": "Merchant Payable Breakdown", + "type": "object", + "properties": { + "platform_fees": { + "maxItems": 1, + "minItems": 0, + "type": "array", + "description": "An array of platform or partner fees, commissions, or brokerage fees for the refund", + "items": { + "$ref": "#/components/schemas/PlatformFee" + }, + "x-ballerina-name-ignore": "platformFees" + }, + "net_amount_in_receivable_currency": { + "allOf": [ + { + "$ref": "#/components/schemas/Money" + } + ], + "x-ballerina-name-ignore": "netAmountInReceivableCurrency" + }, + "total_refunded_amount": { + "allOf": [ + { + "$ref": "#/components/schemas/Money" + } + ], + "x-ballerina-name-ignore": "totalRefundedAmount" + }, + "paypal_fee": { + "allOf": [ + { + "$ref": "#/components/schemas/Money" + } + ], + "x-ballerina-name-ignore": "paypalFee" + }, + "gross_amount": { + "allOf": [ + { + "$ref": "#/components/schemas/Money" + } + ], + "x-ballerina-name-ignore": "grossAmount" + }, + "paypal_fee_in_receivable_currency": { + "allOf": [ + { + "$ref": "#/components/schemas/Money" + } + ], + "x-ballerina-name-ignore": "paypalFeeInReceivableCurrency" + }, + "net_amount": { + "allOf": [ + { + "$ref": "#/components/schemas/Money" + } + ], + "x-ballerina-name-ignore": "netAmount" + }, + "net_amount_breakdown": { + "type": "array", + "description": "An array of breakdown values for the net amount. Returned when the currency of the refund is different from the currency of the PayPal account where the payee holds their funds", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/NetAmountBreakdownItem" + }, + "x-ballerina-name-ignore": "netAmountBreakdown" + } + }, + "description": "The breakdown of the refund", + "readOnly": true + }, + "REFERENCEIDNOTFOUND": { + "title": "REFERENCE_ID_NOT_FOUND", + "properties": { + "issue": { + "type": "string", + "enum": ["REFERENCE_ID_NOT_FOUND"] + }, + "description": { + "type": "string", + "enum": [ + "Filter expression value is incorrect. Please check the value of the reference_id and try again." + ] + } + } + }, + "ParesStatus": { + "maxLength": 255, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "Transactions status result identifier. The outcome of the issuer's authentication", + "enum": ["Y", "N", "U", "A", "C", "R", "D", "I"] + }, + "Error503": { + "title": "Service Unavailable Error", + "type": "object", + "properties": { + "debug_id": { + "type": "string", + "description": "The PayPal internal ID. Used for correlation purposes", + "x-ballerina-name-ignore": "debugId" + }, + "name": { + "type": "string", + "enum": ["SERVICE_UNAVAILABLE"] + }, + "links": { + "maxItems": 10000, + "minItems": 0, + "type": "array", + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS)", + "items": { + "$ref": "#/components/schemas/ErrorLinkDescription" + } + }, + "message": { + "type": "string", + "enum": ["Service Unavailable."] + } + }, + "description": "The server is temporarily unable to handle the request, for example, because of planned maintenance or downtime", + "example": { + "name": "SERVICE_UNAVAILABLE", + "message": "Service Unavailable.", + "debug_id": "90957fca61718", + "information_link": "https://developer.paypal.com/docs/api/orders/v2/#error-SERVICE_UNAVAILABLE" + } + }, + "INVALIDPARAMETERSYNTAX": { + "title": "INVALID_PARAMETER_SYNTAX", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_PARAMETER_SYNTAX"] + }, + "description": { + "type": "string", + "enum": [ + "The value of a field does not conform to the expected format." + ] + } + } + }, + "MERCHANTINITIATEDWITHMULTIPLEPURCHASEUNITS": { + "title": "MERCHANT_INITIATED_WITH_MULTIPLE_PURCHASE_UNITS", + "properties": { + "issue": { + "type": "string", + "enum": ["MERCHANT_INITIATED_WITH_MULTIPLE_PURCHASE_UNITS"] + }, + "description": { + "type": "string", + "enum": [ + "`stored_payment_source.payment_initiator` = `MERCHANT` is not supported if more than one purchase_unit is present in the Order. Merchant initiated payments are not supported from orders with more than one purchase_unit. Please retry the request with multiple Order requests (one for each purchase_unit)." + ] + } + } + }, + "Bancontact": { + "title": "Bancontact payment object", + "type": "object", + "properties": { + "country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/CountryCode" + } + ], + "x-ballerina-name-ignore": "countryCode" + }, + "name": { + "$ref": "#/components/schemas/FullName" + }, + "attributes": { + "$ref": "#/components/schemas/AltpayRecurringAttributes" + }, + "card_last_digits": { + "maxLength": 4, + "minLength": 4, + "pattern": "[0-9]{4}", + "type": "string", + "description": "The last digits of the card used to fund the Bancontact payment", + "x-ballerina-name-ignore": "cardLastDigits" + }, + "bic": { + "$ref": "#/components/schemas/Bic" + }, + "iban_last_chars": { + "allOf": [ + { + "$ref": "#/components/schemas/IbanLastChars" + } + ], + "x-ballerina-name-ignore": "ibanLastChars" + } + }, + "description": "Information used to pay Bancontact" + }, + "LineItemAllOf2": { + "properties": { + "commodity_code": { + "maxLength": 12, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_'.-]*$", + "type": "string", + "description": "Code used to classify items purchased and track the total amount spent across various categories of products and services. Different corporate purchasing organizations may use different standards, but the United Nations Standard Products and Services Code (UNSPSC) is frequently used." + }, + "discount_amount": { + "$ref": "#/components/schemas/Money" + }, + "total_amount": { + "$ref": "#/components/schemas/Money" + }, + "unit_of_measure": { + "maxLength": 12, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_'.-]*$", + "type": "string", + "description": "Unit of measure is a standard used to express the magnitude of a quantity in international trade. Most commonly used (but not limited to) examples are: Acre (ACR), Ampere (AMP), Centigram (CGM), Centimetre (CMT), Cubic inch (INQ), Cubic metre (MTQ), Fluid ounce (OZA), Foot (FOT), Hour (HUR), Item (ITM), Kilogram (KGM), Kilometre (KMT), Kilowatt (KWT), Liquid gallon (GLL), Liter (LTR), Pounds (LBS), Square foot (FTK)." + } + } + }, + "INVALIDEXPIRYDATE": { + "title": "INVALID_EXPIRY_DATE", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_EXPIRY_DATE"] + }, + "description": { + "type": "string", + "enum": [ + "Expiry date is invalid. Expiry date should be a date in future and within the threshold for the payment source." + ] + } + } + }, + "P24Request": { + "title": "P24 payment object", + "required": ["country_code", "email", "name"], + "type": "object", + "properties": { + "experience_context": { + "allOf": [ + { + "$ref": "#/components/schemas/ExperienceContextBase" + } + ], + "x-ballerina-name-ignore": "experienceContext" + }, + "country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/CountryCode" + } + ], + "x-ballerina-name-ignore": "countryCode" + }, + "name": { + "$ref": "#/components/schemas/FullName" + }, + "email": { + "$ref": "#/components/schemas/EmailAddress" + } + }, + "description": "Information needed to pay using P24 (Przelewy24)" + }, + "PaymentCollection": { + "title": "Payment Collection", + "type": "object", + "properties": { + "captures": { + "type": "array", + "description": "An array of captured payments for a purchase unit. A purchase unit can have zero or more captured payments", + "items": { + "$ref": "#/components/schemas/Capture" + } + }, + "authorizations": { + "type": "array", + "description": "An array of authorized payments for a purchase unit. A purchase unit can have zero or more authorized payments", + "items": { + "$ref": "#/components/schemas/AuthorizationWithAdditionalData" + } + }, + "refunds": { + "type": "array", + "description": "An array of refunds for a purchase unit. A purchase unit can have zero or more refunds", + "items": { + "$ref": "#/components/schemas/Refund" + } + } + }, + "description": "The collection of payments, or transactions, for a purchase unit in an order. For example, authorized payments, captured payments, and refunds" + }, + "PaymentSource": { + "title": "Payment Source", + "type": "object", + "properties": { + "giropay": { + "$ref": "#/components/schemas/GiropayRequest" + }, + "blik": { + "$ref": "#/components/schemas/BlikRequest" + }, + "ideal": { + "$ref": "#/components/schemas/IdealRequest" + }, + "google_pay": { + "allOf": [ + { + "$ref": "#/components/schemas/GooglePayRequest" + } + ], + "x-ballerina-name-ignore": "googlePay" + }, + "trustly": { + "$ref": "#/components/schemas/TrustlyRequest" + }, + "eps": { + "$ref": "#/components/schemas/EpsRequest" + }, + "sofort": { + "$ref": "#/components/schemas/SofortRequest" + }, + "token": { + "$ref": "#/components/schemas/Token" + }, + "venmo": { + "$ref": "#/components/schemas/VenmoWalletRequest" + }, + "apple_pay": { + "allOf": [ + { + "$ref": "#/components/schemas/ApplePayRequest" + } + ], + "x-ballerina-name-ignore": "applePay" + }, + "bancontact": { + "$ref": "#/components/schemas/BancontactRequest" + }, + "p24": { + "$ref": "#/components/schemas/P24Request" + }, + "paypal": { + "$ref": "#/components/schemas/PaypalWallet" + }, + "card": { + "$ref": "#/components/schemas/CardRequest" + }, + "mybank": { + "$ref": "#/components/schemas/MybankRequest" + } + }, + "description": "The payment source definition" + }, + "Eps": { + "title": "An eps payment object", + "type": "object", + "properties": { + "country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/CountryCode" + } + ], + "x-ballerina-name-ignore": "countryCode" + }, + "name": { + "$ref": "#/components/schemas/FullName" + }, + "bic": { + "$ref": "#/components/schemas/Bic" + } + }, + "description": "Information used to pay using eps" + }, + "Token": { + "title": "Token", + "required": ["id", "type"], + "type": "object", + "properties": { + "id": { + "maxLength": 255, + "minLength": 1, + "pattern": "^[0-9a-zA-Z_-]+$", + "type": "string", + "description": "The PayPal-generated ID for the token" + }, + "type": { + "maxLength": 255, + "minLength": 1, + "pattern": "^[0-9A-Z_-]+$", + "type": "string", + "description": "The tokenization method that generated the ID", + "enum": ["BILLING_AGREEMENT"] + } + }, + "description": "The tokenized payment source to fund a payment" + }, + "CardBrand": { + "title": "Card Brand", + "maxLength": 255, + "minLength": 1, + "pattern": "^[A-Z_]+$", + "type": "string", + "description": "The card network or brand. Applies to credit, debit, gift, and payment cards", + "enum": [ + "VISA", + "MASTERCARD", + "DISCOVER", + "AMEX", + "SOLO", + "JCB", + "STAR", + "DELTA", + "SWITCH", + "MAESTRO", + "CB_NATIONALE", + "CONFIGOGA", + "CONFIDIS", + "ELECTRON", + "CETELEM", + "CHINA_UNION_PAY" + ] + }, + "CARDEXPIRED": { + "title": "CARD_EXPIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["CARD_EXPIRED"] + }, + "description": { + "type": "string", + "enum": ["The card is expired"] + } + } + }, + "PATCHPATHREQUIRED1": { + "title": "PATCH_PATH_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["PATCH_PATH_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "Specify a `value` for the field in which the operation needs to be performed." + ] + } + } + }, + "OrdersTrackersPatch404": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Orderstrackerspatch404Details" + } + } + } + }, + "PAYPALREQUESTIDREQUIRED": { + "title": "PAYPAL_REQUEST_ID_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYPAL_REQUEST_ID_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "A PayPal-Request-Id is required if you are trying to process payment for an Order. Please specify a PayPal-Request-Id or Create the Order without a 'payment_source' specified." + ] + } + } + }, + "CURRENCYNOTSUPPORTEDFORBANK1": { + "title": "CURRENCY_NOT_SUPPORTED_FOR_BANK", + "properties": { + "issue": { + "type": "string", + "enum": ["CURRENCY_NOT_SUPPORTED_FOR_BANK"] + }, + "description": { + "type": "string", + "enum": [ + "The payment_source does not support the currency of the Order. For ACH debit, only USD is supported and for SEPA debit, only EUR is supported." + ] + } + } + }, + "INVALIDPICKUPADDRESS": { + "title": "INVALID_PICKUP_ADDRESS", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_PICKUP_ADDRESS"] + }, + "description": { + "type": "string", + "enum": [ + "If the 'shipping_option.type' is set as 'PICKUP' then the 'shipping_detail.name.full_name' should start with 'S2S' meaning Ship To Store. Example: 'S2S My Store'." + ] + } + } + }, + "OrderTrackerRequestAllOf2": { + "required": ["capture_id"], + "properties": { + "capture_id": { + "maxLength": 50, + "minLength": 1, + "pattern": "^[a-zA-Z0-9]*$", + "type": "string", + "description": "The PayPal capture ID." + }, + "notify_payer": { + "type": "boolean", + "description": "If true, sends an email notification to the payer of the PayPal transaction. The email contains the tracking information that was uploaded through the API.", + "default": false + }, + "items": { + "type": "array", + "description": "An array of details of items in the shipment.", + "items": { + "$ref": "#/components/schemas/TrackerItem" + } + } + } + }, + "DateTime": { + "maxLength": 64, + "minLength": 20, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])[T,t]([0-1][0-9]|2[0-3]):[0-5][0-9]:([0-5][0-9]|60)([.][0-9]+)?([Zz]|[+-][0-9]{2}:[0-9]{2})$", + "type": "string", + "description": "The date and time, in [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6). Seconds are required while fractional seconds are optional.
Note: The regular expression provides guidance but does not reject all invalid dates.
", + "format": "ppaas_date_time_v3" + }, + "OrdersTrackCreate403": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Orderstrackcreate403Details" + } + } + } + }, + "OrdersTrackersPatch403": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Orderstrackerspatch403Details" + } + } + } + }, + "TaxInfo": { + "title": "Tax Information", + "required": ["tax_id", "tax_id_type"], + "type": "object", + "properties": { + "tax_id_type": { + "maxLength": 14, + "minLength": 1, + "pattern": "^[A-Z0-9_]+$", + "type": "string", + "description": "The customer's tax ID type", + "enum": ["BR_CPF", "BR_CNPJ"], + "x-ballerina-name-ignore": "taxIdType" + }, + "tax_id": { + "maxLength": 14, + "minLength": 1, + "pattern": "([a-zA-Z0-9])", + "type": "string", + "description": "The customer's tax ID value", + "x-ballerina-name-ignore": "taxId" + } + }, + "description": "The tax ID of the customer. The customer is also known as the payer. Both `tax_id` and `tax_id_type` are required" + }, + "OrdersTrackCreate400": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Orderstrackcreate400Details" + } + } + } + }, + "OrdersTrackersPatch400": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Orderstrackerspatch400Details" + } + } + } + }, + "TRACKERIDNOTFOUND": { + "title": "TRACKER_ID_NOT_FOUND", + "properties": { + "issue": { + "type": "string", + "enum": ["TRACKER_ID_NOT_FOUND"] + }, + "description": { + "type": "string", + "enum": [ + "Specified tracker ID does not exist. Check the tracker ID and try again." + ] + } + } + }, + "INVALIDPARAMETERSYNTAX5": { + "title": "INVALID_PARAMETER_SYNTAX", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_PARAMETER_SYNTAX"] + }, + "description": { + "type": "string", + "enum": [ + "The value of a field does not conform to the expected format." + ] + } + } + }, + "SHIPPINGADDRESSINVALID1": { + "title": "SHIPPING_ADDRESS_INVALID", + "properties": { + "issue": { + "type": "string", + "enum": ["SHIPPING_ADDRESS_INVALID"] + }, + "description": { + "type": "string", + "enum": ["Provided shipping address is invalid."] + } + } + }, + "SHIPPINGADDRESSINVALID2": { + "title": "SHIPPING_ADDRESS_INVALID", + "properties": { + "issue": { + "type": "string", + "enum": ["SHIPPING_ADDRESS_INVALID"] + }, + "description": { + "type": "string", + "enum": ["Provided shipping address is invalid."] + } + } + }, + "Error500": { + "title": "Internal Server Error", + "type": "object", + "properties": { + "debug_id": { + "type": "string", + "description": "The PayPal internal ID. Used for correlation purposes", + "x-ballerina-name-ignore": "debugId" + }, + "name": { + "type": "string", + "enum": ["INTERNAL_SERVER_ERROR"] + }, + "links": { + "maxItems": 10000, + "minItems": 0, + "type": "array", + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS)", + "items": { + "$ref": "#/components/schemas/ErrorLinkDescription" + } + }, + "message": { + "type": "string", + "enum": ["An internal server error occurred."] + } + }, + "description": "This is either a system or application error, and generally indicates that although the client appeared to provide a correct request, something unexpected has gone wrong on the server", + "example": { + "name": "INTERNAL_SERVER_ERROR", + "message": "An internal server error occurred.", + "debug_id": "90957fca61718", + "links": [ + { + "href": "https://developer.paypal.com/api/orders/v2/#error-INTERNAL_SERVER_ERROR", + "rel": "information_link" + } + ] + } + }, + "SHIPPINGADDRESSINVALID3": { + "title": "SHIPPING_ADDRESS_INVALID", + "properties": { + "issue": { + "type": "string", + "enum": ["SHIPPING_ADDRESS_INVALID"] + }, + "description": { + "type": "string", + "enum": ["Provided shipping address is invalid."] + } + } + }, + "MAXVALUEEXCEEDED": { + "title": "MAX_VALUE_EXCEEDED", + "properties": { + "issue": { + "type": "string", + "enum": ["MAX_VALUE_EXCEEDED"] + }, + "description": { + "type": "string", + "enum": ["Should be less than or equal to 999999999999999.99."] + } + } + }, + "INVALIDPARAMETERSYNTAX3": { + "title": "INVALID_PARAMETER_SYNTAX", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_PARAMETER_SYNTAX"] + }, + "description": { + "type": "string", + "enum": [ + "The value of a field does not conform to the expected format." + ] + } + } + }, + "REQUIREDPARAMETERFORCUSTOMERINITIATEDPAYMENT": { + "title": "REQUIRED_PARAMETER_FOR_CUSTOMER_INITIATED_PAYMENT", + "properties": { + "issue": { + "type": "string", + "enum": ["REQUIRED_PARAMETER_FOR_CUSTOMER_INITIATED_PAYMENT"] + }, + "description": { + "type": "string", + "enum": [ + "This parameter is required when the customer is present. If the customer is not present, indicate so by sending payment_initiator=`MERCHANT`. For details, see Stored Credential." + ] + } + } + }, + "INVALIDPARAMETERSYNTAX4": { + "title": "INVALID_PARAMETER_SYNTAX", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_PARAMETER_SYNTAX"] + }, + "description": { + "type": "string", + "enum": [ + "The value of a field does not conform to the expected format." + ] + } + } + }, + "INVALIDPARAMETERSYNTAX1": { + "title": "INVALID_PARAMETER_SYNTAX", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_PARAMETER_SYNTAX"] + }, + "description": { + "type": "string", + "enum": [ + "The value of a field does not conform to the expected format." + ] + } + } + }, + "INVALIDPARAMETERSYNTAX2": { + "title": "INVALID_PARAMETER_SYNTAX", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_PARAMETER_SYNTAX"] + }, + "description": { + "type": "string", + "enum": [ + "The value of the field does not conform to the expected format." + ] + } + } + }, + "ShippingWithTrackingDetailsAllOf2": { + "properties": { + "trackers": { + "type": "array", + "description": "An array of trackers for a transaction.", + "items": { + "$ref": "#/components/schemas/Tracker" + } + } + } + }, + "MSPNOTSUPPORTED": { + "title": "MSP_NOT_SUPPORTED", + "properties": { + "issue": { + "type": "string", + "enum": ["MSP_NOT_SUPPORTED"] + }, + "description": { + "type": "string", + "enum": [ + "Multiple purchase units are not supported for this operation." + ] + } + } + }, + "EmailAddress": { + "maxLength": 254, + "minLength": 3, + "pattern": "^(?:[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[A-Za-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?\\.)+[A-Za-z0-9](?:[A-Za-z0-9-]*[A-Za-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[A-Za-z0-9-]*[A-Za-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])+)\\])$", + "type": "string", + "description": "The internationalized email address.
Note: Up to 64 characters are allowed before and 255 characters are allowed after the @ sign. However, the generally accepted maximum length for an email address is 254 characters. The pattern verifies that an unquoted @ sign exists.
", + "format": "ppaas_common_email_address_v2" + }, + "PAYMENTSOURCECANNOTBEUSED1": { + "title": "PAYMENT_SOURCE_CANNOT_BE_USED", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYMENT_SOURCE_CANNOT_BE_USED"] + }, + "description": { + "type": "string", + "enum": [ + "The provided payment source cannot be used to pay for the order. Please try again with a different payment source by creating a new order." + ] + } + } + }, + "EMVDATAREQUIRED": { + "title": "EMV_DATA_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["EMV_DATA_REQUIRED"] + }, + "description": { + "type": "string", + "enum": ["EMV Data is required if authentication method is EMV."] + } + } + }, + "ShipmentTrackingStatus": { + "title": "Shipment Tracking Status.", + "maxLength": 64, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "The status of the item shipment. For allowed values, see Shipping Statuses", + "enum": [ + "CANCELLED", + "DELIVERED", + "LOCAL_PICKUP", + "ON_HOLD", + "SHIPPED", + "SHIPMENT_CREATED", + "DROPPED_OFF", + "IN_TRANSIT", + "RETURNED", + "LABEL_PRINTED", + "ERROR", + "UNCONFIRMED", + "PICKUP_FAILED", + "DELIVERY_DELAYED", + "DELIVERY_SCHEDULED", + "DELIVERY_FAILED", + "INRETURN", + "IN_PROCESS", + "NEW", + "VOID", + "PROCESSED", + "NOT_SHIPPED", + "COMPLETED" + ] + }, + "PREVIOUSTRANSACTIONREFERENCEVOIDED": { + "title": "PREVIOUS_TRANSACTION_REFERENCE_VOIDED", + "properties": { + "issue": { + "type": "string", + "enum": ["PREVIOUS_TRANSACTION_REFERENCE_VOIDED"] + }, + "description": { + "type": "string", + "enum": [ + "The status of authorization referenced by `previous_transaction_reference` is `VOIDED` and hence cannot be used for this order. Please use a `previous_transaction_reference` whose status is not `VOIDED`." + ] + } + } + }, + "ProcessingInstruction": { + "title": "Processing Instruction", + "maxLength": 36, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "The instruction to process an order", + "default": "NO_INSTRUCTION", + "enum": ["ORDER_COMPLETE_ON_PAYMENT_APPROVAL", "NO_INSTRUCTION"] + }, + "Error404": { + "title": "Not found Error", + "type": "object", + "properties": { + "debug_id": { + "type": "string", + "description": "The PayPal internal ID. Used for correlation purposes", + "x-ballerina-name-ignore": "debugId" + }, + "name": { + "type": "string", + "enum": ["RESOURCE_NOT_FOUND"] + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ErrorDetails" + } + }, + "links": { + "maxItems": 10000, + "minItems": 0, + "type": "array", + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS)", + "items": { + "$ref": "#/components/schemas/ErrorLinkDescription" + } + }, + "message": { + "type": "string", + "enum": ["The specified resource does not exist."] + } + }, + "description": "The server has not found anything matching the request URI. This either means that the URI is incorrect or the resource is not available" + }, + "SupplementaryData": { + "title": "Supplementary Data", + "type": "object", + "properties": { + "card": { + "$ref": "#/components/schemas/CardSupplementaryData" + } + }, + "description": "Supplementary data about a payment. This object passes information that can be used to improve risk assessments and processing costs, for example, by providing Level 2 and Level 3 payment data" + }, + "BancontactRequest": { + "title": "Bancontact payment object", + "required": ["country_code", "name"], + "type": "object", + "properties": { + "experience_context": { + "allOf": [ + { + "$ref": "#/components/schemas/ExperienceContextBase" + } + ], + "x-ballerina-name-ignore": "experienceContext" + }, + "country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/CountryCode" + } + ], + "x-ballerina-name-ignore": "countryCode" + }, + "name": { + "$ref": "#/components/schemas/FullName" + }, + "attributes": { + "$ref": "#/components/schemas/AltpayRecurringAttributesRequest" + } + }, + "description": "Information needed to pay using Bancontact" + }, + "REQUIREDPARAMETERFORPAYMENTSOURCE": { + "title": "REQUIRED_PARAMETER_FOR_PAYMENT_SOURCE", + "properties": { + "issue": { + "type": "string", + "enum": ["REQUIRED_PARAMETER_FOR_PAYMENT_SOURCE"] + }, + "description": { + "type": "string", + "enum": ["The parameter is required for provided payment source."] + } + } + }, + "MISSINGREQUIREDPARAMETER5": { + "title": "MISSING_REQUIRED_PARAMETER", + "properties": { + "issue": { + "type": "string", + "enum": ["MISSING_REQUIRED_PARAMETER"] + }, + "description": { + "type": "string", + "enum": ["A required field / parameter is missing."] + } + } + }, + "Error409": { + "title": "Resource Conflict Error", + "type": "object", + "properties": { + "debug_id": { + "type": "string", + "description": "The PayPal internal ID. Used for correlation purposes", + "x-ballerina-name-ignore": "debugId" + }, + "name": { + "type": "string", + "enum": ["RESOURCE_CONFLICT"] + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ErrorDetails" + } + }, + "links": { + "maxItems": 10000, + "minItems": 0, + "type": "array", + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS)", + "items": { + "$ref": "#/components/schemas/ErrorLinkDescription" + } + }, + "message": { + "type": "string", + "enum": [ + "The server has detected a conflict while processing this request." + ] + } + }, + "description": "The server has detected a conflict while processing this request" + }, + "MISSINGREQUIREDPARAMETER4": { + "title": "MISSING_REQUIRED_PARAMETER", + "properties": { + "issue": { + "type": "string", + "enum": ["MISSING_REQUIRED_PARAMETER"] + }, + "description": { + "type": "string", + "enum": ["A required field / parameter is missing"] + } + } + }, + "PAYERCANNOTPAY": { + "title": "PAYER_CANNOT_PAY", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYER_CANNOT_PAY"] + }, + "description": { + "type": "string", + "enum": [ + "Combination of payer and payee settings mean that this buyer cannot pay this seller." + ] + } + } + }, + "BlikOneClick": { + "title": "BLIK one-click payment object", + "required": ["consumer_reference"], + "type": "object", + "properties": { + "consumer_reference": { + "maxLength": 64, + "minLength": 3, + "pattern": "^[ -~]{3,64}$", + "type": "string", + "description": "The merchant generated, unique reference serving as a primary identifier for accounts connected between Blik and a merchant", + "x-ballerina-name-ignore": "consumerReference" + }, + "alias_key": { + "maxLength": 19, + "minLength": 1, + "pattern": "^[0-9]+$", + "type": "string", + "description": "A Blik-defined identifier for a specific Blik-enabled bank account that is associated with a given merchant. Used only in conjunction with a Consumer Reference", + "x-ballerina-name-ignore": "aliasKey" + }, + "alias_label": { + "maxLength": 35, + "minLength": 8, + "pattern": "^[ -~]{8,35}$", + "type": "string", + "description": "A bank defined identifier used as a display name to allow the payer to differentiate between multiple registered bank accounts", + "x-ballerina-name-ignore": "aliasLabel" + }, + "auth_code": { + "maxLength": 6, + "minLength": 6, + "pattern": "^[0-9]{6}$", + "type": "string", + "description": "The 6-digit code used to authenticate a consumer within BLIK", + "x-ballerina-name-ignore": "authCode" + } + }, + "description": "Information used to pay using BLIK one-click flow" + }, + "MISSINGREQUIREDPARAMETER6": { + "title": "MISSING_REQUIRED_PARAMETER", + "properties": { + "issue": { + "type": "string", + "enum": ["MISSING_REQUIRED_PARAMETER"] + }, + "description": { + "type": "string", + "enum": ["A required field or parameter is missing."] + } + } + }, + "PaypalWalletCustomer": { + "title": "Customer information based on PayPal's system of record", + "type": "object", + "description": "The details about a customer in PayPal's system of record", + "allOf": [ + { + "$ref": "#/components/schemas/Customer" + }, + { + "$ref": "#/components/schemas/PaypalWalletCustomerAllOf2" + } + ] + }, + "Url": { + "type": "string", + "description": "Describes the URL", + "format": "uri" + }, + "VaultPaypalWalletBase": { + "title": "Vaulted PayPal Wallet Common Attributes", + "required": ["usage_type"], + "type": "object", + "description": "Resource consolidating common request and response attributes for vaulting PayPal Wallet", + "allOf": [ + { + "$ref": "#/components/schemas/VaultInstructionBase" + }, + { + "$ref": "#/components/schemas/VaultPaypalWalletBaseAllOf2" + } + ] + }, + "Authorization": { + "title": "Authorization", + "type": "object", + "description": "The authorized payment transaction", + "allOf": [ + { + "$ref": "#/components/schemas/AuthorizationStatus" + }, + { + "$ref": "#/components/schemas/AuthorizationAllOf2" + }, + { + "$ref": "#/components/schemas/ActivityTimestamps" + } + ] + }, + "Orderscapture422Details": { + "anyOf": [ + { + "$ref": "#/components/schemas/AGREEMENTALREADYCANCELLED2" + }, + { + "$ref": "#/components/schemas/BILLINGAGREEMENTNOTFOUND2" + }, + { + "$ref": "#/components/schemas/DECLINEDDUETORELATEDTXN1" + }, + { + "$ref": "#/components/schemas/MISSINGPREVIOUSREFERENCE3" + }, + { + "$ref": "#/components/schemas/MISSINGCRYPTOGRAM3" + }, + { + "$ref": "#/components/schemas/CARDBRANDNOTSUPPORTED1" + }, + { + "$ref": "#/components/schemas/COMPLIANCEVIOLATION1" + }, + { + "$ref": "#/components/schemas/DOMESTICTRANSACTIONREQUIRED2" + }, + { + "$ref": "#/components/schemas/DUPLICATEINVOICEID2" + }, + { + "$ref": "#/components/schemas/INSTRUMENTDECLINED1" + }, + { + "$ref": "#/components/schemas/ORDERNOTAPPROVED1" + }, + { + "$ref": "#/components/schemas/MAXNUMBEROFPAYMENTATTEMPTSEXCEEDED2" + }, + { + "$ref": "#/components/schemas/PAYEEBLOCKEDTRANSACTION2" + }, + { + "$ref": "#/components/schemas/PAYEEFXRATEIDEXPIRED3" + }, + { + "$ref": "#/components/schemas/PAYERACCOUNTLOCKEDORCLOSED2" + }, + { + "$ref": "#/components/schemas/PAYERACCOUNTRESTRICTED2" + }, + { + "$ref": "#/components/schemas/PAYERCANNOTPAY2" + }, + { + "$ref": "#/components/schemas/PAYPALTRANSACTIONIDEXPIRED1" + }, + { + "$ref": "#/components/schemas/PNREFEXPIRED1" + }, + { + "$ref": "#/components/schemas/REFERENCEDCARDEXPIRED1" + }, + { + "$ref": "#/components/schemas/TOKENIDNOTFOUND1" + }, + { + "$ref": "#/components/schemas/TRANSACTIONLIMITEXCEEDED3" + }, + { + "$ref": "#/components/schemas/TRANSACTIONRECEIVINGLIMITEXCEEDED2" + }, + { + "$ref": "#/components/schemas/TRANSACTIONREFUSED2" + }, + { + "$ref": "#/components/schemas/REDIRECTPAYERFORALTERNATEFUNDING" + }, + { + "$ref": "#/components/schemas/ORDERALREADYCAPTURED1" + }, + { + "$ref": "#/components/schemas/TRANSACTIONBLOCKEDBYPAYEE1" + }, + { + "$ref": "#/components/schemas/AUTHCAPTURENOTENABLED2" + }, + { + "$ref": "#/components/schemas/NOTENABLEDFORBANKPROCESSING" + }, + { + "$ref": "#/components/schemas/NOTENABLEDFORCARDPROCESSING2" + }, + { + "$ref": "#/components/schemas/PAYEENOTENABLEDFORBANKPROCESSING" + }, + { + "$ref": "#/components/schemas/PAYEENOTENABLEDFORCARDPROCESSING" + }, + { + "$ref": "#/components/schemas/INVALIDPICKUPADDRESS1" + }, + { + "$ref": "#/components/schemas/SHIPPINGADDRESSINVALID3" + }, + { + "$ref": "#/components/schemas/PAYMENTSOURCENOTSUPPORTED" + }, + { + "$ref": "#/components/schemas/ORDERCOMPLETIONINPROGRESS" + }, + { + "$ref": "#/components/schemas/BILLINGAGREEMENTIDMISMATCH1" + }, + { + "$ref": "#/components/schemas/PREFERREDPAYMENTSOURCEMISMATCH1" + }, + { + "$ref": "#/components/schemas/INCOMPATIBLEPARAMETERVALUE3" + }, + { + "$ref": "#/components/schemas/INVALIDPREVIOUSTRANSACTIONREFERENCE2" + }, + { + "$ref": "#/components/schemas/PREVIOUSTRANSACTIONREFERENCEHASCHARGEBACK2" + }, + { + "$ref": "#/components/schemas/PREVIOUSTRANSACTIONREFERENCEVOIDED2" + }, + { + "$ref": "#/components/schemas/PAYMENTSOURCEMISMATCH2" + }, + { + "$ref": "#/components/schemas/MERCHANTINITIATEDWITHSECURITYCODE2" + }, + { + "$ref": "#/components/schemas/MERCHANTINITIATEDWITHAUTHENTICATIONRESULTS2" + }, + { + "$ref": "#/components/schemas/MERCHANTINITIATEDWITHMULTIPLEPURCHASEUNITS2" + }, + { + "$ref": "#/components/schemas/RETURNURLREQUIRED2" + }, + { + "$ref": "#/components/schemas/CANCELURLREQUIRED2" + }, + { + "$ref": "#/components/schemas/SETUPERRORFORBANK1" + }, + { + "$ref": "#/components/schemas/BANKNOTSUPPORTEDFORVERIFICATION1" + }, + { + "$ref": "#/components/schemas/PAYERACTIONREQUIRED1" + }, + { + "$ref": "#/components/schemas/APPLEPAYAMOUNTMISMATCH3" + }, + { + "$ref": "#/components/schemas/CURRENCYNOTSUPPORTEDFORBANK1" + }, + { + "$ref": "#/components/schemas/ONLYONEBANKSOURCEALLOWED1" + }, + { + "$ref": "#/components/schemas/INVALIDIBAN1" + }, + { + "$ref": "#/components/schemas/IBANCOUNTRYNOTSUPPORTED1" + }, + { + "$ref": "#/components/schemas/CARDNUMBERREQUIRED2" + }, + { + "$ref": "#/components/schemas/CARDEXPIRYREQUIRED2" + }, + { + "$ref": "#/components/schemas/VAULTINSTRUCTIONREQUIRED3" + }, + { + "$ref": "#/components/schemas/MISMATCHEDVAULTIDTOPAYMENTSOURCE3" + }, + { + "$ref": "#/components/schemas/NOTELIGIBLEFORPNREFPROCESSING3" + }, + { + "$ref": "#/components/schemas/NOTELIGIBLEFORPAYPALTRANSACTIONIDPROCESSING3" + }, + { + "$ref": "#/components/schemas/PAYPALTRANSACTIONIDNOTFOUND3" + }, + { + "$ref": "#/components/schemas/PNREFNOTFOUND3" + }, + { + "$ref": "#/components/schemas/INVALIDSECURITYCODELENGTH3" + }, + { + "$ref": "#/components/schemas/PLATFORMFEEPAYEECANNOTBESAMEASPAYER" + }, + { + "$ref": "#/components/schemas/REQUIREDPARAMETERFORCUSTOMERINITIATEDPAYMENT3" + }, + { + "$ref": "#/components/schemas/IDENTIFIERNOTFOUND" + } + ] + }, + "ONLYONEBANKSOURCEALLOWED": { + "title": "ONLY_ONE_BANK_SOURCE_ALLOWED", + "properties": { + "issue": { + "type": "string", + "enum": ["ONLY_ONE_BANK_SOURCE_ALLOWED"] + }, + "description": { + "type": "string", + "enum": [ + "More than one payment method within the bank payment object is not supported." + ] + } + } + }, + "CITYREQUIRED1": { + "title": "CITY_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["CITY_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "The specified country requires a city (address.admin_area_2)." + ] + } + } + }, + "DUPLICATEREFERENCEID1": { + "title": "DUPLICATE_REFERENCE_ID", + "properties": { + "issue": { + "type": "string", + "enum": ["DUPLICATE_REFERENCE_ID"] + }, + "description": { + "type": "string", + "enum": [ + "`reference_id` must be unique if multiple `purchase_unit` are provided." + ] + } + } + }, + "OrdersTrackCreate422": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Orderstrackcreate422Details" + } + } + } + }, + "MISSINGREQUIREDPARAMETER1": { + "title": "MISSING_REQUIRED_PARAMETER", + "properties": { + "issue": { + "type": "string", + "enum": ["MISSING_REQUIRED_PARAMETER"] + }, + "description": { + "type": "string", + "enum": ["A required field / parameter is missing."] + } + } + }, + "MISSINGPICKUPADDRESS": { + "title": "MISSING_PICKUP_ADDRESS", + "properties": { + "issue": { + "type": "string", + "enum": ["MISSING_PICKUP_ADDRESS"] + }, + "description": { + "type": "string", + "enum": [ + "A pickup address(`shipping.address`) is required for the provided `shipping.type`." + ] + } + } + }, + "MISSINGREQUIREDPARAMETER3": { + "title": "MISSING_REQUIRED_PARAMETER", + "properties": { + "issue": { + "type": "string", + "enum": ["MISSING_REQUIRED_PARAMETER"] + }, + "description": { + "type": "string", + "enum": ["A required field / parameter is missing"] + } + } + }, + "MISSINGREQUIREDPARAMETER2": { + "title": "MISSING_REQUIRED_PARAMETER", + "properties": { + "issue": { + "type": "string", + "enum": ["MISSING_REQUIRED_PARAMETER"] + }, + "description": { + "type": "string", + "enum": ["A required field / parameter is missing"] + } + } + }, + "Error400": { + "title": "Bad Request Error", + "type": "object", + "properties": { + "debug_id": { + "type": "string", + "description": "The PayPal internal ID. Used for correlation purposes", + "x-ballerina-name-ignore": "debugId" + }, + "name": { + "type": "string", + "enum": ["INVALID_REQUEST"] + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ErrorDetails" + } + }, + "links": { + "maxItems": 10000, + "minItems": 0, + "type": "array", + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS)", + "items": { + "$ref": "#/components/schemas/ErrorLinkDescription" + } + }, + "message": { + "type": "string", + "enum": [ + "Request is not well-formed, syntactically incorrect, or violates schema." + ] + } + }, + "description": "Request is not well-formed, syntactically incorrect, or violates schema" + }, + "Orderscapture400Details": { + "anyOf": [ + { + "$ref": "#/components/schemas/INVALIDPARAMETERVALUE4" + }, + { + "$ref": "#/components/schemas/MISSINGREQUIREDPARAMETER4" + }, + { + "$ref": "#/components/schemas/INVALIDSTRINGLENGTH4" + }, + { + "$ref": "#/components/schemas/INVALIDPARAMETERSYNTAX4" + }, + { + "$ref": "#/components/schemas/MALFORMEDREQUESTJSON4" + } + ] + }, + "Error401": { + "title": "Unauthorized Error", + "type": "object", + "properties": { + "debug_id": { + "type": "string", + "description": "The PayPal internal ID. Used for correlation purposes", + "x-ballerina-name-ignore": "debugId" + }, + "name": { + "type": "string", + "enum": ["AUTHENTICATION_FAILURE"] + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ErrorDetails" + } + }, + "links": { + "maxItems": 10000, + "minItems": 0, + "type": "array", + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS)", + "items": { + "$ref": "#/components/schemas/ErrorLinkDescription" + } + }, + "message": { + "type": "string", + "enum": [ + "Authentication failed due to missing authorization header, or invalid authentication credentials." + ] + } + }, + "description": "Authentication failed due to missing Authorization header, or invalid authentication credentials" + }, + "PREFERREDSHIPPINGOPTIONAMOUNTMISMATCH": { + "title": "PREFERRED_SHIPPING_OPTION_AMOUNT_MISMATCH", + "properties": { + "issue": { + "type": "string", + "enum": ["PREFERRED_SHIPPING_OPTION_AMOUNT_MISMATCH"] + }, + "description": { + "type": "string", + "enum": [ + "The amount provided in the preferred shipping option should match the amount provided in amount breakdown" + ] + } + } + }, + "Error403": { + "title": "Not Authorized Error", + "type": "object", + "properties": { + "debug_id": { + "type": "string", + "description": "The PayPal internal ID. Used for correlation purposes", + "x-ballerina-name-ignore": "debugId" + }, + "name": { + "type": "string", + "enum": ["NOT_AUTHORIZED"] + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ErrorDetails" + } + }, + "links": { + "maxItems": 10000, + "minItems": 0, + "type": "array", + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS)", + "items": { + "$ref": "#/components/schemas/ErrorLinkDescription" + } + }, + "message": { + "type": "string", + "enum": ["Authorization failed due to insufficient permissions."] + } + }, + "description": "The client is not authorized to access this resource, although it may have valid credentials. " + }, + "Error415": { + "title": "Unsupported Media Type Error", + "type": "object", + "properties": { + "debug_id": { + "type": "string", + "description": "The PayPal internal ID. Used for correlation purposes", + "x-ballerina-name-ignore": "debugId" + }, + "name": { + "type": "string", + "enum": ["UNSUPPORTED_MEDIA_TYPE"] + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ErrorDetails" + } + }, + "links": { + "maxItems": 10000, + "minItems": 0, + "type": "array", + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS)", + "items": { + "$ref": "#/components/schemas/ErrorLinkDescription" + } + }, + "message": { + "type": "string", + "enum": [ + "The server does not support the request payload's media type." + ] + } + }, + "description": "The server does not support the request payload's media type" + }, + "PAYEEACCOUNTLOCKEDORCLOSED1": { + "title": "PAYEE_ACCOUNT_LOCKED_OR_CLOSED", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYEE_ACCOUNT_LOCKED_OR_CLOSED"] + }, + "description": { + "type": "string", + "enum": ["The merchant account is locked or closed."] + } + } + }, + "NOTELIGIBLEFORTOKENPROCESSING1": { + "title": "NOT_ELIGIBLE_FOR_TOKEN_PROCESSING", + "properties": { + "issue": { + "type": "string", + "enum": ["NOT_ELIGIBLE_FOR_TOKEN_PROCESSING"] + }, + "description": { + "type": "string", + "enum": [ + "API caller is not enabled to process payments with the specified type of token. Please contact customer support to request permissions to process transactions with this type of token." + ] + } + } + }, + "SETUPERRORFORBANK1": { + "title": "SETUP_ERROR_FOR_BANK", + "properties": { + "issue": { + "type": "string", + "enum": ["SETUP_ERROR_FOR_BANK"] + }, + "description": { + "type": "string", + "enum": [ + "The API Caller account setup, for bank payments, is incomplete or incorrect. Please contact your PayPal account manager." + ] + } + } + }, + "PREVIOUSTRANSACTIONREFERENCEVOIDED2": { + "title": "PREVIOUS_TRANSACTION_REFERENCE_VOIDED", + "properties": { + "issue": { + "type": "string", + "enum": ["PREVIOUS_TRANSACTION_REFERENCE_VOIDED"] + }, + "description": { + "type": "string", + "enum": [ + "The status of authorization referenced by `previous_transaction_reference` is `VOIDED` and hence cannot be used for this order. Please use a `previous_transaction_reference` whose status is not `VOIDED`." + ] + } + } + }, + "ORDERCOMPLETEDORVOIDED": { + "title": "ORDER_COMPLETED_OR_VOIDED", + "properties": { + "issue": { + "type": "string", + "enum": ["ORDER_COMPLETED_OR_VOIDED"] + }, + "description": { + "type": "string", + "enum": [ + "Order is voided or completed and hence cannot be authorized." + ] + } + } + }, + "PREVIOUSTRANSACTIONREFERENCEVOIDED1": { + "title": "PREVIOUS_TRANSACTION_REFERENCE_VOIDED", + "properties": { + "issue": { + "type": "string", + "enum": ["PREVIOUS_TRANSACTION_REFERENCE_VOIDED"] + }, + "description": { + "type": "string", + "enum": [ + "The status of authorization referenced by `previous_transaction_reference` is `VOIDED` and hence cannot be used for this order. Please use a `previous_transaction_reference` whose status is not `VOIDED`." + ] + } + } + }, + "REDIRECTPAYERFORALTERNATEFUNDING": { + "title": "REDIRECT_PAYER_FOR_ALTERNATE_FUNDING", + "properties": { + "issue": { + "type": "string", + "enum": ["REDIRECT_PAYER_FOR_ALTERNATE_FUNDING"] + }, + "description": { + "type": "string", + "enum": [ + "Transaction failed. Redirect the payer to select another funding source." + ] + } + } + }, + "PAYERACCOUNTLOCKEDORCLOSED": { + "title": "PAYER_ACCOUNT_LOCKED_OR_CLOSED", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYER_ACCOUNT_LOCKED_OR_CLOSED"] + }, + "description": { + "type": "string", + "enum": ["The payer account cannot be used for this transaction."] + } + } + }, + "PAYMENTALREADYAPPROVED": { + "title": "PAYMENT_ALREADY_APPROVED", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYMENT_ALREADY_APPROVED"] + }, + "description": { + "type": "string", + "enum": [ + "The payment has already been approved. Please capture the order, or create and confirm a new order with this payment source." + ] + } + } + }, + "CARDNUMBERREQUIRED1": { + "title": "CARD_NUMBER_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["CARD_NUMBER_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "The card number is required when attempting to process payment with card." + ] + } + } + }, + "AuthenticationResponse": { + "title": "Authentication Response", + "type": "object", + "properties": { + "authentication_flow": { + "allOf": [ + { + "$ref": "#/components/schemas/AuthenticationFlow" + } + ], + "x-ballerina-name-ignore": "authenticationFlow" + }, + "liability_shift": { + "allOf": [ + { + "$ref": "#/components/schemas/LiabilityShift" + } + ], + "x-ballerina-name-ignore": "liabilityShift" + }, + "exemption_details": { + "allOf": [ + { + "$ref": "#/components/schemas/ExemptionDetails" + } + ], + "x-ballerina-name-ignore": "exemptionDetails" + }, + "three_d_secure": { + "allOf": [ + { + "$ref": "#/components/schemas/ThreeDSecureAuthenticationResponse" + } + ], + "x-ballerina-name-ignore": "threeDSecure" + } + }, + "description": "Results of Authentication such as 3D Secure" + }, + "StoredPaymentSource": { + "title": "Stored Payment Source", + "required": ["payment_initiator", "payment_type"], + "type": "object", + "properties": { + "payment_type": { + "allOf": [ + { + "$ref": "#/components/schemas/StoredPaymentSourcePaymentType" + } + ], + "x-ballerina-name-ignore": "paymentType" + }, + "usage": { + "$ref": "#/components/schemas/StoredPaymentSourceUsageType" + }, + "payment_initiator": { + "allOf": [ + { + "$ref": "#/components/schemas/PaymentInitiator" + } + ], + "x-ballerina-name-ignore": "paymentInitiator" + }, + "previous_network_transaction_reference": { + "allOf": [ + { + "$ref": "#/components/schemas/NetworkTransactionReference" + } + ], + "x-ballerina-name-ignore": "previousNetworkTransactionReference" + } + }, + "description": "Provides additional details to process a payment using a `payment_source` that has been stored or is intended to be stored (also referred to as stored_credential or card-on-file).
Parameter compatibility:
  • `payment_type=ONE_TIME` is compatible only with `payment_initiator=CUSTOMER`.
  • `usage=FIRST` is compatible only with `payment_initiator=CUSTOMER`.
  • `previous_transaction_reference` or `previous_network_transaction_reference` is compatible only with `payment_initiator=MERCHANT`.
  • Only one of the parameters - `previous_transaction_reference` and `previous_network_transaction_reference` - can be present in the request.
" + }, + "CARDNUMBERREQUIRED2": { + "title": "CARD_NUMBER_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["CARD_NUMBER_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "The card number is required when attempting to process payment with card." + ] + } + } + }, + "NOTELIGIBLEFORPAYPALTRANSACTIONIDPROCESSING3": { + "title": "NOT_ELIGIBLE_FOR_PAYPAL_TRANSACTION_ID_PROCESSING", + "properties": { + "issue": { + "type": "string", + "enum": ["NOT_ELIGIBLE_FOR_PAYPAL_TRANSACTION_ID_PROCESSING"] + }, + "description": { + "type": "string", + "enum": [ + "API caller is not enable to process payments using `paypal_transaction_id`. Please contact customer support to request permissions to process transactions with PayPal transaction ID." + ] + } + } + }, + "NOTELIGIBLEFORTOKENPROCESSING": { + "title": "NOT_ELIGIBLE_FOR_TOKEN_PROCESSING", + "properties": { + "issue": { + "type": "string", + "enum": ["NOT_ELIGIBLE_FOR_TOKEN_PROCESSING"] + }, + "description": { + "type": "string", + "enum": [ + "API caller is not enabled to process payments with the specified type of token. Please contact customer support to request permissions to process transactions with this type of token." + ] + } + } + }, + "NOTELIGIBLEFORPAYPALTRANSACTIONIDPROCESSING2": { + "title": "NOT_ELIGIBLE_FOR_PAYPAL_TRANSACTION_ID_PROCESSING", + "properties": { + "issue": { + "type": "string", + "enum": ["NOT_ELIGIBLE_FOR_PAYPAL_TRANSACTION_ID_PROCESSING"] + }, + "description": { + "type": "string", + "enum": [ + "API caller is not enable to process payments using `paypal_transaction_id`. Please contact customer support to request permissions to process transactions with PayPal transaction ID." + ] + } + } + }, + "BILLINGAGREEMENTNOTFOUND": { + "title": "BILLING_AGREEMENT_NOT_FOUND", + "properties": { + "issue": { + "type": "string", + "enum": ["BILLING_AGREEMENT_NOT_FOUND"] + }, + "description": { + "type": "string", + "enum": ["The requested Billing Agreement token was not found."] + } + } + }, + "PAYPALTRANSACTIONIDNOTFOUND1": { + "title": "PAYPAL_TRANSACTION_ID_NOT_FOUND", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYPAL_TRANSACTION_ID_NOT_FOUND"] + }, + "description": { + "type": "string", + "enum": [ + "Specified `paypal_transaction_id` was not found. Verify the value and try the request again." + ] + } + } + }, + "BANKNOTSUPPORTEDFORVERIFICATION": { + "title": "BANK_NOT_SUPPORTED_FOR_VERIFICATION", + "properties": { + "issue": { + "type": "string", + "enum": ["BANK_NOT_SUPPORTED_FOR_VERIFICATION"] + }, + "description": { + "type": "string", + "enum": ["Verification for this bank account is not supported."] + } + } + }, + "PAYPALTRANSACTIONIDNOTFOUND2": { + "title": "PAYPAL_TRANSACTION_ID_NOT_FOUND", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYPAL_TRANSACTION_ID_NOT_FOUND"] + }, + "description": { + "type": "string", + "enum": [ + "Specified `paypal_transaction_id` was not found. Verify the value and try the request again." + ] + } + } + }, + "NOTELIGIBLEFORPAYPALTRANSACTIONIDPROCESSING1": { + "title": "NOT_ELIGIBLE_FOR_PAYPAL_TRANSACTION_ID_PROCESSING", + "properties": { + "issue": { + "type": "string", + "enum": ["NOT_ELIGIBLE_FOR_PAYPAL_TRANSACTION_ID_PROCESSING"] + }, + "description": { + "type": "string", + "enum": [ + "API caller is not enable to process payments using `paypal_transaction_id`. Please contact customer support to request permissions to process transactions with PayPal transaction ID." + ] + } + } + }, + "PAYPALTRANSACTIONIDNOTFOUND3": { + "title": "PAYPAL_TRANSACTION_ID_NOT_FOUND", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYPAL_TRANSACTION_ID_NOT_FOUND"] + }, + "description": { + "type": "string", + "enum": [ + "Specified `paypal_transaction_id` was not found. Verify the value and try the request again." + ] + } + } + }, + "Trustly": { + "title": "Trustly payment object", + "type": "object", + "properties": { + "country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/CountryCode" + } + ], + "x-ballerina-name-ignore": "countryCode" + }, + "name": { + "$ref": "#/components/schemas/FullName" + }, + "bic": { + "$ref": "#/components/schemas/Bic" + }, + "iban_last_chars": { + "allOf": [ + { + "$ref": "#/components/schemas/IbanLastChars" + } + ], + "x-ballerina-name-ignore": "ibanLastChars" + } + }, + "description": "Information needed to pay using Trustly" + }, + "DONATIONITEMSNOTSUPPORTED1": { + "title": "DONATION_ITEMS_NOT_SUPPORTED", + "properties": { + "issue": { + "type": "string", + "enum": ["DONATION_ITEMS_NOT_SUPPORTED"] + }, + "description": { + "type": "string", + "enum": [ + "If 'purchase_unit' has \"DONATION\" as the 'items.category' then the Order can at most have one purchase_unit. Multiple purchase_units are not supported if either of them have at least one items with category as \"DONATION\"." + ] + } + } + }, + "Ordersconfirm400Details": { + "anyOf": [ + { + "$ref": "#/components/schemas/INVALIDPARAMETERSYNTAX2" + }, + { + "$ref": "#/components/schemas/INVALIDPARAMETERVALUE2" + }, + { + "$ref": "#/components/schemas/MISSINGREQUIREDPARAMETER2" + }, + { + "$ref": "#/components/schemas/INVALIDSTRINGLENGTH2" + }, + { + "$ref": "#/components/schemas/INVALIDSTRINGMAXLENGTH" + }, + { + "$ref": "#/components/schemas/MALFORMEDREQUESTJSON2" + } + ] + }, + "MISSINGPREVIOUSREFERENCE1": { + "title": "MISSING_PREVIOUS_REFERENCE", + "properties": { + "issue": { + "type": "string", + "enum": ["MISSING_PREVIOUS_REFERENCE"] + }, + "description": { + "type": "string", + "enum": [ + "For Merchant initiated network token transactions, either the payment_source.card.stored_credential.previous_network_transaction_reference or payment_source.card.stored_credential.previous_transaction_reference must be included in the request." + ] + } + } + }, + "AmountBreakdown": { + "title": "Amount Breakdown", + "type": "object", + "properties": { + "insurance": { + "$ref": "#/components/schemas/Money" + }, + "tax_total": { + "allOf": [ + { + "$ref": "#/components/schemas/Money" + } + ], + "x-ballerina-name-ignore": "taxTotal" + }, + "shipping": { + "$ref": "#/components/schemas/Money" + }, + "shipping_discount": { + "allOf": [ + { + "$ref": "#/components/schemas/Money" + } + ], + "x-ballerina-name-ignore": "shippingDiscount" + }, + "discount": { + "$ref": "#/components/schemas/Money" + }, + "item_total": { + "allOf": [ + { + "$ref": "#/components/schemas/Money" + } + ], + "x-ballerina-name-ignore": "itemTotal" + }, + "handling": { + "$ref": "#/components/schemas/Money" + } + }, + "description": "The breakdown of the amount. Breakdown provides details such as total item amount, total tax amount, shipping, handling, insurance, and discounts, if any" + }, + "PAYMENTSOURCEMISMATCH2": { + "title": "PAYMENT_SOURCE_MISMATCH", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYMENT_SOURCE_MISMATCH"] + }, + "description": { + "type": "string", + "enum": [ + "The `payment_source` in the request must match the `payment_source` used for the authorization or capture referenced by `previous_transaction_reference`. Please use `previous_transaction_reference` whose `payment_source` matches with the `payment_source` specified in the order." + ] + } + } + }, + "PAYMENTSOURCEMISMATCH1": { + "title": "PAYMENT_SOURCE_MISMATCH", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYMENT_SOURCE_MISMATCH"] + }, + "description": { + "type": "string", + "enum": [ + "The `payment_source` in the request must match the `payment_source` used for the authorization or capture referenced by `previous_transaction_reference`. Please use `previous_transaction_reference` whose `payment_source` matches with the `payment_source` specified in the order." + ] + } + } + }, + "MISSINGPREVIOUSREFERENCE3": { + "title": "MISSING_PREVIOUS_REFERENCE", + "properties": { + "issue": { + "type": "string", + "enum": ["MISSING_PREVIOUS_REFERENCE"] + }, + "description": { + "type": "string", + "enum": [ + "For Merchant initiated network token transactions, either the payment_source.card.stored_credential.previous_network_transaction_reference or payment_source.card.stored_credential.previous_transaction_reference must be included in the request." + ] + } + } + }, + "CARDEXPIRYREQUIRED": { + "title": "CARD_EXPIRY_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["CARD_EXPIRY_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "The card expiry is required when attempting to process payment with card." + ] + } + } + }, + "MISSINGPREVIOUSREFERENCE2": { + "title": "MISSING_PREVIOUS_REFERENCE", + "properties": { + "issue": { + "type": "string", + "enum": ["MISSING_PREVIOUS_REFERENCE"] + }, + "description": { + "type": "string", + "enum": [ + "For Merchant initiated network token transactions, either the payment_source.card.stored_credential.previous_network_transaction_reference or payment_source.card.stored_credential.previous_transaction_reference must be included in the request." + ] + } + } + }, + "Orderspatch400Details": { + "anyOf": [ + { + "$ref": "#/components/schemas/FIELDNOTPATCHABLE" + }, + { + "$ref": "#/components/schemas/INVALIDARRAYMAXITEMS1" + }, + { + "$ref": "#/components/schemas/INVALIDPARAMETERSYNTAX1" + }, + { + "$ref": "#/components/schemas/INVALIDSTRINGLENGTH1" + }, + { + "$ref": "#/components/schemas/INVALIDPARAMETERVALUE1" + }, + { + "$ref": "#/components/schemas/MISSINGREQUIREDPARAMETER1" + }, + { + "$ref": "#/components/schemas/AMOUNTNOTPATCHABLE" + }, + { + "$ref": "#/components/schemas/INVALIDPATCHOPERATION" + }, + { + "$ref": "#/components/schemas/MALFORMEDREQUESTJSON1" + } + ] + }, + "PAYEEACCOUNTNOTVERIFIED": { + "title": "PAYEE_ACCOUNT_NOT_VERIFIED", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYEE_ACCOUNT_NOT_VERIFIED"] + }, + "description": { + "type": "string", + "enum": [ + "Payee has not verified their account with PayPal. The selected payment method requires the recipient to have a verified PayPal account before transactions can be processed on their behalf." + ] + } + } + }, + "InlineResponse422": { + "allOf": [ + { + "$ref": "#/components/schemas/Error422" + }, + { + "$ref": "#/components/schemas/UnprocessableContent" + } + ] + }, + "PAYEEBLOCKEDTRANSACTION": { + "title": "PAYEE_BLOCKED_TRANSACTION", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYEE_BLOCKED_TRANSACTION"] + }, + "description": { + "type": "string", + "enum": [ + "The Fraud settings for this seller are such that this payment cannot be executed." + ] + } + } + }, + "EciFlag": { + "maxLength": 255, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "Electronic Commerce Indicator (ECI). The ECI value is part of the 2 data elements that indicate the transaction was processed electronically. This should be passed on the authorization transaction to the Gateway/Processor", + "enum": [ + "MASTERCARD_NON_3D_SECURE_TRANSACTION", + "MASTERCARD_ATTEMPTED_AUTHENTICATION_TRANSACTION", + "MASTERCARD_FULLY_AUTHENTICATED_TRANSACTION", + "FULLY_AUTHENTICATED_TRANSACTION", + "ATTEMPTED_AUTHENTICATION_TRANSACTION", + "NON_3D_SECURE_TRANSACTION" + ] + }, + "ApplePayAttributes": {}, + "BLIKONECLICKMISSINGREQUIREDPARAMETER1": { + "title": "BLIK_ONE_CLICK_MISSING_REQUIRED_PARAMETER", + "properties": { + "issue": { + "type": "string", + "enum": ["BLIK_ONE_CLICK_MISSING_REQUIRED_PARAMETER"] + }, + "description": { + "type": "string", + "enum": [ + "Blik's one_click flow requires one_click.auth_code and one_click.alias_label parameters for the buyer's first transaction. For all subsequent transactions,only the one_click.alias_key parameter is required." + ] + } + } + }, + "AddressDetails1": { + "title": "Address Details", + "type": "object", + "properties": { + "building_name": { + "maxLength": 100, + "type": "string", + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House", + "x-ballerina-name-ignore": "buildingName" + }, + "street_number": { + "maxLength": 100, + "type": "string", + "description": "The street number", + "x-ballerina-name-ignore": "streetNumber" + }, + "street_type": { + "maxLength": 100, + "type": "string", + "description": "The street type. For example, avenue, boulevard, road, or expressway", + "x-ballerina-name-ignore": "streetType" + }, + "sub_building": { + "maxLength": 100, + "type": "string", + "description": "The first-order entity below a named building or location that represents the sub-premise. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment", + "x-ballerina-name-ignore": "subBuilding" + }, + "delivery_service": { + "maxLength": 100, + "type": "string", + "description": "The delivery service. Post office box, bag number, or post office name", + "x-ballerina-name-ignore": "deliveryService" + }, + "street_name": { + "maxLength": 100, + "type": "string", + "description": "The street name. Just `Drury` in `Drury Lane`", + "x-ballerina-name-ignore": "streetName" + } + }, + "description": "The non-portable additional address details include fine-grain address information for Compliance, Risk, and other scenarios. This isn't portable with common third-party and open source applications. This can include data that is redundant with core fields. For example, `address_portable.address_line_1` is usually a combination of `address_details.street_number`, `street_name`, and `street_type`" + }, + "VaultOwnerId": {}, + "Error422": { + "title": "Unprocessable Entity Error", + "type": "object", + "properties": { + "debug_id": { + "type": "string", + "description": "The PayPal internal ID. Used for correlation purposes", + "x-ballerina-name-ignore": "debugId" + }, + "name": { + "type": "string", + "enum": ["UNPROCESSABLE_ENTITY"] + }, + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ErrorDetails" + } + }, + "links": { + "maxItems": 10000, + "minItems": 0, + "type": "array", + "description": "An array of request-related [HATEOAS links](https://en.wikipedia.org/wiki/HATEOAS)", + "items": { + "$ref": "#/components/schemas/ErrorLinkDescription" + } + }, + "message": { + "type": "string", + "enum": [ + "The requested action could not be performed, semantically incorrect, or failed business validation." + ] + } + }, + "description": "The requested action cannot be performed and may require interaction with APIs or processes outside of the current request. This is distinct from a 500 response in that there are no systemic problems limiting the API from performing the request" + }, + "DUPLICATEREFERENCEID": { + "title": "DUPLICATE_REFERENCE_ID", + "properties": { + "issue": { + "type": "string", + "enum": ["DUPLICATE_REFERENCE_ID"] + }, + "description": { + "type": "string", + "enum": [ + "`reference_id` must be unique if multiple `purchase_unit` are provided." + ] + } + } + }, + "DONATIONITEMSNOTSUPPORTED": { + "title": "DONATION_ITEMS_NOT_SUPPORTED", + "properties": { + "issue": { + "type": "string", + "enum": ["DONATION_ITEMS_NOT_SUPPORTED"] + }, + "description": { + "type": "string", + "enum": [ + "If 'purchase_unit' has \"DONATION\" as the 'items.category' then the Order can at most have one purchase_unit. Multiple purchase_units are not supported if either of them have at least one items with category as \"DONATION\"." + ] + } + } + }, + "CobrandedCard": { + "title": "cobranded card object", + "type": "object", + "properties": { + "payee": { + "$ref": "#/components/schemas/PayeeBase" + }, + "amount": { + "$ref": "#/components/schemas/Money" + }, + "labels": { + "maxItems": 25, + "minItems": 1, + "type": "array", + "description": "Array of labels for the cobranded card", + "items": { + "maxLength": 256, + "minLength": 1, + "type": "string", + "description": "Label for the cobranded card." + } + } + }, + "description": "Details about the merchant cobranded card used for order purchase" + }, + "PurchaseUnit": { + "title": "Purchase Unit", + "type": "object", + "properties": { + "amount": { + "$ref": "#/components/schemas/AmountWithBreakdown" + }, + "reference_id": { + "maxLength": 256, + "minLength": 1, + "type": "string", + "description": "The API caller-provided external ID for the purchase unit. Required for multiple purchase units when you must update the order through `PATCH`. If you omit this value and the order contains only one purchase unit, PayPal sets this value to `default`.
Note: If there are multiple purchase units, reference_id is required for each purchase unit.
", + "x-ballerina-name-ignore": "referenceId" + }, + "custom_id": { + "maxLength": 127, + "minLength": 1, + "type": "string", + "description": "The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports", + "x-ballerina-name-ignore": "customId" + }, + "payments": { + "$ref": "#/components/schemas/PaymentCollection" + }, + "description": { + "maxLength": 127, + "minLength": 1, + "type": "string", + "description": "The purchase description" + }, + "payment_instruction": { + "allOf": [ + { + "$ref": "#/components/schemas/PaymentInstruction" + } + ], + "x-ballerina-name-ignore": "paymentInstruction" + }, + "payee": { + "$ref": "#/components/schemas/Payee" + }, + "supplementary_data": { + "allOf": [ + { + "$ref": "#/components/schemas/SupplementaryData" + } + ], + "x-ballerina-name-ignore": "supplementaryData" + }, + "shipping": { + "$ref": "#/components/schemas/ShippingWithTrackingDetails" + }, + "soft_descriptor": { + "maxLength": 22, + "minLength": 1, + "type": "string", + "description": "The payment descriptor on account transactions on the customer's credit card statement, that PayPal sends to processors. The maximum length of the soft descriptor information that you can pass in the API field is 22 characters, in the following format:22 - len(PAYPAL * (8)) - len(Descriptor in Payment Receiving Preferences of Merchant account + 1)The PAYPAL prefix uses 8 characters.

The soft descriptor supports the following ASCII characters:
  • Alphanumeric characters
  • Dashes
  • Asterisks
  • Periods (.)
  • Spaces
For Wallet payments marketplace integrations:
  • The merchant descriptor in the Payment Receiving Preferences must be the marketplace name.
  • You can't use the remaining space to show the customer service number.
  • The remaining spaces can be a combination of seller name and country.

For unbranded payments (Direct Card) marketplace integrations, use a combination of the seller name and phone number", + "x-ballerina-name-ignore": "softDescriptor" + }, + "invoice_id": { + "maxLength": 127, + "minLength": 1, + "type": "string", + "description": "The API caller-provided external invoice ID for this order", + "x-ballerina-name-ignore": "invoiceId" + }, + "id": { + "maxLength": 19, + "minLength": 1, + "type": "string", + "description": "The PayPal-generated ID for the purchase unit. This ID appears in both the payer's transaction history and the emails that the payer receives. In addition, this ID is available in transaction and settlement reports that merchants and API callers can use to reconcile transactions. This ID is only available when an order is saved by calling v2/checkout/orders/id/save" + }, + "items": { + "type": "array", + "description": "An array of items that the customer purchases from the merchant", + "items": { + "$ref": "#/components/schemas/Item" + } + } + }, + "description": "The purchase unit details. Used to capture required information for the payment contract" + }, + "ORDERCANNOTBESAVED": { + "title": "ORDER_CANNOT_BE_SAVED", + "properties": { + "issue": { + "type": "string", + "enum": ["ORDER_CANNOT_BE_SAVED"] + }, + "description": { + "type": "string", + "enum": [ + "The option to save an order is only available if the `intent` is AUTHORIZE and `processing_instruction` uses one of the `ORDER_SAVED` options. For example, `intent`=AUTHORIZE, `processing_instruction`=ORDER_SAVED_EXPLICITLY. Please change the intent and/or processing_instruction` and try again." + ] + } + } + }, + "INVALIDJSONPOINTERFORMAT1": { + "title": "INVALID_JSON_POINTER_FORMAT", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_JSON_POINTER_FORMAT"] + }, + "description": { + "type": "string", + "enum": [ + "Path should be a valid [JSON Pointer](https://tools.ietf.org/html/rfc6901) that references a location within the request where the operation is performed." + ] + } + } + }, + "AddressPortable": { + "title": "Portable Postal Address (Medium-Grained)", + "required": ["country_code"], + "type": "object", + "properties": { + "country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/CountryCode" + } + ], + "x-ballerina-name-ignore": "countryCode" + }, + "admin_area_1": { + "maxLength": 300, + "type": "string", + "description": "The highest level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision. Format for postal delivery. For example, `CA` and not `California`. Value, by country, is:
  • UK. A county.
  • US. A state.
  • Canada. A province.
  • Japan. A prefecture.
  • Switzerland. A kanton.
", + "x-ballerina-name-ignore": "adminArea1" + }, + "address_line_1": { + "maxLength": 300, + "type": "string", + "description": "The first line of the address. For example, number or street. For example, `173 Drury Lane`. Required for data entry and compliance and risk checks. Must contain the full address", + "x-ballerina-name-ignore": "addressLine1" + }, + "admin_area_3": { + "maxLength": 100, + "type": "string", + "description": "A sub-locality, suburb, neighborhood, or district. Smaller than `admin_area_level_2`. Value is:
  • Brazil. Suburb, bairro, or neighborhood.
  • India. Sub-locality or district. Street name information is not always available but a sub-locality or district can be a very small area.
", + "x-ballerina-name-ignore": "adminArea3" + }, + "address_details": { + "allOf": [ + { + "$ref": "#/components/schemas/AddressDetails" + } + ], + "x-ballerina-name-ignore": "addressDetails" + }, + "admin_area_2": { + "maxLength": 120, + "type": "string", + "description": "A city, town, or village. Smaller than `admin_area_level_1`", + "x-ballerina-name-ignore": "adminArea2" + }, + "address_line_3": { + "maxLength": 100, + "type": "string", + "description": "The third line of the address, if needed. For example, a street complement for Brazil, direction text, such as `next to Walmart`, or a landmark in an Indian address", + "x-ballerina-name-ignore": "addressLine3" + }, + "address_line_2": { + "maxLength": 300, + "type": "string", + "description": "The second line of the address. For example, suite or apartment number", + "x-ballerina-name-ignore": "addressLine2" + }, + "admin_area_4": { + "maxLength": 100, + "type": "string", + "description": "The neighborhood, ward, or district. Smaller than `admin_area_level_3` or `sub_locality`. Value is:
  • The postal sorting code for Guernsey and many French territories, such as French Guiana.
  • The fine-grained administrative levels in China.
", + "x-ballerina-name-ignore": "adminArea4" + }, + "postal_code": { + "maxLength": 60, + "type": "string", + "description": "The postal code, which is the zip code or equivalent. Typically required for countries with a postal code or an equivalent. See [postal code](https://en.wikipedia.org/wiki/Postal_code)", + "x-ballerina-name-ignore": "postalCode" + } + }, + "description": "The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute)" + }, + "INVALIDPARAMETERVALUE": { + "title": "INVALID_PARAMETER_VALUE", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_PARAMETER_VALUE"] + }, + "description": { + "type": "string", + "enum": ["A parameter value is not valid."] + } + } + }, + "TRANSACTIONBLOCKEDBYPAYEE1": { + "title": "TRANSACTION_BLOCKED_BY_PAYEE", + "properties": { + "issue": { + "type": "string", + "enum": ["TRANSACTION_BLOCKED_BY_PAYEE"] + }, + "description": { + "type": "string", + "enum": [ + "Transaction blocked by Payee’s Fraud Protection settings." + ] + } + } + }, + "NOTENABLEDFORCARDPROCESSING": { + "title": "NOT_ENABLED_FOR_CARD_PROCESSING", + "properties": { + "issue": { + "type": "string", + "enum": ["NOT_ENABLED_FOR_CARD_PROCESSING"] + }, + "description": { + "type": "string", + "enum": [ + "The recipient for which the API call is made on behalf of is not enabled for card processing. Please contact PayPal customer support." + ] + } + } + }, + "UNSUPPORTEDPAYMENTINSTRUCTION": { + "title": "UNSUPPORTED_PAYMENT_INSTRUCTION", + "properties": { + "issue": { + "type": "string", + "enum": ["UNSUPPORTED_PAYMENT_INSTRUCTION"] + }, + "description": { + "type": "string", + "enum": [ + "You must provide the payment instruction when you capture an authorized payment for `intent=AUTHORIZE`. For details, see Capture authorization. For `intent=CAPTURE`, send the payment instruction when you create the order." + ] + } + } + }, + "INVALIDPAYERID": { + "title": "INVALID_PAYER_ID", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_PAYER_ID"] + }, + "description": { + "type": "string", + "enum": ["The payer ID is not valid."] + } + } + }, + "PATCHVALUEREQUIRED": { + "title": "PATCH_VALUE_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["PATCH_VALUE_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "Please specify a 'value' to for the field that is being patched." + ] + } + } + }, + "PurchaseUnitRequest": { + "title": "Purchase Unit Request", + "required": ["amount"], + "type": "object", + "properties": { + "payee": { + "$ref": "#/components/schemas/Payee" + }, + "amount": { + "$ref": "#/components/schemas/AmountWithBreakdown" + }, + "supplementary_data": { + "allOf": [ + { + "$ref": "#/components/schemas/SupplementaryData" + } + ], + "x-ballerina-name-ignore": "supplementaryData" + }, + "reference_id": { + "maxLength": 256, + "minLength": 1, + "type": "string", + "description": "The API caller-provided external ID for the purchase unit. Required for multiple purchase units when you must update the order through `PATCH`. If you omit this value and the order contains only one purchase unit, PayPal sets this value to `default`", + "x-ballerina-name-ignore": "referenceId" + }, + "shipping": { + "$ref": "#/components/schemas/ShippingDetail" + }, + "soft_descriptor": { + "maxLength": 22, + "minLength": 1, + "type": "string", + "description": "The soft descriptor is the dynamic text used to construct the statement descriptor that appears on a payer's card statement.

If an Order is paid using the \"PayPal Wallet\", the statement descriptor will appear in following format on the payer's card statement: PAYPAL_prefix+(space)+merchant_descriptor+(space)+ soft_descriptor
Note: The merchant descriptor is the descriptor of the merchant’s payment receiving preferences which can be seen by logging into the merchant account https://www.sandbox.paypal.com/businessprofile/settings/info/edit
The PAYPAL prefix uses 8 characters. Only the first 22 characters will be displayed in the statement.
For example, if:
  • The PayPal prefix toggle is PAYPAL *.
  • The merchant descriptor in the profile is Janes Gift.
  • The soft descriptor is 800-123-1234.
Then, the statement descriptor on the card is PAYPAL * Janes Gift 80", + "x-ballerina-name-ignore": "softDescriptor" + }, + "custom_id": { + "maxLength": 127, + "minLength": 1, + "type": "string", + "description": "The API caller-provided external ID. Used to reconcile client transactions with PayPal transactions. Appears in transaction and settlement reports but is not visible to the payer", + "x-ballerina-name-ignore": "customId" + }, + "description": { + "maxLength": 127, + "minLength": 1, + "type": "string", + "description": "The purchase description. The maximum length of the character is dependent on the type of characters used. The character length is specified assuming a US ASCII character. Depending on type of character; (e.g. accented character, Japanese characters) the number of characters that that can be specified as input might not equal the permissible max length" + }, + "invoice_id": { + "maxLength": 127, + "minLength": 1, + "type": "string", + "description": "The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives", + "x-ballerina-name-ignore": "invoiceId" + }, + "payment_instruction": { + "allOf": [ + { + "$ref": "#/components/schemas/PaymentInstruction" + } + ], + "x-ballerina-name-ignore": "paymentInstruction" + }, + "items": { + "type": "array", + "description": "An array of items that the customer purchases from the merchant", + "items": { + "$ref": "#/components/schemas/Item" + } + } + }, + "description": "The purchase unit request. Includes required information for the payment contract" + }, + "TAXTOTALREQUIRED": { + "title": "TAX_TOTAL_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["TAX_TOTAL_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "If item details are specified (items.tax_total and items.quantity) corresponding amount.breakdown.tax_total is required." + ] + } + } + }, + "MAXVALUEEXCEEDED1": { + "title": "MAX_VALUE_EXCEEDED", + "properties": { + "issue": { + "type": "string", + "enum": ["MAX_VALUE_EXCEEDED"] + }, + "description": { + "type": "string", + "enum": ["Should be less than or equal to 999999999999999.99."] + } + } + }, + "PERMISSIONDENIED": { + "title": "PERMISSION_DENIED", + "properties": { + "issue": { + "type": "string", + "enum": ["PERMISSION_DENIED"] + }, + "description": { + "type": "string", + "enum": [ + "You do not have permission to access or perform operations on this resource." + ] + } + } + }, + "TOKENIDNOTFOUND": { + "title": "TOKEN_ID_NOT_FOUND", + "properties": { + "issue": { + "type": "string", + "enum": ["TOKEN_ID_NOT_FOUND"] + }, + "description": { + "type": "string", + "enum": [ + "Specified token was not found. Verify the token and try the request again." + ] + } + } + }, + "ApplePayDecryptedTokenData": { + "title": "Decrypted Apple Pay Token data.", + "required": ["tokenized_card"], + "type": "object", + "properties": { + "transaction_amount": { + "allOf": [ + { + "$ref": "#/components/schemas/Money" + } + ], + "x-ballerina-name-ignore": "transactionAmount" + }, + "tokenized_card": { + "allOf": [ + { + "$ref": "#/components/schemas/Card" + } + ], + "x-ballerina-name-ignore": "tokenizedCard" + }, + "payment_data": { + "allOf": [ + { + "$ref": "#/components/schemas/ApplePayPaymentData" + } + ], + "x-ballerina-name-ignore": "paymentData" + }, + "device_manufacturer_id": { + "maxLength": 2000, + "minLength": 1, + "pattern": "^.*$", + "type": "string", + "description": "Apple Pay Hex-encoded device manufacturer identifier. The pattern is defined by an external party and supports Unicode", + "x-ballerina-name-ignore": "deviceManufacturerId" + }, + "payment_data_type": { + "maxLength": 16, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "Indicates the type of payment data passed, in case of Non China the payment data is 3DSECURE and for China it is EMV", + "enum": ["3DSECURE", "EMV"], + "x-ballerina-name-ignore": "paymentDataType" + } + }, + "description": "Information about the Payment data obtained by decrypting Apple Pay token" + }, + "OrderAllOf2": { + "properties": { + "id": { + "type": "string", + "description": "The ID of the order.", + "readOnly": true + }, + "payment_source": { + "$ref": "#/components/schemas/PaymentSourceResponse" + }, + "intent": { + "$ref": "#/components/schemas/CheckoutPaymentIntent" + }, + "processing_instruction": { + "$ref": "#/components/schemas/ProcessingInstruction" + }, + "payer": { + "$ref": "#/components/schemas/Payer" + }, + "purchase_units": { + "maxItems": 10, + "minItems": 1, + "type": "array", + "description": "An array of purchase units. Each purchase unit establishes a contract between a customer and merchant. Each purchase unit represents either a full or partial order that the customer intends to purchase from the merchant.", + "items": { + "$ref": "#/components/schemas/PurchaseUnit" + } + }, + "status": { + "$ref": "#/components/schemas/OrderStatus" + }, + "links": { + "type": "array", + "description": "An array of request-related HATEOAS links. To complete payer approval, use the `approve` link to redirect the payer. The API caller has 3 hours (default setting, this which can be changed by your account manager to 24/48/72 hours to accommodate your use case) from the time the order is created, to redirect your payer. Once redirected, the API caller has 3 hours for the payer to approve the order and either authorize or capture the order. If you are not using the PayPal JavaScript SDK to initiate PayPal Checkout (in context) ensure that you include `application_context.return_url` is specified or you will get \"We're sorry, Things don't appear to be working at the moment\" after the payer approves the payment.", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/LinkDescription" + } + } + } + }, + "OrderAuthorizeResponseAllOf2": { + "properties": { + "id": { + "type": "string", + "description": "The ID of the order.", + "readOnly": true + }, + "payment_source": { + "$ref": "#/components/schemas/PaymentSourceResponse" + }, + "intent": { + "$ref": "#/components/schemas/CheckoutPaymentIntent" + }, + "processing_instruction": { + "$ref": "#/components/schemas/ProcessingInstruction" + }, + "payer": { + "$ref": "#/components/schemas/Payer" + }, + "purchase_units": { + "maxItems": 10, + "minItems": 1, + "type": "array", + "description": "An array of purchase units. Each purchase unit establishes a contract between a customer and merchant. Each purchase unit represents either a full or partial order that the customer intends to purchase from the merchant.", + "items": { + "$ref": "#/components/schemas/PurchaseUnit" + } + }, + "status": { + "$ref": "#/components/schemas/OrderStatus" + }, + "links": { + "type": "array", + "description": "An array of request-related HATEOAS links. To complete payer approval, use the `approve` link to redirect the payer. The API caller has 3 hours (default setting, this which can be changed by your account manager to 24/48/72 hours to accommodate your use case) from the time the order is created, to redirect your payer. Once redirected, the API caller has 3 hours for the payer to approve the order and either authorize or capture the order. If you are not using the PayPal JavaScript SDK to initiate PayPal Checkout (in context) ensure that you include `application_context.return_url` is specified or you will get \"We're sorry, Things don't appear to be working at the moment\" after the payer approves the payment.", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/LinkDescription" + } + } + } + }, + "INVALIDGOOGLEPAYTOKEN1": { + "title": "INVALID_GOOGLE_PAY_TOKEN", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_GOOGLE_PAY_TOKEN"] + }, + "description": { + "type": "string", + "enum": [ + "The google pay token is invalid. PayPal was not able to decrypt the googlepay token or PayPal was not able to find the necessary data in the token after decryption." + ] + } + } + }, + "SofortRequest": { + "title": "Sofort payment object", + "required": ["country_code", "name"], + "type": "object", + "properties": { + "experience_context": { + "allOf": [ + { + "$ref": "#/components/schemas/ExperienceContextBase" + } + ], + "x-ballerina-name-ignore": "experienceContext" + }, + "country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/CountryCode" + } + ], + "x-ballerina-name-ignore": "countryCode" + }, + "name": { + "$ref": "#/components/schemas/FullName" + } + }, + "description": "Information needed to pay using Sofort" + }, + "MULTICURRENCYORDER": { + "title": "MULTI_CURRENCY_ORDER", + "properties": { + "issue": { + "type": "string", + "enum": ["MULTI_CURRENCY_ORDER"] + }, + "description": { + "type": "string", + "enum": [ + "Multiple differing values of currency_code are not supported. Entire Order request must have the same currency_code." + ] + } + } + }, + "BillingAgreementId": { + "maxLength": 128, + "minLength": 2, + "pattern": "^[a-zA-Z0-9-]+$", + "type": "string", + "description": "The PayPal billing agreement ID. References an approved recurring payment for goods or services" + }, + "ONLYONEPAYMENTSOURCEALLOWED": { + "title": "ONLY_ONE_PAYMENT_SOURCE_ALLOWED", + "properties": { + "issue": { + "type": "string", + "enum": ["ONLY_ONE_PAYMENT_SOURCE_ALLOWED"] + }, + "description": { + "type": "string", + "enum": [ + "More than one payment method within the payment source is not supported." + ] + } + } + }, + "PAYMENTSOURCECANNOTBEUSED": { + "title": "PAYMENT_SOURCE_CANNOT_BE_USED", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYMENT_SOURCE_CANNOT_BE_USED"] + }, + "description": { + "type": "string", + "enum": [ + "The provided payment source cannot be used to pay for the order. Please try again with a different payment source by creating a new order." + ] + } + } + }, + "CardType": { + "title": "Card Type", + "maxLength": 255, + "minLength": 1, + "pattern": "^[A-Z_]+$", + "type": "string", + "description": "Type of card. i.e Credit, Debit and so on", + "enum": ["CREDIT", "DEBIT", "PREPAID", "STORE", "UNKNOWN"] + }, + "Phone": { + "title": "Phone", + "required": ["country_code", "national_number"], + "type": "object", + "properties": { + "country_code": { + "maxLength": 3, + "minLength": 1, + "pattern": "^[0-9]{1,3}?$", + "type": "string", + "description": "The country calling code (CC), in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the CC and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN)", + "x-ballerina-name-ignore": "countryCode" + }, + "extension_number": { + "maxLength": 15, + "minLength": 1, + "pattern": "^[0-9]{1,15}?$", + "type": "string", + "description": "The extension number", + "x-ballerina-name-ignore": "extensionNumber" + }, + "national_number": { + "maxLength": 14, + "minLength": 1, + "pattern": "^[0-9]{1,14}?$", + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN)", + "x-ballerina-name-ignore": "nationalNumber" + } + }, + "description": "The phone number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en)" + }, + "OrdersTrackersPatch422": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Orderstrackerspatch422Details" + } + } + } + }, + "PREFERREDPAYMENTSOURCEMISMATCH": { + "title": "PREFERRED_PAYMENT_SOURCE_MISMATCH", + "properties": { + "issue": { + "type": "string", + "enum": ["PREFERRED_PAYMENT_SOURCE_MISMATCH"] + }, + "description": { + "type": "string", + "enum": [ + "Payment Source must exactly match the Preferred Payment Source that was provided during order creation." + ] + } + } + }, + "CITYREQUIRED": { + "title": "CITY_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["CITY_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "The specified country requires a city (address.admin_area_2)." + ] + } + } + }, + "CountryCode": { + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$", + "type": "string", + "description": "The [two-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.
", + "format": "ppaas_common_country_code_v2" + }, + "REFERENCEIDREQUIRED1": { + "title": "REFERENCE_ID_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["REFERENCE_ID_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "'reference_id' is required for each 'purchase_unit' if multiple 'purchase_unit' are provided." + ] + } + } + }, + "BANKNOTSUPPORTEDFORVERIFICATION1": { + "title": "BANK_NOT_SUPPORTED_FOR_VERIFICATION", + "properties": { + "issue": { + "type": "string", + "enum": ["BANK_NOT_SUPPORTED_FOR_VERIFICATION"] + }, + "description": { + "type": "string", + "enum": ["Verification for this bank account is not supported."] + } + } + }, + "INVALIDCOUNTRYCODE": { + "title": "INVALID_COUNTRY_CODE", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_COUNTRY_CODE"] + }, + "description": { + "type": "string", + "enum": [ + "Country code is invalid. Please refer to https://developer.paypal.com/api/rest/reference/country-codes/ for a list of supported country codes." + ] + } + } + }, + "PERMISSIONDENIEDFORDONATIONITEMS": { + "title": "PERMISSION_DENIED_FOR_DONATION_ITEMS", + "properties": { + "issue": { + "type": "string", + "enum": ["PERMISSION_DENIED_FOR_DONATION_ITEMS"] + }, + "description": { + "type": "string", + "enum": [ + "The API Caller or Payee have not been granted appropriate permissions to send 'items.category' as 'DONATION'. Please speak to your account manager if you want to process these type of items." + ] + } + } + }, + "TAXTOTALMISMATCH1": { + "title": "TAX_TOTAL_MISMATCH", + "properties": { + "issue": { + "type": "string", + "enum": ["TAX_TOTAL_MISMATCH"] + }, + "description": { + "type": "string", + "enum": [ + "Should equal sum of (tax * quantity) across all items for a given purchase_unit." + ] + } + } + }, + "ONLYONEBANKSOURCEALLOWED1": { + "title": "ONLY_ONE_BANK_SOURCE_ALLOWED", + "properties": { + "issue": { + "type": "string", + "enum": ["ONLY_ONE_BANK_SOURCE_ALLOWED"] + }, + "description": { + "type": "string", + "enum": [ + "More than one payment method within the bank payment object is not supported." + ] + } + } + }, + "INVALIDARRAYMINITEMS": { + "title": "INVALID_ARRAY_MIN_ITEMS", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_ARRAY_MIN_ITEMS"] + }, + "description": { + "type": "string", + "enum": ["The number of items in an array parameter is too small."] + } + } + }, + "COMPLIANCEVIOLATION1": { + "title": "COMPLIANCE_VIOLATION", + "properties": { + "issue": { + "type": "string", + "enum": ["COMPLIANCE_VIOLATION"] + }, + "description": { + "type": "string", + "enum": ["Transaction is declined due to compliance violation."] + } + } + }, + "IdealRequest": { + "title": "The iDEAL payment object", + "required": ["country_code", "name"], + "type": "object", + "properties": { + "experience_context": { + "allOf": [ + { + "$ref": "#/components/schemas/ExperienceContextBase" + } + ], + "x-ballerina-name-ignore": "experienceContext" + }, + "country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/CountryCode" + } + ], + "x-ballerina-name-ignore": "countryCode" + }, + "name": { + "$ref": "#/components/schemas/FullName" + }, + "attributes": { + "$ref": "#/components/schemas/AltpayRecurringAttributesRequest" + }, + "bic": { + "$ref": "#/components/schemas/Bic" + } + }, + "description": "Information needed to pay using iDEAL" + }, + "ORDERNOTAPPROVED": { + "title": "ORDER_NOT_APPROVED", + "properties": { + "issue": { + "type": "string", + "enum": ["ORDER_NOT_APPROVED"] + }, + "description": { + "type": "string", + "enum": [ + "Payer has not yet approved the Order for payment. Please redirect the payer to the 'rel':'approve' url returned as part of the HATEOAS links within the Create Order call." + ] + } + } + }, + "ORDEREXPIRED": { + "title": "ORDER_EXPIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["ORDER_EXPIRED"] + }, + "description": { + "type": "string", + "enum": [ + "Order is expired and hence cannot be authorized. Please contact Customer Support if you need to increase your order validity period." + ] + } + } + }, + "INCOMPATIBLEPARAMETERVALUE3": { + "title": "INCOMPATIBLE_PARAMETER_VALUE", + "properties": { + "issue": { + "type": "string", + "enum": ["INCOMPATIBLE_PARAMETER_VALUE"] + }, + "description": { + "type": "string", + "enum": [ + "The value of the field is incompatible/redundant with other fields in the order." + ] + } + } + }, + "ITEMSKUMISMATCH": { + "title": "ITEM_SKU_MISMATCH", + "properties": { + "issue": { + "type": "string", + "enum": ["ITEM_SKU_MISMATCH"] + }, + "description": { + "type": "string", + "enum": [ + "Item sku must match one of the items sku that was provided during order creation." + ] + } + } + }, + "INCOMPATIBLEPARAMETERVALUE1": { + "title": "INCOMPATIBLE_PARAMETER_VALUE", + "properties": { + "issue": { + "type": "string", + "enum": ["INCOMPATIBLE_PARAMETER_VALUE"] + }, + "description": { + "type": "string", + "enum": [ + "The value of the field is incompatible/redundant with other fields in the order." + ] + } + } + }, + "ORDERCOMPLETIONINPROGRESS": { + "title": "ORDER_COMPLETION_IN_PROGRESS", + "properties": { + "issue": { + "type": "string", + "enum": ["ORDER_COMPLETION_IN_PROGRESS"] + }, + "description": { + "type": "string", + "enum": [ + "The order was created with processing_instruction of ORDER_COMPLETE_ON_PAYMENT_APPROVAL. The customer has approved the payment and PayPal is still in the process of capturing the order on your behalf as instructed. Please try your request again." + ] + } + } + }, + "ErrorLocation": { + "type": "string", + "description": "The location of the field that caused the error. Value is `body`, `path`, or `query`", + "default": "body", + "enum": ["body", "path", "query"] + }, + "INCOMPATIBLEPARAMETERVALUE2": { + "title": "INCOMPATIBLE_PARAMETER_VALUE", + "properties": { + "issue": { + "type": "string", + "enum": ["INCOMPATIBLE_PARAMETER_VALUE"] + }, + "description": { + "type": "string", + "enum": [ + "The value of the field is incompatible/redundant with other fields in the order." + ] + } + } + }, + "PhoneType2": { + "title": "Phone Type", + "type": "string", + "description": "The phone type", + "enum": ["FAX", "HOME", "MOBILE", "OTHER", "PAGER", "WORK"] + }, + "AltpayRecurringAttributesRequest": {}, + "ITEMSKUMISMATCH1": { + "title": "ITEM_SKU_MISMATCH", + "properties": { + "issue": { + "type": "string", + "enum": ["ITEM_SKU_MISMATCH"] + }, + "description": { + "type": "string", + "enum": [ + "Item sku must match one of the items sku that was provided during order creation." + ] + } + } + }, + "PaypalWalletVaultResponseAllOf2": { + "properties": { + "customer": { + "$ref": "#/components/schemas/PaypalWalletCustomer" + }, + "owner_id": { + "$ref": "#/components/schemas/VaultOwnerId" + } + } + }, + "EMVDATAREQUIRED1": { + "title": "EMV_DATA_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["EMV_DATA_REQUIRED"] + }, + "description": { + "type": "string", + "enum": ["EMV Data is required if authentication method is EMV."] + } + } + }, + "ORDERCOMPLETEONPAYMENTAPPROVAL1": { + "title": "ORDER_COMPLETE_ON_PAYMENT_APPROVAL", + "properties": { + "issue": { + "type": "string", + "enum": ["ORDER_COMPLETE_ON_PAYMENT_APPROVAL"] + }, + "description": { + "type": "string", + "enum": [ + "A processing_instruction of `ORDER_COMPLETE_ON_PAYMENT_APPROVAL` is required for the specified payment_source." + ] + } + } + }, + "ITEMTOTALREQUIRED1": { + "title": "ITEM_TOTAL_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["ITEM_TOTAL_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "If item details are specified (items.unit_amount and items.quantity) corresponding amount.breakdown.item_total is required." + ] + } + } + }, + "PAYEEFXRATEIDEXPIRED": { + "title": "PAYEE_FX_RATE_ID_EXPIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYEE_FX_RATE_ID_EXPIRED"] + }, + "description": { + "type": "string", + "enum": [ + "The specified FX Rate ID has expired. Please specify a different FX Rate Id and try the request again. Alternately, remove the FX Rate ID to process the request using the default exchange rate." + ] + } + } + }, + "PhoneWithType": { + "title": "Phone With Type", + "required": ["phone_number"], + "type": "object", + "properties": { + "phone_type": { + "allOf": [ + { + "$ref": "#/components/schemas/PhoneType" + } + ], + "x-ballerina-name-ignore": "phoneType" + }, + "phone_number": { + "allOf": [ + { + "$ref": "#/components/schemas/Phone" + } + ], + "x-ballerina-name-ignore": "phoneNumber" + } + }, + "description": "The phone information" + }, + "Orderstrackcreate403Details": { + "anyOf": [ + { + "$ref": "#/components/schemas/PERMISSIONDENIED3" + } + ] + }, + "CARDEXPIRED1": { + "title": "CARD_EXPIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["CARD_EXPIRED"] + }, + "description": { + "type": "string", + "enum": ["The card is expired"] + } + } + }, + "PAYMENTSOURCEINFOCANNOTBEVERIFIED1": { + "title": "PAYMENT_SOURCE_INFO_CANNOT_BE_VERIFIED", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYMENT_SOURCE_INFO_CANNOT_BE_VERIFIED"] + }, + "description": { + "type": "string", + "enum": [ + "The combination of the payment_source name, billing address, shipping name and shipping address could not be verified. Please correct this information and try again by creating a new order." + ] + } + } + }, + "SETUPERRORFORBANK": { + "title": "SETUP_ERROR_FOR_BANK", + "properties": { + "issue": { + "type": "string", + "enum": ["SETUP_ERROR_FOR_BANK"] + }, + "description": { + "type": "string", + "enum": [ + "The API Caller account setup, for bank payments, is incomplete or incorrect. Please contact your PayPal account manager." + ] + } + } + }, + "FIELDNOTPATCHABLE": { + "title": "FIELD_NOT_PATCHABLE", + "properties": { + "issue": { + "type": "string", + "enum": ["FIELD_NOT_PATCHABLE"] + }, + "description": { + "type": "string", + "enum": ["Field cannot be patched."] + } + } + }, + "ORDERALREADYCAPTURED1": { + "title": "ORDER_ALREADY_CAPTURED", + "properties": { + "issue": { + "type": "string", + "enum": ["ORDER_ALREADY_CAPTURED"] + }, + "description": { + "type": "string", + "enum": [ + "Order already captured.If 'intent=CAPTURE' only one capture per order is allowed." + ] + } + } + }, + "POSTALCODEREQUIRED1": { + "title": "POSTAL_CODE_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["POSTAL_CODE_REQUIRED"] + }, + "description": { + "type": "string", + "enum": ["The specified country requires a postal code."] + } + } + }, + "PAYMENTTYPENOTSUPPORTEDFORINTENT": { + "title": "PAYMENT_TYPE_NOT_SUPPORTED_FOR_INTENT", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYMENT_TYPE_NOT_SUPPORTED_FOR_INTENT"] + }, + "description": { + "type": "string", + "enum": [ + "Provided payment type not supported for order intent. Payment authorizations are supported only for order with `intent=AUTHORIZE` and payment captures are supported only for order with `intent=CAPTURE`." + ] + } + } + }, + "NOTPATCHABLE1": { + "title": "NOT_PATCHABLE", + "properties": { + "issue": { + "type": "string", + "enum": ["NOT_PATCHABLE"] + }, + "description": { + "type": "string", + "enum": ["Cannot be patched."] + } + } + }, + "PAYPALTRANSACTIONIDEXPIRED": { + "title": "PAYPAL_TRANSACTION_ID_EXPIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYPAL_TRANSACTION_ID_EXPIRED"] + }, + "description": { + "type": "string", + "enum": [ + "Specified `paypal_transaction_id` has expired. PayPal transaction ID expires 4 years after the date of the initial transaction." + ] + } + } + }, + "PERMISSIONDENIED3": { + "title": "PERMISSION_DENIED", + "properties": { + "issue": { + "type": "string", + "enum": ["PERMISSION_DENIED"] + }, + "description": { + "type": "string", + "enum": [ + "You do not have permission to access or perform operations on this resource." + ] + } + } + }, + "Refund": { + "title": "Refund", + "type": "object", + "description": "The refund information", + "allOf": [ + { + "$ref": "#/components/schemas/RefundStatus" + }, + { + "$ref": "#/components/schemas/RefundAllOf2" + }, + { + "$ref": "#/components/schemas/ActivityTimestamps" + } + ] + }, + "PERMISSIONDENIED2": { + "title": "PERMISSION_DENIED", + "properties": { + "issue": { + "type": "string", + "enum": ["PERMISSION_DENIED"] + }, + "description": { + "type": "string", + "enum": [ + "You do not have permission to access or perform operations on this resource." + ] + } + } + }, + "PERMISSIONDENIED4": { + "title": "PERMISSION_DENIED", + "properties": { + "issue": { + "type": "string", + "enum": ["PERMISSION_DENIED"] + }, + "description": { + "type": "string", + "enum": [ + "You do not have permission to access or perform operations on this resource." + ] + } + } + }, + "DOMESTICTRANSACTIONREQUIRED2": { + "title": "DOMESTIC_TRANSACTION_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["DOMESTIC_TRANSACTION_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "This transaction requires the payee and payer to be resident in the same country, a domestic transaction is required to create this payment." + ] + } + } + }, + "DOMESTICTRANSACTIONREQUIRED1": { + "title": "DOMESTIC_TRANSACTION_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["DOMESTIC_TRANSACTION_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "This transaction requires the payee and payer to be resident in the same country, a domestic transaction is required to create this payment." + ] + } + } + }, + "PERMISSIONDENIED1": { + "title": "PERMISSION_DENIED", + "properties": { + "issue": { + "type": "string", + "enum": ["PERMISSION_DENIED"] + }, + "description": { + "type": "string", + "enum": [ + "You do not have permission to access or perform operations on this resource." + ] + } + } + }, + "ALIASDECLINEDBYPROCESSOR": { + "title": "ALIAS_DECLINED_BY_PROCESSOR", + "properties": { + "issue": { + "type": "string", + "enum": ["ALIAS_DECLINED_BY_PROCESSOR"] + }, + "description": { + "type": "string", + "enum": [ + "The provided alias was declined by the processor. Please create a new order with a different alias_key and/or alias_label and try again." + ] + } + } + }, + "MULTICURRENCYORDER1": { + "title": "MULTI_CURRENCY_ORDER", + "properties": { + "issue": { + "type": "string", + "enum": ["MULTI_CURRENCY_ORDER"] + }, + "description": { + "type": "string", + "enum": [ + "Multiple differing values of currency_code are not supported. Entire Order request must have the same currency_code." + ] + } + } + }, + "APPLEPAYAMOUNTMISMATCH3": { + "title": "APPLE_PAY_AMOUNT_MISMATCH", + "properties": { + "issue": { + "type": "string", + "enum": ["APPLE_PAY_AMOUNT_MISMATCH"] + }, + "description": { + "type": "string", + "enum": [ + "The 'amount' specified in the Order should match the amount that was viewed and authorized by the payer/buyer on Apple Pay. If the amount has changed, please redirect the buyer to authorize the order again via Apple Pay." + ] + } + } + }, + "CaptureStatus": { + "title": "Capture Status", + "type": "object", + "properties": { + "status_details": { + "allOf": [ + { + "$ref": "#/components/schemas/CaptureStatusDetails" + } + ], + "x-ballerina-name-ignore": "statusDetails" + }, + "status": { + "type": "string", + "description": "The status of the captured payment", + "readOnly": true, + "enum": [ + "COMPLETED", + "DECLINED", + "PARTIALLY_REFUNDED", + "PENDING", + "REFUNDED", + "FAILED" + ] + } + }, + "description": "The status of a captured payment" + }, + "APPLEPAYAMOUNTMISMATCH2": { + "title": "APPLE_PAY_AMOUNT_MISMATCH", + "properties": { + "issue": { + "type": "string", + "enum": ["APPLE_PAY_AMOUNT_MISMATCH"] + }, + "description": { + "type": "string", + "enum": [ + "The 'amount' specified in the Order should match the amount that was viewed and authorized by the payer/buyer on Apple Pay. If the amount has changed, please redirect the buyer to authorize the order again via Apple Pay." + ] + } + } + }, + "ONEOFPARAMETERSREQUIRED": { + "title": "ONE_OF_PARAMETERS_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["ONE_OF_PARAMETERS_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "One or more field is required to continue with this request." + ] + } + } + }, + "APPLEPAYAMOUNTMISMATCH1": { + "title": "APPLE_PAY_AMOUNT_MISMATCH", + "properties": { + "issue": { + "type": "string", + "enum": ["APPLE_PAY_AMOUNT_MISMATCH"] + }, + "description": { + "type": "string", + "enum": [ + "The 'amount' specified in the Order should match the amount that was viewed and authorized by the payer/buyer on Apple Pay. If the amount has changed, please redirect the buyer to authorize the order again via Apple Pay." + ] + } + } + }, + "TrackerAllOf1": { + "properties": { + "id": { + "type": "string", + "description": "The tracker id.", + "readOnly": true + }, + "status": { + "$ref": "#/components/schemas/TrackerStatus" + }, + "items": { + "type": "array", + "description": "An array of details of items in the shipment.", + "items": { + "$ref": "#/components/schemas/TrackerItem" + } + }, + "links": { + "type": "array", + "description": "An array of request-related HATEOAS links.", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/LinkDescription" + } + } + } + }, + "MALFORMEDREQUESTJSON": { + "title": "MALFORMED_REQUEST_JSON", + "properties": { + "issue": { + "type": "string", + "enum": ["MALFORMED_REQUEST_JSON"] + }, + "description": { + "type": "string", + "enum": ["The request JSON is not well formed."] + } + } + }, + "CANCELURLREQUIRED": { + "title": "CANCEL_URL_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["CANCEL_URL_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "The cancel url is required when attempting to vault this source." + ] + } + } + }, + "ITEMCATEGORYNOTSUPPORTEDBYPAYMENTSOURCE": { + "title": "ITEM_CATEGORY_NOT_SUPPORTED_BY_PAYMENT_SOURCE", + "properties": { + "issue": { + "type": "string", + "enum": ["ITEM_CATEGORY_NOT_SUPPORTED_BY_PAYMENT_SOURCE"] + }, + "description": { + "type": "string", + "enum": [ + "The provided payment source does not support provided item category." + ] + } + } + }, + "ORDERALREADYCOMPLETED": { + "title": "ORDER_ALREADY_COMPLETED", + "properties": { + "issue": { + "type": "string", + "enum": ["ORDER_ALREADY_COMPLETED"] + }, + "description": { + "type": "string", + "enum": ["The order cannot be patched after it is completed."] + } + } + }, + "ErrorDetails": { + "title": "Error Details", + "required": ["issue"], + "type": "object", + "properties": { + "field": { + "type": "string", + "description": "The field that caused the error. If this field is in the body, set this value to the field's JSON pointer value. Required for client-side errors" + }, + "issue": { + "type": "string", + "description": "The unique, fine-grained application-level error code" + }, + "description": { + "type": "string", + "description": "The human-readable description for an issue. The description can change over the lifetime of an API, so clients must not depend on this value" + }, + "location": { + "$ref": "#/components/schemas/ErrorLocation" + }, + "value": { + "type": "string", + "description": "The value of the field that caused the error" + } + }, + "description": "The error details. Required for client-side `4XX` errors" + }, + "INVALIDACCOUNTSTATUS": { + "title": "INVALID_ACCOUNT_STATUS", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_ACCOUNT_STATUS"] + }, + "description": { + "type": "string", + "enum": ["Account validations failed for the user."] + } + } + }, + "AGREEMENTALREADYCANCELLED2": { + "title": "AGREEMENT_ALREADY_CANCELLED", + "properties": { + "issue": { + "type": "string", + "enum": ["AGREEMENT_ALREADY_CANCELLED"] + }, + "description": { + "type": "string", + "enum": ["The requested agreement is already canceled."] + } + } + }, + "AGREEMENTALREADYCANCELLED1": { + "title": "AGREEMENT_ALREADY_CANCELLED", + "properties": { + "issue": { + "type": "string", + "enum": ["AGREEMENT_ALREADY_CANCELLED"] + }, + "description": { + "type": "string", + "enum": ["The requested agreement is already canceled."] + } + } + }, + "PaypalWalletAttributesResponse": { + "title": "PayPal Wallet Attributes Response", + "type": "object", + "properties": { + "cobranded_cards": { + "maxItems": 25, + "minItems": 0, + "type": "array", + "description": "An array of merchant cobranded cards used by buyer to complete an order. This array will be present if a merchant has onboarded their cobranded card with PayPal and provided corresponding label(s)", + "items": { + "$ref": "#/components/schemas/CobrandedCard" + }, + "x-ballerina-name-ignore": "cobrandedCards" + }, + "vault": { + "$ref": "#/components/schemas/PaypalWalletVaultResponse" + } + }, + "description": "Additional attributes associated with the use of a PayPal Wallet" + }, + "SellerReceivableBreakdown": { + "title": "Seller Receivable Breakdown", + "required": ["gross_amount"], + "type": "object", + "properties": { + "platform_fees": { + "maxItems": 1, + "minItems": 0, + "type": "array", + "description": "An array of platform or partner fees, commissions, or brokerage fees that associated with the captured payment", + "items": { + "$ref": "#/components/schemas/PlatformFee" + }, + "x-ballerina-name-ignore": "platformFees" + }, + "exchange_rate": { + "allOf": [ + { + "$ref": "#/components/schemas/ExchangeRate" + } + ], + "x-ballerina-name-ignore": "exchangeRate" + }, + "paypal_fee": { + "allOf": [ + { + "$ref": "#/components/schemas/Money" + } + ], + "x-ballerina-name-ignore": "paypalFee" + }, + "gross_amount": { + "allOf": [ + { + "$ref": "#/components/schemas/Money" + } + ], + "x-ballerina-name-ignore": "grossAmount" + }, + "paypal_fee_in_receivable_currency": { + "allOf": [ + { + "$ref": "#/components/schemas/Money" + } + ], + "x-ballerina-name-ignore": "paypalFeeInReceivableCurrency" + }, + "net_amount": { + "allOf": [ + { + "$ref": "#/components/schemas/Money" + } + ], + "x-ballerina-name-ignore": "netAmount" + }, + "receivable_amount": { + "allOf": [ + { + "$ref": "#/components/schemas/Money" + } + ], + "x-ballerina-name-ignore": "receivableAmount" + } + }, + "description": "The detailed breakdown of the capture activity. This is not available for transactions that are in pending state" + }, + "INVALIDPLATFORMFEESACCOUNT1": { + "title": "INVALID_PLATFORM_FEES_ACCOUNT", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_PLATFORM_FEES_ACCOUNT"] + }, + "description": { + "type": "string", + "enum": [ + "The specified platform_fees payee account is either invalid or account setup is incomplete.Please work with your PayPal Account Manager to enable this option for your account." + ] + } + } + }, + "PREFERREDSHIPPINGOPTIONAMOUNTMISMATCH1": { + "title": "PREFERRED_SHIPPING_OPTION_AMOUNT_MISMATCH", + "properties": { + "issue": { + "type": "string", + "enum": ["PREFERRED_SHIPPING_OPTION_AMOUNT_MISMATCH"] + }, + "description": { + "type": "string", + "enum": [ + "The amount provided in the preferred shipping option should match the amount provided in amount breakdown" + ] + } + } + }, + "MISMATCHEDVAULTIDTOPAYMENTSOURCE1": { + "title": "MISMATCHED_VAULT_ID_TO_PAYMENT_SOURCE", + "properties": { + "issue": { + "type": "string", + "enum": ["MISMATCHED_VAULT_ID_TO_PAYMENT_SOURCE"] + }, + "description": { + "type": "string", + "enum": [ + "The vault_id does not match the payment_source provided. Please verify that the vault_id token used refers to the matching payment_source and try again. For example, a PayPal token cannot be passed in the vault_id field in the payment_source.card object." + ] + } + } + }, + "PREVIOUSTRANSACTIONREFERENCEHASCHARGEBACK2": { + "title": "PREVIOUS_TRANSACTION_REFERENCE_HAS_CHARGEBACK", + "properties": { + "issue": { + "type": "string", + "enum": ["PREVIOUS_TRANSACTION_REFERENCE_HAS_CHARGEBACK"] + }, + "description": { + "type": "string", + "enum": [ + "The capture referenced by `previous_transaction_reference` has a chargeback and hence cannot be used for this order. Please use a `previous_transaction_reference` which does not have a chargeback." + ] + } + } + }, + "PREVIOUSTRANSACTIONREFERENCEHASCHARGEBACK1": { + "title": "PREVIOUS_TRANSACTION_REFERENCE_HAS_CHARGEBACK", + "properties": { + "issue": { + "type": "string", + "enum": ["PREVIOUS_TRANSACTION_REFERENCE_HAS_CHARGEBACK"] + }, + "description": { + "type": "string", + "enum": [ + "The capture referenced by `previous_transaction_reference` has a chargeback and hence cannot be used for this order. Please use a `previous_transaction_reference` which does not have a chargeback." + ] + } + } + }, + "MISMATCHEDVAULTIDTOPAYMENTSOURCE3": { + "title": "MISMATCHED_VAULT_ID_TO_PAYMENT_SOURCE", + "properties": { + "issue": { + "type": "string", + "enum": ["MISMATCHED_VAULT_ID_TO_PAYMENT_SOURCE"] + }, + "description": { + "type": "string", + "enum": [ + "The vault_id does not match the payment_source provided. Please verify that the vault_id token used refers to the matching payment_source and try again. For example, a PayPal token cannot be passed in the vault_id field in the payment_source.card object." + ] + } + } + }, + "AddressDetails": { + "title": "Address Details", + "type": "object", + "properties": { + "building_name": { + "maxLength": 100, + "type": "string", + "description": "A named locations that represents the premise. Usually a building name or number or collection of buildings with a common name or number. For example, Craven House", + "x-ballerina-name-ignore": "buildingName" + }, + "street_number": { + "maxLength": 100, + "type": "string", + "description": "The street number", + "x-ballerina-name-ignore": "streetNumber" + }, + "street_type": { + "maxLength": 100, + "type": "string", + "description": "The street type. For example, avenue, boulevard, road, or expressway", + "x-ballerina-name-ignore": "streetType" + }, + "sub_building": { + "maxLength": 100, + "type": "string", + "description": "The first-order entity below a named building or location that represents the sub-premises. Usually a single building within a collection of buildings with a common name. Can be a flat, story, floor, room, or apartment", + "x-ballerina-name-ignore": "subBuilding" + }, + "delivery_service": { + "maxLength": 100, + "type": "string", + "description": "The delivery service. Post office box, bag number, or post office name", + "x-ballerina-name-ignore": "deliveryService" + }, + "street_name": { + "maxLength": 100, + "type": "string", + "description": "The street name. Just `Drury` in `Drury Lane`", + "x-ballerina-name-ignore": "streetName" + } + }, + "description": "The non-portable additional address details that are sometimes needed for compliance, risk, or other scenarios where fine-grain address information might be needed. Not portable with common third party and open source. Redundant with core fields.
For example, `address_portable.address_line_1` is usually a combination of `address_details.street_number`, `street_name`, and `street_type`" + }, + "MISMATCHEDVAULTIDTOPAYMENTSOURCE2": { + "title": "MISMATCHED_VAULT_ID_TO_PAYMENT_SOURCE", + "properties": { + "issue": { + "type": "string", + "enum": ["MISMATCHED_VAULT_ID_TO_PAYMENT_SOURCE"] + }, + "description": { + "type": "string", + "enum": [ + "The vault_id does not match the payment_source provided. Please verify that the vault_id token used refers to the matching payment_source and try again. For example, a PayPal token cannot be passed in the vault_id field in the payment_source.card object." + ] + } + } + }, + "Ordersauthorize400Details": { + "anyOf": [ + { + "$ref": "#/components/schemas/INVALIDCOUNTRYCODE1" + }, + { + "$ref": "#/components/schemas/INVALIDPARAMETERVALUE3" + }, + { + "$ref": "#/components/schemas/MISSINGREQUIREDPARAMETER3" + }, + { + "$ref": "#/components/schemas/INVALIDSTRINGLENGTH3" + }, + { + "$ref": "#/components/schemas/INVALIDPARAMETERSYNTAX3" + }, + { + "$ref": "#/components/schemas/MALFORMEDREQUESTJSON3" + } + ] + }, + "MAXNUMBEROFPAYMENTATTEMPTSEXCEEDED2": { + "title": "MAX_NUMBER_OF_PAYMENT_ATTEMPTS_EXCEEDED", + "properties": { + "issue": { + "type": "string", + "enum": ["MAX_NUMBER_OF_PAYMENT_ATTEMPTS_EXCEEDED"] + }, + "description": { + "type": "string", + "enum": [ + "You have exceeded the maximum number of payment attempts." + ] + } + } + }, + "MAXNUMBEROFPAYMENTATTEMPTSEXCEEDED1": { + "title": "MAX_NUMBER_OF_PAYMENT_ATTEMPTS_EXCEEDED", + "properties": { + "issue": { + "type": "string", + "enum": ["MAX_NUMBER_OF_PAYMENT_ATTEMPTS_EXCEEDED"] + }, + "description": { + "type": "string", + "enum": [ + "You have exceeded the maximum number of payment attempts." + ] + } + } + }, + "PAYERACCOUNTRESTRICTED": { + "title": "PAYER_ACCOUNT_RESTRICTED", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYER_ACCOUNT_RESTRICTED"] + }, + "description": { + "type": "string", + "enum": ["PAYER_ACCOUNT_RESTRICTED"] + } + } + }, + "MULTIPLESHIPPINGTYPENOTSUPPORTED": { + "title": "MULTIPLE_SHIPPING_TYPE_NOT_SUPPORTED", + "properties": { + "issue": { + "type": "string", + "enum": ["MULTIPLE_SHIPPING_TYPE_NOT_SUPPORTED"] + }, + "description": { + "type": "string", + "enum": [ + "Different `shipping.type` are not supported across purchase units." + ] + } + } + }, + "REQUIREDPARAMETERFORCUSTOMERINITIATEDPAYMENT2": { + "title": "REQUIRED_PARAMETER_FOR_CUSTOMER_INITIATED_PAYMENT", + "properties": { + "issue": { + "type": "string", + "enum": ["REQUIRED_PARAMETER_FOR_CUSTOMER_INITIATED_PAYMENT"] + }, + "description": { + "type": "string", + "enum": [ + "This parameter is required when the customer is present. If the customer is not present, indicate so by sending payment_initiator=`MERCHANT`. For details, see Stored Credential." + ] + } + } + }, + "Ordersauthorize422Details": { + "anyOf": [ + { + "$ref": "#/components/schemas/ACTIONDOESNOTMATCHINTENT" + }, + { + "$ref": "#/components/schemas/AGREEMENTALREADYCANCELLED1" + }, + { + "$ref": "#/components/schemas/BILLINGAGREEMENTNOTFOUND1" + }, + { + "$ref": "#/components/schemas/MISSINGPREVIOUSREFERENCE2" + }, + { + "$ref": "#/components/schemas/MISSINGCRYPTOGRAM2" + }, + { + "$ref": "#/components/schemas/CARDBRANDNOTSUPPORTED" + }, + { + "$ref": "#/components/schemas/DECLINEDDUETORELATEDTXN" + }, + { + "$ref": "#/components/schemas/DOMESTICTRANSACTIONREQUIRED1" + }, + { + "$ref": "#/components/schemas/DUPLICATEINVOICEID1" + }, + { + "$ref": "#/components/schemas/ORDERNOTAPPROVED" + }, + { + "$ref": "#/components/schemas/MAXNUMBEROFPAYMENTATTEMPTSEXCEEDED1" + }, + { + "$ref": "#/components/schemas/PAYEEBLOCKEDTRANSACTION1" + }, + { + "$ref": "#/components/schemas/PAYEEFXRATEIDEXPIRED2" + }, + { + "$ref": "#/components/schemas/UNSUPPORTEDINTENTFORPAYMENTSOURCE" + }, + { + "$ref": "#/components/schemas/PAYERACCOUNTLOCKEDORCLOSED1" + }, + { + "$ref": "#/components/schemas/PAYERACCOUNTRESTRICTED1" + }, + { + "$ref": "#/components/schemas/PAYERCANNOTPAY1" + }, + { + "$ref": "#/components/schemas/PAYPALTRANSACTIONIDEXPIRED" + }, + { + "$ref": "#/components/schemas/PNREFEXPIRED" + }, + { + "$ref": "#/components/schemas/REFERENCEDCARDEXPIRED" + }, + { + "$ref": "#/components/schemas/TOKENEXPIRED2" + }, + { + "$ref": "#/components/schemas/TOKENIDNOTFOUND" + }, + { + "$ref": "#/components/schemas/TRANSACTIONLIMITEXCEEDED2" + }, + { + "$ref": "#/components/schemas/TRANSACTIONRECEIVINGLIMITEXCEEDED1" + }, + { + "$ref": "#/components/schemas/TRANSACTIONREFUSED1" + }, + { + "$ref": "#/components/schemas/ORDERALREADYAUTHORIZED1" + }, + { + "$ref": "#/components/schemas/AUTHCAPTURENOTENABLED1" + }, + { + "$ref": "#/components/schemas/AMOUNTCANNOTBESPECIFIED" + }, + { + "$ref": "#/components/schemas/AUTHORIZATIONAMOUNTEXCEEDED" + }, + { + "$ref": "#/components/schemas/AUTHORIZATIONCURRENCYMISMATCH" + }, + { + "$ref": "#/components/schemas/MAXAUTHORIZATIONCOUNTEXCEEDED" + }, + { + "$ref": "#/components/schemas/ORDERCOMPLETEDORVOIDED" + }, + { + "$ref": "#/components/schemas/ORDEREXPIRED" + }, + { + "$ref": "#/components/schemas/INVALIDPICKUPADDRESS" + }, + { + "$ref": "#/components/schemas/SHIPPINGADDRESSINVALID2" + }, + { + "$ref": "#/components/schemas/PAYMENTTYPENOTSUPPORTEDFORINTENT" + }, + { + "$ref": "#/components/schemas/BILLINGAGREEMENTIDMISMATCH" + }, + { + "$ref": "#/components/schemas/PREFERREDPAYMENTSOURCEMISMATCH" + }, + { + "$ref": "#/components/schemas/INCOMPATIBLEPARAMETERVALUE2" + }, + { + "$ref": "#/components/schemas/INVALIDPREVIOUSTRANSACTIONREFERENCE1" + }, + { + "$ref": "#/components/schemas/PREVIOUSTRANSACTIONREFERENCEHASCHARGEBACK1" + }, + { + "$ref": "#/components/schemas/PREVIOUSTRANSACTIONREFERENCEVOIDED1" + }, + { + "$ref": "#/components/schemas/PAYMENTSOURCEMISMATCH1" + }, + { + "$ref": "#/components/schemas/MERCHANTINITIATEDWITHSECURITYCODE1" + }, + { + "$ref": "#/components/schemas/MERCHANTINITIATEDWITHAUTHENTICATIONRESULTS1" + }, + { + "$ref": "#/components/schemas/MERCHANTINITIATEDWITHMULTIPLEPURCHASEUNITS1" + }, + { + "$ref": "#/components/schemas/RETURNURLREQUIRED1" + }, + { + "$ref": "#/components/schemas/CANCELURLREQUIRED1" + }, + { + "$ref": "#/components/schemas/PAYERACTIONREQUIRED" + }, + { + "$ref": "#/components/schemas/APPLEPAYAMOUNTMISMATCH2" + }, + { + "$ref": "#/components/schemas/CARDNUMBERREQUIRED1" + }, + { + "$ref": "#/components/schemas/CARDEXPIRYREQUIRED1" + }, + { + "$ref": "#/components/schemas/VAULTINSTRUCTIONREQUIRED2" + }, + { + "$ref": "#/components/schemas/MISMATCHEDVAULTIDTOPAYMENTSOURCE2" + }, + { + "$ref": "#/components/schemas/ORDERCANNOTBESAVED" + }, + { + "$ref": "#/components/schemas/SAVEORDERNOTSUPPORTED" + }, + { + "$ref": "#/components/schemas/NOTELIGIBLEFORPNREFPROCESSING2" + }, + { + "$ref": "#/components/schemas/NOTELIGIBLEFORPAYPALTRANSACTIONIDPROCESSING2" + }, + { + "$ref": "#/components/schemas/PAYPALTRANSACTIONIDNOTFOUND2" + }, + { + "$ref": "#/components/schemas/PNREFNOTFOUND2" + }, + { + "$ref": "#/components/schemas/INVALIDSECURITYCODELENGTH2" + }, + { + "$ref": "#/components/schemas/REQUIREDPARAMETERFORCUSTOMERINITIATEDPAYMENT2" + } + ] + }, + "REQUIREDPARAMETERFORCUSTOMERINITIATEDPAYMENT3": { + "title": "REQUIRED_PARAMETER_FOR_CUSTOMER_INITIATED_PAYMENT", + "properties": { + "issue": { + "type": "string", + "enum": ["REQUIRED_PARAMETER_FOR_CUSTOMER_INITIATED_PAYMENT"] + }, + "description": { + "type": "string", + "enum": [ + "This parameter is required when the customer is present. If the customer is not present, indicate so by sending payment_initiator=`MERCHANT`. For details, see Stored Credential." + ] + } + } + }, + "REQUIREDPARAMETERFORCUSTOMERINITIATEDPAYMENT1": { + "title": "REQUIRED_PARAMETER_FOR_CUSTOMER_INITIATED_PAYMENT", + "properties": { + "issue": { + "type": "string", + "enum": ["REQUIRED_PARAMETER_FOR_CUSTOMER_INITIATED_PAYMENT"] + }, + "description": { + "type": "string", + "enum": [ + "This parameter is required when the customer is present. If the customer is not present, indicate so by sending payment_initiator=`MERCHANT`. For details, see Stored Credential." + ] + } + } + }, + "UNSUPPORTEDINTENT": { + "title": "UNSUPPORTED_INTENT", + "properties": { + "issue": { + "type": "string", + "enum": ["UNSUPPORTED_INTENT"] + }, + "description": { + "type": "string", + "enum": [ + "`intent=AUTHORIZE` is not supported for multiple purchase units. Only `intent=CAPTURE` is supported." + ] + } + } + }, + "INVALIDCOUNTRYCODE1": { + "title": "INVALID_COUNTRY_CODE", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_COUNTRY_CODE"] + }, + "description": { + "type": "string", + "enum": [ + "Country code is invalid. Please refer to https://developer.paypal.com/api/rest/reference/country-codes/ for a list of supported country codes." + ] + } + } + }, + "AMOUNTCANNOTBESPECIFIED": { + "title": "AMOUNT_CANNOT_BE_SPECIFIED", + "properties": { + "issue": { + "type": "string", + "enum": ["AMOUNT_CANNOT_BE_SPECIFIED"] + }, + "description": { + "type": "string", + "enum": [ + "An authorization amount can only be specified if an Order has been saved by calling /v2/checkout/orders/{order_id}/save. Please save the order and try again." + ] + } + } + }, + "INVALIDSTRINGMAXLENGTH": { + "title": "INVALID_STRING_MAX_LENGTH", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_STRING_MAX_LENGTH"] + }, + "description": { + "type": "string", + "enum": ["The value of a field is too long."] + } + } + }, + "VAULTINSTRUCTIONDUPLICATED": { + "title": "VAULT_INSTRUCTION_DUPLICATED", + "properties": { + "issue": { + "type": "string", + "enum": ["VAULT_INSTRUCTION_DUPLICATED"] + }, + "description": { + "type": "string", + "enum": [ + "Only one vault instruction is allowed. Please use `vault.store_in_vault` to provide vault instruction." + ] + } + } + }, + "PayeeAllOf2": { + "properties": {} + }, + "VaultVenmoWalletBaseAllOf2": { + "properties": { + "description": { + "maxLength": 128, + "minLength": 1, + "pattern": "^[a-zA-Z0-9_'\\-., :;\\!?\"]*$", + "type": "string", + "description": "The description displayed to Venmo consumer on the approval flow for Venmo, as well as on the Venmo payment token management experience on Venmo.com." + }, + "usage_pattern": { + "maxLength": 30, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "Expected business/pricing model for the billing agreement.", + "enum": [ + "IMMEDIATE", + "DEFERRED", + "RECURRING_PREPAID", + "RECURRING_POSTPAID", + "THRESHOLD_PREPAID", + "THRESHOLD_POSTPAID" + ] + }, + "usage_type": { + "maxLength": 255, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "The usage type associated with the Venmo payment token.", + "enum": ["MERCHANT", "PLATFORM"] + }, + "customer_type": { + "maxLength": 255, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "The customer type associated with the Venmo payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer.", + "default": "CONSUMER", + "enum": ["CONSUMER", "BUSINESS"] + }, + "permit_multiple_payment_tokens": { + "type": "boolean", + "description": "Create multiple payment tokens for the same payer, merchant/platform combination. Use this when the customer has not logged in at merchant/platform. The payment token thus generated, can then also be used to create the customer account at merchant/platform. Use this also when multiple payment tokens are required for the same payer, different customer at merchant/platform. This helps to identify customers distinctly even though they may share the same Venmo account.", + "default": false + } + } + }, + "NOTPATCHABLE": { + "title": "NOT_PATCHABLE", + "properties": { + "issue": { + "type": "string", + "enum": ["NOT_PATCHABLE"] + }, + "description": { + "type": "string", + "enum": ["Cannot be patched."] + } + } + }, + "DECLINEDDUETORELATEDTXN": { + "title": "DECLINED_DUE_TO_RELATED_TXN", + "properties": { + "issue": { + "type": "string", + "enum": ["DECLINED_DUE_TO_RELATED_TXN"] + }, + "description": { + "type": "string", + "enum": [ + "One or more transactions in this Order did not succeed. Since this Order is being processed as an All or None Order, if one or more transactions in this Order do not succeed, then all purchase units are marked declined and will not be processed." + ] + } + } + }, + "INVALIDFXRATEID": { + "title": "INVALID_FX_RATE_ID", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_FX_RATE_ID"] + }, + "description": { + "type": "string", + "enum": [ + "The specific FX Rate ID is not valid. This could be either because we are not able to look up the FX Rate based on this ID or it could be because the ID belongs to another API Caller." + ] + } + } + }, + "CountryCode2": { + "maxLength": 2, + "minLength": 2, + "pattern": "^([A-Z]{2}|C2)$", + "type": "string", + "description": "The [2-character ISO 3166-1 code](/api/rest/reference/country-codes/) that identifies the country or region.
Note: The country code for Great Britain is GB and not UK as used in the top-level domain names for that country. Use the `C2` country code for China worldwide for comparable uncontrolled price (CUP) method, bank card, and cross-border transactions.
", + "format": "ppaas_common_country_code_v2" + }, + "AccountId": { + "title": "PayPal Account Identifier", + "maxLength": 13, + "minLength": 13, + "pattern": "^[2-9A-HJ-NP-Z]{13}$", + "type": "string", + "description": "The account identifier for a PayPal account", + "format": "ppaas_payer_id_v3" + }, + "CardAttributes": { + "title": "Card Attributes", + "type": "object", + "properties": { + "vault": { + "$ref": "#/components/schemas/VaultInstructionBase" + }, + "customer": { + "$ref": "#/components/schemas/Customer" + } + }, + "description": "Additional attributes associated with the use of this card" + }, + "AuthorizationAllOf2": { + "properties": { + "id": { + "type": "string", + "description": "The PayPal-generated ID for the authorized payment.", + "readOnly": true + }, + "amount": { + "$ref": "#/components/schemas/Money" + }, + "invoice_id": { + "type": "string", + "description": "The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives.", + "readOnly": true + }, + "custom_id": { + "maxLength": 127, + "type": "string", + "description": "The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports." + }, + "network_transaction_reference": { + "$ref": "#/components/schemas/NetworkTransactionReference" + }, + "seller_protection": { + "$ref": "#/components/schemas/SellerProtection" + }, + "expiration_time": { + "$ref": "#/components/schemas/DateTime" + }, + "links": { + "type": "array", + "description": "An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/LinkDescription" + } + } + } + }, + "SHIPPINGOPTIONSNOTSUPPORTED1": { + "title": "SHIPPING_OPTIONS_NOT_SUPPORTED", + "properties": { + "issue": { + "type": "string", + "enum": ["SHIPPING_OPTIONS_NOT_SUPPORTED"] + }, + "description": { + "type": "string", + "enum": [ + "Shipping options are not supported when 'application_context.shipping_preference' is set as 'NO_SHIPPING' or 'SET_PROVIDED_ADDRESS'." + ] + } + } + }, + "Ordersconfirm422Details": { + "anyOf": [ + { + "$ref": "#/components/schemas/ORDERALREADYCAPTURED" + }, + { + "$ref": "#/components/schemas/ORDERALREADYAUTHORIZED" + }, + { + "$ref": "#/components/schemas/ORDERCANNOTBECONFIRMED" + }, + { + "$ref": "#/components/schemas/MISSINGPREVIOUSREFERENCE1" + }, + { + "$ref": "#/components/schemas/MISSINGCRYPTOGRAM1" + }, + { + "$ref": "#/components/schemas/CURRENCYNOTSUPPORTEDFORCOUNTRY" + }, + { + "$ref": "#/components/schemas/CARDEXPIRED1" + }, + { + "$ref": "#/components/schemas/CARDTYPENOTSUPPORTED" + }, + { + "$ref": "#/components/schemas/CURRENCYNOTSUPPORTEDFORCARDTYPE" + }, + { + "$ref": "#/components/schemas/ONLYONEPAYMENTSOURCEALLOWED" + }, + { + "$ref": "#/components/schemas/NOPAYMENTSOURCEPROVIDED" + }, + { + "$ref": "#/components/schemas/PAYMENTALREADYAPPROVED" + }, + { + "$ref": "#/components/schemas/UNSUPPORTEDPROCESSINGINSTRUCTION1" + }, + { + "$ref": "#/components/schemas/ORDERCOMPLETEONPAYMENTAPPROVAL1" + }, + { + "$ref": "#/components/schemas/INVALIDEXPIRYDATE1" + }, + { + "$ref": "#/components/schemas/TOKENEXPIRED1" + }, + { + "$ref": "#/components/schemas/INVALIDGOOGLEPAYTOKEN1" + }, + { + "$ref": "#/components/schemas/GOOGLEPAYGATEWAYMERCHANTIDMISMATCH1" + }, + { + "$ref": "#/components/schemas/CRYPTOGRAMREQUIRED2" + }, + { + "$ref": "#/components/schemas/ONEOFPARAMETERSREQUIRED1" + }, + { + "$ref": "#/components/schemas/RETURNURLREQUIRED" + }, + { + "$ref": "#/components/schemas/CANCELURLREQUIRED" + }, + { + "$ref": "#/components/schemas/COUNTRYNOTSUPPORTEDBYPAYMENTSOURCE" + }, + { + "$ref": "#/components/schemas/REQUIREDPARAMETERFORPAYMENTSOURCE" + }, + { + "$ref": "#/components/schemas/REQUIREDPARAMETERFORCUSTOMERINITIATEDPAYMENT1" + }, + { + "$ref": "#/components/schemas/ITEMCATEGORYNOTSUPPORTEDBYPAYMENTSOURCE" + }, + { + "$ref": "#/components/schemas/PAYMENTSOURCEINFOCANNOTBEVERIFIED1" + }, + { + "$ref": "#/components/schemas/PAYMENTSOURCEDECLINEDBYPROCESSOR1" + }, + { + "$ref": "#/components/schemas/PAYMENTSOURCECANNOTBEUSED1" + }, + { + "$ref": "#/components/schemas/SETUPERRORFORBANK" + }, + { + "$ref": "#/components/schemas/BANKNOTSUPPORTEDFORVERIFICATION" + }, + { + "$ref": "#/components/schemas/APPLEPAYAMOUNTMISMATCH1" + }, + { + "$ref": "#/components/schemas/ONEOFTHEPARAMETERSREQUIRED" + }, + { + "$ref": "#/components/schemas/BILLINGADDRESSINVALID1" + }, + { + "$ref": "#/components/schemas/SHIPPINGADDRESSINVALID1" + }, + { + "$ref": "#/components/schemas/ORDERISPENDINGAPPROVAL" + }, + { + "$ref": "#/components/schemas/DEVICEDATANOTAVAILABLE" + }, + { + "$ref": "#/components/schemas/CURRENCYNOTSUPPORTEDFORBANK" + }, + { + "$ref": "#/components/schemas/ONLYONEBANKSOURCEALLOWED" + }, + { + "$ref": "#/components/schemas/INVALIDIBAN" + }, + { + "$ref": "#/components/schemas/IBANCOUNTRYNOTSUPPORTED" + }, + { + "$ref": "#/components/schemas/PAYEECOUNTRYNOTSUPPORTEDFORPAYMENTSOURCE" + }, + { + "$ref": "#/components/schemas/CARDNUMBERREQUIRED" + }, + { + "$ref": "#/components/schemas/CARDEXPIRYREQUIRED" + }, + { + "$ref": "#/components/schemas/INCOMPATIBLEPARAMETERVALUE1" + }, + { + "$ref": "#/components/schemas/VAULTINSTRUCTIONDUPLICATED1" + }, + { + "$ref": "#/components/schemas/VAULTINSTRUCTIONREQUIRED1" + }, + { + "$ref": "#/components/schemas/MISMATCHEDVAULTIDTOPAYMENTSOURCE1" + }, + { + "$ref": "#/components/schemas/NOTELIGIBLEFORPNREFPROCESSING1" + }, + { + "$ref": "#/components/schemas/NOTELIGIBLEFORPAYPALTRANSACTIONIDPROCESSING1" + }, + { + "$ref": "#/components/schemas/PAYPALTRANSACTIONIDNOTFOUND1" + }, + { + "$ref": "#/components/schemas/PNREFNOTFOUND1" + }, + { + "$ref": "#/components/schemas/INVALIDSECURITYCODELENGTH1" + }, + { + "$ref": "#/components/schemas/NOTENABLEDTOVAULTPAYMENTSOURCE1" + }, + { + "$ref": "#/components/schemas/CRYPTOGRAMREQUIRED3" + }, + { + "$ref": "#/components/schemas/EMVDATAREQUIRED1" + }, + { + "$ref": "#/components/schemas/ALIASDECLINEDBYPROCESSOR1" + }, + { + "$ref": "#/components/schemas/BLIKONECLICKMISSINGREQUIREDPARAMETER1" + }, + { + "$ref": "#/components/schemas/TRANSACTIONLIMITEXCEEDED1" + } + ] + }, + "BinDetails": { + "title": "Bin Details", + "type": "object", + "properties": { + "bin": { + "maxLength": 25, + "minLength": 1, + "pattern": "^[0-9]+$", + "type": "string", + "description": "The Bank Identification Number (BIN) signifies the number that is being used to identify the granular level details (except the PII information) of the card" + }, + "bin_country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/CountryCode" + } + ], + "x-ballerina-name-ignore": "binCountryCode" + }, + "issuing_bank": { + "maxLength": 64, + "minLength": 1, + "type": "string", + "description": "The issuer of the card instrument", + "x-ballerina-name-ignore": "issuingBank" + }, + "products": { + "maxItems": 256, + "minItems": 1, + "type": "array", + "description": "The type of card product assigned to the BIN by the issuer. These values are defined by the issuer and may change over time. Some examples include: PREPAID_GIFT, CONSUMER, CORPORATE", + "items": { + "maxLength": 255, + "minLength": 1, + "type": "string", + "description": "This value provides the category of the BIN." + } + } + }, + "description": "Bank Identification Number (BIN) details used to fund a payment" + }, + "SHIPPINGOPTIONSNOTSUPPORTED2": { + "title": "SHIPPING_OPTIONS_NOT_SUPPORTED", + "properties": { + "issue": { + "type": "string", + "enum": ["SHIPPING_OPTIONS_NOT_SUPPORTED"] + }, + "description": { + "type": "string", + "enum": [ + "Shipping options are not supported when 'application_context.shipping_preference' is set as 'NO_SHIPPING' or 'SET_PROVIDED_ADDRESS'." + ] + } + } + }, + "VaultInstructionBase": { + "title": "Base vault Instruction parameters", + "type": "object", + "properties": { + "store_in_vault": { + "allOf": [ + { + "$ref": "#/components/schemas/StoreInVaultInstruction" + } + ], + "x-ballerina-name-ignore": "storeInVault" + } + }, + "description": "Basic vault instruction specification that can be extended by specific payment sources that supports vaulting" + }, + "Orderstrackcreate422Details": { + "anyOf": [ + { + "$ref": "#/components/schemas/CAPTURESTATUSNOTVALID" + }, + { + "$ref": "#/components/schemas/ITEMSKUMISMATCH" + }, + { + "$ref": "#/components/schemas/CAPTUREIDNOTFOUND" + }, + { + "$ref": "#/components/schemas/MSPNOTSUPPORTED" + } + ] + }, + "Name": { + "title": "Name", + "type": "object", + "properties": { + "full_name": { + "maxLength": 300, + "type": "string", + "description": "When the party is a person, the party's full name", + "x-ballerina-name-ignore": "fullName" + }, + "prefix": { + "maxLength": 140, + "type": "string", + "description": "The prefix, or title, to the party's name" + }, + "surname": { + "maxLength": 140, + "type": "string", + "description": "When the party is a person, the party's surname or family name. Also known as the last name. Required when the party is a person. Use also to store multiple surnames including the matronymic, or mother's, surname" + }, + "given_name": { + "maxLength": 140, + "type": "string", + "description": "When the party is a person, the party's given, or first, name", + "x-ballerina-name-ignore": "givenName" + }, + "middle_name": { + "maxLength": 140, + "type": "string", + "description": "When the party is a person, the party's middle name. Use also to store multiple middle names including the patronymic, or father's, middle name", + "x-ballerina-name-ignore": "middleName" + }, + "suffix": { + "maxLength": 140, + "type": "string", + "description": "The suffix for the party's name" + }, + "alternate_full_name": { + "maxLength": 300, + "type": "string", + "description": "DEPRECATED. The party's alternate name. Can be a business name, nickname, or any other name that cannot be split into first, last name. Required when the party is a business", + "x-ballerina-name-ignore": "alternateFullName" + } + }, + "description": "The name of the party" + }, + "PAYEEACCOUNTRESTRICTED": { + "title": "PAYEE_ACCOUNT_RESTRICTED", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYEE_ACCOUNT_RESTRICTED"] + }, + "description": { + "type": "string", + "enum": ["The merchant account is restricted."] + } + } + }, + "P24": { + "title": "P24 payment object", + "type": "object", + "properties": { + "country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/CountryCode" + } + ], + "x-ballerina-name-ignore": "countryCode" + }, + "payment_descriptor": { + "maxLength": 2000, + "minLength": 1, + "type": "string", + "description": "P24 generated payment description", + "x-ballerina-name-ignore": "paymentDescriptor" + }, + "method_id": { + "maxLength": 300, + "minLength": 1, + "type": "string", + "description": "Numeric identifier of the payment scheme or bank used for the payment", + "x-ballerina-name-ignore": "methodId" + }, + "method_description": { + "maxLength": 2000, + "minLength": 1, + "type": "string", + "description": "Friendly name of the payment scheme or bank used for the payment", + "x-ballerina-name-ignore": "methodDescription" + }, + "name": { + "$ref": "#/components/schemas/FullName" + }, + "email": { + "$ref": "#/components/schemas/EmailAddress" + } + }, + "description": "Information used to pay using P24(Przelewy24)" + }, + "PAYMENTSOURCEMISMATCH": { + "title": "PAYMENT_SOURCE_MISMATCH", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYMENT_SOURCE_MISMATCH"] + }, + "description": { + "type": "string", + "enum": [ + "The `payment_source` in the request must match the `payment_source` used for the authorization or capture referenced by `previous_transaction_reference`. Please use `previous_transaction_reference` whose `payment_source` matches with the `payment_source` specified in the order." + ] + } + } + }, + "PayeeBase": { + "title": "Merchant Base", + "type": "object", + "properties": { + "email_address": { + "allOf": [ + { + "$ref": "#/components/schemas/Email" + } + ], + "x-ballerina-name-ignore": "emailAddress" + }, + "merchant_id": { + "allOf": [ + { + "$ref": "#/components/schemas/AccountId" + } + ], + "x-ballerina-name-ignore": "merchantId" + } + }, + "description": "The details for the merchant who receives the funds and fulfills the order. The merchant is also known as the payee" + }, + "AmountWithBreakdownAllOf2": { + "properties": { + "breakdown": { + "$ref": "#/components/schemas/AmountBreakdown" + } + } + }, + "TRANSACTIONLIMITEXCEEDED3": { + "title": "TRANSACTION_LIMIT_EXCEEDED", + "properties": { + "issue": { + "type": "string", + "enum": ["TRANSACTION_LIMIT_EXCEEDED"] + }, + "description": { + "type": "string", + "enum": ["Total payment amount exceeded transaction limit."] + } + } + }, + "TRANSACTIONLIMITEXCEEDED2": { + "title": "TRANSACTION_LIMIT_EXCEEDED", + "properties": { + "issue": { + "type": "string", + "enum": ["TRANSACTION_LIMIT_EXCEEDED"] + }, + "description": { + "type": "string", + "enum": ["Total payment amount exceeded transaction limit."] + } + } + }, + "CURRENCYNOTSUPPORTEDFORCARDTYPE": { + "title": "CURRENCY_NOT_SUPPORTED_FOR_CARD_TYPE", + "properties": { + "issue": { + "type": "string", + "enum": ["CURRENCY_NOT_SUPPORTED_FOR_CARD_TYPE"] + }, + "description": { + "type": "string", + "enum": [ + "The issued currency code of this card is not supported for direct card payments. Please refer https://developer.paypal.com/api/rest/reference/currency-codes/ for list of supported currency codes." + ] + } + } + }, + "TRANSACTIONLIMITEXCEEDED1": { + "title": "TRANSACTION_LIMIT_EXCEEDED", + "properties": { + "issue": { + "type": "string", + "enum": ["TRANSACTION_LIMIT_EXCEEDED"] + }, + "description": { + "type": "string", + "enum": ["Total payment amount exceeded transaction limit."] + } + } + }, + "Name2": { + "title": "Name", + "type": "object", + "properties": { + "full_name": { + "maxLength": 300, + "type": "string", + "description": "When the party is a person, the party's full name", + "x-ballerina-name-ignore": "fullName" + }, + "prefix": { + "maxLength": 140, + "type": "string", + "description": "The prefix, or title, to the party's name" + }, + "surname": { + "maxLength": 140, + "type": "string", + "description": "When the party is a person, the party's surname or family name. Also known as the last name. Required when the party is a person. Use also to store multiple surnames including the matronymic, or mother's, surname" + }, + "given_name": { + "maxLength": 140, + "type": "string", + "description": "When the party is a person, the party's given, or first, name", + "x-ballerina-name-ignore": "givenName" + }, + "middle_name": { + "maxLength": 140, + "type": "string", + "description": "When the party is a person, the party's middle name. Use also to store multiple middle names including the patronymic, or father's, middle name", + "x-ballerina-name-ignore": "middleName" + }, + "suffix": { + "maxLength": 140, + "type": "string", + "description": "The suffix for the party's name" + } + }, + "description": "The name of the party" + }, + "PaypalWalletAttributes": { + "title": "PayPal Wallet Attributes", + "type": "object", + "properties": { + "vault": { + "$ref": "#/components/schemas/VaultPaypalWalletBase" + }, + "customer": { + "$ref": "#/components/schemas/PaypalWalletCustomer" + } + }, + "description": "Additional attributes associated with the use of this PayPal Wallet" + }, + "ONEOFTHEPARAMETERSREQUIRED": { + "title": "ONE_OF_THE_PARAMETERS_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["ONE_OF_THE_PARAMETERS_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "One or more field is required to continue with this request." + ] + } + } + }, + "TRANSACTIONLIMITEXCEEDED": { + "title": "TRANSACTION_LIMIT_EXCEEDED", + "properties": { + "issue": { + "type": "string", + "enum": ["TRANSACTION_LIMIT_EXCEEDED"] + }, + "description": { + "type": "string", + "enum": ["Total payment amount exceeded transaction limit."] + } + } + }, + "AuthorizationWithAdditionalDataAllOf2": { + "properties": { + "processor_response": { + "$ref": "#/components/schemas/ProcessorResponse" + } + } + }, + "MISSINGREQUIREDPARAMETER": { + "title": "MISSING_REQUIRED_PARAMETER", + "properties": { + "issue": { + "type": "string", + "enum": ["MISSING_REQUIRED_PARAMETER"] + }, + "description": { + "type": "string", + "enum": ["A required parameter is missing."] + } + } + }, + "INVALIDPLATFORMFEESAMOUNT": { + "title": "INVALID_PLATFORM_FEES_AMOUNT", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_PLATFORM_FEES_AMOUNT"] + }, + "description": { + "type": "string", + "enum": [ + "The platform_fees amount cannot be greater than order amount." + ] + } + } + }, + "401Details": { + "anyOf": [ + { + "$ref": "#/components/schemas/INVALIDACCOUNTSTATUS" + } + ] + }, + "PaypalWallet": { + "title": "PayPal Wallet", + "type": "object", + "properties": { + "experience_context": { + "allOf": [ + { + "$ref": "#/components/schemas/PaypalWalletExperienceContext" + } + ], + "x-ballerina-name-ignore": "experienceContext" + }, + "billing_agreement_id": { + "allOf": [ + { + "$ref": "#/components/schemas/BillingAgreementId" + } + ], + "x-ballerina-name-ignore": "billingAgreementId" + }, + "email_address": { + "allOf": [ + { + "$ref": "#/components/schemas/Email" + } + ], + "x-ballerina-name-ignore": "emailAddress" + }, + "address": { + "$ref": "#/components/schemas/AddressPortable2" + }, + "tax_info": { + "allOf": [ + { + "$ref": "#/components/schemas/TaxInfo" + } + ], + "x-ballerina-name-ignore": "taxInfo" + }, + "phone": { + "$ref": "#/components/schemas/PhoneWithType" + }, + "birth_date": { + "allOf": [ + { + "$ref": "#/components/schemas/DateNoTime" + } + ], + "x-ballerina-name-ignore": "birthDate" + }, + "name": { + "$ref": "#/components/schemas/Name2" + }, + "attributes": { + "$ref": "#/components/schemas/PaypalWalletAttributes" + }, + "vault_id": { + "allOf": [ + { + "$ref": "#/components/schemas/VaultId" + } + ], + "x-ballerina-name-ignore": "vaultId" + } + }, + "description": "A resource that identifies a PayPal Wallet is used for payment" + }, + "CardAttributesResponse": { + "title": "Card Attributes Response", + "type": "object", + "properties": { + "vault": { + "$ref": "#/components/schemas/VaultResponse" + } + }, + "description": "Additional attributes associated with the use of this card" + }, + "Sofort": { + "title": "Sofort payment object", + "type": "object", + "properties": { + "country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/CountryCode" + } + ], + "x-ballerina-name-ignore": "countryCode" + }, + "name": { + "$ref": "#/components/schemas/FullName" + }, + "bic": { + "$ref": "#/components/schemas/Bic" + }, + "iban_last_chars": { + "allOf": [ + { + "$ref": "#/components/schemas/IbanLastChars" + } + ], + "x-ballerina-name-ignore": "ibanLastChars" + } + }, + "description": "Information used to pay using Sofort" + }, + "AUTHCAPTURENOTENABLED": { + "title": "AUTH_CAPTURE_NOT_ENABLED", + "properties": { + "issue": { + "type": "string", + "enum": ["AUTH_CAPTURE_NOT_ENABLED"] + }, + "description": { + "type": "string", + "enum": [ + "Authorization and Capture feature is not enabled for the merchant. Make sure that the recipient of the funds is a verified business account." + ] + } + } + }, + "InlineResponse4041": { + "allOf": [ + { + "$ref": "#/components/schemas/Error404" + }, + { + "$ref": "#/components/schemas/OrdersTrackersPatch404" + } + ] + }, + "CardResponse": { + "title": "Card Response", + "type": "object", + "properties": { + "from_request": { + "allOf": [ + { + "$ref": "#/components/schemas/CardFromRequest" + } + ], + "x-ballerina-name-ignore": "fromRequest" + }, + "authentication_result": { + "allOf": [ + { + "$ref": "#/components/schemas/AuthenticationResponse" + } + ], + "x-ballerina-name-ignore": "authenticationResult" + }, + "bin_details": { + "allOf": [ + { + "$ref": "#/components/schemas/BinDetails" + } + ], + "x-ballerina-name-ignore": "binDetails" + }, + "name": { + "maxLength": 300, + "minLength": 2, + "type": "string", + "description": "The card holder's name as it appears on the card" + }, + "available_networks": { + "maxItems": 256, + "minItems": 1, + "type": "array", + "description": "Array of brands or networks associated with the card", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/CardBrand" + }, + "x-ballerina-name-ignore": "availableNetworks" + }, + "attributes": { + "$ref": "#/components/schemas/CardAttributesResponse" + }, + "expiry": { + "$ref": "#/components/schemas/DateYearMonth" + }, + "type": { + "type": "string", + "description": "The payment card type", + "readOnly": true, + "enum": ["CREDIT", "DEBIT", "PREPAID", "UNKNOWN"] + }, + "last_digits": { + "pattern": "[0-9]{2,}", + "type": "string", + "description": "The last digits of the payment card", + "readOnly": true, + "x-ballerina-name-ignore": "lastDigits" + }, + "brand": { + "$ref": "#/components/schemas/CardBrand" + } + }, + "description": "The payment card to use to fund a payment. Card can be a credit or debit card" + }, + "INVALIDFXRATEID1": { + "title": "INVALID_FX_RATE_ID", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_FX_RATE_ID"] + }, + "description": { + "type": "string", + "enum": [ + "The specific FX Rate ID is not valid. This could be either because we are not able to look up the FX Rate based on this ID or it could be because the ID belongs to another API Caller." + ] + } + } + }, + "ITEMTOTALREQUIRED": { + "title": "ITEM_TOTAL_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["ITEM_TOTAL_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "If item details are specified (items.unit_amount and items.quantity) corresponding amount.breakdown.item_total is required." + ] + } + } + }, + "IDENTIFIERNOTFOUND": { + "title": "IDENTIFIER_NOT_FOUND", + "properties": { + "issue": { + "type": "string", + "enum": ["IDENTIFIER_NOT_FOUND"] + }, + "description": { + "type": "string", + "enum": [ + "Specified identifier was not found. Please verify the correct identifier was used and try the request again." + ] + } + } + }, + "ExchangeRate": { + "title": "Exchange Rate", + "type": "object", + "properties": { + "source_currency": { + "allOf": [ + { + "$ref": "#/components/schemas/CurrencyCode" + } + ], + "x-ballerina-name-ignore": "sourceCurrency" + }, + "target_currency": { + "allOf": [ + { + "$ref": "#/components/schemas/CurrencyCode" + } + ], + "x-ballerina-name-ignore": "targetCurrency" + }, + "value": { + "type": "string", + "description": "The target currency amount. Equivalent to one unit of the source currency. Formatted as integer or decimal value with one to 15 digits to the right of the decimal point" + } + }, + "description": "The exchange rate that determines the amount to convert from one currency to another currency", + "readOnly": true + }, + "LinkDescription": { + "title": "Link Description", + "required": ["href", "rel"], + "type": "object", + "properties": { + "method": { + "type": "string", + "description": "The HTTP method required to make the related call", + "enum": [ + "GET", + "POST", + "PUT", + "DELETE", + "HEAD", + "CONNECT", + "OPTIONS", + "PATCH" + ] + }, + "rel": { + "type": "string", + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml)" + }, + "href": { + "type": "string", + "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call" + } + }, + "description": "The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information" + }, + "PLATFORMFEEPAYEECANNOTBESAMEASPAYER": { + "title": "PLATFORM_FEE_PAYEE_CANNOT_BE_SAME_AS_PAYER", + "properties": { + "issue": { + "type": "string", + "enum": ["PLATFORM_FEE_PAYEE_CANNOT_BE_SAME_AS_PAYER"] + }, + "description": { + "type": "string", + "enum": [ + "The payer cannot pay themselves. The recipient account of the platform fees must be different from the payer account." + ] + } + } + }, + "OrderConfirmApplicationContext": { + "title": "Confirm Application Context", + "type": "object", + "properties": { + "return_url": { + "maxLength": 4000, + "minLength": 10, + "type": "string", + "description": "The URL where the customer is redirected after the customer approves the payment", + "format": "uri", + "x-ballerina-name-ignore": "returnUrl" + }, + "brand_name": { + "maxLength": 127, + "minLength": 1, + "type": "string", + "description": "Label to present to your payer as part of the PayPal hosted web experience", + "x-ballerina-name-ignore": "brandName" + }, + "locale": { + "$ref": "#/components/schemas/Language" + }, + "cancel_url": { + "maxLength": 4000, + "minLength": 10, + "type": "string", + "description": "The URL where the customer is redirected after the customer cancels the payment", + "format": "uri", + "x-ballerina-name-ignore": "cancelUrl" + }, + "stored_payment_source": { + "allOf": [ + { + "$ref": "#/components/schemas/StoredPaymentSource" + } + ], + "x-ballerina-name-ignore": "storedPaymentSource" + } + }, + "description": "Customizes the payer confirmation experience" + }, + "ShippingDetail": { + "title": "Shipping Details", + "type": "object", + "properties": { + "address": { + "$ref": "#/components/schemas/AddressPortable" + }, + "name": { + "$ref": "#/components/schemas/Name" + }, + "options": { + "maxItems": 10, + "minItems": 0, + "type": "array", + "description": "An array of shipping options that the payee or merchant offers to the payer to ship or pick up their items", + "items": { + "$ref": "#/components/schemas/ShippingOption" + } + }, + "type": { + "maxLength": 255, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "A classification for the method of purchase fulfillment (e.g shipping, in-store pickup, etc). Either `type` or `options` may be present, but not both", + "enum": [ + "SHIPPING", + "PICKUP_IN_PERSON", + "PICKUP_IN_STORE", + "PICKUP_FROM_PERSON" + ] + } + }, + "description": "The shipping details" + }, + "LiabilityShift": { + "maxLength": 255, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "Liability shift indicator. The outcome of the issuer's authentication", + "enum": ["NO", "POSSIBLE", "UNKNOWN"] + }, + "UnprocessableContent": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/422Details" + } + } + } + }, + "INVALIDIBAN": { + "title": "INVALID_IBAN", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_IBAN"] + }, + "description": { + "type": "string", + "enum": ["IBAN provided is not a valid bank account number."] + } + } + }, + "PAYEECOUNTRYNOTSUPPORTEDFORPAYMENTSOURCE": { + "title": "PAYEE_COUNTRY_NOT_SUPPORTED_FOR_PAYMENT_SOURCE", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYEE_COUNTRY_NOT_SUPPORTED_FOR_PAYMENT_SOURCE"] + }, + "description": { + "type": "string", + "enum": [ + "Payee country code is not supported by the provided payment source." + ] + } + } + }, + "NetworkTokenRequest": { + "title": "Network Token", + "required": ["expiry", "number"], + "type": "object", + "properties": { + "number": { + "maxLength": 19, + "minLength": 13, + "pattern": "^[0-9]{13,19}$", + "type": "string", + "description": "Third party network token number" + }, + "eci_flag": { + "allOf": [ + { + "$ref": "#/components/schemas/EciFlag" + } + ], + "x-ballerina-name-ignore": "eciFlag" + }, + "expiry": { + "$ref": "#/components/schemas/DateYearMonth" + }, + "token_requestor_id": { + "maxLength": 11, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "A TRID, or a Token Requestor ID, is an identifier used by merchants to request network tokens from card networks. A TRID is a precursor to obtaining a network token for a credit card primary account number (PAN), and will aid in enabling secure card on file (COF) payments and reducing fraud", + "x-ballerina-name-ignore": "tokenRequestorId" + }, + "cryptogram": { + "maxLength": 32, + "minLength": 28, + "pattern": "^.*$", + "type": "string", + "description": "An Encrypted one-time use value that's sent along with Network Token. This field is not required to be present for recurring transactions" + } + }, + "description": "The Third Party Network token used to fund a payment" + }, + "CardRequestAllOf2": { + "properties": { + "vault_id": { + "$ref": "#/components/schemas/VaultId" + }, + "stored_credential": { + "$ref": "#/components/schemas/CardStoredCredential" + }, + "network_token": { + "$ref": "#/components/schemas/NetworkTokenRequest" + }, + "experience_context": { + "$ref": "#/components/schemas/CardExperienceContext" + } + } + }, + "Phone2": { + "title": "Phone", + "required": ["national_number"], + "type": "object", + "properties": { + "national_number": { + "maxLength": 14, + "minLength": 1, + "pattern": "^[0-9]{1,14}?$", + "type": "string", + "description": "The national number, in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en). The combined length of the country calling code (CC) and the national number must not be greater than 15 digits. The national number consists of a national destination code (NDC) and subscriber number (SN)", + "x-ballerina-name-ignore": "nationalNumber" + } + }, + "description": "The phone number in its canonical international [E.164 numbering plan format](https://www.itu.int/rec/T-REC-E.164/en)" + }, + "OrderAuthorizeResponse": { + "title": "Order", + "type": "object", + "description": "The order authorize response", + "allOf": [ + { + "$ref": "#/components/schemas/ActivityTimestamps" + }, + { + "$ref": "#/components/schemas/OrderAuthorizeResponseAllOf2" + } + ] + }, + "PNREFEXPIRED1": { + "title": "PNREF_EXPIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["PNREF_EXPIRED"] + }, + "description": { + "type": "string", + "enum": [ + "Specified `pnref` has expired. PNREF expires 15 months after the date of the initial transaction." + ] + } + } + }, + "RETURNURLREQUIRED1": { + "title": "RETURN_URL_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["RETURN_URL_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "The return url is required when attempting to vault this source." + ] + } + } + }, + "RETURNURLREQUIRED2": { + "title": "RETURN_URL_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["RETURN_URL_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "The return url is required when attempting to vault this source." + ] + } + } + }, + "PayerBase": { + "title": "Payer Base", + "type": "object", + "properties": { + "email_address": { + "allOf": [ + { + "$ref": "#/components/schemas/Email" + } + ], + "x-ballerina-name-ignore": "emailAddress" + }, + "payer_id": { + "allOf": [ + { + "$ref": "#/components/schemas/AccountId" + } + ], + "x-ballerina-name-ignore": "payerId" + } + }, + "description": "The customer who approves and pays for the order. The customer is also known as the payer" + }, + "PAYEEPRICINGTIERIDNOTENABLED": { + "title": "PAYEE_PRICING_TIER_ID_NOT_ENABLED", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYEE_PRICING_TIER_ID_NOT_ENABLED"] + }, + "description": { + "type": "string", + "enum": [ + "The API Caller is not enabled to process transactions by specifying a 'payee_pricing_tier_id'. Please work with your Account Manager to enable this option for your account." + ] + } + } + }, + "MISSINGPREVIOUSREFERENCE": { + "title": "MISSING_PREVIOUS_REFERENCE", + "properties": { + "issue": { + "type": "string", + "enum": ["MISSING_PREVIOUS_REFERENCE"] + }, + "description": { + "type": "string", + "enum": [ + "For Merchant initiated network token transactions, either the payment_source.card.stored_credential.previous_network_transaction_reference or payment_source.card.stored_credential.previous_transaction_reference must be included in the request." + ] + } + } + }, + "APPLEPAYAMOUNTMISMATCH": { + "title": "APPLE_PAY_AMOUNT_MISMATCH", + "properties": { + "issue": { + "type": "string", + "enum": ["APPLE_PAY_AMOUNT_MISMATCH"] + }, + "description": { + "type": "string", + "enum": [ + "The 'amount' specified in the Order should match the amount that was viewed and authorized by the payer/buyer on Apple Pay. If the amount has changed, please redirect the buyer to authorize the order again via Apple Pay." + ] + } + } + }, + "MALFORMEDREQUESTJSON2": { + "title": "MALFORMED_REQUEST_JSON", + "properties": { + "issue": { + "type": "string", + "enum": ["MALFORMED_REQUEST_JSON"] + }, + "description": { + "type": "string", + "enum": ["The request JSON is not well formed."] + } + } + }, + "SHIPPINGTYPENOTSUPPORTEDFORCLIENT": { + "title": "SHIPPING_TYPE_NOT_SUPPORTED_FOR_CLIENT", + "properties": { + "issue": { + "type": "string", + "enum": ["SHIPPING_TYPE_NOT_SUPPORTED_FOR_CLIENT"] + }, + "description": { + "type": "string", + "enum": [ + "The API Caller account is not setup to be able to support a `shipping.type`=`PICKUP_IN_PERSON`. This feature is only supported for PayPal Commerce Platform for Platforms and Marketplaces." + ] + } + } + }, + "AMOUNTMISMATCH1": { + "title": "AMOUNT_MISMATCH", + "properties": { + "issue": { + "type": "string", + "enum": ["AMOUNT_MISMATCH"] + }, + "description": { + "type": "string", + "enum": [ + "Should equal item_total + tax_total + shipping + handling + insurance - shipping_discount - discount." + ] + } + } + }, + "MALFORMEDREQUESTJSON3": { + "title": "MALFORMED_REQUEST_JSON", + "properties": { + "issue": { + "type": "string", + "enum": ["MALFORMED_REQUEST_JSON"] + }, + "description": { + "type": "string", + "enum": ["The request JSON is not well formed."] + } + } + }, + "PAYEEFXRATEIDCURRENCYMISMATCH": { + "title": "PAYEE_FX_RATE_ID_CURRENCY_MISMATCH", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYEE_FX_RATE_ID_CURRENCY_MISMATCH"] + }, + "description": { + "type": "string", + "enum": [ + "The specified FX Rate ID is for a currency that does not match with the currency of this request. Please specify a different FX Rate ID and try the request again. Alternately, remove the FX Rate ID to process the request using the default exchange rate." + ] + } + } + }, + "MALFORMEDREQUESTJSON1": { + "title": "MALFORMED_REQUEST_JSON", + "properties": { + "issue": { + "type": "string", + "enum": ["MALFORMED_REQUEST_JSON"] + }, + "description": { + "type": "string", + "enum": ["The request JSON is not well formed."] + } + } + }, + "MALFORMEDREQUESTJSON4": { + "title": "MALFORMED_REQUEST_JSON", + "properties": { + "issue": { + "type": "string", + "enum": ["MALFORMED_REQUEST_JSON"] + }, + "description": { + "type": "string", + "enum": ["The request JSON is not well formed."] + } + } + }, + "MALFORMEDREQUESTJSON5": { + "title": "MALFORMED_REQUEST_JSON", + "properties": { + "issue": { + "type": "string", + "enum": ["MALFORMED_REQUEST_JSON"] + }, + "description": { + "type": "string", + "enum": ["The request JSON is not well formed."] + } + } + }, + "MERCHANTINITIATEDWITHSECURITYCODE2": { + "title": "MERCHANT_INITIATED_WITH_SECURITY_CODE", + "properties": { + "issue": { + "type": "string", + "enum": ["MERCHANT_INITIATED_WITH_SECURITY_CODE"] + }, + "description": { + "type": "string", + "enum": [ + "`stored_payment_source.payment_initiator` = `MERCHANT` is not supported if `payment_source.card.security_code` is present in the order. `security_code` can be present in the order only when customer is the payment initiator. It is semantically incorrect to perform a merchant initiated payment with `security_code` is the order." + ] + } + } + }, + "TRANSACTIONRECEIVINGLIMITEXCEEDED": { + "title": "TRANSACTION_RECEIVING_LIMIT_EXCEEDED", + "properties": { + "issue": { + "type": "string", + "enum": ["TRANSACTION_RECEIVING_LIMIT_EXCEEDED"] + }, + "description": { + "type": "string", + "enum": ["The transaction exceeds the receiver's receiving limit."] + } + } + }, + "TrackerItem": { + "title": "Tracker Item", + "type": "object", + "properties": { + "quantity": { + "maxLength": 10, + "minLength": 1, + "pattern": "^[1-9][0-9]{0,9}$", + "type": "string", + "description": "The item quantity. Must be a whole number" + }, + "image_url": { + "maxLength": 2048, + "minLength": 1, + "pattern": "^(https:)([/|.|\\w|\\s|-])*\\.(?:jpg|gif|png|jpeg|JPG|GIF|PNG|JPEG)", + "type": "string", + "description": "The URL of the item's image. File type and size restrictions apply. An image that violates these restrictions will not be honored", + "format": "uri", + "x-ballerina-name-ignore": "imageUrl" + }, + "name": { + "maxLength": 127, + "minLength": 1, + "type": "string", + "description": "The item name or title" + }, + "upc": { + "$ref": "#/components/schemas/UniversalProductCode" + }, + "sku": { + "maxLength": 127, + "minLength": 1, + "type": "string", + "description": "The stock keeping unit (SKU) for the item. This can contain unicode characters" + }, + "url": { + "maxLength": 2048, + "minLength": 1, + "type": "string", + "description": "The URL to the item being purchased. Visible to buyer and used in buyer experiences", + "format": "uri" + } + }, + "description": "The details of the items in the shipment" + }, + "FullName": { + "maxLength": 300, + "minLength": 3, + "type": "string", + "description": "The full name representation like Mr J Smith" + }, + "MERCHANTINITIATEDWITHSECURITYCODE1": { + "title": "MERCHANT_INITIATED_WITH_SECURITY_CODE", + "properties": { + "issue": { + "type": "string", + "enum": ["MERCHANT_INITIATED_WITH_SECURITY_CODE"] + }, + "description": { + "type": "string", + "enum": [ + "`stored_payment_source.payment_initiator` = `MERCHANT` is not supported if `payment_source.card.security_code` is present in the order. `security_code` can be present in the order only when customer is the payment initiator. It is semantically incorrect to perform a merchant initiated payment with `security_code` is the order." + ] + } + } + }, + "RefundAllOf2": { + "properties": { + "id": { + "type": "string", + "description": "The PayPal-generated ID for the refund.", + "readOnly": true + }, + "amount": { + "$ref": "#/components/schemas/Money" + }, + "invoice_id": { + "type": "string", + "description": "The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives.", + "readOnly": true + }, + "custom_id": { + "maxLength": 127, + "minLength": 1, + "pattern": "^[A-Za-z0-9-_.,]*$", + "type": "string", + "description": "The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports." + }, + "acquirer_reference_number": { + "maxLength": 36, + "minLength": 1, + "pattern": "^[a-zA-Z0-9]+$", + "type": "string", + "description": "Reference ID issued for the card transaction. This ID can be used to track the transaction across processors, card brands and issuing banks." + }, + "note_to_payer": { + "type": "string", + "description": "The reason for the refund. Appears in both the payer's transaction history and the emails that the payer receives.", + "readOnly": true + }, + "seller_payable_breakdown": { + "$ref": "#/components/schemas/MerchantPayableBreakdown" + }, + "payer": { + "$ref": "#/components/schemas/PayeeBase" + }, + "links": { + "type": "array", + "description": "An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/LinkDescription" + } + } + } + }, + "DisbursementMode": { + "title": "Disbursement Mode", + "maxLength": 16, + "minLength": 1, + "pattern": "^[A-Z_]+$", + "type": "string", + "description": "The funds that are held on behalf of the merchant", + "default": "INSTANT", + "enum": ["INSTANT", "DELAYED"] + }, + "ORDERALREADYAUTHORIZED1": { + "title": "ORDER_ALREADY_AUTHORIZED", + "properties": { + "issue": { + "type": "string", + "enum": ["ORDER_ALREADY_AUTHORIZED"] + }, + "description": { + "type": "string", + "enum": [ + "Order already authorized.If 'intent=AUTHORIZE' only one authorization per order is allowed." + ] + } + } + }, + "Orderstrackcreate400Details": { + "anyOf": [ + { + "$ref": "#/components/schemas/MISSINGREQUIREDPARAMETER5" + }, + { + "$ref": "#/components/schemas/INVALIDSTRINGLENGTH5" + }, + { + "$ref": "#/components/schemas/INVALIDPARAMETERVALUE5" + }, + { + "$ref": "#/components/schemas/INVALIDPARAMETERSYNTAX5" + } + ] + }, + "VaultPaypalWalletBaseAllOf2": { + "properties": { + "description": { + "maxLength": 128, + "minLength": 1, + "type": "string", + "description": "The description displayed to PayPal consumer on the approval flow for PayPal, as well as on the PayPal payment token management experience on PayPal.com." + }, + "usage_pattern": { + "maxLength": 30, + "minLength": 1, + "type": "string", + "description": "Expected business/pricing model for the billing agreement.", + "enum": [ + "IMMEDIATE", + "DEFERRED", + "RECURRING_PREPAID", + "RECURRING_POSTPAID", + "THRESHOLD_PREPAID", + "THRESHOLD_POSTPAID" + ] + }, + "shipping": { + "$ref": "#/components/schemas/ShippingDetail" + }, + "usage_type": { + "maxLength": 255, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "The usage type associated with the PayPal payment token.", + "enum": ["MERCHANT", "PLATFORM"] + }, + "owner_id": { + "$ref": "#/components/schemas/VaultOwnerId" + }, + "customer_type": { + "maxLength": 255, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "The customer type associated with the PayPal payment token. This is to indicate whether the customer acting on the merchant / platform is either a business or a consumer.", + "default": "CONSUMER", + "enum": ["CONSUMER", "BUSINESS"] + }, + "permit_multiple_payment_tokens": { + "type": "boolean", + "description": "Create multiple payment tokens for the same payer, merchant/platform combination. Use this when the customer has not logged in at merchant/platform. The payment token thus generated, can then also be used to create the customer account at merchant/platform. Use this also when multiple payment tokens are required for the same payer, different customer at merchant/platform. This helps to identify customers distinctly even though they may share the same PayPal account. This only applies to PayPal payment source.", + "default": false + } + } + }, + "DEVICEDATANOTAVAILABLE": { + "title": "DEVICE_DATA_NOT_AVAILABLE", + "properties": { + "issue": { + "type": "string", + "enum": ["DEVICE_DATA_NOT_AVAILABLE"] + }, + "description": { + "type": "string", + "enum": [ + "Device Data is not available for processing this order. The PayPal-Client-Metadata-Id header value sent during `Create Order` api call is either missing or incorrect or there was an error in collecting required data. Please verify if appropriate value for PayPal-Client-Metadata-Id header is being sent during 'Create Order' api call. Please note this error only applies to payment_source.pay_upon_invoice at the moment." + ] + } + } + }, + "BILLINGADDRESSINVALID1": { + "title": "BILLING_ADDRESS_INVALID", + "properties": { + "issue": { + "type": "string", + "enum": ["BILLING_ADDRESS_INVALID"] + }, + "description": { + "type": "string", + "enum": ["Provided billing address is invalid."] + } + } + }, + "ShipmentTracker": { + "title": "Shipment Tracker.", + "required": ["status", "transaction_id"], + "type": "object", + "properties": { + "transaction_id": { + "maxLength": 50, + "minLength": 1, + "pattern": "^[a-zA-Z0-9]*$", + "type": "string", + "description": "The PayPal transaction ID", + "x-ballerina-name-ignore": "transactionId" + }, + "quantity": { + "maximum": 100, + "minimum": 1, + "type": "integer", + "description": "The quantity of items shipped", + "readOnly": true + }, + "notify_buyer": { + "type": "boolean", + "description": "If true, sends an email notification to the buyer of the PayPal transaction. The email contains the tracking information that was uploaded through the API", + "default": false, + "x-ballerina-name-ignore": "notifyBuyer" + }, + "tracking_number_type": { + "allOf": [ + { + "$ref": "#/components/schemas/ShipmentTrackingNumberType" + } + ], + "x-ballerina-name-ignore": "trackingNumberType" + }, + "shipment_date": { + "allOf": [ + { + "$ref": "#/components/schemas/DateNoTime" + } + ], + "x-ballerina-name-ignore": "shipmentDate" + }, + "tracking_number_validated": { + "type": "boolean", + "description": "Indicates whether the carrier validated the tracking number", + "readOnly": true, + "x-ballerina-name-ignore": "trackingNumberValidated" + }, + "shipment_direction": { + "maxLength": 50, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "To denote whether the shipment is sent forward to the receiver or returned back", + "enum": ["FORWARD", "RETURN"], + "x-ballerina-name-ignore": "shipmentDirection" + }, + "postage_payment_id": { + "maxLength": 64, + "minLength": 1, + "type": "string", + "description": "The postage payment ID. This property supports Unicode", + "readOnly": true, + "x-ballerina-name-ignore": "postagePaymentId" + }, + "carrier": { + "$ref": "#/components/schemas/ShipmentCarrier" + }, + "shipment_uploader": { + "maxLength": 50, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "To denote which party uploaded the shipment tracking info", + "readOnly": true, + "enum": ["MERCHANT", "CONSUMER", "PARTNER"], + "x-ballerina-name-ignore": "shipmentUploader" + }, + "last_updated_time": { + "allOf": [ + { + "$ref": "#/components/schemas/DateTime" + } + ], + "x-ballerina-name-ignore": "lastUpdatedTime" + }, + "carrier_name_other": { + "maxLength": 64, + "minLength": 1, + "type": "string", + "description": "The name of the carrier for the shipment. Provide this value only if the carrier parameter is OTHER. This property supports Unicode", + "x-ballerina-name-ignore": "carrierNameOther" + }, + "tracking_number": { + "maxLength": 64, + "minLength": 1, + "type": "string", + "description": "The tracking number for the shipment. This property supports Unicode", + "x-ballerina-name-ignore": "trackingNumber" + }, + "status": { + "$ref": "#/components/schemas/ShipmentTrackingStatus" + } + }, + "description": "The tracking information for a shipment" + }, + "NOTENABLEDFORCARDPROCESSING1": { + "title": "NOT_ENABLED_FOR_CARD_PROCESSING", + "properties": { + "issue": { + "type": "string", + "enum": ["NOT_ENABLED_FOR_CARD_PROCESSING"] + }, + "description": { + "type": "string", + "enum": [ + "The API Caller account is not setup to be able to process card payments. Please contact PayPal customer support." + ] + } + } + }, + "NotFound": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/404Details" + } + } + } + }, + "Forbidden": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/403Details" + } + } + } + }, + "NOTENABLEDFORCARDPROCESSING2": { + "title": "NOT_ENABLED_FOR_CARD_PROCESSING", + "properties": { + "issue": { + "type": "string", + "enum": ["NOT_ENABLED_FOR_CARD_PROCESSING"] + }, + "description": { + "type": "string", + "enum": [ + "The API Caller account is not setup to be able to process card payments. Please contact PayPal customer support." + ] + } + } + }, + "Capture": { + "title": "Capture", + "type": "object", + "description": "A captured payment", + "allOf": [ + { + "$ref": "#/components/schemas/CaptureStatus" + }, + { + "$ref": "#/components/schemas/CaptureAllOf2" + }, + { + "$ref": "#/components/schemas/ActivityTimestamps" + } + ] + }, + "Unauthorized": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/401Details" + } + } + } + }, + "BadRequest": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/400Details" + } + } + } + }, + "Item": { + "title": "Item", + "required": ["name", "quantity", "unit_amount"], + "type": "object", + "properties": { + "quantity": { + "maxLength": 10, + "pattern": "^[1-9][0-9]{0,9}$", + "type": "string", + "description": "The item quantity. Must be a whole number" + }, + "name": { + "maxLength": 127, + "minLength": 1, + "type": "string", + "description": "The item name or title" + }, + "description": { + "maxLength": 127, + "type": "string", + "description": "The detailed item description" + }, + "tax": { + "$ref": "#/components/schemas/Money" + }, + "unit_amount": { + "allOf": [ + { + "$ref": "#/components/schemas/Money" + } + ], + "x-ballerina-name-ignore": "unitAmount" + }, + "sku": { + "maxLength": 127, + "type": "string", + "description": "The stock keeping unit (SKU) for the item" + }, + "category": { + "maxLength": 20, + "minLength": 1, + "type": "string", + "description": "The item category type", + "enum": ["DIGITAL_GOODS", "PHYSICAL_GOODS", "DONATION"] + } + }, + "description": "The details for the items to be purchased" + }, + "Blik": { + "title": "BLIK payment object", + "type": "object", + "properties": { + "country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/CountryCode" + } + ], + "x-ballerina-name-ignore": "countryCode" + }, + "name": { + "$ref": "#/components/schemas/FullName" + }, + "one_click": { + "allOf": [ + { + "$ref": "#/components/schemas/BlikOneClickResponse" + } + ], + "x-ballerina-name-ignore": "oneClick" + }, + "email": { + "$ref": "#/components/schemas/EmailAddress" + } + }, + "description": "Information used to pay using BLIK" + }, + "CONSENTNEEDED": { + "title": "CONSENT_NEEDED", + "properties": { + "issue": { + "type": "string", + "enum": ["CONSENT_NEEDED"] + }, + "description": { + "type": "string", + "enum": ["CONSENT_NEEDED"] + } + } + }, + "IbanLastChars": { + "maxLength": 34, + "minLength": 4, + "pattern": "[a-zA-Z0-9]{4}", + "type": "string", + "description": "The last characters of the IBAN used to pay" + }, + "ORDERISPENDINGAPPROVAL": { + "title": "ORDER_IS_PENDING_APPROVAL", + "properties": { + "issue": { + "type": "string", + "enum": ["ORDER_IS_PENDING_APPROVAL"] + }, + "description": { + "type": "string", + "enum": [ + "The order was confirmed and payer action completed but order approval processing from PayPal is pending. No action is needed from Payee or Payer. Please wait until order status changes to 'APPROVED'." + ] + } + } + }, + "VenmoWalletResponse": { + "title": "Venmo Wallet Response Object", + "type": "object", + "properties": { + "email_address": { + "allOf": [ + { + "$ref": "#/components/schemas/Email" + } + ], + "x-ballerina-name-ignore": "emailAddress" + }, + "account_id": { + "allOf": [ + { + "$ref": "#/components/schemas/AccountId2" + } + ], + "x-ballerina-name-ignore": "accountId" + }, + "address": { + "$ref": "#/components/schemas/AddressPortable2" + }, + "user_name": { + "maxLength": 50, + "minLength": 1, + "pattern": "^[-a-zA-Z0-9_]*$", + "type": "string", + "description": "The Venmo user name chosen by the user, also know as a Venmo handle", + "x-ballerina-name-ignore": "userName" + }, + "name": { + "$ref": "#/components/schemas/Name2" + }, + "phone_number": { + "allOf": [ + { + "$ref": "#/components/schemas/Phone2" + } + ], + "x-ballerina-name-ignore": "phoneNumber" + }, + "attributes": { + "$ref": "#/components/schemas/VenmoWalletAttributesResponse" + } + }, + "description": "Venmo wallet response" + }, + "UNSUPPORTEDINTENTFORPAYMENTSOURCE": { + "title": "UNSUPPORTED_INTENT_FOR_PAYMENT_SOURCE", + "properties": { + "issue": { + "type": "string", + "enum": ["UNSUPPORTED_INTENT_FOR_PAYMENT_SOURCE"] + }, + "description": { + "type": "string", + "enum": [ + "`intent=AUTHORIZE` is not supported for the specified payment_source. Only `intent=CAPTURE` is supported." + ] + } + } + }, + "VAULTINSTRUCTIONREQUIRED3": { + "title": "VAULT_INSTRUCTION_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["VAULT_INSTRUCTION_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "Vault instruction is required. Please use `vault.store_in_vault` to provide vault instruction." + ] + } + } + }, + "RefundStatus": { + "title": "Refund Status", + "type": "object", + "properties": { + "status_details": { + "allOf": [ + { + "$ref": "#/components/schemas/RefundStatusDetails" + } + ], + "x-ballerina-name-ignore": "statusDetails" + }, + "status": { + "type": "string", + "description": "The status of the refund", + "readOnly": true, + "enum": ["CANCELLED", "FAILED", "PENDING", "COMPLETED"] + } + }, + "description": "The refund status" + }, + "INVALIDRESOURCEID": { + "title": "INVALID_RESOURCE_ID", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_RESOURCE_ID"] + }, + "description": { + "type": "string", + "enum": [ + "Specified resource ID does not exist. Please check the resource ID and try again." + ] + } + } + }, + "COMPLIANCEVIOLATION": { + "title": "COMPLIANCE_VIOLATION", + "properties": { + "issue": { + "type": "string", + "enum": ["COMPLIANCE_VIOLATION"] + }, + "description": { + "type": "string", + "enum": ["Transaction is declined due to compliance violation."] + } + } + }, + "TrustlyRequest": { + "title": "Trustly payment object", + "required": ["country_code", "name"], + "type": "object", + "properties": { + "experience_context": { + "allOf": [ + { + "$ref": "#/components/schemas/ExperienceContextBase" + } + ], + "x-ballerina-name-ignore": "experienceContext" + }, + "country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/CountryCode" + } + ], + "x-ballerina-name-ignore": "countryCode" + }, + "name": { + "$ref": "#/components/schemas/FullName" + } + }, + "description": "Information needed to pay using Trustly" + }, + "VAULTINSTRUCTIONREQUIRED2": { + "title": "VAULT_INSTRUCTION_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["VAULT_INSTRUCTION_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "Vault instruction is required. Please use `vault.store_in_vault` to provide vault instruction." + ] + } + } + }, + "REFERENCEDCARDEXPIRED1": { + "title": "REFERENCED_CARD_EXPIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["REFERENCED_CARD_EXPIRED"] + }, + "description": { + "type": "string", + "enum": [ + "The card underlying the token has expired and hence cannot be used to process a payment." + ] + } + } + }, + "TRANSACTIONREFUSED2": { + "title": "TRANSACTION_REFUSED", + "properties": { + "issue": { + "type": "string", + "enum": ["TRANSACTION_REFUSED"] + }, + "description": { + "type": "string", + "enum": ["The request was refused."] + } + } + }, + "VAULTINSTRUCTIONREQUIRED1": { + "title": "VAULT_INSTRUCTION_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["VAULT_INSTRUCTION_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "Vault instruction is required. Please use `vault.store_in_vault` to provide vault instruction." + ] + } + } + }, + "Card": { + "title": "Card", + "type": "object", + "properties": { + "number": { + "maxLength": 19, + "minLength": 13, + "pattern": "^[0-9]{13,19}$", + "type": "string", + "description": "The primary account number (PAN) for the payment card" + }, + "security_code": { + "maxLength": 4, + "minLength": 3, + "pattern": "^[0-9]{3,4}$", + "type": "string", + "description": "The three- or four-digit security code of the card. Also known as the CVV, CVC, CVN, CVE, or CID. This parameter cannot be present in the request when `payment_initiator=MERCHANT`", + "x-ballerina-name-ignore": "securityCode" + }, + "name": { + "maxLength": 300, + "minLength": 1, + "pattern": "^.{1,300}$", + "type": "string", + "description": "The card holder's name as it appears on the card" + }, + "billing_address": { + "allOf": [ + { + "$ref": "#/components/schemas/AddressPortable" + } + ], + "x-ballerina-name-ignore": "billingAddress" + }, + "attributes": { + "$ref": "#/components/schemas/CardAttributes" + }, + "id": { + "$ref": "#/components/schemas/InstrumentId" + }, + "expiry": { + "$ref": "#/components/schemas/DateYearMonth" + }, + "card_type": { + "allOf": [ + { + "$ref": "#/components/schemas/CardBrand" + } + ], + "x-ballerina-name-ignore": "cardType" + }, + "type": { + "$ref": "#/components/schemas/CardType" + }, + "last_digits": { + "maxLength": 4, + "minLength": 2, + "pattern": "^[0-9]{2,4}$", + "type": "string", + "description": "The last digits of the payment card", + "readOnly": true, + "x-ballerina-name-ignore": "lastDigits" + }, + "brand": { + "$ref": "#/components/schemas/CardBrand" + } + }, + "description": "The payment card to use to fund a payment. Can be a credit or debit card" + }, + "ShippingOption": { + "title": "Shipping Option", + "required": ["id", "label", "selected"], + "type": "object", + "properties": { + "amount": { + "$ref": "#/components/schemas/Money" + }, + "id": { + "maxLength": 127, + "type": "string", + "description": "A unique ID that identifies a payer-selected shipping option" + }, + "label": { + "maxLength": 127, + "type": "string", + "description": "A description that the payer sees, which helps them choose an appropriate shipping option. For example, `Free Shipping`, `USPS Priority Shipping`, `Expédition prioritaire USPS`, or `USPS yōuxiān fā huò`. Localize this description to the payer's locale" + }, + "type": { + "$ref": "#/components/schemas/ShippingType" + }, + "selected": { + "type": "boolean", + "description": "If the API request sets `selected = true`, it represents the shipping option that the payee or merchant expects to be pre-selected for the payer when they first view the `shipping.options` in the PayPal Checkout experience. As part of the response if a `shipping.option` contains `selected=true`, it represents the shipping option that the payer selected during the course of checkout with PayPal. Only one `shipping.option` can be set to `selected=true`" + } + }, + "description": "The options that the payee or merchant offers to the payer to ship or pick up their items" + }, + "MERCHANTINITIATEDWITHMULTIPLEPURCHASEUNITS2": { + "title": "MERCHANT_INITIATED_WITH_MULTIPLE_PURCHASE_UNITS", + "properties": { + "issue": { + "type": "string", + "enum": ["MERCHANT_INITIATED_WITH_MULTIPLE_PURCHASE_UNITS"] + }, + "description": { + "type": "string", + "enum": [ + "`stored_payment_source.payment_initiator` = `MERCHANT` is not supported if more than one purchase_unit is present in the Order. Merchant initiated payments are not supported from orders with more than one purchase_unit. Please retry the request with multiple Order requests (one for each purchase_unit)." + ] + } + } + }, + "MERCHANTINITIATEDWITHMULTIPLEPURCHASEUNITS1": { + "title": "MERCHANT_INITIATED_WITH_MULTIPLE_PURCHASE_UNITS", + "properties": { + "issue": { + "type": "string", + "enum": ["MERCHANT_INITIATED_WITH_MULTIPLE_PURCHASE_UNITS"] + }, + "description": { + "type": "string", + "enum": [ + "`stored_payment_source.payment_initiator` = `MERCHANT` is not supported if more than one purchase_unit is present in the Order. Merchant initiated payments are not supported from orders with more than one purchase_unit. Please retry the request with multiple Order requests (one for each purchase_unit)." + ] + } + } + }, + "ExemptionDetails": {}, + "InlineResponse4001": { + "allOf": [ + { + "$ref": "#/components/schemas/Error400" + }, + { + "$ref": "#/components/schemas/OrdersPatch400" + } + ] + }, + "InlineResponse4003": { + "allOf": [ + { + "$ref": "#/components/schemas/Error400" + }, + { + "$ref": "#/components/schemas/OrdersAuthorize400" + } + ] + }, + "InlineResponse4002": { + "allOf": [ + { + "$ref": "#/components/schemas/Error400" + }, + { + "$ref": "#/components/schemas/OrdersConfirm400" + } + ] + }, + "InlineResponse4005": { + "allOf": [ + { + "$ref": "#/components/schemas/Error400" + }, + { + "$ref": "#/components/schemas/OrdersTrackCreate400" + } + ] + }, + "InlineResponse4004": { + "allOf": [ + { + "$ref": "#/components/schemas/Error400" + }, + { + "$ref": "#/components/schemas/OrdersCapture400" + } + ] + }, + "InlineResponse4006": { + "allOf": [ + { + "$ref": "#/components/schemas/Error400" + }, + { + "$ref": "#/components/schemas/OrdersTrackersPatch400" + } + ] + }, + "TOKENEXPIRED": { + "title": "TOKEN_EXPIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["TOKEN_EXPIRED"] + }, + "description": { + "type": "string", + "enum": ["The token is expired and cannot be used for payment."] + } + } + }, + "PaypalWalletCustomerAllOf2": { + "properties": {} + }, + "CARDNUMBERREQUIRED": { + "title": "CARD_NUMBER_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["CARD_NUMBER_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "The card number is required when attempting to process payment with card." + ] + } + } + }, + "BILLINGAGREEMENTNOTFOUND2": { + "title": "BILLING_AGREEMENT_NOT_FOUND", + "properties": { + "issue": { + "type": "string", + "enum": ["BILLING_AGREEMENT_NOT_FOUND"] + }, + "description": { + "type": "string", + "enum": ["The requested Billing Agreement token was not found."] + } + } + }, + "TAXTOTALMISMATCH": { + "title": "TAX_TOTAL_MISMATCH", + "properties": { + "issue": { + "type": "string", + "enum": ["TAX_TOTAL_MISMATCH"] + }, + "description": { + "type": "string", + "enum": [ + "Should equal sum of (tax * quantity) across all items for a given purchase_unit." + ] + } + } + }, + "BILLINGAGREEMENTNOTFOUND1": { + "title": "BILLING_AGREEMENT_NOT_FOUND", + "properties": { + "issue": { + "type": "string", + "enum": ["BILLING_AGREEMENT_NOT_FOUND"] + }, + "description": { + "type": "string", + "enum": ["The requested Billing Agreement token was not found."] + } + } + }, + "TRANSACTIONBLOCKEDBYPAYEE": { + "title": "TRANSACTION_BLOCKED_BY_PAYEE", + "properties": { + "issue": { + "type": "string", + "enum": ["TRANSACTION_BLOCKED_BY_PAYEE"] + }, + "description": { + "type": "string", + "enum": [ + "Transaction blocked by Payee’s Fraud Protection settings." + ] + } + } + }, + "INVALIDGOOGLEPAYTOKEN": { + "title": "INVALID_GOOGLE_PAY_TOKEN", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_GOOGLE_PAY_TOKEN"] + }, + "description": { + "type": "string", + "enum": [ + "The google pay token is invalid. PayPal was not able to decrypt the googlepay token or PayPal was not able to find the necessary data in the token after decryption." + ] + } + } + }, + "INVALIDPREVIOUSTRANSACTIONREFERENCE": { + "title": "INVALID_PREVIOUS_TRANSACTION_REFERENCE", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_PREVIOUS_TRANSACTION_REFERENCE"] + }, + "description": { + "type": "string", + "enum": [ + "The authorization or capture referenced by `previous_transaction_reference` is not valid. This could be either because the previous_transaction_reference is not found or doesn't belong to the payee. Please use a valid `previous_transaction_reference`." + ] + } + } + }, + "VaultId": { + "maxLength": 255, + "minLength": 1, + "pattern": "^[0-9a-zA-Z_-]+$", + "type": "string", + "description": "The PayPal-generated ID for the vaulted payment source. This ID should be stored on the merchant's server so the saved payment source can be used for future transactions" + }, + "BlikExperienceContext": { + "title": "BLIK Experience Context", + "type": "object", + "description": "Customizes the payer experience during the approval process for the BLIK payment", + "allOf": [ + { + "$ref": "#/components/schemas/ExperienceContextBase" + }, + { + "$ref": "#/components/schemas/BlikExperienceContextAllOf2" + } + ] + }, + "AddressPortable2": { + "title": "Portable Postal Address (Medium-Grained)", + "required": ["country_code"], + "type": "object", + "properties": { + "country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/CountryCode2" + } + ], + "x-ballerina-name-ignore": "countryCode" + }, + "admin_area_1": { + "maxLength": 300, + "type": "string", + "description": "The highest-level sub-division in a country, which is usually a province, state, or ISO-3166-2 subdivision. This data is formatted for postal delivery, for example, `CA` and not `California`. Value, by country, is:
  • UK. A county.
  • US. A state.
  • Canada. A province.
  • Japan. A prefecture.
  • Switzerland. A *kanton*.
", + "x-ballerina-name-ignore": "adminArea1" + }, + "address_line_1": { + "maxLength": 300, + "type": "string", + "description": "The first line of the address, such as number and street, for example, `173 Drury Lane`. Needed for data entry, and Compliance and Risk checks. This field needs to pass the full address", + "x-ballerina-name-ignore": "addressLine1" + }, + "admin_area_3": { + "maxLength": 100, + "type": "string", + "description": "The sub-locality, suburb, neighborhood, or district. This is smaller than `admin_area_level_2`. Value is:
  • Brazil. Suburb, *bairro*, or neighborhood.
  • India. Sub-locality or district. Street name information isn't always available, but a sub-locality or district can be a very small area.
", + "x-ballerina-name-ignore": "adminArea3" + }, + "address_details": { + "allOf": [ + { + "$ref": "#/components/schemas/AddressDetails1" + } + ], + "x-ballerina-name-ignore": "addressDetails" + }, + "admin_area_2": { + "maxLength": 120, + "type": "string", + "description": "A city, town, or village. Smaller than `admin_area_level_1`", + "x-ballerina-name-ignore": "adminArea2" + }, + "address_line_3": { + "maxLength": 100, + "type": "string", + "description": "The third line of the address, if needed. Examples include a street complement for Brazil, direction text, such as `next to Walmart`, or a landmark in an Indian address", + "x-ballerina-name-ignore": "addressLine3" + }, + "address_line_2": { + "maxLength": 300, + "type": "string", + "description": "The second line of the address, for example, a suite or apartment number", + "x-ballerina-name-ignore": "addressLine2" + }, + "admin_area_4": { + "maxLength": 100, + "type": "string", + "description": "The neighborhood, ward, or district. This is smaller than `admin_area_level_3` or `sub_locality`. Value is:
  • The postal sorting code that is used in Guernsey and many French territories, such as French Guiana.
  • The fine-grained administrative levels in China.
", + "x-ballerina-name-ignore": "adminArea4" + }, + "postal_code": { + "maxLength": 60, + "type": "string", + "description": "The postal code, which is the ZIP code or equivalent. Typically required for countries with a postal code or an equivalent. See [postal code](https://en.wikipedia.org/wiki/Postal_code)", + "x-ballerina-name-ignore": "postalCode" + } + }, + "description": "The portable international postal address. Maps to [AddressValidationMetadata](https://github.com/googlei18n/libaddressinput/wiki/AddressValidationMetadata) and HTML 5.1 [Autofilling form controls: the autocomplete attribute](https://www.w3.org/TR/html51/sec-forms.html#autofilling-form-controls-the-autocomplete-attribute)" + }, + "MULTIPLEITEMCATEGORIES": { + "title": "MULTIPLE_ITEM_CATEGORIES", + "properties": { + "issue": { + "type": "string", + "enum": ["MULTIPLE_ITEM_CATEGORIES"] + }, + "description": { + "type": "string", + "enum": [ + "For a given 'purchase_unit' the 'items.category' could be either \"PHYSICAL_GOODS\" and/or \"DIGITAL_GOODS\" or just \"DONATION\". 'items.category' as \"DONATION\" cannot be combined with items with either \"PHYSICAL_GOODS\" or \"DIGITAL_GOODS\"." + ] + } + } + }, + "TRANSACTIONREFUSED1": { + "title": "TRANSACTION_REFUSED", + "properties": { + "issue": { + "type": "string", + "enum": ["TRANSACTION_REFUSED"] + }, + "description": { + "type": "string", + "enum": ["The request was refused."] + } + } + }, + "InlineResponse4032": { + "allOf": [ + { + "$ref": "#/components/schemas/Error403" + }, + { + "$ref": "#/components/schemas/OrdersCapture403" + } + ] + }, + "OrdersAuthorize422": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Ordersauthorize422Details" + } + } + } + }, + "InlineResponse4031": { + "allOf": [ + { + "$ref": "#/components/schemas/Error403" + }, + { + "$ref": "#/components/schemas/OrdersAuthorize403" + } + ] + }, + "InlineResponse4034": { + "allOf": [ + { + "$ref": "#/components/schemas/Error403" + }, + { + "$ref": "#/components/schemas/OrdersTrackersPatch403" + } + ] + }, + "InlineResponse4033": { + "allOf": [ + { + "$ref": "#/components/schemas/Error403" + }, + { + "$ref": "#/components/schemas/OrdersTrackCreate403" + } + ] + }, + "PAYERACCOUNTLOCKEDORCLOSED1": { + "title": "PAYER_ACCOUNT_LOCKED_OR_CLOSED", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYER_ACCOUNT_LOCKED_OR_CLOSED"] + }, + "description": { + "type": "string", + "enum": ["The payer account cannot be used for this transaction."] + } + } + }, + "PAYERACCOUNTLOCKEDORCLOSED2": { + "title": "PAYER_ACCOUNT_LOCKED_OR_CLOSED", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYER_ACCOUNT_LOCKED_OR_CLOSED"] + }, + "description": { + "type": "string", + "enum": ["The payer account cannot be used for this transaction."] + } + } + }, + "TOKENEXPIRED2": { + "title": "TOKEN_EXPIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["TOKEN_EXPIRED"] + }, + "description": { + "type": "string", + "enum": ["The token is expired and cannot be used for payment."] + } + } + }, + "PAYERCANNOTPAY2": { + "title": "PAYER_CANNOT_PAY", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYER_CANNOT_PAY"] + }, + "description": { + "type": "string", + "enum": [ + "Payer cannot pay for this transaction. Please contact the payer to find other ways to pay for this transaction." + ] + } + } + }, + "COUNTRYNOTSUPPORTEDBYPAYMENTSOURCE": { + "title": "COUNTRY_NOT_SUPPORTED_BY_PAYMENT_SOURCE", + "properties": { + "issue": { + "type": "string", + "enum": ["COUNTRY_NOT_SUPPORTED_BY_PAYMENT_SOURCE"] + }, + "description": { + "type": "string", + "enum": [ + "Country code provided is not supported by the provided payment source." + ] + } + } + }, + "PAYERCANNOTPAY1": { + "title": "PAYER_CANNOT_PAY", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYER_CANNOT_PAY"] + }, + "description": { + "type": "string", + "enum": [ + "Payer cannot pay for this transaction. Please contact the payer to find other ways to pay for this transaction." + ] + } + } + }, + "TOKENEXPIRED1": { + "title": "TOKEN_EXPIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["TOKEN_EXPIRED"] + }, + "description": { + "type": "string", + "enum": ["The token is expired and cannot be used for payment."] + } + } + }, + "NOTENABLEDFORAPPLEPAY": { + "title": "NOT_ENABLED_FOR_APPLE_PAY", + "properties": { + "issue": { + "type": "string", + "enum": ["NOT_ENABLED_FOR_APPLE_PAY"] + }, + "description": { + "type": "string", + "enum": [ + "The 'API caller' and/or 'payee' is not setup to be able to process apple pay. Please contact your Account Manager." + ] + } + } + }, + "PAYEEBLOCKEDTRANSACTION1": { + "title": "PAYEE_BLOCKED_TRANSACTION", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYEE_BLOCKED_TRANSACTION"] + }, + "description": { + "type": "string", + "enum": [ + "The Fraud settings for this seller are such that this payment cannot be executed." + ] + } + } + }, + "CANNOTBEZEROORNEGATIVE1": { + "title": "CANNOT_BE_ZERO_OR_NEGATIVE", + "properties": { + "issue": { + "type": "string", + "enum": ["CANNOT_BE_ZERO_OR_NEGATIVE"] + }, + "description": { + "type": "string", + "enum": [ + "Must be greater than zero. If the currency supports decimals, only two decimal place precision is supported." + ] + } + } + }, + "PREVIOUSTRANSACTIONREFERENCEHASCHARGEBACK": { + "title": "PREVIOUS_TRANSACTION_REFERENCE_HAS_CHARGEBACK", + "properties": { + "issue": { + "type": "string", + "enum": ["PREVIOUS_TRANSACTION_REFERENCE_HAS_CHARGEBACK"] + }, + "description": { + "type": "string", + "enum": [ + "The capture referenced by `previous_transaction_reference` has a chargeback and hence cannot be used for this order. Please use a `previous_transaction_reference` which does not have a chargeback." + ] + } + } + }, + "POSTALCODEREQUIRED": { + "title": "POSTAL_CODE_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["POSTAL_CODE_REQUIRED"] + }, + "description": { + "type": "string", + "enum": ["The specified country requires a postal code."] + } + } + }, + "NOTELIGIBLEFORPNREFPROCESSING2": { + "title": "NOT_ELIGIBLE_FOR_PNREF_PROCESSING", + "properties": { + "issue": { + "type": "string", + "enum": ["NOT_ELIGIBLE_FOR_PNREF_PROCESSING"] + }, + "description": { + "type": "string", + "enum": [ + "API caller is not enabled to process payments with the `pnref`. Please contact customer support to request permissions to process transactions with PNREF." + ] + } + } + }, + "MerchantPartnerCustomerId": { + "maxLength": 22, + "minLength": 1, + "pattern": "^[0-9a-zA-Z_-]+$", + "type": "string", + "description": "The unique ID for a customer generated by PayPal" + }, + "NOTELIGIBLEFORPNREFPROCESSING1": { + "title": "NOT_ELIGIBLE_FOR_PNREF_PROCESSING", + "properties": { + "issue": { + "type": "string", + "enum": ["NOT_ELIGIBLE_FOR_PNREF_PROCESSING"] + }, + "description": { + "type": "string", + "enum": [ + "API caller is not enabled to process payments with the `pnref`. Please contact customer support to request permissions to process transactions with PNREF." + ] + } + } + }, + "PAYEEBLOCKEDTRANSACTION2": { + "title": "PAYEE_BLOCKED_TRANSACTION", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYEE_BLOCKED_TRANSACTION"] + }, + "description": { + "type": "string", + "enum": [ + "The Fraud settings for this seller are such that this payment cannot be executed." + ] + } + } + }, + "MAXNUMBEROFPAYMENTATTEMPTSEXCEEDED": { + "title": "MAX_NUMBER_OF_PAYMENT_ATTEMPTS_EXCEEDED", + "properties": { + "issue": { + "type": "string", + "enum": ["MAX_NUMBER_OF_PAYMENT_ATTEMPTS_EXCEEDED"] + }, + "description": { + "type": "string", + "enum": [ + "You have exceeded the maximum number of payment attempts." + ] + } + } + }, + "NOTELIGIBLEFORPNREFPROCESSING3": { + "title": "NOT_ELIGIBLE_FOR_PNREF_PROCESSING", + "properties": { + "issue": { + "type": "string", + "enum": ["NOT_ELIGIBLE_FOR_PNREF_PROCESSING"] + }, + "description": { + "type": "string", + "enum": [ + "API caller is not enabled to process payments with the `pnref`. Please contact customer support to request permissions to process transactions with PNREF." + ] + } + } + }, + "MULTIPLESHIPPINGOPTIONSELECTED1": { + "title": "MULTIPLE_SHIPPING_OPTION_SELECTED", + "properties": { + "issue": { + "type": "string", + "enum": ["MULTIPLE_SHIPPING_OPTION_SELECTED"] + }, + "description": { + "type": "string", + "enum": [ + "Only one shipping.option can be set to 'selected = true'." + ] + } + } + }, + "AltpayRecurringAttributes": {}, + "ORDERCANNOTBECONFIRMED": { + "title": "ORDER_CANNOT_BE_CONFIRMED", + "properties": { + "issue": { + "type": "string", + "enum": ["ORDER_CANNOT_BE_CONFIRMED"] + }, + "description": { + "type": "string", + "enum": [ + "An order with status = 'COMPLETED' cannot be confirmed again." + ] + } + } + }, + "NOTELIGIBLEFORPNREFPROCESSING": { + "title": "NOT_ELIGIBLE_FOR_PNREF_PROCESSING", + "properties": { + "issue": { + "type": "string", + "enum": ["NOT_ELIGIBLE_FOR_PNREF_PROCESSING"] + }, + "description": { + "type": "string", + "enum": [ + "API caller is not enabled to process payments with the `pnref`. Please contact customer support to request permissions to process transactions with PNREF." + ] + } + } + }, + "OrdersConfirm422": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Ordersconfirm422Details" + } + } + } + }, + "MULTIPLESHIPPINGADDRESSNOTSUPPORTED": { + "title": "MULTIPLE_SHIPPING_ADDRESS_NOT_SUPPORTED", + "properties": { + "issue": { + "type": "string", + "enum": ["MULTIPLE_SHIPPING_ADDRESS_NOT_SUPPORTED"] + }, + "description": { + "type": "string", + "enum": ["Multiple shipping addresses are not supported."] + } + } + }, + "BILLINGAGREEMENTIDMISMATCH1": { + "title": "BILLING_AGREEMENT_ID_MISMATCH", + "properties": { + "issue": { + "type": "string", + "enum": ["BILLING_AGREEMENT_ID_MISMATCH"] + }, + "description": { + "type": "string", + "enum": [ + "Billing Agreement ID must exactly match the Billing Agreement ID that was provided during order creation." + ] + } + } + }, + "TrackerStatus": {}, + "ShippingWithTrackingDetails": { + "title": "Order Shipping Details", + "type": "object", + "description": "The order shipping details", + "allOf": [ + { + "$ref": "#/components/schemas/ShippingDetail" + }, + { + "$ref": "#/components/schemas/ShippingWithTrackingDetailsAllOf2" + } + ] + }, + "GooglePayRequest": {}, + "MULTIPLESHIPPINGOPTIONSELECTED": { + "title": "MULTIPLE_SHIPPING_OPTION_SELECTED", + "properties": { + "issue": { + "type": "string", + "enum": ["MULTIPLE_SHIPPING_OPTION_SELECTED"] + }, + "description": { + "type": "string", + "enum": [ + "Only one shipping.option can be set to 'selected = true'." + ] + } + } + }, + "PAYEENOTENABLEDFORBANKPROCESSING": { + "title": "PAYEE_NOT_ENABLED_FOR_BANK_PROCESSING", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYEE_NOT_ENABLED_FOR_BANK_PROCESSING"] + }, + "description": { + "type": "string", + "enum": [ + "Payee account is not setup to be able to process bank payments. Please contact your PayPal account manager." + ] + } + } + }, + "PAYEEACCOUNTRESTRICTED1": { + "title": "PAYEE_ACCOUNT_RESTRICTED", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYEE_ACCOUNT_RESTRICTED"] + }, + "description": { + "type": "string", + "enum": ["The merchant account is restricted."] + } + } + }, + "VAULTINSTRUCTIONDUPLICATED1": { + "title": "VAULT_INSTRUCTION_DUPLICATED", + "properties": { + "issue": { + "type": "string", + "enum": ["VAULT_INSTRUCTION_DUPLICATED"] + }, + "description": { + "type": "string", + "enum": [ + "Only one vault instruction is allowed. Please use `vault.store_in_vault` to provide vault instruction." + ] + } + } + }, + "INVALIDPICKUPADDRESS1": { + "title": "INVALID_PICKUP_ADDRESS", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_PICKUP_ADDRESS"] + }, + "description": { + "type": "string", + "enum": [ + "If the 'shipping_option.type' is set as 'PICKUP' then the 'shipping_detail.name.full_name' should start with 'S2S' meaning Ship To Store. Example: 'S2S My Store'." + ] + } + } + }, + "ConfirmOrderRequest": { + "title": "Confirm Order Request", + "required": ["payment_source"], + "properties": { + "payment_source": { + "$ref": "#/components/schemas/PaymentSource" + }, + "processing_instruction": { + "$ref": "#/components/schemas/ProcessingInstruction" + }, + "application_context": { + "$ref": "#/components/schemas/OrderConfirmApplicationContext" + } + }, + "description": "Payer confirms the intent to pay for the Order using the provided payment source" + }, + "AMOUNTMISMATCH": { + "title": "AMOUNT_MISMATCH", + "properties": { + "issue": { + "type": "string", + "enum": ["AMOUNT_MISMATCH"] + }, + "description": { + "type": "string", + "enum": [ + "Should equal item_total + tax_total + shipping + handling + insurance - shipping_discount - discount." + ] + } + } + }, + "MISSINGCRYPTOGRAM": { + "title": "MISSING_CRYPTOGRAM", + "properties": { + "issue": { + "type": "string", + "enum": ["MISSING_CRYPTOGRAM"] + }, + "description": { + "type": "string", + "enum": [ + "Cryptogram is mandatory for any customer initiated network token transactions." + ] + } + } + }, + "PAYERACTIONREQUIRED": { + "title": "PAYER_ACTION_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYER_ACTION_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "Transaction cannot complete successfully, instruct the buyer to return to PayPal." + ] + } + } + }, + "SHIPPINGADDRESSINVALID": { + "title": "SHIPPING_ADDRESS_INVALID", + "properties": { + "issue": { + "type": "string", + "enum": ["SHIPPING_ADDRESS_INVALID"] + }, + "description": { + "type": "string", + "enum": ["Provided shipping address is invalid."] + } + } + }, + "CardExperienceContext": { + "title": "Card Experience Context", + "type": "object", + "properties": { + "return_url": { + "allOf": [ + { + "$ref": "#/components/schemas/Url" + } + ], + "x-ballerina-name-ignore": "returnUrl" + }, + "cancel_url": { + "allOf": [ + { + "$ref": "#/components/schemas/Url" + } + ], + "x-ballerina-name-ignore": "cancelUrl" + } + }, + "description": "Customizes the payer experience during the 3DS Approval for payment" + }, + "AuthorizationStatus": { + "title": "Authorization Status", + "type": "object", + "properties": { + "status_details": { + "allOf": [ + { + "$ref": "#/components/schemas/AuthorizationStatusDetails" + } + ], + "x-ballerina-name-ignore": "statusDetails" + }, + "status": { + "type": "string", + "description": "The status for the authorized payment", + "readOnly": true, + "enum": [ + "CREATED", + "CAPTURED", + "DENIED", + "PARTIALLY_CAPTURED", + "VOIDED", + "PENDING" + ] + } + }, + "description": "The status fields for an authorized payment" + }, + "CaptureStatusDetails": { + "title": "Capture Status Details", + "type": "object", + "properties": { + "reason": { + "maxLength": 64, + "minLength": 1, + "pattern": "^[A-Z_]+$", + "type": "string", + "description": "The reason why the captured payment status is `PENDING` or `DENIED`", + "enum": [ + "BUYER_COMPLAINT", + "CHARGEBACK", + "ECHECK", + "INTERNATIONAL_WITHDRAWAL", + "OTHER", + "PENDING_REVIEW", + "RECEIVING_PREFERENCE_MANDATES_MANUAL_ACTION", + "REFUNDED", + "TRANSACTION_APPROVED_AWAITING_FUNDING", + "UNILATERAL", + "VERIFICATION_REQUIRED" + ] + } + }, + "description": "The details of the captured payment status" + }, + "ErrorDefault": { + "description": "The default error response", + "oneOf": [ + { + "$ref": "#/components/schemas/Error400" + }, + { + "$ref": "#/components/schemas/Error401" + }, + { + "$ref": "#/components/schemas/Error403" + }, + { + "$ref": "#/components/schemas/Error404" + }, + { + "$ref": "#/components/schemas/Error409" + }, + { + "$ref": "#/components/schemas/Error415" + }, + { + "$ref": "#/components/schemas/Error422" + }, + { + "$ref": "#/components/schemas/Error500" + }, + { + "$ref": "#/components/schemas/Error503" + } + ] + }, + "OrdersAuthorize400": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Ordersauthorize400Details" + } + } + } + }, + "OrdersAuthorize403": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Ordersauthorize403Details" + } + } + } + }, + "CANNOTBENEGATIVE": { + "title": "CANNOT_BE_NEGATIVE", + "properties": { + "issue": { + "type": "string", + "enum": ["CANNOT_BE_NEGATIVE"] + }, + "description": { + "type": "string", + "enum": [ + "Must be greater than or equal to 0. If the currency supports decimals, only two decimal place precision is supported." + ] + } + } + }, + "INVALIDSTRINGLENGTH": { + "title": "INVALID_STRING_LENGTH", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_STRING_LENGTH"] + }, + "description": { + "type": "string", + "enum": ["The value of a field is either too short or too long"] + } + } + }, + "DUPLICATEINVOICEID": { + "title": "DUPLICATE_INVOICE_ID", + "properties": { + "issue": { + "type": "string", + "enum": ["DUPLICATE_INVOICE_ID"] + }, + "description": { + "type": "string", + "enum": [ + "Duplicate Invoice ID detected. To avoid a potential duplicate transaction your account setting requires that Invoice Id be unique for each transaction." + ] + } + } + }, + "CardRequest": { + "title": "Card Request", + "type": "object", + "description": "The payment card to use to fund a payment. Can be a credit or debit card.
Note: Passing card number, cvv and expiry directly via the API requires PCI SAQ D compliance.
*PayPal offers a mechanism by which you do not have to take on the PCI SAQ D burden by using hosted fields - refer to this Integration Guide*.
", + "allOf": [ + { + "$ref": "#/components/schemas/Card" + }, + { + "$ref": "#/components/schemas/CardRequestAllOf2" + } + ] + }, + "DateYearMonth": { + "maxLength": 7, + "minLength": 7, + "pattern": "^[0-9]{4}-(0[1-9]|1[0-2])$", + "type": "string", + "description": "The year and month, in ISO-8601 `YYYY-MM` date format. See [Internet date and time format](https://tools.ietf.org/html/rfc3339#section-5.6)" + }, + "PLATFORMFEESNOTSUPPORTED1": { + "title": "PLATFORM_FEES_NOT_SUPPORTED", + "properties": { + "issue": { + "type": "string", + "enum": ["PLATFORM_FEES_NOT_SUPPORTED"] + }, + "description": { + "type": "string", + "enum": [ + "The API Caller is not enabled to process transactions by specifying 'platform_fees'. Please work with your PayPal Account Manager to enable this option for your account." + ] + } + } + }, + "Orderstrackerspatch400Details": { + "anyOf": [ + { + "$ref": "#/components/schemas/FIELDNOTPATCHABLE1" + }, + { + "$ref": "#/components/schemas/INVALIDPARAMETERVALUE6" + }, + { + "$ref": "#/components/schemas/MISSINGREQUIREDPARAMETER6" + }, + { + "$ref": "#/components/schemas/INVALIDSTRINGLENGTH6" + }, + { + "$ref": "#/components/schemas/INVALIDPATCHOPERATION1" + }, + { + "$ref": "#/components/schemas/MALFORMEDREQUESTJSON5" + } + ] + }, + "Payer": { + "title": "Customer", + "type": "object", + "description": "The customer who approves and pays for the order. The customer is also known as the payer", + "format": "payer_v1", + "allOf": [ + { + "$ref": "#/components/schemas/PayerBase" + }, + { + "$ref": "#/components/schemas/PayerAllOf2" + } + ] + }, + "Order": { + "title": "Order", + "type": "object", + "description": "The order details", + "allOf": [ + { + "$ref": "#/components/schemas/ActivityTimestamps" + }, + { + "$ref": "#/components/schemas/OrderAllOf2" + } + ] + }, + "CRYPTOGRAMREQUIRED1": { + "title": "CRYPTOGRAM_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["CRYPTOGRAM_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "Cryptogram is required if authentication method is CRYPTOGRAM 3DS." + ] + } + } + }, + "CRYPTOGRAMREQUIRED2": { + "title": "CRYPTOGRAM_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["CRYPTOGRAM_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "Cryptogram is required if authentication method is CRYPTOGRAM 3DS." + ] + } + } + }, + "CRYPTOGRAMREQUIRED3": { + "title": "CRYPTOGRAM_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["CRYPTOGRAM_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "Cryptogram is required if authentication method is CRYPTOGRAM 3DS." + ] + } + } + }, + "OrderRequest": { + "title": "Order Request", + "required": ["intent", "purchase_units"], + "type": "object", + "properties": { + "application_context": { + "allOf": [ + { + "$ref": "#/components/schemas/OrderApplicationContext" + } + ], + "x-ballerina-name-ignore": "applicationContext" + }, + "purchase_units": { + "maxItems": 10, + "minItems": 1, + "type": "array", + "description": "An array of purchase units. Each purchase unit establishes a contract between a payer and the payee. Each purchase unit represents either a full or partial order that the payer intends to purchase from the payee", + "items": { + "$ref": "#/components/schemas/PurchaseUnitRequest" + }, + "x-ballerina-name-ignore": "purchaseUnits" + }, + "payment_source": { + "allOf": [ + { + "$ref": "#/components/schemas/PaymentSource" + } + ], + "x-ballerina-name-ignore": "paymentSource" + }, + "intent": { + "$ref": "#/components/schemas/CheckoutPaymentIntent" + }, + "payer": { + "$ref": "#/components/schemas/Payer" + } + }, + "description": "The order request details" + }, + "GOOGLEPAYGATEWAYMERCHANTIDMISMATCH": { + "title": "GOOGLE_PAY_GATEWAY_MERCHANT_ID_MISMATCH", + "properties": { + "issue": { + "type": "string", + "enum": ["GOOGLE_PAY_GATEWAY_MERCHANT_ID_MISMATCH"] + }, + "description": { + "type": "string", + "enum": [ + "The gateway merchant ID in Google Pay token is not valid. This could be because the gateway merchant Id that was authorized by payer/buyer on Google Pay does not match with the API caller of the order." + ] + } + } + }, + "CardSupplementaryData": { + "title": "Card Supplementary Data", + "type": "object", + "properties": { + "level_3": { + "allOf": [ + { + "$ref": "#/components/schemas/Level3CardProcessingData" + } + ], + "x-ballerina-name-ignore": "level3" + }, + "level_2": { + "allOf": [ + { + "$ref": "#/components/schemas/Level2CardProcessingData" + } + ], + "x-ballerina-name-ignore": "level2" + } + }, + "description": "Merchants and partners can add Level 2 and 3 data to payments to reduce risk and payment processing costs. For more information about processing payments, see checkout or multiparty checkout" + }, + "PAYERACCOUNTRESTRICTED2": { + "title": "PAYER_ACCOUNT_RESTRICTED", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYER_ACCOUNT_RESTRICTED"] + }, + "description": { + "type": "string", + "enum": ["PAYER_ACCOUNT_RESTRICTED"] + } + } + }, + "PAYERACCOUNTRESTRICTED1": { + "title": "PAYER_ACCOUNT_RESTRICTED", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYER_ACCOUNT_RESTRICTED"] + }, + "description": { + "type": "string", + "enum": ["PAYER_ACCOUNT_RESTRICTED"] + } + } + }, + "MybankRequest": { + "title": "MyBank payment object", + "required": ["country_code", "name"], + "type": "object", + "properties": { + "experience_context": { + "allOf": [ + { + "$ref": "#/components/schemas/ExperienceContextBase" + } + ], + "x-ballerina-name-ignore": "experienceContext" + }, + "country_code": { + "allOf": [ + { + "$ref": "#/components/schemas/CountryCode" + } + ], + "x-ballerina-name-ignore": "countryCode" + }, + "name": { + "$ref": "#/components/schemas/FullName" + } + }, + "description": "Information needed to pay using MyBank" + }, + "SAVEORDERNOTSUPPORTED": { + "title": "SAVE_ORDER_NOT_SUPPORTED", + "properties": { + "issue": { + "type": "string", + "enum": ["SAVE_ORDER_NOT_SUPPORTED"] + }, + "description": { + "type": "string", + "enum": [ + "The API caller account is setup in a way that does not allow it to be used for saving the order. This functionality is not available for PayPal Commerce Platform for Platforms & Marketplaces." + ] + } + } + }, + "DECLINEDDUETORELATEDTXN1": { + "title": "DECLINED_DUE_TO_RELATED_TXN", + "properties": { + "issue": { + "type": "string", + "enum": ["DECLINED_DUE_TO_RELATED_TXN"] + }, + "description": { + "type": "string", + "enum": [ + "One or more transactions in this Order did not succeed. Since this Order is being processed as an All or None Order, if one or more transactions in this Order do not succeed, then all purchase units are marked declined and will not be processed." + ] + } + } + }, + "ALIASDECLINEDBYPROCESSOR1": { + "title": "ALIAS_DECLINED_BY_PROCESSOR", + "properties": { + "issue": { + "type": "string", + "enum": ["ALIAS_DECLINED_BY_PROCESSOR"] + }, + "description": { + "type": "string", + "enum": [ + "The provided alias was declined by the processor. Please create a new order with a different alias_key and/or alias_label and try again." + ] + } + } + }, + "CAPTUREIDNOTFOUND": { + "title": "CAPTURE_ID_NOT_FOUND", + "properties": { + "issue": { + "type": "string", + "enum": ["CAPTURE_ID_NOT_FOUND"] + }, + "description": { + "type": "string", + "enum": [ + "Specified capture ID does not exist. Check the capture ID and try again." + ] + } + } + }, + "DUPLICATEINVOICEID1": { + "title": "DUPLICATE_INVOICE_ID", + "properties": { + "issue": { + "type": "string", + "enum": ["DUPLICATE_INVOICE_ID"] + }, + "description": { + "type": "string", + "enum": [ + "Duplicate Invoice ID detected. To avoid a potential duplicate transaction your account setting requires that Invoice Id be unique for each transaction." + ] + } + } + }, + "PAYPALTRANSACTIONIDEXPIRED1": { + "title": "PAYPAL_TRANSACTION_ID_EXPIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYPAL_TRANSACTION_ID_EXPIRED"] + }, + "description": { + "type": "string", + "enum": [ + "Specified `paypal_transaction_id` has expired. PayPal transaction ID expires 4 years after the date of the initial transaction." + ] + } + } + }, + "CardFromRequest": { + "title": "Response of Card from Request", + "type": "object", + "properties": { + "expiry": { + "$ref": "#/components/schemas/DateYearMonth" + }, + "last_digits": { + "maxLength": 4, + "minLength": 2, + "pattern": "[0-9]{2,}", + "type": "string", + "description": "The last digits of the payment card", + "readOnly": true, + "x-ballerina-name-ignore": "lastDigits" + } + }, + "description": "Representation of card details as received in the request" + }, + "DUPLICATEINVOICEID2": { + "title": "DUPLICATE_INVOICE_ID", + "properties": { + "issue": { + "type": "string", + "enum": ["DUPLICATE_INVOICE_ID"] + }, + "description": { + "type": "string", + "enum": [ + "Duplicate Invoice ID detected. To avoid a potential duplicate transaction your account setting requires that Invoice Id be unique for each transaction." + ] + } + } + }, + "CANNOTBEZEROORNEGATIVE": { + "title": "CANNOT_BE_ZERO_OR_NEGATIVE", + "properties": { + "issue": { + "type": "string", + "enum": ["CANNOT_BE_ZERO_OR_NEGATIVE"] + }, + "description": { + "type": "string", + "enum": [ + "Must be greater than zero. If the currency supports decimals, only two decimal place precision is supported." + ] + } + } + }, + "PhoneType": { + "title": "Phone Type", + "type": "string", + "description": "The phone type", + "enum": ["FAX", "HOME", "MOBILE", "OTHER", "PAGER"] + }, + "OrdersConfirm400": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Ordersconfirm400Details" + } + } + } + }, + "INVALIDCURRENCYCODE": { + "title": "INVALID_CURRENCY_CODE", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_CURRENCY_CODE"] + }, + "description": { + "type": "string", + "enum": [ + "Currency code is invalid or is not currently supported. Please refer https://developer.paypal.com/api/rest/reference/currency-codes/ for list of supported currency codes." + ] + } + } + }, + "ORDERALREADYAUTHORIZED": { + "title": "ORDER_ALREADY_AUTHORIZED", + "properties": { + "issue": { + "type": "string", + "enum": ["ORDER_ALREADY_AUTHORIZED"] + }, + "description": { + "type": "string", + "enum": [ + "Order already captured. If 'intent=CAPTURE' only one capture per order is allowed." + ] + } + } + }, + "Ordersauthorize403Details": { + "anyOf": [ + { + "$ref": "#/components/schemas/NOTELIGIBLEFORTOKENPROCESSING" + }, + { + "$ref": "#/components/schemas/PERMISSIONDENIED1" + }, + { + "$ref": "#/components/schemas/PERMISSIONDENIEDFORDONATIONITEMS" + } + ] + }, + "PaymentMethod": { + "title": "Payment Method", + "type": "object", + "properties": { + "payee_preferred": { + "allOf": [ + { + "$ref": "#/components/schemas/PayeePaymentMethodPreference" + } + ], + "x-ballerina-name-ignore": "payeePreferred" + }, + "standard_entry_class_code": { + "maxLength": 255, + "minLength": 3, + "type": "string", + "description": "NACHA (the regulatory body governing the ACH network) requires that API callers (merchants, partners) obtain the consumer’s explicit authorization before initiating a transaction. To stay compliant, you’ll need to make sure that you retain a compliant authorization for each transaction that you originate to the ACH Network using this API. ACH transactions are categorized (using SEC codes) by how you capture authorization from the Receiver (the person whose bank account is being debited or credited). PayPal supports the following SEC codes", + "default": "WEB", + "enum": ["TEL", "WEB", "CCD", "PPD"], + "x-ballerina-name-ignore": "standardEntryClassCode" + } + }, + "description": "The customer and merchant payment preferences" + }, + "ActivityTimestamps": { + "title": "Transaction Date and Time Stamps", + "type": "object", + "properties": { + "update_time": { + "allOf": [ + { + "$ref": "#/components/schemas/DateTime" + } + ], + "x-ballerina-name-ignore": "updateTime" + }, + "create_time": { + "allOf": [ + { + "$ref": "#/components/schemas/DateTime" + } + ], + "x-ballerina-name-ignore": "createTime" + } + }, + "description": "The date and time stamps that are common to authorized payment, captured payment, and refund transactions" + }, + "Payee": { + "title": "Payee", + "type": "object", + "description": "The merchant who receives the funds and fulfills the order. The merchant is also known as the payee", + "allOf": [ + { + "$ref": "#/components/schemas/PayeeBase" + }, + { + "$ref": "#/components/schemas/PayeeAllOf2" + } + ] + }, + "NOTENABLEDFORGOOGLEPAY": { + "title": "NOT_ENABLED_FOR_GOOGLE_PAY", + "properties": { + "issue": { + "type": "string", + "enum": ["NOT_ENABLED_FOR_GOOGLE_PAY"] + }, + "description": { + "type": "string", + "enum": [ + "The 'API caller' and/or 'payee' is not setup to be able to process google pay. Please contact your Account Manager." + ] + } + } + }, + "SHIPPINGOPTIONNOTSELECTED1": { + "title": "SHIPPING_OPTION_NOT_SELECTED", + "properties": { + "issue": { + "type": "string", + "enum": ["SHIPPING_OPTION_NOT_SELECTED"] + }, + "description": { + "type": "string", + "enum": [ + "At least one of the shipping.option should be set to 'selected = true'." + ] + } + } + }, + "AUTHORIZATIONAMOUNTEXCEEDED": { + "title": "AUTHORIZATION_AMOUNT_EXCEEDED", + "properties": { + "issue": { + "type": "string", + "enum": ["AUTHORIZATION_AMOUNT_EXCEEDED"] + }, + "description": { + "type": "string", + "enum": [ + "Authorization amount specified exceeded allowable limit. Specify a different amount and try the request again. Alternately, contact Customer Support to increase your limits. Local regulations (e.g. in PSD2 countries) prohibit overages above the amount authorized by the payer." + ] + } + } + }, + "INVALIDARRAYMAXITEMS": { + "title": "INVALID_ARRAY_MAX_ITEMS", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_ARRAY_MAX_ITEMS"] + }, + "description": { + "type": "string", + "enum": ["The number of items in an array parameter is too large."] + } + } + }, + "CaptureAllOf2": { + "properties": { + "id": { + "type": "string", + "description": "The PayPal-generated ID for the captured payment.", + "readOnly": true + }, + "amount": { + "$ref": "#/components/schemas/Money" + }, + "invoice_id": { + "type": "string", + "description": "The API caller-provided external invoice number for this order. Appears in both the payer's transaction history and the emails that the payer receives.", + "readOnly": true + }, + "custom_id": { + "maxLength": 127, + "type": "string", + "description": "The API caller-provided external ID. Used to reconcile API caller-initiated transactions with PayPal transactions. Appears in transaction and settlement reports." + }, + "network_transaction_reference": { + "$ref": "#/components/schemas/NetworkTransactionReference" + }, + "seller_protection": { + "$ref": "#/components/schemas/SellerProtection" + }, + "final_capture": { + "type": "boolean", + "description": "Indicates whether you can make additional captures against the authorized payment. Set to `true` if you do not intend to capture additional payments against the authorization. Set to `false` if you intend to capture additional payments against the authorization.", + "readOnly": true, + "default": false + }, + "seller_receivable_breakdown": { + "$ref": "#/components/schemas/SellerReceivableBreakdown" + }, + "disbursement_mode": { + "$ref": "#/components/schemas/DisbursementMode" + }, + "links": { + "type": "array", + "description": "An array of related [HATEOAS links](/docs/api/reference/api-responses/#hateoas-links).", + "readOnly": true, + "items": { + "$ref": "#/components/schemas/LinkDescription" + } + }, + "processor_response": { + "$ref": "#/components/schemas/ProcessorResponse" + } + } + }, + "ErrorLinkDescription": { + "title": "Link Description", + "required": ["href", "rel"], + "type": "object", + "properties": { + "method": { + "maxLength": 6, + "minLength": 3, + "pattern": "^[A-Z]*$", + "type": "string", + "description": "The HTTP method required to make the related call", + "enum": ["GET", "POST", "PUT", "DELETE", "PATCH"] + }, + "rel": { + "maxLength": 100, + "minLength": 0, + "pattern": "^.*$", + "type": "string", + "description": "The [link relation type](https://tools.ietf.org/html/rfc5988#section-4), which serves as an ID for a link that unambiguously describes the semantics of the link. See [Link Relations](https://www.iana.org/assignments/link-relations/link-relations.xhtml)" + }, + "href": { + "maxLength": 20000, + "minLength": 0, + "pattern": "^.*$", + "type": "string", + "description": "The complete target URL. To make the related call, combine the method with this [URI Template-formatted](https://tools.ietf.org/html/rfc6570) link. For pre-processing, include the `$`, `(`, and `)` characters. The `href` is the key HATEOAS component that links a completed call with a subsequent call" + } + }, + "description": "The request-related [HATEOAS link](/api/rest/responses/#hateoas-links) information" + }, + "BILLINGADDRESSINVALID": { + "title": "BILLING_ADDRESS_INVALID", + "properties": { + "issue": { + "type": "string", + "enum": ["BILLING_ADDRESS_INVALID"] + }, + "description": { + "type": "string", + "enum": ["Provided billing address is invalid."] + } + } + }, + "StoredPaymentSourcePaymentType": { + "maxLength": 255, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "Indicates the type of the stored payment_source payment", + "enum": ["ONE_TIME", "RECURRING", "UNSCHEDULED"] + }, + "ShipmentTrackingNumberType": { + "title": "Shipment Tracking Number Type.", + "maxLength": 64, + "minLength": 1, + "pattern": "^[0-9A-Z_]+$", + "type": "string", + "description": "The tracking number type", + "enum": ["CARRIER_PROVIDED", "E2E_PARTNER_PROVIDED"] + }, + "AccountId2": { + "maxLength": 13, + "minLength": 13, + "pattern": "^[2-9A-HJ-NP-Z]{13}$", + "type": "string", + "description": "The PayPal payer ID, which is a masked version of the PayPal account number intended for use with third parties. The account number is reversibly encrypted and a proprietary variant of Base32 is used to encode the result", + "format": "ppaas_payer_id_v3" + }, + "NOTENABLEDTOVAULTPAYMENTSOURCE1": { + "title": "NOT_ENABLED_TO_VAULT_PAYMENT_SOURCE", + "properties": { + "issue": { + "type": "string", + "enum": ["NOT_ENABLED_TO_VAULT_PAYMENT_SOURCE"] + }, + "description": { + "type": "string", + "enum": [ + "The API caller or the merchant on whose behalf the API call is initiated is not allowed to vault the given source. Please contact PayPal customer support for assistance." + ] + } + } + }, + "PaymentInstruction": { + "title": "Payment Instruction", + "type": "object", + "properties": { + "disbursement_mode": { + "allOf": [ + { + "$ref": "#/components/schemas/DisbursementMode" + } + ], + "x-ballerina-name-ignore": "disbursementMode" + }, + "platform_fees": { + "maxItems": 1, + "minItems": 0, + "type": "array", + "description": "An array of various fees, commissions, tips, or donations. This field is only applicable to merchants that been enabled for PayPal Commerce Platform for Marketplaces and Platforms capability", + "items": { + "$ref": "#/components/schemas/PlatformFee" + }, + "x-ballerina-name-ignore": "platformFees" + }, + "payee_receivable_fx_rate_id": { + "maxLength": 4000, + "minLength": 1, + "pattern": "^.*$", + "type": "string", + "description": "FX identifier generated returned by PayPal to be used for payment processing in order to honor FX rate (for eligible integrations) to be used when amount is settled/received into the payee account", + "x-ballerina-name-ignore": "payeeReceivableFxRateId" + }, + "payee_pricing_tier_id": { + "maxLength": 20, + "minLength": 1, + "pattern": "^.*$", + "type": "string", + "description": "This field is only enabled for selected merchants/partners to use and provides the ability to trigger a specific pricing rate/plan for a payment transaction. The list of eligible 'payee_pricing_tier_id' would be provided to you by your Account Manager. Specifying values other than the one provided to you by your account manager would result in an error", + "x-ballerina-name-ignore": "payeePricingTierId" + } + }, + "description": "Any additional payment instructions to be consider during payment processing. This processing instruction is applicable for Capturing an order or Authorizing an Order" + }, + "PAYPALTRANSACTIONIDNOTFOUND": { + "title": "PAYPAL_TRANSACTION_ID_NOT_FOUND", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYPAL_TRANSACTION_ID_NOT_FOUND"] + }, + "description": { + "type": "string", + "enum": [ + "Specified `paypal_transaction_id` was not found. Verify the value and try the request again." + ] + } + } + }, + "FIELDNOTPATCHABLE1": { + "title": "FIELD_NOT_PATCHABLE", + "properties": { + "issue": { + "type": "string", + "enum": ["FIELD_NOT_PATCHABLE"] + }, + "description": { + "type": "string", + "enum": ["Field cannot be patched."] + } + } + }, + "VenmoWalletAttributes": { + "title": "Venmo Wallet Attributes", + "type": "object", + "properties": { + "vault": { + "$ref": "#/components/schemas/VaultVenmoWalletBase" + }, + "customer": { + "$ref": "#/components/schemas/Customer" + } + }, + "description": "Additional attributes associated with the use of this Venmo Wallet" + }, + "PATCHPATHREQUIRED": { + "title": "PATCH_PATH_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["PATCH_PATH_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "Please specify a 'path' for the field for which the operation needs to be performed." + ] + } + } + }, + "V3VaultInstructionBase": { + "title": "Base Vault Instruction Parameters", + "required": ["store_in_vault"], + "type": "object", + "properties": { + "store_in_vault": { + "allOf": [ + { + "$ref": "#/components/schemas/StoreInVaultInstruction" + } + ], + "x-ballerina-name-ignore": "storeInVault" + } + }, + "description": "Base vaulting specification. The object can be extended for specific use cases within each payment_source that supports vaulting" + }, + "INVALIDPLATFORMFEESACCOUNT": { + "title": "INVALID_PLATFORM_FEES_ACCOUNT", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_PLATFORM_FEES_ACCOUNT"] + }, + "description": { + "type": "string", + "enum": [ + "The specified platform_fees payee account is either invalid or account setup is incomplete.Please work with your PayPal Account Manager to enable this option for your account." + ] + } + } + }, + "UNSUPPORTEDPATCHPARAMETERVALUE": { + "title": "UNSUPPORTED_PATCH_PARAMETER_VALUE", + "properties": { + "issue": { + "type": "string", + "enum": ["UNSUPPORTED_PATCH_PARAMETER_VALUE"] + }, + "description": { + "type": "string", + "enum": [ + "The value specified for this field is not currently supported." + ] + } + } + }, + "INVALIDPARAMETERVALUE2": { + "title": "INVALID_PARAMETER_VALUE", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_PARAMETER_VALUE"] + }, + "description": { + "type": "string", + "enum": ["A parameter value is not valid."] + } + } + }, + "INVALIDPARAMETERVALUE1": { + "title": "INVALID_PARAMETER_VALUE", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_PARAMETER_VALUE"] + }, + "description": { + "type": "string", + "enum": ["The value of a field is invalid."] + } + } + }, + "INVALIDPARAMETERVALUE6": { + "title": "INVALID_PARAMETER_VALUE", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_PARAMETER_VALUE"] + }, + "description": { + "type": "string", + "enum": ["The value of a field is invalid."] + } + } + }, + "DOMESTICTRANSACTIONREQUIRED": { + "title": "DOMESTIC_TRANSACTION_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["DOMESTIC_TRANSACTION_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "This transaction requires the payee and payer to be resident in the same country, a domestic transaction is required to create this payment." + ] + } + } + }, + "INVALIDPARAMETERVALUE5": { + "title": "INVALID_PARAMETER_VALUE", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_PARAMETER_VALUE"] + }, + "description": { + "type": "string", + "enum": ["A parameter value is not valid."] + } + } + }, + "INVALIDPARAMETERVALUE4": { + "title": "INVALID_PARAMETER_VALUE", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_PARAMETER_VALUE"] + }, + "description": { + "type": "string", + "enum": ["A parameter value is not valid."] + } + } + }, + "INVALIDARRAYMAXITEMS1": { + "title": "INVALID_ARRAY_MAX_ITEMS", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_ARRAY_MAX_ITEMS"] + }, + "description": { + "type": "string", + "enum": ["The number of items in an array parameter is too large."] + } + } + }, + "INVALIDPARAMETERVALUE3": { + "title": "INVALID_PARAMETER_VALUE", + "properties": { + "issue": { + "type": "string", + "enum": ["INVALID_PARAMETER_VALUE"] + }, + "description": { + "type": "string", + "enum": ["A parameter value is not valid."] + } + } + }, + "CARDBRANDNOTSUPPORTED": { + "title": "CARD_BRAND_NOT_SUPPORTED", + "properties": { + "issue": { + "type": "string", + "enum": ["CARD_BRAND_NOT_SUPPORTED"] + }, + "description": { + "type": "string", + "enum": [ + "Processing of this card brand is not supported. Please use another card to continue with this transaction." + ] + } + } + }, + "PLATFORMFEESNOTSUPPORTED": { + "title": "PLATFORM_FEES_NOT_SUPPORTED", + "properties": { + "issue": { + "type": "string", + "enum": ["PLATFORM_FEES_NOT_SUPPORTED"] + }, + "description": { + "type": "string", + "enum": [ + "The API Caller is not enabled to process transactions by specifying 'platform_fees'. Please work with your PayPal Account Manager to enable this option for your account." + ] + } + } + }, + "PAYMENTSOURCENOTSUPPORTED": { + "title": "PAYMENT_SOURCE_NOT_SUPPORTED", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYMENT_SOURCE_NOT_SUPPORTED"] + }, + "description": { + "type": "string", + "enum": [ + "The payer selected method of payment is not supported when multiple purchase units are specified for an Order." + ] + } + } + }, + "PNREFNOTFOUND1": { + "title": "PNREF_NOT_FOUND", + "properties": { + "issue": { + "type": "string", + "enum": ["PNREF_NOT_FOUND"] + }, + "description": { + "type": "string", + "enum": [ + "Specified `pnref` was not found. Verify the value and try the request again." + ] + } + } + }, + "SellerProtection": { + "title": "Seller Protection", + "type": "object", + "properties": { + "dispute_categories": { + "type": "array", + "description": "An array of conditions that are covered for the transaction", + "readOnly": true, + "items": { + "type": "string", + "description": "The condition that is covered for the transaction.", + "enum": ["ITEM_NOT_RECEIVED", "UNAUTHORIZED_TRANSACTION"] + }, + "x-ballerina-name-ignore": "disputeCategories" + }, + "status": { + "type": "string", + "description": "Indicates whether the transaction is eligible for seller protection. For information, see [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection)", + "readOnly": true, + "enum": ["ELIGIBLE", "PARTIALLY_ELIGIBLE", "NOT_ELIGIBLE"] + } + }, + "description": "The level of protection offered as defined by [PayPal Seller Protection for Merchants](https://www.paypal.com/us/webapps/mpp/security/seller-protection)" + }, + "PNREFNOTFOUND3": { + "title": "PNREF_NOT_FOUND", + "properties": { + "issue": { + "type": "string", + "enum": ["PNREF_NOT_FOUND"] + }, + "description": { + "type": "string", + "enum": [ + "Specified `pnref` was not found. Verify the value and try the request again." + ] + } + } + }, + "PNREFNOTFOUND2": { + "title": "PNREF_NOT_FOUND", + "properties": { + "issue": { + "type": "string", + "enum": ["PNREF_NOT_FOUND"] + }, + "description": { + "type": "string", + "enum": [ + "Specified `pnref` was not found. Verify the value and try the request again." + ] + } + } + }, + "PAYMENTSOURCEINFOCANNOTBEVERIFIED": { + "title": "PAYMENT_SOURCE_INFO_CANNOT_BE_VERIFIED", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYMENT_SOURCE_INFO_CANNOT_BE_VERIFIED"] + }, + "description": { + "type": "string", + "enum": [ + "The combination of the payment_source name, billing address, shipping name and shipping address could not be verified. Please correct this information and try again by creating a new order." + ] + } + } + }, + "NetAmountBreakdownItem": { + "title": "Net Amount Breakdown Item", + "type": "object", + "properties": { + "exchange_rate": { + "allOf": [ + { + "$ref": "#/components/schemas/ExchangeRate" + } + ], + "x-ballerina-name-ignore": "exchangeRate" + }, + "converted_amount": { + "allOf": [ + { + "$ref": "#/components/schemas/Money" + } + ], + "x-ballerina-name-ignore": "convertedAmount" + }, + "payable_amount": { + "allOf": [ + { + "$ref": "#/components/schemas/Money" + } + ], + "x-ballerina-name-ignore": "payableAmount" + } + }, + "description": "The net amount. Returned when the currency of the refund is different from the currency of the PayPal account where the merchant holds their funds" + }, + "DECIMALPRECISION": { + "title": "DECIMAL_PRECISION", + "properties": { + "issue": { + "type": "string", + "enum": ["DECIMAL_PRECISION"] + }, + "description": { + "type": "string", + "enum": [ + "If the currency supports decimals, only two decimal place precision is supported." + ] + } + } + }, + "NOPAYMENTSOURCEPROVIDED": { + "title": "NO_PAYMENT_SOURCE_PROVIDED", + "properties": { + "issue": { + "type": "string", + "enum": ["NO_PAYMENT_SOURCE_PROVIDED"] + }, + "description": { + "type": "string", + "enum": [ + "At least one payment method is required within the payment source." + ] + } + } + }, + "ITEMTOTALMISMATCH": { + "title": "ITEM_TOTAL_MISMATCH", + "properties": { + "issue": { + "type": "string", + "enum": ["ITEM_TOTAL_MISMATCH"] + }, + "description": { + "type": "string", + "enum": [ + "Should equal sum of (unit_amount * quantity) across all items for a given purchase_unit." + ] + } + } + }, + "LineItem": { + "title": "Lineitem", + "type": "object", + "description": "The line items for this purchase. If your merchant account has been configured for Level 3 processing this field will be passed to the processor on your behalf", + "allOf": [ + { + "$ref": "#/components/schemas/Item" + }, + { + "$ref": "#/components/schemas/LineItemAllOf2" + } + ] + }, + "CANCELURLREQUIRED2": { + "title": "CANCEL_URL_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["CANCEL_URL_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "The cancel url is required when attempting to vault this source." + ] + } + } + }, + "CANCELURLREQUIRED1": { + "title": "CANCEL_URL_REQUIRED", + "properties": { + "issue": { + "type": "string", + "enum": ["CANCEL_URL_REQUIRED"] + }, + "description": { + "type": "string", + "enum": [ + "The cancel url is required when attempting to vault this source." + ] + } + } + }, + "NOTENABLEDTOVAULTPAYMENTSOURCE": { + "title": "NOT_ENABLED_TO_VAULT_PAYMENT_SOURCE", + "properties": { + "issue": { + "type": "string", + "enum": ["NOT_ENABLED_TO_VAULT_PAYMENT_SOURCE"] + }, + "description": { + "type": "string", + "enum": [ + "The API caller or the merchant on whose behalf the API call is initiated is not allowed to vault the given source. Please contact PayPal customer support for assistance." + ] + } + } + }, + "PAYEEFXRATEIDCURRENCYMISMATCH1": { + "title": "PAYEE_FX_RATE_ID_CURRENCY_MISMATCH", + "properties": { + "issue": { + "type": "string", + "enum": ["PAYEE_FX_RATE_ID_CURRENCY_MISMATCH"] + }, + "description": { + "type": "string", + "enum": [ + "The specified FX Rate ID is for a currency that does not match with the currency of this request. Please specify a different FX Rate ID and try the request again. Alternately, remove the FX Rate ID to process the request using the default exchange rate." + ] + } + } + }, + "AMOUNTCHANGENOTALLOWED": { + "title": "AMOUNT_CHANGE_NOT_ALLOWED", + "properties": { + "issue": { + "type": "string", + "enum": ["AMOUNT_CHANGE_NOT_ALLOWED"] + }, + "description": { + "type": "string", + "enum": [ + "The amount specified is different from the amount authorized by payer." + ] + } + } + }, + "RefundStatusDetails": { + "title": "Refund Status Details", + "type": "object", + "properties": { + "reason": { + "type": "string", + "description": "The reason why the refund has the `PENDING` or `FAILED` status", + "enum": ["ECHECK"] + } + }, + "description": "The details of the refund status" + }, + "InlineResponse4221": { + "allOf": [ + { + "$ref": "#/components/schemas/Error422" + }, + { + "$ref": "#/components/schemas/OrdersPatch422" + } + ] + }, + "InlineResponse4224": { + "allOf": [ + { + "$ref": "#/components/schemas/Error422" + }, + { + "$ref": "#/components/schemas/OrdersCapture422" + } + ] + }, + "InlineResponse4225": { + "allOf": [ + { + "$ref": "#/components/schemas/Error422" + }, + { + "$ref": "#/components/schemas/OrdersTrackCreate422" + } + ] + }, + "InlineResponse4222": { + "allOf": [ + { + "$ref": "#/components/schemas/Error422" + }, + { + "$ref": "#/components/schemas/OrdersConfirm422" + } + ] + }, + "BILLINGAGREEMENTIDMISMATCH": { + "title": "BILLING_AGREEMENT_ID_MISMATCH", + "properties": { + "issue": { + "type": "string", + "enum": ["BILLING_AGREEMENT_ID_MISMATCH"] + }, + "description": { + "type": "string", + "enum": [ + "Billing Agreement ID must exactly match the Billing Agreement ID that was provided during order creation." + ] + } + } + }, + "PlatformFee": { + "title": "Platform Fee", + "required": ["amount"], + "type": "object", + "properties": { + "payee": { + "$ref": "#/components/schemas/PayeeBase" + }, + "amount": { + "$ref": "#/components/schemas/Money" + } + }, + "description": "The platform or partner fee, commission, or brokerage fee that is associated with the transaction. Not a separate or isolated transaction leg from the external perspective. The platform fee is limited in scope and is always associated with the original payment for the purchase unit" + }, + "InlineResponse4223": { + "allOf": [ + { + "$ref": "#/components/schemas/Error422" + }, + { + "$ref": "#/components/schemas/OrdersAuthorize422" + } + ] + }, + "UNSUPPORTEDSHIPPINGTYPE": { + "title": "UNSUPPORTED_SHIPPING_TYPE", + "properties": { + "issue": { + "type": "string", + "enum": ["UNSUPPORTED_SHIPPING_TYPE"] + }, + "description": { + "type": "string", + "enum": [ + "The provided `shipping.type` is only supported for `application_context.shipping_preference`=`SET_PROVIDED_ADDRESS` or `NO_SHIPPING`." + ] + } + } + }, + "InlineResponse4226": { + "allOf": [ + { + "$ref": "#/components/schemas/Error422" + }, + { + "$ref": "#/components/schemas/OrdersTrackersPatch422" + } + ] + } + }, + "responses": { + "default": { + "description": "The default response.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ErrorDefault" + } + } + } + } + }, + "parameters": { + "paypal_request_id": { + "name": "PayPal-Request-Id", + "in": "header", + "description": "The server stores keys for 6 hours. The API callers can request the times to up to 72 hours by speaking to their Account Manager", + "required": false, + "style": "simple", + "explode": false, + "schema": { + "maxLength": 108, + "minLength": 1, + "type": "string" + }, + "x-ballerina-name-ignore": "payPalRequestId" + }, + "paypal_partner_attribution_id": { + "name": "PayPal-Partner-Attribution-Id", + "in": "header", + "required": false, + "style": "simple", + "explode": false, + "schema": { + "maxLength": 36, + "minLength": 1, + "type": "string" + }, + "x-ballerina-name-ignore": "payPalPartnerAttributionId" + }, + "paypal_client_metadata_id": { + "name": "PayPal-Client-Metadata-Id", + "in": "header", + "required": false, + "style": "simple", + "explode": false, + "schema": { + "maxLength": 36, + "minLength": 1, + "type": "string" + }, + "x-ballerina-name-ignore": "payPalClientMetadataId" + }, + "prefer": { + "name": "Prefer", + "in": "header", + "description": "The preferred server response upon successful completion of the request. Value is:
  • return=minimal. The server returns a minimal response to optimize communication between the API caller and the server. A minimal response includes the id, status and HATEOAS links.
  • return=representation. The server returns a complete resource representation, including the current state of the resource.
", + "required": false, + "style": "simple", + "explode": false, + "schema": { + "maxLength": 25, + "minLength": 1, + "pattern": "^[a-zA-Z=]*$", + "type": "string", + "default": "return=representation" + }, + "x-ballerina-name-ignore": "prefer" + }, + "id": { + "name": "id", + "in": "path", + "description": "The ID of the order that the tracking information is associated with", + "required": true, + "style": "simple", + "explode": false, + "schema": { + "maxLength": 36, + "minLength": 1, + "pattern": "^[A-Z0-9]+$", + "type": "string" + } + }, + "fields": { + "name": "fields", + "in": "query", + "description": "A comma-separated list of fields that should be returned for the order. Valid filter field is `payment_source`", + "required": false, + "style": "form", + "explode": true, + "schema": { + "pattern": "^[a-z_]*$", + "type": "string" + } + }, + "paypal_auth_assertion": { + "name": "PayPal-Auth-Assertion", + "in": "header", + "description": "An API-caller-provided JSON Web Token (JWT) assertion that identifies the merchant. For details, see PayPal-Auth-Assertion", + "required": false, + "style": "simple", + "explode": false, + "schema": { + "type": "string" + }, + "x-ballerina-name-ignore": "payPalAuthAssertion" + }, + "tracker_id": { + "name": "trackerId", + "in": "path", + "description": "The order tracking ID", + "required": true, + "style": "simple", + "explode": false, + "schema": { + "maxLength": 36, + "minLength": 1, + "pattern": "^[A-Z0-9]+$", + "type": "string" + } + } + }, + "requestBodies": { + "patch_request": { + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PatchRequest" + } + } + } + } + }, + "securitySchemes": { + "Oauth2": { + "type": "oauth2", + "description": "Oauth 2.0 authentication", + "flows": { + "clientCredentials": { + "tokenUrl": "https://api-m.sandbox.paypal.com/v1/oauth2/token", + "scopes": { + "https://uri.paypal.com/services/payments/payment": "Manage payments and checkout workflow.", + "https://uri.paypal.com/services/payments/payment/reference-transaction": "Permission to initiate reference transaction", + "https://uri.paypal.com/services/payments/initiatepayment": "Initiates payments and checkout workflows.", + "https://uri.paypal.com/services/payments/orders/client-side-integration": "Allows client-side integration on Create, Get, Patch, Authorize & Capture Order endpoints." + } + } + } + } + } + } +} diff --git a/docs/spec/sanitations.md b/docs/spec/sanitations.md index 0cdc07c..bd16872 100644 --- a/docs/spec/sanitations.md +++ b/docs/spec/sanitations.md @@ -1,24 +1,410 @@ -_Author_: \ -_Created_: \ -_Updated_: \ +_Author_: @snelusha +_Created_: 18 June 2025 +_Updated_: 18 June 2025 _Edition_: Swan Lake -# Sanitation for OpenAPI specification +# Sanitations for the OpenAPI specification -This document records the sanitation done on top of the official OpenAPI specification from Paypal Orders. -The OpenAPI specification is obtained from (TODO: Add source link). -These changes are done in order to improve the overall usability, and as workarounds for some known language limitations. +This document outlines the manual sanitizations applied to the PayPal Checkout Orders v2 OpenAPI specification. The official specification is initially retrieved from [PayPal’s official GitHub repository](https://github.com/paypal/paypal-rest-api-specifications/blob/main/openapi/checkout_orders_v2.json). After being flattened and aligned by the Ballerina OpenAPI tool, these manual modifications are implemented to improve the developer experience and to circumvent certain language and tool limitations. -[//]: # (TODO: Add sanitation details) -1. -2. -3. +## 1. Update OAuth2 token URL to relative URL. -## OpenAPI cli command +**Location**: `components.securitySchemes.Oauth2.flows.clientCredentials.tokenUrl` + +**Original**: `"tokenUrl": "/v1/oauth2/token"` + +**Sanitized**: `"tokenUrl": "https://api-m.sandbox.paypal.com/v1/oauth2/token"` + +```diff +- "tokenUrl": "/v1/oauth2/token" ++ "tokenUrl": "https://api-m.sandbox.paypal.com/v1/oauth2/token" +``` + +**Reason**: The relative path does not resolve correctly against the OAuth2 endpoint. + +## 2. Fix invalid generated schema names with Apostrophe + +**Original**: + +```json +"Schema'400": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/400Details" + } + } + } +}, +"Schema'401": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/401Details" + } + } + } +} +``` + +```json +"InlineResponse400": { + "allOf": [ + { + "$ref": "#/components/schemas/Error400" + }, + { + "$ref": "#/components/schemas/Schema'400" + } + ] +}, +"InlineResponse401": { + "allOf": [ + { + "$ref": "#/components/schemas/Error401" + }, + { + "$ref": "#/components/schemas/Schema'401" + } + ] +} +``` + +**Sanitized**: + +```json +"BadRequest": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/400Details" + } + } + } +}, +"Unauthorized": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/401Details" + } + } + } +} +``` + +```json +"InlineResponse400": { + "allOf": [ + { + "$ref": "#/components/schemas/Error400" + }, + { + "$ref": "#/components/schemas/BadRequest" + } + ] +}, +"InlineResponse401": { + "allOf": [ + { + "$ref": "#/components/schemas/Error401" + }, + { + "$ref": "#/components/schemas/Unauthorized" + } + ] +} +``` + +```diff +- "Schema'400": { ++ "BadRequest": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/400Details" + } + } + } +}, +- "Schema'401": { ++ "Unauthorized": { + "properties": { + "details": { + "type": "array", + "items": { + "$ref": "#/components/schemas/401Details" + } + } + } +} +``` + +```diff +"InlineResponse400": { + "allOf": [ + { + "$ref": "#/components/schemas/Error400" + }, + { +- "$ref": "#/components/schemas/Schema'400" ++ "$ref": "#/components/schemas/BadRequest" + } + ] +}, +"InlineResponse401": { + "allOf": [ + { + "$ref": "#/components/schemas/Error401" + }, + { +- "$ref": "#/components/schemas/Schema'401" ++ "$ref": "#/components/schemas/Unauthorized" + } + ] +} +``` + +**Reason**: Apostrophes in schema names generate invalid JSON Schema; plain identifiers prevent generator errors. + +**Reason**: JSON keys with apostrophes (e.g., `Schema'404`) are invalid and break schema parsing; using plain, descriptive identifiers (e.g., `NotFound`) ensures valid JSON Schema and prevents generator errors. See GitHub issue [#8011](https://github.com/ballerina-platform/ballerina-library/issues/8011) for details. + + +## 3. Remove duplicate schema entries + +**Location**: + +- `components.schemas.Money2` and `components.schemas.CurrencyCode2` +- `components.schemas.ApplePayDecryptedTokenData.properties.transaction_amount.allOf[0]` + +**Original**: + +```json +"Money2": { + "title": "Money", + "required": ["currency_code", "value"], + "type": "object", + "properties": { + ... + } +} +``` + +```json +"CurrencyCode2": { + "maxLength": 3, + "minLength": 3, + ... +} +``` + +```json +"transaction_amount": { + "allOf": [ + { + "$ref": "#/components/schemas/Money2" + } + ], + "x-ballerina-name": "transactionAmount" +} +``` + +**Sanitized**: + +```json +"transaction_amount": { + "allOf": [ + { + "$ref": "#/components/schemas/Money" + } + ], + "x-ballerina-name": "transactionAmount" +} +``` + +```diff +- "Money2": { +- "title": "Money", +- "required": ["currency_code", "value"], +- "type": "object", +- "properties": { +- ... +- } +- } +``` + +```diff +- "CurrencyCode2": { +- "maxLength": 3, +- "minLength": 3, +- ... +- } +``` + +```diff +"transaction_amount": { + "allOf": [ + { +- "$ref": "#/components/schemas/Money2" ++ "$ref": "#/components/schemas/Money" + } + ], + "x-ballerina-name": "transactionAmount" +} +``` + +**Reason**: `Money2` and `CurrencyCode2` duplicate the existing `Money` schema, so using one Money definition avoids redundancy + +## 4. Change the default response behaviour to obtain the entire representation instead of the minimal representation + +**Location**: `components.parameters.prefer` + +**Original**: + +```json +"prefer": { + ... + "schema": { + ... + "default": "return=minimal" + } +} +``` + +**Sanitized**: + +```json +"prefer": { + ... + "schema": { + ... + "default": "return=representation" + } +} +``` + +```diff +"prefer": { + ... + "schema": { + ... +- "default": "return=minimal" ++ "default": "return=representation" + } +} +``` + +**Reason**: Setting the default to return=representation means clients get the full response. + +## 5. Duplicate the field in the schema to avoid redeclared field error + +**Location**: `components.schemas.PaypalWalletVaultResponse` + +**Original**: + +```json +"PaypalWalletVaultResponse": { + ... + "allOf": [ + { + "$ref": "#/components/schemas/VaultResponse" + }, + { + "$ref": "#/components/schemas/PaypalWalletVaultResponseAllOf2" + } + ] +} +``` + +**Sanitized**: + +```json +"PaypalWalletVaultResponse": { + ... + "allOf": [ + { + "$ref": "#/components/schemas/VaultResponse" + }, + { + "$ref": "#/components/schemas/PaypalWalletVaultResponseAllOf2" + }, + { + "type": "object", + "properties": { + "customer": { + "allOf": [ + { + "$ref": "#/components/schemas/Customer" + } + ], + "x-ballerina-name-ignore": "customer" + } + } + } + ] +} +``` + +```diff +"PaypalWalletVaultResponse": { + ... + "allOf": [ + { + "$ref": "#/components/schemas/VaultResponse" + }, + { + "$ref": "#/components/schemas/PaypalWalletVaultResponseAllOf2" +- } ++ }, ++ { ++ "type": "object", ++ "properties": { ++ "customer": { ++ "allOf": [ ++ { ++ "$ref": "#/components/schemas/Customer" ++ } ++ ], ++ "x-ballerina-name-ignore": "customer" ++ } ++ } ++ } + ] +} +``` + +**Reason**: Prevent duplicate symbol conflicts by explicitly defining the `customer` property. Also addresses GitHub issue [#8042](https://github.com/ballerina-platform/ballerina-library/issues/8042) + +## 6. Avoid property name sanitisation to avoid data-binding error which is caused by a language limitation + +**Original**: + +```json +"x-ballerina-name": "countryCode" +``` + +**Sanitized**: + +```json +"x-ballerina-name-ignore": "countryCode" +``` + +```diff +- "x-ballerina-name": "countryCode" ++ "x-ballerina-name-ignore": "countryCode" +``` + +**Reason**: Due to issue [#38535](https://github.com/ballerina-platform/ballerina-lang/issues/38535); the data binding fails for the fields which have json data name annotations. above chagne will avoid adding this annotations to the fields. + +## OpenAPI CLI command The following command was used to generate the Ballerina client from the OpenAPI specification. The command should be executed from the repository root directory. ```bash -# TODO: Add OpenAPI CLI command used to generate the client +bal openapi -i docs/spec/openapi.json --mode client --license docs/license.txt -o ballerina ``` -Note: The license year is hardcoded to 2024, change if necessary. diff --git a/gradle.properties b/gradle.properties index cb556a2..b5b080a 100644 --- a/gradle.properties +++ b/gradle.properties @@ -3,5 +3,5 @@ group=io.ballerina.lib version=2.0.0-SNAPSHOT releasePluginVersion=2.8.0 -ballerinaGradlePluginVersion=2.2.4 -ballerinaLangVersion=2201.12.0 +ballerinaGradlePluginVersion=2.3.0 +ballerinaLangVersion=2201.12.7