Skip to main content

Overview

Invoices can include optional custom questions (for example, collecting an email, shipping notes, or other merchant-defined fields). This endpoint returns the question schema for the current session.

Authentication

Requires:
  • x-session-token: pst_...
  • x-signature: sig_...

Request

Endpoint:
  • GET /api/v1/payments/invoice-questions
Example:
BASE_URL=${PEPAY_API_URL}

curl "$BASE_URL/api/v1/payments/invoice-questions" \
  -H "x-session-token: pst_..." \
  -H "x-signature: sig_..."

Response

{
  "has_questions": true,
  "questions": {
    "questions": [
      {
        "id": "q1",
        "question": "Email address",
        "type": "email",
        "validation": { "required": true }
      }
    ]
  }
}

Errors

  • 401 invalid session token/signature
  • 404 session not found / expired

Examples

  • Use the returned schema to render a form, then submit answers via Submit form.
Next: Submit form