Accept payment terms and conditions
POST/company/payment/terms
Records the company's acceptance of Stripe's terms and conditions, thereby enabling payment processing.
Objective
Update payment_settings.tos_acceptance in the company with the acceptance date, IP, and status, and synchronize with the Stripe account if it exists.
Use Cases
- User accepts the terms from the payment setup modal
- First step in the payment onboarding flow
- Compliance requirement before processing real payments with Stripe
Validation Flow
flowchart TD
A[Receive Request] --> B{User authenticated?}
B -->|No| C[404 USER_NOT_FOUND]
B -->|Yes| D{Company found?}
D -->|No| E[401 CIA_NOT_FOUND]
D -->|Yes| F{Stripe customer exists?}
F -->|No| G[Create Stripe customer]
G --> H[Update tos_acceptance in Stripe]
F -->|Yes| H
H --> I[Save to company]
I --> J[200 success: true]
Notes
- Requires JWT authentication (bearerAuth)
- No request body required (acceptance is implied by the call)
- If
stripe_customerdoes not exist, it is created automatically - Records server timestamp and IP for auditing
- Saves
tos_acceptance.date,tos_acceptance.ip, andtos_acceptance.accepted=true
Request
Responses
- 200
- 401
- 404
Terms successfully accepted
Response Headers
Company not found or error creating account in Stripe.
Response Headers
User not found