{"openapi":"3.0.3","info":{"title":"LipaZone Developer API","version":"1.3.0","description":"Implemented sandbox API contracts. Use server-side bearer credentials. Simulator collections and refunds are available; eligible approved Stripe arrangements can also execute hosted test checkout. Signed sandbox webhooks are available. No real funds, live credentials or transfers are available. Versioned paths are authoritative; undocumented admin and portal routes are not integration APIs. Quotas: 60 requests\/minute\/application across keys and endpoints, plus 120 requests\/minute\/source IP. Timestamps, where returned, use UTC RFC 3339. No paginated list endpoint is currently published. Stripe sandbox hosted checkout is available only for explicitly configured, verified and approved direct arrangements. No live processing or Stripe refunds are enabled."},"servers":[{"url":"\/","description":"Current LipaZone deployment root"}],"security":[{"SandboxBearer":[]}],"paths":{"\/api\/v1\/account":{"get":{"operationId":"getAccount","summary":"Read application and business context","tags":["Account"],"x-required-scopes":["account:read"],"responses":{"200":{"description":"Successful sandbox response.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Limit applied to this response.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer","minimum":0}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Account"},"meta":{"$ref":"#\/components\/schemas\/Meta"}},"required":["data","meta"]},"example":{"data":{"application_id":"22222222-2222-4222-8222-222222222222","application_name":"Example integration","business":{"id":"33333333-3333-4333-8333-333333333333","name":"Example business","onboarding_status":"draft"},"environment":"sandbox","scopes":["account:read"],"live_payments_enabled":false,"capabilities":[]},"meta":{"request_id":"11111111-1111-4111-8111-111111111111","api_version":"1.3.0"}}}}},"401":{"description":"Missing, invalid, expired, revoked or inactive sandbox credential.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"WWW-Authenticate":{"schema":{"type":"string"},"example":"Bearer"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Credential does not include the endpoint scope.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"API resource not found.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"405":{"description":"HTTP method is not allowed.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"Allow":{"schema":{"type":"string"}}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Quota exceeded. Respect Retry-After.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"Retry-After":{"description":"Seconds until retry.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"Limit applied to this response.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer","minimum":0}}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"Internal error; contact support with request ID.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/sandbox\/scenarios":{"get":{"operationId":"getSandboxScenarios","summary":"List executable integration checks","tags":["Sandbox"],"x-required-scopes":["sandbox:read"],"responses":{"200":{"description":"Successful sandbox response.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Limit applied to this response.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer","minimum":0}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/Scenarios"},"meta":{"$ref":"#\/components\/schemas\/Meta"}},"required":["data","meta"]}}}},"401":{"description":"Missing, invalid, expired, revoked or inactive sandbox credential.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"WWW-Authenticate":{"schema":{"type":"string"},"example":"Bearer"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Credential does not include the endpoint scope.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"API resource not found.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"405":{"description":"HTTP method is not allowed.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"Allow":{"schema":{"type":"string"}}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Quota exceeded. Respect Retry-After.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"Retry-After":{"description":"Seconds until retry.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"Limit applied to this response.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer","minimum":0}}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"Internal error; contact support with request ID.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/sandbox\/validate":{"post":{"operationId":"validateSandboxRequest","summary":"Validate a payment-shaped contract without creating a payment","description":"No provider call, payment persistence, fund reservation, webhook or idempotency record is created. Sandbox contract v1 only; supported currencies are validation fixtures, not live rail availability. Maximum JSON body size: 16 KiB.","tags":["Sandbox"],"x-required-scopes":["sandbox:validate"],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ValidationRequest"},"example":{"reference":"ORDER-1001","amount":{"currency":"TZS","minor_units":150000}}}}},"responses":{"200":{"description":"Successful sandbox response.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Limit applied to this response.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer","minimum":0}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"type":"object","properties":{"data":{"$ref":"#\/components\/schemas\/ValidationResult"},"meta":{"$ref":"#\/components\/schemas\/Meta"}},"required":["data","meta"]},"example":{"data":{"valid":true,"payment_created":false,"normalized_request":{"reference":"ORDER-1001","amount":{"currency":"TZS","minor_units":150000}}},"meta":{"request_id":"11111111-1111-4111-8111-111111111111","api_version":"1.3.0"}}}}},"401":{"description":"Missing, invalid, expired, revoked or inactive sandbox credential.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"WWW-Authenticate":{"schema":{"type":"string"},"example":"Bearer"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Credential does not include the endpoint scope.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"API resource not found.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"405":{"description":"HTTP method is not allowed.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"Allow":{"schema":{"type":"string"}}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Quota exceeded. Respect Retry-After.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"Retry-After":{"description":"Seconds until retry.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"Limit applied to this response.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer","minimum":0}}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"Internal error; contact support with request ID.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"400":{"description":"Malformed JSON or a non-object body.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"413":{"description":"Body exceeds 16 KiB.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"415":{"description":"Content-Type must be application\/json.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"Fields do not match the validation contract.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}}}}},"\/api\/v1\/payments":{"post":{"operationId":"createPayment","summary":"Create a simulated collection","tags":["Sandbox payments"],"x-required-scopes":["payments:write"],"responses":{"401":{"description":"Missing, invalid, expired, revoked or inactive sandbox credential.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"WWW-Authenticate":{"schema":{"type":"string"},"example":"Bearer"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Credential does not include the endpoint scope.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"API resource not found.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"405":{"description":"HTTP method is not allowed.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"Allow":{"schema":{"type":"string"}}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Quota exceeded. Respect Retry-After.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"Retry-After":{"description":"Seconds until retry.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"Limit applied to this response.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer","minimum":0}}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"Internal error; contact support with request ID.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"400":{"description":"Malformed JSON or a non-object body.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"413":{"description":"Body exceeds 16 KiB.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"415":{"description":"Content-Type must be application\/json.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"Fields do not match the validation contract.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"Idempotency payload mismatch, conflicting final state, currency mismatch or insufficient refundable amount.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"201":{"description":"New simulated operation, which may be pending, unknown, failed or succeeded.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Limit applied to this response.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer","minimum":0}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"Idempotency-Replayed":{"schema":{"type":"string","enum":["true","false"]}}},"content":{"application\/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"$ref":"#\/components\/schemas\/Operation"},"meta":{"$ref":"#\/components\/schemas\/Meta"}}}}}},"200":{"description":"Idempotent replay, returning current state.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Limit applied to this response.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer","minimum":0}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"Idempotency-Replayed":{"schema":{"type":"string","enum":["true","false"]}}},"content":{"application\/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"$ref":"#\/components\/schemas\/Operation"},"meta":{"$ref":"#\/components\/schemas\/Meta"}}}}}}},"parameters":[{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"},"description":"Unique per application across collection and refund operations. Retained for the operation lifetime. Identical normalized payload replays the current representation; a changed payload returns 409."}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PaymentRequest"},"example":{"reference":"ORDER-1001","amount":{"currency":"TZS","minor_units":150000},"scenario":"success","expires_in":3600}}}},"description":"Simulator accepts scenarios and TZS\/USD fixtures. Stripe requires arrangement_id, USD amount between 50 and 99999999 minor units, expires_in between 3600 and 86400, and prohibits scenario. Only Stripe sandbox collections are supported."}},"\/api\/v1\/operations\/{operation}":{"get":{"operationId":"getOperation","summary":"Read a payment or refund operation","tags":["Sandbox payments"],"x-required-scopes":["payments:read"],"responses":{"401":{"description":"Missing, invalid, expired, revoked or inactive sandbox credential.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"WWW-Authenticate":{"schema":{"type":"string"},"example":"Bearer"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Credential does not include the endpoint scope.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"API resource not found.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"405":{"description":"HTTP method is not allowed.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"Allow":{"schema":{"type":"string"}}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Quota exceeded. Respect Retry-After.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"Retry-After":{"description":"Seconds until retry.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"Limit applied to this response.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer","minimum":0}}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"Internal error; contact support with request ID.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"400":{"description":"Malformed JSON or a non-object body.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"413":{"description":"Body exceeds 16 KiB.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"415":{"description":"Content-Type must be application\/json.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"Fields do not match the validation contract.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"Idempotency payload mismatch, conflicting final state, currency mismatch or insufficient refundable amount.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"200":{"description":"Current sandbox operation. No real funds are moved.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Limit applied to this response.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer","minimum":0}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"$ref":"#\/components\/schemas\/Operation"},"meta":{"$ref":"#\/components\/schemas\/Meta"}}}}}}},"parameters":[{"name":"operation","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"description":"Sandbox-only. No provider account credentials or real money are involved. Unknown outcomes are not failures. Terminal outcomes cannot regress."}},"\/api\/v1\/payments\/{payment}\/refunds":{"post":{"operationId":"createRefund","summary":"Reserve and simulate a refund","tags":["Sandbox payments"],"x-required-scopes":["refunds:write"],"responses":{"401":{"description":"Missing, invalid, expired, revoked or inactive sandbox credential.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"WWW-Authenticate":{"schema":{"type":"string"},"example":"Bearer"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Credential does not include the endpoint scope.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"API resource not found.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"405":{"description":"HTTP method is not allowed.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"Allow":{"schema":{"type":"string"}}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Quota exceeded. Respect Retry-After.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"Retry-After":{"description":"Seconds until retry.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"Limit applied to this response.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer","minimum":0}}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"Internal error; contact support with request ID.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"400":{"description":"Malformed JSON or a non-object body.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"413":{"description":"Body exceeds 16 KiB.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"415":{"description":"Content-Type must be application\/json.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"Fields do not match the validation contract.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"Idempotency payload mismatch, conflicting final state, currency mismatch or insufficient refundable amount.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"201":{"description":"New simulated operation, which may be pending, unknown, failed or succeeded.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Limit applied to this response.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer","minimum":0}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"Idempotency-Replayed":{"schema":{"type":"string","enum":["true","false"]}}},"content":{"application\/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"$ref":"#\/components\/schemas\/Operation"},"meta":{"$ref":"#\/components\/schemas\/Meta"}}}}}},"200":{"description":"Idempotent replay, returning current state.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Limit applied to this response.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer","minimum":0}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"Idempotency-Replayed":{"schema":{"type":"string","enum":["true","false"]}}},"content":{"application\/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"$ref":"#\/components\/schemas\/Operation"},"meta":{"$ref":"#\/components\/schemas\/Meta"}}}}}}},"parameters":[{"name":"payment","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,127}$"},"description":"Unique per application across collection and refund operations. Retained for the operation lifetime. Identical normalized payload replays the current representation; a changed payload returns 409."}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/PaymentRequest"},"example":{"reference":"ORDER-1001","amount":{"currency":"TZS","minor_units":150000},"scenario":"success","expires_in":3600}}}},"description":"Simulator refunds only. Stripe payments return 409 with provider_refund_not_supported."}},"\/api\/v1\/sandbox\/operations\/{operation}\/resolve":{"post":{"operationId":"resolveSimulation","summary":"Apply terminal simulator evidence","tags":["Sandbox payments"],"x-required-scopes":["sandbox:simulate"],"responses":{"401":{"description":"Missing, invalid, expired, revoked or inactive sandbox credential.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"WWW-Authenticate":{"schema":{"type":"string"},"example":"Bearer"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Credential does not include the endpoint scope.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"API resource not found.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"405":{"description":"HTTP method is not allowed.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"Allow":{"schema":{"type":"string"}}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Quota exceeded. Respect Retry-After.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"Retry-After":{"description":"Seconds until retry.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"Limit applied to this response.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer","minimum":0}}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"Internal error; contact support with request ID.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"400":{"description":"Malformed JSON or a non-object body.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"413":{"description":"Body exceeds 16 KiB.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"415":{"description":"Content-Type must be application\/json.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"Fields do not match the validation contract.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"Idempotency payload mismatch, conflicting final state, currency mismatch or insufficient refundable amount.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"200":{"description":"Current sandbox operation. No real funds are moved.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"X-RateLimit-Limit":{"description":"Limit applied to this response.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer","minimum":0}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"$ref":"#\/components\/schemas\/Operation"},"meta":{"$ref":"#\/components\/schemas\/Meta"}}}}}}},"parameters":[{"name":"operation","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ResolveRequest"},"example":{"event_id":"confirmation-1","outcome":"succeeded"}}}},"description":"Sandbox-only. No provider account credentials or real money are involved. Unknown outcomes are not failures. Terminal outcomes cannot regress."}},"\/api\/v1\/provider-callbacks\/simulator":{"post":{"operationId":"receiveSimulatorCallback","tags":["Provider simulator"],"summary":"Receive authenticated simulator evidence","description":"Server-operated simulator callback contract, not a Selcom or Stripe callback. Conflicting evidence is retained as rejected. Unexpected processing failures leave an authenticated inbox entry for recovery. Identical event IDs must preserve the exact raw body.","security":[{"SimulatorCallbackSignature":[]}],"parameters":[{"name":"X-LipaZone-Provider-Event-ID","in":"header","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/ProviderCallback"}}}},"responses":{"401":{"description":"Missing, invalid, expired, revoked or inactive sandbox credential.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"WWW-Authenticate":{"schema":{"type":"string"},"example":"Bearer"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"403":{"description":"Credential does not include the endpoint scope.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"404":{"description":"API resource not found.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"405":{"description":"HTTP method is not allowed.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"Allow":{"schema":{"type":"string"}}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"429":{"description":"Quota exceeded. Respect Retry-After.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"},"Retry-After":{"description":"Seconds until retry.","schema":{"type":"integer","minimum":0}},"X-RateLimit-Limit":{"description":"Limit applied to this response.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"schema":{"type":"integer","minimum":0}}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"500":{"description":"Internal error; contact support with request ID.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"400":{"description":"Malformed JSON or a non-object body.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"413":{"description":"Body exceeds 16 KiB.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"415":{"description":"Content-Type must be application\/json.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"422":{"description":"Fields do not match the validation contract.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"409":{"description":"Idempotency payload mismatch, conflicting final state, currency mismatch or insufficient refundable amount.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"503":{"description":"Simulator callback secret is not configured; callback_not_configured.","headers":{"X-Request-ID":{"description":"Server-generated correlation UUID. Client values are not trusted.","schema":{"type":"string","format":"uuid"}},"Cache-Control":{"schema":{"type":"string"},"example":"no-store, private"}},"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/Error"}}}},"200":{"description":"Authenticated event processed, or an identical already processed event replayed.","content":{"application\/json":{"schema":{"type":"object","required":["data","meta"],"properties":{"data":{"type":"object","required":["event_id","status"],"properties":{"event_id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["processed"]}}},"meta":{"$ref":"#\/components\/schemas\/Meta"}}}}}}}}},"\/api\/v1\/provider-callbacks\/stripe":{"post":{"summary":"Receive authenticated Stripe sandbox checkout events","operationId":"stripeCallback","security":[],"description":"Server-to-server Stripe endpoint, not a developer simulation tool. Verify Stripe-Signature against STRIPE_WEBHOOK_SECRET with a five-minute tolerance. Persist a redacted durable inbox record before processing. Duplicate event IDs require the same body hash. Pending receipts recover through payments:reconcile-stripe. Maximum body size 65536 bytes.","parameters":[{"name":"Stripe-Signature","in":"header","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/StripeCallback"}}}},"responses":{"200":{"description":"Event durably accepted, processed or ignored. Not a payment success indication.","content":{"application\/json":{"schema":{"type":"object","properties":{"received":{"type":"boolean"},"status":{"type":"string","enum":["pending","processed","rejected","ignored"]}}}}}},"401":{"description":"Invalid or stale signature"},"409":{"description":"Event ID reused with a different payload"},"422":{"description":"Invalid event or unsupported account\/environment"},"503":{"description":"Signing secret not configured"}}}}},"components":{"securitySchemes":{"SandboxBearer":{"type":"http","scheme":"bearer","bearerFormat":"lz_test_ followed by 64 hexadecimal characters","description":"Scope requirements are listed in x-required-scopes for each operation. These are application scopes, not OAuth grants."},"SimulatorCallbackSignature":{"type":"apiKey","in":"header","name":"X-LipaZone-Provider-Signature","description":"Separate server-only simulator secret. HMAC-SHA256 of timestamp.event_uuid.raw_body; t=timestamp,v1=hex signature, with a 300-second clock window. Integration bearer keys do not authenticate this endpoint."}},"schemas":{"Meta":{"type":"object","properties":{"request_id":{"type":"string","format":"uuid"},"api_version":{"type":"string","enum":["1.3.0"],"example":"1.3.0"}},"required":["request_id","api_version"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"required":["code","message","details"]},"meta":{"$ref":"#\/components\/schemas\/Meta"}},"required":["error","meta"]},"Capability":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"provider":{"type":"string","nullable":true},"environment":{"type":"string","enum":["sandbox","live"],"nullable":true},"capability":{"type":"string","enum":["collect","refund","transfer","payout"]},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"method":{"type":"string","enum":["card","mobile_money","bank_transfer"]},"approval_status":{"type":"string","enum":["approved","revoked"]},"enabled":{"type":"boolean"},"unavailable_reason":{"type":"string","enum":["business_suspended","approval_revoked","arrangement_revoked","business_not_approved","provider_not_connected","provider_verification_pending","provider_routing_pending","provider_disconnected",null],"nullable":true}},"required":["id","provider","environment","capability","currency","method","approval_status","enabled","unavailable_reason"]},"Account":{"type":"object","properties":{"application_id":{"type":"string","format":"uuid"},"application_name":{"type":"string"},"business":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"onboarding_status":{"type":"string","enum":["draft","submitted","changes_requested","approved","rejected","suspended"]}},"required":["id","name","onboarding_status"]},"environment":{"type":"string","enum":["sandbox"]},"scopes":{"type":"array","items":{"type":"string","enum":["account:read","sandbox:read","sandbox:validate","payments:read","payments:write","refunds:write","sandbox:simulate"]}},"live_payments_enabled":{"type":"boolean","enum":[false]},"capabilities":{"type":"array","items":{"$ref":"#\/components\/schemas\/Capability"}}},"required":["application_id","application_name","business","environment","scopes","live_payments_enabled","capabilities"]},"Money":{"type":"object","properties":{"currency":{"type":"string","enum":["TZS","USD"]},"minor_units":{"type":"integer","format":"int64","minimum":1,"maximum":999999999999}},"required":["currency","minor_units"],"additionalProperties":false},"ValidationRequest":{"type":"object","properties":{"reference":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$","minLength":1,"maxLength":100},"amount":{"$ref":"#\/components\/schemas\/Money"}},"required":["reference","amount"],"additionalProperties":false},"ValidationResult":{"type":"object","properties":{"valid":{"type":"boolean","enum":[true]},"payment_created":{"type":"boolean","enum":[false]},"normalized_request":{"$ref":"#\/components\/schemas\/ValidationRequest"}},"required":["valid","payment_created","normalized_request"]},"Scenario":{"type":"object","properties":{"id":{"type":"string"},"method":{"type":"string","enum":["GET","POST"]},"path":{"type":"string"},"expected_status":{"type":"integer"},"instruction":{"type":"string"}},"required":["id","method","path","expected_status","instruction"]},"Scenarios":{"type":"object","properties":{"environment":{"type":"string","enum":["sandbox"]},"payment_execution_available":{"type":"boolean","enum":[true]},"scenarios":{"type":"array","items":{"$ref":"#\/components\/schemas\/Scenario"}},"live_payments_available":{"type":"boolean","enum":[false]}},"required":["environment","payment_execution_available","scenarios"]},"PaymentRequest":{"type":"object","properties":{"reference":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$","minLength":1,"maxLength":100},"amount":{"$ref":"#\/components\/schemas\/Money"},"scenario":{"type":"string","enum":["success","rejected","pending","timeout","late_confirmation","duplicate_confirmation"],"default":"success"},"expires_in":{"type":"integer","minimum":1,"maximum":86400,"default":3600},"provider":{"type":"string","enum":["simulator","stripe"],"default":"simulator"},"arrangement_id":{"type":"string","format":"uuid","description":"Required for Stripe. Must belong to this application business; prohibited for simulator requests."}},"required":["reference","amount"],"additionalProperties":false,"description":"Simulator accepts scenarios and TZS\/USD fixtures. Stripe requires arrangement_id, USD amount between 50 and 99999999 minor units, expires_in between 3600 and 86400, and prohibits scenario. Only Stripe sandbox collections are supported."},"ResolveRequest":{"type":"object","additionalProperties":false,"required":["event_id","outcome"],"properties":{"event_id":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9._:-]{0,99}$"},"outcome":{"type":"string","enum":["succeeded","failed"]}}},"Operation":{"type":"object","required":["id","environment","kind","status","reference","amount","provider","scenario","refund_reserved_minor_units","refunded_minor_units","expires_at","created_at","attempt","payment_id"],"properties":{"id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox"]},"kind":{"type":"string","enum":["collection","refund"]},"status":{"type":"string","enum":["created","pending","unknown","succeeded","failed","expired"]},"reference":{"type":"string"},"payment_id":{"type":"string","format":"uuid","nullable":true},"amount":{"type":"object","required":["currency","minor_units","exponent"],"properties":{"currency":{"type":"string","enum":["TZS","USD"]},"minor_units":{"type":"integer","format":"int64","minimum":1,"maximum":999999999999},"exponent":{"type":"integer","enum":[2]}}},"refund_reserved_minor_units":{"type":"integer","format":"int64","minimum":0},"refunded_minor_units":{"type":"integer","format":"int64","minimum":0},"provider":{"type":"string","enum":["simulator","stripe"]},"scenario":{"type":"string","enum":["success","rejected","pending","timeout","late_confirmation","duplicate_confirmation",null],"default":"success","nullable":true},"expires_at":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"attempt":{"type":"object","nullable":true,"required":["reference","status"],"properties":{"reference":{"type":"string","description":"Opaque simulator reference or Stripe test session ID. Do not assume UUID format."},"status":{"type":"string","enum":["pending","unknown","succeeded","failed"]}}},"checkout_url":{"type":"string","format":"uri","nullable":true,"description":"Signed LipaZone Pay page URL for Stripe operations. Valid for seven days. Treat as a bearer link. Null for simulator."}}},"WebhookEvent":{"type":"object","required":["id","application_id","type","created_at","data"],"properties":{"id":{"type":"string","format":"uuid"},"application_id":{"type":"string","format":"uuid"},"type":{"type":"string","enum":["collection.succeeded","collection.failed","collection.expired","refund.succeeded","refund.failed","refund.expired"]},"created_at":{"type":"string","format":"date-time"},"data":{"type":"object","required":["operation_id","environment","status","amount"],"properties":{"operation_id":{"type":"string","format":"uuid"},"environment":{"type":"string","enum":["sandbox"]},"status":{"type":"string","enum":["succeeded","failed","expired"]},"amount":{"$ref":"#\/components\/schemas\/Money"},"schema_version":{"type":"integer","enum":[1]},"sequence":{"type":"integer","minimum":1},"provider":{"type":"string","enum":["simulator","stripe"]}}}}},"ProviderCallback":{"type":"object","additionalProperties":false,"required":["operation_id","provider_reference","outcome","amount"],"properties":{"operation_id":{"type":"string","format":"uuid"},"provider_reference":{"type":"string","format":"uuid"},"outcome":{"type":"string","enum":["succeeded","failed"]},"amount":{"$ref":"#\/components\/schemas\/Money"}}},"StripeCallback":{"type":"object","required":["id","object","livemode","type","data"],"properties":{"id":{"type":"string","pattern":"^evt_[A-Za-z0-9]+$"},"object":{"type":"string","enum":["event"]},"livemode":{"type":"boolean","enum":[false]},"type":{"type":"string"},"data":{"type":"object","properties":{"object":{"type":"object"}}}},"description":"Stripe snapshot event. Direct account test events only. Accepted Checkout events require a cs_test session with LipaZone operation metadata. The raw body is authenticated before parsing; the provider session and PaymentIntent are fetched for authoritative evidence."}}},"x-lipazone-webhooks":{"registration":"Developer access portal, verified developer membership and current password required.","payload_schema":{"$ref":"#\/components\/schemas\/WebhookEvent"},"signature_header":"X-LipaZone-Signature","delivery_header":"X-LipaZone-Delivery-ID","signature_format":"t=unix_seconds,v1=lowercase_hex_hmac_sha256","signed_message":"timestamp.delivery_uuid.exact_raw_body","clock_tolerance_seconds":300,"delivery_semantics":"At least once; no ordering guarantee. Deduplicate by event ID. Acknowledge 2xx after durable acceptance.","attempt_limit":6,"retry_delays_seconds":[60,300,900,3600,21600],"redelivery":"Manual redelivery preserves payload and IDs, uses fresh signature timestamp and current signing keys.","rotation":"At most 1440 minutes of dual signatures. Receivers must remove retired keys from their own configuration.","receiver_verifier":"\/developers\/webhook-verifier.php"}}