Skip to main content

Set default payment method

POST 

/truckers/payment/default_payment_method/:id

Set a payment method as default for future transactions.

Validations:

  • The method must belong to the user's Stripe customer
  • The method must be active and valid
  • The user must have permissions to modify it

Effects:

  • Updates the default_payment_method field in the database
  • All future transactions will use this method by default

Usage example:

  1. User selects Use as default on a card
  2. Frontend calls this endpoint with the method ID
  3. Backend validates and updates the configuration

Request

Responses

Method set as default successfully.