Skip to main content
POST
/
api
/
v1
/
workspaces
/
{workspace_id}
/
billing
/
payment-methods
Attach Payment Method
curl --request POST \
  --url https://api.example.com/api/v1/workspaces/{workspace_id}/billing/payment-methods \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "payment_method_id": "<string>",
  "set_as_default": true
}
'
{
  "is_default": true,
  "payment_method": {
    "brand": "<string>",
    "exp_month": 123,
    "exp_year": 123,
    "last4": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.riftmap.dev/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

X-API-Key
string
header
required

Headers

X-Workspace-Id
string | null

Path Parameters

workspace_id
string<uuid>
required

Cookies

riftmap_access
string | null

Body

application/json
payment_method_id
string
required
set_as_default
boolean
default:true

Response

Successful Response

is_default
boolean
required
payment_method
PaymentMethodInfo · object
required