Manage payment methods
Add a card to your account, set the default, update billing details, and remove cards you no longer need. Payment methods are required to subscribe to any paid plan.
Prerequisites: You must be the OWNER. ADMINs can read payment methods but cannot make changes.
Add a card
The console uses Stripe Elements to collect card details — your card data never touches the smplkit backend.
In the console
- Go to Account → Payment methods.
- Click Add payment method.
- The Stripe Elements form opens. Enter the card details and any billing information.
- Confirm. The card is attached to your Stripe customer and registered with smplkit.
- If this is your first card, it's automatically marked default.
Via the API
The API expects a Stripe pm_... ID — you typically obtain one through Stripe's setup-intent flow.
- Get a setup-intent client secret:
curl -X POST https://app.smplkit.com/api/v1/functions/setup_intent/actions/execute \
-H "Authorization: Bearer $SMPLKIT_API_KEY"Mount Stripe Elements with the client secret on a frontend, collect the card, and call Stripe's
confirmCardSetupto get apm_...ID.Register the payment method with smplkit:
curl -X POST https://app.smplkit.com/api/v1/payment_methods \
-H "Authorization: Bearer $SMPLKIT_API_KEY" \
-H "Content-Type: application/vnd.api+json" \
-d '{
"data": {
"type": "payment_method",
"attributes": {
"stripe_payment_method_id": "pm_1ABC...",
"default": true
}
}
}'The default field is optional. If true, the card becomes the new default; the previous default is demoted in the same transaction. If omitted, the existing default is preserved.
Returns 201 with the new resource. The id is a smplkit UUID — Stripe IDs are stored internally but never exposed in URL paths.
List payment methods
curl https://app.smplkit.com/api/v1/payment_methods \
-H "Authorization: Bearer $SMPLKIT_API_KEY"Returns the account's payment methods, default first, then newest first. Each resource includes:
id— smplkit UUID for use in subsequent operations.brand—visa,mastercard, etc.last4— last four digits.exp_month,exp_year— expiration.default— boolean.billing_details— full Stripe billing-details object.
Set the default
Use the dedicated action to atomically demote the current default and promote a different card:
curl -X POST https://app.smplkit.com/api/v1/payment_methods/$ID/actions/set_default \
-H "Authorization: Bearer $SMPLKIT_API_KEY"Idempotent — calling on a card that's already default returns success without making a change. The change syncs to Stripe so your customer's invoice_settings.default_payment_method is updated.
You cannot change the default by including default: true in a PUT — the platform rejects with HTTP 400 "use the set_default action". PUT is for billing details and expiration updates only.
Update billing details or expiration
curl -X PUT https://app.smplkit.com/api/v1/payment_methods/$ID \
-H "Authorization: Bearer $SMPLKIT_API_KEY" \
-H "Content-Type: application/vnd.api+json" \
-d '{
"data": {
"type": "payment_method",
"id": "'$ID'",
"attributes": {
"exp_month": 11,
"exp_year": 2028,
"billing_details": {
"name": "Acme Corp",
"email": "billing@acme.example",
"address": {
"line1": "123 Main St",
"city": "San Francisco",
"state": "CA",
"postal_code": "94103",
"country": "US"
}
}
}
}
}'The platform syncs the changes to Stripe before updating the local row.
Remove a card
curl -X DELETE https://app.smplkit.com/api/v1/payment_methods/$ID \
-H "Authorization: Bearer $SMPLKIT_API_KEY"Returns 204. The card is detached from your Stripe customer and the local row is soft-deleted.
If the card was the default and you have other cards, the oldest remaining card is promoted to default automatically.
Last card with active subscriptions
If you try to delete the only remaining payment method while you have any paid (non-Free, non-fully-discounted) subscription, the platform returns HTTP 409 Conflict — leaving you with no payment method on file would block your next renewal. Either cancel the paid subscriptions first or add a replacement card before removing the last one.
Verify
curl https://app.smplkit.com/api/v1/payment_methods \
-H "Authorization: Bearer $SMPLKIT_API_KEY"Confirm the expected card is present and default is set on the right one. The console Payment methods page reflects the same data.
After adding a card, try subscribing to a paid plan — see Manage subscriptions.
Limits
There's no smplkit-side cap on payment methods. Stripe's own limits apply.

