Skip to main content
PUT
/
customers
/
{external_customer_id}
/
payment_methods
/
{lago_id}
/
set_as_default
Set the payment method as default
curl --request PUT \
  --url https://api.getlago.com/api/v1/customers/{external_customer_id}/payment_methods/{lago_id}/set_as_default \
  --header 'Authorization: Bearer <token>'
{
  "payment_method": {
    "lago_id": "4cf085a7-c196-4f07-a543-97c50ec6e8b2",
    "is_default": true,
    "payment_provider_type": "stripe",
    "provider_method_id": "pm_1N8ZQX2eZvKYlo2CkL9Y8XYZ",
    "created_at": "2025-01-21T00:10:29Z",
    "payment_provider_code": "stripe_prod",
    "payment_provider_name": "Stripe"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

lago_id
string<uuid>
required

The payment method unique identifier, created by Lago.

Example:

"5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"

external_customer_id
string
required

The customer external unique identifier (provided by your own application)

Example:

"5eb02857-a71e-4ea2-bcf9-57d3a41bc6ba"

Response

Return a 200 status to indicate that the data was received successfully

payment_method
object
required