---
updatedAt: 2026-04-20T19:14:03.000Z
agentTools:
  projectIndex: https://docs.paymentlabs.io/llms.txt
---

# Get Widget URL

Returns a signed URL that opens the Payment Labs payee widget for one payee, where the payee signs up, enters personal details,
adds a payment method and fills in tax forms.

Call it from your server each time a payee opens the widget, then load the returned `url` in an iframe or redirect the payee
to it. See [Getting Started with the Payee Widget](/docs/getting-started-with-the-payee-widget).

Any payout role can call it.

Side effects. Payment Labs finds the payee by `payeeReferenceId` and `payeeEmail`, the same way Create Payees does:
- If no payee matches either value, Payment Labs creates the payee and may send them an invitation email.
- If the payee found by `payeeReferenceId` has another email, the payee's email changes to `payeeEmail`.
- If the payee found by `payeeEmail` has another reference ID, the payee's reference ID changes to `payeeReferenceId`.
- `taxJurisdiction`, if sent, is added to the payee's tax jurisdictions.

**Errors**
- `400 EMAIL_ALREADY_IN_USE`: `payeeReferenceId` belongs to one payee and `payeeEmail` to another. Send the email that payee
  already has.
- `400 VALIDATION_ERROR`: a required field is missing, `payeeEmail` is not a valid email address, `taxJurisdiction` is not a
  known value, or the body has a field not listed here.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Payout API Specification",
    "version": "0.0.1",
    "description": "Describes the operations a Payor can do to manage payments"
  },
  "paths": {
    "/payors/widget-url": {
      "put": {
        "operationId": "Get Embeddable URL",
        "tags": [
          "Embedded"
        ],
        "description": "Returns a signed URL that opens the Payment Labs payee widget for one payee, where the payee signs up, enters personal details,\nadds a payment method and fills in tax forms.\n\nCall it from your server each time a payee opens the widget, then load the returned `url` in an iframe or redirect the payee\nto it. See [Getting Started with the Payee Widget](/docs/getting-started-with-the-payee-widget).\n\nAny payout role can call it.\n\nSide effects. Payment Labs finds the payee by `payeeReferenceId` and `payeeEmail`, the same way Create Payees does:\n- If no payee matches either value, Payment Labs creates the payee and may send them an invitation email.\n- If the payee found by `payeeReferenceId` has another email, the payee's email changes to `payeeEmail`.\n- If the payee found by `payeeEmail` has another reference ID, the payee's reference ID changes to `payeeReferenceId`.\n- `taxJurisdiction`, if sent, is added to the payee's tax jurisdictions.\n\n**Errors**\n- `400 EMAIL_ALREADY_IN_USE`: `payeeReferenceId` belongs to one payee and `payeeEmail` to another. Send the email that payee\n  already has.\n- `400 VALIDATION_ERROR`: a required field is missing, `payeeEmail` is not a valid email address, `taxJurisdiction` is not a\n  known value, or the body has a field not listed here.",
        "summary": "Get Widget URL",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "description": "Identifies the payee to open the payee widget for.",
                "type": "object",
                "properties": {
                  "payeeEmail": {
                    "description": "Email address of the payee. If no payee of yours has this email or `payeeReferenceId`, Payment Labs creates one. If the\npayee found by `payeeReferenceId` has a different email, the payee's email is changed to this one.",
                    "example": "jordan.lee@example.com",
                    "type": "string",
                    "title": "payeeEmail"
                  },
                  "payeeReferenceId": {
                    "description": "Your own ID for the payee, unique within your payor account. If the payee found by `payeeEmail` has a different reference ID,\nthe payee's reference ID is changed to this one. See [Payee Reference IDs](/docs/payee-reference-ids).",
                    "example": "EMP-10442",
                    "type": "string",
                    "title": "payeeReferenceId"
                  },
                  "taxJurisdiction": {
                    "$ref": "#/components/schemas/TaxJurisdiction",
                    "description": "Tax jurisdiction to add to the payee. The payee is then asked for the tax form of that jurisdiction during onboarding. Omit it,\nor send `none`, to leave the payee's tax jurisdictions unchanged.",
                    "title": "taxJurisdiction"
                  },
                  "redirectPath": {
                    "description": "Page of the payee widget to open after the payee signs in, as a Base64-encoded path, for example `L3BheW1lbnQtbWV0aG9kcw==`\nfor `/payment-methods`. Omit it to open the default page.",
                    "example": "L3BheW1lbnQtbWV0aG9kcw==",
                    "type": "string",
                    "title": "redirectPath"
                  }
                },
                "required": [
                  "payeeEmail",
                  "payeeReferenceId"
                ]
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The signed widget URL.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "url": {
                      "description": "Signed URL of the payee widget for this payee. Open it as is; changing any part of it invalidates the signature. It is\nmeant for this payee only: do not log it, store it or share it. Request a new one each time the payee opens the widget.",
                      "example": "https://widget.example.com/?config=eyJwYXllZSI6e319&_s=MEUCIQDx",
                      "type": "string",
                      "title": "url"
                    }
                  },
                  "required": [
                    "url"
                  ]
                }
              }
            }
          },
          "400": {
            "description": "The request was understood but refused by a business rule. Read `code` to decide what to do; the possible codes are listed\nin the endpoint description. `message` is for humans and may change.\nOne or more fields in the request are missing or invalid. `details` maps each failing field (a dotted path for nested\nfields) to the list of rules it broke. Fix every listed field before retrying.\n\nExample: `{\"code\": \"VALIDATION_ERROR\", \"message\": \"There have been validation errors\", \"details\": {\"email\": [{\"code\": \"MISSING_REQUIRED_FIELD\", \"message\": \"email is required\"}]}}`",
            "content": {
              "application/json": {
                "schema": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "code": {
                          "description": "Machine-readable error code, stable across releases.",
                          "type": "string",
                          "title": "code"
                        },
                        "message": {
                          "description": "Human-readable explanation. Do not parse it.",
                          "type": "string",
                          "title": "message"
                        }
                      },
                      "required": [
                        "code",
                        "message"
                      ]
                    },
                    {
                      "type": "object",
                      "properties": {
                        "code": {
                          "type": "string",
                          "enum": [
                            "VALIDATION_ERROR"
                          ],
                          "title": "code"
                        },
                        "message": {
                          "description": "Human-readable summary.",
                          "type": "string",
                          "title": "message"
                        },
                        "details": {
                          "description": "Failing fields, each with the list of rules it broke.",
                          "type": "object",
                          "title": "details"
                        }
                      },
                      "required": [
                        "code",
                        "details",
                        "message"
                      ]
                    }
                  ]
                }
              }
            }
          },
          "401": {
            "description": "The request has no valid access token. Get a new token from `POST /login` and send it as `Authorization: Bearer <token>`.\n\nCodes: `UNAUTHORIZED_NO_TOKEN` (no `Authorization` header), `UNAUTHORIZED_INVALID_TOKEN` (expired or malformed token),\n`UNAUTHORIZED_NO_CONTEXT` (the token does not belong to a payor or merchant), `UNAUTHORIZED_NO_PAYOR` (the token gives access\nto more than one payor and the request did not send `x-payor-id`). A few endpoints answer from the API gateway instead and\nreturn only `{\"message\": \"Unauthorized\"}`.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "description": "Machine-readable reason. Absent when the API gateway rejects the request.",
                      "enum": [
                        "UNAUTHORIZED_INVALID_TOKEN",
                        "UNAUTHORIZED_NO_CONTEXT",
                        "UNAUTHORIZED_NO_PAYOR",
                        "UNAUTHORIZED_NO_TOKEN"
                      ],
                      "type": "string",
                      "title": "code"
                    },
                    "message": {
                      "description": "Human-readable explanation.",
                      "type": "string",
                      "title": "message"
                    }
                  },
                  "required": [
                    "message"
                  ]
                }
              }
            }
          },
          "403": {
            "description": "The token is valid but is not allowed to perform this operation.\n\nCodes: `FORBIDDEN_INSUFFICIENT_TAGS` (your credential's role does not allow this operation), `FORBIDDEN_CONDITION_NOT_MET`\n(the payment amount is above your approval limit). Some endpoints add their own codes; they are listed in the endpoint\ndescription.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "description": "Machine-readable reason.",
                      "type": "string",
                      "title": "code"
                    },
                    "message": {
                      "description": "Human-readable explanation.",
                      "type": "string",
                      "title": "message"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          },
          "404": {
            "description": "The resource does not exist in your account.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "NOT_FOUND"
                      ],
                      "title": "code"
                    },
                    "message": {
                      "description": "Names the missing resource, for example `Provided batch was not found`.",
                      "type": "string",
                      "title": "message"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          },
          "422": {
            "description": "The request body is not valid JSON, or is not a JSON object. Send `Content-Type: application/json` with a JSON object body.",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "code": {
                      "type": "string",
                      "enum": [
                        "INVALID_BODY"
                      ],
                      "title": "code"
                    },
                    "message": {
                      "description": "Human-readable explanation.",
                      "type": "string",
                      "title": "message"
                    }
                  },
                  "required": [
                    "code",
                    "message"
                  ]
                }
              }
            }
          }
        },
        "security": [
          {
            "bearerToken": []
          }
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api-sandbox.paymentlabs.io",
      "description": "Sandbox Server"
    },
    {
      "url": "https://api.paymentlabs.io",
      "description": "Production Server"
    }
  ],
  "components": {
    "securitySchemes": {
      "bearerToken": {
        "scheme": "bearer",
        "type": "http",
        "bearerFormat": "JWT",
        "description": "Bearer Token using JWT"
      }
    },
    "schemas": {
      "TaxJurisdiction": {
        "title": "TaxJurisdiction",
        "enum": [
          "de",
          "fi",
          "gb",
          "my",
          "none",
          "pl",
          "sa",
          "se",
          "us"
        ],
        "type": "string",
        "description": "Tax jurisdiction whose rules apply to a payment, as a lower-case country code: `us`, `gb`, `de`, `fi`, `pl`, `se`, `sa`, `my`; or `none` for no tax treatment. Only jurisdictions enabled on your account are accepted."
      }
    }
  }
}
```