Handle payout component errors in the Web SDK.
Payout components on Web report errors as an error code (SDKXXXX) and a descriptive message. Configuration and wallet validation failures are thrown when you create a component. Runtime failures during SDK-initiated payout execution are delivered through onError.
Catch create-time errors around create. Use onError on the submission component for failures after the customer submits a payout. For field-level rules and examples, see Data validation.
The following table summarises where payout errors appear.
| Stage | How you receive the error |
|---|---|
| Component creation | Thrown from create. For example, missing wallet fields, invalid amount, or invalid currency. |
| SDK-initiated payout execution | Delivered to onError on the payout submission component. |
The following tables list payout-related codes from the Web SDK.
| Error code | Description |
|---|---|
SDK0000 | Unexpected error. |
SDK0001 | Not implemented. |
SDK0100 | Missing SDK config. |
SDK0101 | Missing SDK config: environment. |
SDK0102 | Missing SDK config: session data. |
SDK0103 | Missing SDK config: session ID. |
SDK0104 | Missing SDK config: session HMAC key. |
SDK0106 | Intent type does not support the requested component. |
SDK0108 | PayPal is missing from allowed funding types. |
SDK0112 | PayPal intent type is required for the component but was not provided. |
SDK0200 | Component name must not be empty. |
SDK0201 | Container element with the given ID was not found. |
SDK0500 | Network error. |
SDK0501 | Validation error. |
| Error code | Description |
|---|---|
SDK0803 | Receiver value is required. |
SDK0804 | Invalid receiver type. Valid values are Email, Phone, PaypalId, and UserHandle. |
SDK0805 | Receiver type must be Email. |
SDK0806 | Invalid wallet value. Must be Paypal. |
SDK0807 | Receiver type must be Email when the wallet is Paypal. |
SDK0808 | Invalid email format for the receiver. |
SDK0809 | PayPal payer ID is required. |
SDK0810 | Amount must be a valid number. |
SDK0811 | Amount must be a positive number greater than 0. |
SDK0812 | Amount is required. |
SDK0813 | Currency code must be a non-empty string. |
SDK0814 | Currency code must be a 3-letter ISO 4217 currency code. |
SDK0815 | Invalid currency code. |
SDK0816 | Receiver type is required. |
SDK0818 | A PayPal payout field exceeds its maximum length. |
| Error code | Description |
|---|---|
SDK0900 | Venmo wallet is required. |
SDK0901 | Receiver value is required for Venmo. |
SDK0902 | Venmo recipient type is required. |
SDK0903 | Invalid Venmo recipient type. Valid values are Email, Phone, and UserHandle. |
SDK0904 | Invalid phone format for the Venmo receiver. Use numeric characters only. |
SDK0905 | Venmo only supports USD currency. |
| Error code | Description |
|---|---|
SDK1000 | PayPal configuration is required. |
SDK1001 | Recipient wallet is required. |
SDK1002 | Receiver and recipient type are required. |
SDK1003 | Unsupported recipient wallet. Valid values are Paypal and Venmo. |
Notes longer than 4000 characters are truncated with a console warning. The submission path does not throw SDK1004 for an over-long note. The note field is included with Venmo payouts only.
The following example catches create-time errors and handles runtime failures in onError:
try {
const submitComponent = pxpCheckoutSdk.create("payout-submission", {
recipientWallet: "Paypal",
onError: (error) => {
console.error("Payout error:", error.ErrorCode, error.message);
showErrorMessage(error.message);
},
});
} catch (error) {
console.error("Create failed:", error.ErrorCode, error.message);
showErrorMessage(error.message);
}