Skip to main content

Get Stripe Configuration

GET 

/truckers/payment/withStripe

Returns the current status of the Stripe payment configuration for the carrier's company.

Technical Flow:

  1. Verifies user authentication
  2. Retrieves the company associated with the user
  3. Fetches payment settings
  4. Returns Stripe status and related data

Information Included:

  • withStripe: Status of Stripe payment enablement
  • stripe_customer: Stripe customer ID (if exists)
  • default_payment_method: Default payment method ID (if exists)
  • tos_acceptance: Terms of service acceptance status

Validations:

  • User must be authenticated (valid JWT)
  • User must belong to a valid company

Response Example:

{
withStripe: true,
stripe_customer: cus_ABC123XYZ456,
default_payment_method: pm_1ABC123XYZ456,
tos_acceptance: {
date: 1733947200,
ip: 192.168.1.1,
accepted: true
}
}

Error Cases:

  • 401 Unauthorized:
    • Invalid JWT token
    • User has no associated company
    • Error retrieving configuration

Responses

Payment Settings