Profiles

Download the complete public OpenAPI schema

Profiles

Create and manage end-customer profiles used for purchases. The profile represents the customer of record - who the purchase will be billed and shipped to.

GET /v1/profiles

List profiles

Return end-customer profiles visible to the authenticated API key.

Parameters, request, responses, and security

{
  "tags": [
    "profiles"
  ],
  "summary": "List profiles",
  "description": "Return end-customer profiles visible to the authenticated API key.",
  "operationId": "v1_list_profiles",
  "parameters": [
    {
      "required": false,
      "schema": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/ProfileStatus"
          },
          {
            "type": "null"
          }
        ],
        "title": "Status"
      },
      "name": "status",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/ProfileIssuingState"
          },
          {
            "type": "null"
          }
        ],
        "title": "Issuing"
      },
      "name": "issuing",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/ProfileType"
          },
          {
            "type": "null"
          }
        ],
        "title": "Profile Type"
      },
      "name": "profile_type",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "anyOf": [
          {
            "$ref": "#/components/schemas/CountryCode"
          },
          {
            "type": "null"
          }
        ],
        "title": "Country"
      },
      "name": "country",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ],
        "title": "Created After"
      },
      "name": "created_after",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string",
            "format": "date-time"
          },
          {
            "type": "null"
          }
        ],
        "title": "Created Before"
      },
      "name": "created_before",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "anyOf": [
          {
            "type": "string",
            "maxLength": 255,
            "minLength": 1
          },
          {
            "type": "null"
          }
        ],
        "title": "Q"
      },
      "name": "q",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "type": "integer",
        "maximum": 200.0,
        "minimum": 1.0,
        "title": "Limit",
        "default": 50
      },
      "name": "limit",
      "in": "query"
    },
    {
      "required": false,
      "schema": {
        "type": "integer",
        "minimum": 0.0,
        "title": "Offset",
        "default": 0
      },
      "name": "offset",
      "in": "query"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PublicProfileListResponse"
          }
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "ApiKeyBearer": []
    }
  ],
  "x-api-audience": "public_v1",
  "x-api-authentication": "required",
  "x-operation-id": "v1_list_profiles",
  "x-mcp-exposed": true,
  "x-public-path": "/v1/profiles",
  "x-docs-kind": "list",
  "x-docs-order": 40,
  "x-docs-depth": 0,
  "x-docs-action-order": 1000,
  "x-codeSamples": [
    {
      "lang": "shell",
      "label": "curl",
      "source": "curl -X GET https://api.openmerchant.dev/v1/profiles \\\n  -H 'Authorization: Bearer pr_sk_test_...'"
    },
    {
      "lang": "shell",
      "label": "MCP (Streamable HTTP)",
      "source": "curl -X POST https://api.openmerchant.dev/mcp/v1 \\\n  -H 'Authorization: Bearer pr_sk_test_...' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"tools/call\",\n  \"params\": {\n    \"name\": \"v1_list_profiles\",\n    \"arguments\": {}\n  }\n}'"
    },
    {
      "lang": "typescript",
      "label": "MCP SDK (TS)",
      "source": "// Reusing a Client connected to /mcp/v1 — see the \"MCP server\" tag for setup.\nconst result = await client.callTool({\n  name: \"v1_list_profiles\",\n  arguments: {},\n});"
    }
  ]
}

POST /v1/profiles

Create a Profile

A Profile represents your end user and the customer who is buying the item. Configure billing address, shipping address, payment methods, and additional preferences. When enabling issuing, additional KYC is required.

Parameters, request, responses, and security

{
  "tags": [
    "profiles"
  ],
  "summary": "Create a Profile",
  "description": "A Profile represents your end user and the customer who is buying the item. Configure billing address, shipping address, payment methods, and additional preferences. When enabling issuing, additional KYC is required.",
  "operationId": "v1_create_profile",
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/PublicProfileCreate"
        }
      }
    },
    "required": true
  },
  "responses": {
    "201": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PublicProfileRead"
          }
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "ApiKeyBearer": []
    }
  ],
  "x-api-audience": "public_v1",
  "x-api-authentication": "required",
  "x-operation-id": "v1_create_profile",
  "x-mcp-exposed": true,
  "x-public-path": "/v1/profiles",
  "x-docs-kind": "create",
  "x-docs-order": 10,
  "x-docs-depth": 0,
  "x-docs-action-order": 1000,
  "x-codeSamples": [
    {
      "lang": "shell",
      "label": "curl",
      "source": "curl -X POST https://api.openmerchant.dev/v1/profiles \\\n  -H 'Authorization: Bearer pr_sk_test_...' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"profile_type\": \"consumer\",\n  \"first_name\": \"...\",\n  \"last_name\": \"...\",\n  \"email\": \"user@example.com\",\n  \"phone\": \"+14155551234\",\n  \"dob\": {\n    \"day\": 15,\n    \"month\": 6,\n    \"year\": 1990\n  },\n  \"country\": \"AD\"\n}'"
    },
    {
      "lang": "shell",
      "label": "MCP (Streamable HTTP)",
      "source": "curl -X POST https://api.openmerchant.dev/mcp/v1 \\\n  -H 'Authorization: Bearer pr_sk_test_...' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"tools/call\",\n  \"params\": {\n    \"name\": \"v1_create_profile\",\n    \"arguments\": {\n      \"profile_type\": \"consumer\",\n      \"first_name\": \"...\",\n      \"last_name\": \"...\",\n      \"email\": \"user@example.com\",\n      \"phone\": \"+14155551234\",\n      \"dob\": {\n        \"day\": 15,\n        \"month\": 6,\n        \"year\": 1990\n      },\n      \"country\": \"AD\"\n    }\n  }\n}'"
    },
    {
      "lang": "typescript",
      "label": "MCP SDK (TS)",
      "source": "// Reusing a Client connected to /mcp/v1 — see the \"MCP server\" tag for setup.\nconst result = await client.callTool({\n  name: \"v1_create_profile\",\n  arguments: {\n  \"profile_type\": \"consumer\",\n  \"first_name\": \"...\",\n  \"last_name\": \"...\",\n  \"email\": \"user@example.com\",\n  \"phone\": \"+14155551234\",\n  \"dob\": {\n    \"day\": 15,\n    \"month\": 6,\n    \"year\": 1990\n  },\n  \"country\": \"AD\"\n},\n});"
    }
  ]
}

GET /v1/profiles/{profile_id}

Retrieve a Profile

Return one end-customer profile by ID.

Parameters, request, responses, and security

{
  "tags": [
    "profiles"
  ],
  "summary": "Retrieve a Profile",
  "description": "Return one end-customer profile by ID.",
  "operationId": "v1_get_profile",
  "parameters": [
    {
      "required": true,
      "schema": {
        "type": "string",
        "title": "Profile Id"
      },
      "name": "profile_id",
      "in": "path"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PublicProfileRead"
          }
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "ApiKeyBearer": []
    }
  ],
  "x-api-audience": "public_v1",
  "x-api-authentication": "required",
  "x-operation-id": "v1_get_profile",
  "x-mcp-exposed": true,
  "x-public-path": "/v1/profiles/{profile_id}",
  "x-docs-kind": "retrieve",
  "x-docs-order": 30,
  "x-docs-depth": 0,
  "x-docs-action-order": 1000,
  "x-codeSamples": [
    {
      "lang": "shell",
      "label": "curl",
      "source": "curl -X GET https://api.openmerchant.dev/v1/profiles/... \\\n  -H 'Authorization: Bearer pr_sk_test_...'"
    },
    {
      "lang": "shell",
      "label": "MCP (Streamable HTTP)",
      "source": "curl -X POST https://api.openmerchant.dev/mcp/v1 \\\n  -H 'Authorization: Bearer pr_sk_test_...' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"tools/call\",\n  \"params\": {\n    \"name\": \"v1_get_profile\",\n    \"arguments\": {\n      \"profile_id\": \"...\"\n    }\n  }\n}'"
    },
    {
      "lang": "typescript",
      "label": "MCP SDK (TS)",
      "source": "// Reusing a Client connected to /mcp/v1 — see the \"MCP server\" tag for setup.\nconst result = await client.callTool({\n  name: \"v1_get_profile\",\n  arguments: {\n  \"profile_id\": \"...\"\n},\n});"
    }
  ]
}

POST /v1/profiles/{profile_id}

Update a profile

Update Profile information. Country and profile type cannot be changed after creation.

Parameters, request, responses, and security

{
  "tags": [
    "profiles"
  ],
  "summary": "Update a profile",
  "description": "Update Profile information. Country and profile type cannot be changed after creation.",
  "operationId": "v1_update_profile",
  "parameters": [
    {
      "required": true,
      "schema": {
        "type": "string",
        "title": "Profile Id"
      },
      "name": "profile_id",
      "in": "path"
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/PublicProfilePatch"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PublicProfileRead"
          }
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "ApiKeyBearer": []
    }
  ],
  "x-api-audience": "public_v1",
  "x-api-authentication": "required",
  "x-operation-id": "v1_update_profile",
  "x-mcp-exposed": true,
  "x-public-path": "/v1/profiles/{profile_id}",
  "x-docs-kind": "update",
  "x-docs-order": 20,
  "x-docs-depth": 0,
  "x-docs-action-order": 1000,
  "x-codeSamples": [
    {
      "lang": "shell",
      "label": "curl",
      "source": "curl -X POST https://api.openmerchant.dev/v1/profiles/... \\\n  -H 'Authorization: Bearer pr_sk_test_...'"
    },
    {
      "lang": "shell",
      "label": "MCP (Streamable HTTP)",
      "source": "curl -X POST https://api.openmerchant.dev/mcp/v1 \\\n  -H 'Authorization: Bearer pr_sk_test_...' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"tools/call\",\n  \"params\": {\n    \"name\": \"v1_update_profile\",\n    \"arguments\": {\n      \"profile_id\": \"...\"\n    }\n  }\n}'"
    },
    {
      "lang": "typescript",
      "label": "MCP SDK (TS)",
      "source": "// Reusing a Client connected to /mcp/v1 — see the \"MCP server\" tag for setup.\nconst result = await client.callTool({\n  name: \"v1_update_profile\",\n  arguments: {\n  \"profile_id\": \"...\"\n},\n});"
    }
  ]
}

GET /v1/profiles/{profile_id}/payment_methods

List profile PaymentMethods

Return active payment methods attached to a profile.

Parameters, request, responses, and security

{
  "tags": [
    "profiles"
  ],
  "summary": "List profile PaymentMethods",
  "description": "Return active payment methods attached to a profile.",
  "operationId": "v1_list_profile_payment_methods",
  "parameters": [
    {
      "required": true,
      "schema": {
        "type": "string",
        "title": "Profile Id"
      },
      "name": "profile_id",
      "in": "path"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PublicProfilePaymentMethodListResponse"
          }
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "ApiKeyBearer": []
    }
  ],
  "x-api-audience": "public_v1",
  "x-api-authentication": "required",
  "x-operation-id": "v1_list_profile_payment_methods",
  "x-mcp-exposed": true,
  "x-public-path": "/v1/profiles/{profile_id}/payment_methods",
  "x-docs-kind": "list",
  "x-docs-order": 40,
  "x-docs-depth": 1,
  "x-docs-action-order": 1000,
  "x-codeSamples": [
    {
      "lang": "shell",
      "label": "curl",
      "source": "curl -X GET https://api.openmerchant.dev/v1/profiles/.../payment_methods \\\n  -H 'Authorization: Bearer pr_sk_test_...'"
    },
    {
      "lang": "shell",
      "label": "MCP (Streamable HTTP)",
      "source": "curl -X POST https://api.openmerchant.dev/mcp/v1 \\\n  -H 'Authorization: Bearer pr_sk_test_...' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"tools/call\",\n  \"params\": {\n    \"name\": \"v1_list_profile_payment_methods\",\n    \"arguments\": {\n      \"profile_id\": \"...\"\n    }\n  }\n}'"
    },
    {
      "lang": "typescript",
      "label": "MCP SDK (TS)",
      "source": "// Reusing a Client connected to /mcp/v1 — see the \"MCP server\" tag for setup.\nconst result = await client.callTool({\n  name: \"v1_list_profile_payment_methods\",\n  arguments: {\n  \"profile_id\": \"...\"\n},\n});"
    }
  ]
}

POST /v1/profiles/{profile_id}/payment_methods

Create a profile PaymentMethod

Add an existing card or issue a new card for a Profile. Existing Visa and Mastercard cards are eligible to be enrolled for agentic credentials.

Parameters, request, responses, and security

{
  "tags": [
    "profiles"
  ],
  "summary": "Create a profile PaymentMethod",
  "description": "Add an existing card or issue a new card for a Profile. Existing Visa and Mastercard cards are eligible to be enrolled for agentic credentials.",
  "operationId": "v1_create_profile_payment_method",
  "parameters": [
    {
      "required": true,
      "schema": {
        "type": "string",
        "title": "Profile Id"
      },
      "name": "profile_id",
      "in": "path"
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/PublicProfilePaymentMethodCreateRequest"
        }
      }
    },
    "required": true
  },
  "responses": {
    "201": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PublicProfilePaymentMethodRead"
          }
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "ApiKeyBearer": []
    }
  ],
  "x-api-audience": "public_v1",
  "x-api-authentication": "required",
  "x-operation-id": "v1_create_profile_payment_method",
  "x-mcp-exposed": true,
  "x-public-path": "/v1/profiles/{profile_id}/payment_methods",
  "x-docs-kind": "create",
  "x-docs-order": 10,
  "x-docs-depth": 1,
  "x-docs-action-order": 1000,
  "x-codeSamples": [
    {
      "lang": "shell",
      "label": "curl",
      "source": "curl -X POST https://api.openmerchant.dev/v1/profiles/.../payment_methods \\\n  -H 'Authorization: Bearer pr_sk_test_...' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"type\": \"card\",\n  \"card\": {\n    \"kind\": \"existing\"\n  }\n}'"
    },
    {
      "lang": "shell",
      "label": "MCP (Streamable HTTP)",
      "source": "curl -X POST https://api.openmerchant.dev/mcp/v1 \\\n  -H 'Authorization: Bearer pr_sk_test_...' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"tools/call\",\n  \"params\": {\n    \"name\": \"v1_create_profile_payment_method\",\n    \"arguments\": {\n      \"profile_id\": \"...\",\n      \"type\": \"card\",\n      \"card\": {\n        \"kind\": \"existing\"\n      }\n    }\n  }\n}'"
    },
    {
      "lang": "typescript",
      "label": "MCP SDK (TS)",
      "source": "// Reusing a Client connected to /mcp/v1 — see the \"MCP server\" tag for setup.\nconst result = await client.callTool({\n  name: \"v1_create_profile_payment_method\",\n  arguments: {\n  \"profile_id\": \"...\",\n  \"type\": \"card\",\n  \"card\": {\n    \"kind\": \"existing\"\n  }\n},\n});"
    }
  ]
}

GET /v1/profiles/{profile_id}/payment_methods/{payment_method_id}

Retrieve a profile PaymentMethod

Return one active PaymentMethod attached to a profile.

Parameters, request, responses, and security

{
  "tags": [
    "profiles"
  ],
  "summary": "Retrieve a profile PaymentMethod",
  "description": "Return one active PaymentMethod attached to a profile.",
  "operationId": "v1_get_profile_payment_method",
  "parameters": [
    {
      "required": true,
      "schema": {
        "type": "string",
        "title": "Profile Id"
      },
      "name": "profile_id",
      "in": "path"
    },
    {
      "required": true,
      "schema": {
        "type": "string",
        "title": "Payment Method Id"
      },
      "name": "payment_method_id",
      "in": "path"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PublicProfilePaymentMethodRead"
          }
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "ApiKeyBearer": []
    }
  ],
  "x-api-audience": "public_v1",
  "x-api-authentication": "required",
  "x-operation-id": "v1_get_profile_payment_method",
  "x-mcp-exposed": true,
  "x-public-path": "/v1/profiles/{profile_id}/payment_methods/{payment_method_id}",
  "x-docs-kind": "retrieve",
  "x-docs-order": 30,
  "x-docs-depth": 1,
  "x-docs-action-order": 1000,
  "x-codeSamples": [
    {
      "lang": "shell",
      "label": "curl",
      "source": "curl -X GET https://api.openmerchant.dev/v1/profiles/.../payment_methods/... \\\n  -H 'Authorization: Bearer pr_sk_test_...'"
    },
    {
      "lang": "shell",
      "label": "MCP (Streamable HTTP)",
      "source": "curl -X POST https://api.openmerchant.dev/mcp/v1 \\\n  -H 'Authorization: Bearer pr_sk_test_...' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"tools/call\",\n  \"params\": {\n    \"name\": \"v1_get_profile_payment_method\",\n    \"arguments\": {\n      \"profile_id\": \"...\",\n      \"payment_method_id\": \"...\"\n    }\n  }\n}'"
    },
    {
      "lang": "typescript",
      "label": "MCP SDK (TS)",
      "source": "// Reusing a Client connected to /mcp/v1 — see the \"MCP server\" tag for setup.\nconst result = await client.callTool({\n  name: \"v1_get_profile_payment_method\",\n  arguments: {\n  \"profile_id\": \"...\",\n  \"payment_method_id\": \"...\"\n},\n});"
    }
  ]
}

POST /v1/profiles/{profile_id}/payment_methods/{payment_method_id}

Update a profile PaymentMethod

You may update label, cardholder name, and billing address. To change other card details, add a new card.

Parameters, request, responses, and security

{
  "tags": [
    "profiles"
  ],
  "summary": "Update a profile PaymentMethod",
  "description": "You may update label, cardholder name, and billing address. To change other card details, add a new card.",
  "operationId": "v1_update_profile_payment_method",
  "parameters": [
    {
      "required": true,
      "schema": {
        "type": "string",
        "title": "Profile Id"
      },
      "name": "profile_id",
      "in": "path"
    },
    {
      "required": true,
      "schema": {
        "type": "string",
        "title": "Payment Method Id"
      },
      "name": "payment_method_id",
      "in": "path"
    }
  ],
  "requestBody": {
    "content": {
      "application/json": {
        "schema": {
          "$ref": "#/components/schemas/PublicProfilePaymentMethodPatchRequest"
        }
      }
    },
    "required": true
  },
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PublicProfilePaymentMethodRead"
          }
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "ApiKeyBearer": []
    }
  ],
  "x-api-audience": "public_v1",
  "x-api-authentication": "required",
  "x-operation-id": "v1_update_profile_payment_method",
  "x-mcp-exposed": true,
  "x-public-path": "/v1/profiles/{profile_id}/payment_methods/{payment_method_id}",
  "x-docs-kind": "update",
  "x-docs-order": 20,
  "x-docs-depth": 1,
  "x-docs-action-order": 1000,
  "x-codeSamples": [
    {
      "lang": "shell",
      "label": "curl",
      "source": "curl -X POST https://api.openmerchant.dev/v1/profiles/.../payment_methods/... \\\n  -H 'Authorization: Bearer pr_sk_test_...'"
    },
    {
      "lang": "shell",
      "label": "MCP (Streamable HTTP)",
      "source": "curl -X POST https://api.openmerchant.dev/mcp/v1 \\\n  -H 'Authorization: Bearer pr_sk_test_...' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"tools/call\",\n  \"params\": {\n    \"name\": \"v1_update_profile_payment_method\",\n    \"arguments\": {\n      \"profile_id\": \"...\",\n      \"payment_method_id\": \"...\"\n    }\n  }\n}'"
    },
    {
      "lang": "typescript",
      "label": "MCP SDK (TS)",
      "source": "// Reusing a Client connected to /mcp/v1 — see the \"MCP server\" tag for setup.\nconst result = await client.callTool({\n  name: \"v1_update_profile_payment_method\",\n  arguments: {\n  \"profile_id\": \"...\",\n  \"payment_method_id\": \"...\"\n},\n});"
    }
  ]
}

DELETE /v1/profiles/{profile_id}/payment_methods/{payment_method_id}

Remove a profile PaymentMethod

Detach a saved PaymentMethod from a profile and return the profile's remaining methods. Provider resources are reconciled first: an issued virtual card is cancelled and any agentic credential enrollment is withdrawn. The row is soft-deleted, so historical purchases keep resolving their payment method.

Parameters, request, responses, and security

{
  "tags": [
    "profiles"
  ],
  "summary": "Remove a profile PaymentMethod",
  "description": "Detach a saved PaymentMethod from a profile and return the profile's remaining methods. Provider resources are reconciled first: an issued virtual card is cancelled and any agentic credential enrollment is withdrawn. The row is soft-deleted, so historical purchases keep resolving their payment method.",
  "operationId": "v1_remove_profile_payment_method",
  "parameters": [
    {
      "required": true,
      "schema": {
        "type": "string",
        "title": "Profile Id"
      },
      "name": "profile_id",
      "in": "path"
    },
    {
      "required": true,
      "schema": {
        "type": "string",
        "title": "Payment Method Id"
      },
      "name": "payment_method_id",
      "in": "path"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/PublicProfilePaymentMethodListResponse"
          }
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "ApiKeyBearer": []
    }
  ],
  "x-api-audience": "public_v1",
  "x-api-authentication": "required",
  "x-operation-id": "v1_remove_profile_payment_method",
  "x-mcp-exposed": true,
  "x-public-path": "/v1/profiles/{profile_id}/payment_methods/{payment_method_id}",
  "x-docs-kind": "other",
  "x-docs-order": 100,
  "x-docs-depth": 1,
  "x-docs-action-order": 1000,
  "x-codeSamples": [
    {
      "lang": "shell",
      "label": "curl",
      "source": "curl -X DELETE https://api.openmerchant.dev/v1/profiles/.../payment_methods/... \\\n  -H 'Authorization: Bearer pr_sk_test_...'"
    },
    {
      "lang": "shell",
      "label": "MCP (Streamable HTTP)",
      "source": "curl -X POST https://api.openmerchant.dev/mcp/v1 \\\n  -H 'Authorization: Bearer pr_sk_test_...' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"tools/call\",\n  \"params\": {\n    \"name\": \"v1_remove_profile_payment_method\",\n    \"arguments\": {\n      \"profile_id\": \"...\",\n      \"payment_method_id\": \"...\"\n    }\n  }\n}'"
    },
    {
      "lang": "typescript",
      "label": "MCP SDK (TS)",
      "source": "// Reusing a Client connected to /mcp/v1 — see the \"MCP server\" tag for setup.\nconst result = await client.callTool({\n  name: \"v1_remove_profile_payment_method\",\n  arguments: {\n  \"profile_id\": \"...\",\n  \"payment_method_id\": \"...\"\n},\n});"
    }
  ]
}

GET /v1/profiles/{profile_id}/spending

Retrieve a profile's spending and limits

Return the profile's configured policy allowances and remaining spending headroom.

Parameters, request, responses, and security

{
  "tags": [
    "profiles"
  ],
  "summary": "Retrieve a profile's spending and limits",
  "description": "Return the profile's configured policy allowances and remaining spending headroom.",
  "operationId": "v1_get_profile_spending",
  "parameters": [
    {
      "required": true,
      "schema": {
        "type": "string",
        "title": "Profile Id"
      },
      "name": "profile_id",
      "in": "path"
    }
  ],
  "responses": {
    "200": {
      "description": "Successful Response",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/ProfileBudgetRead"
          }
        }
      }
    },
    "422": {
      "description": "Validation Error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/HTTPValidationError"
          }
        }
      }
    }
  },
  "security": [
    {
      "ApiKeyBearer": []
    }
  ],
  "x-api-audience": "public_v1",
  "x-api-authentication": "required",
  "x-operation-id": "v1_get_profile_spending",
  "x-mcp-exposed": true,
  "x-public-path": "/v1/profiles/{profile_id}/spending",
  "x-docs-kind": "other",
  "x-docs-order": 100,
  "x-docs-depth": 2,
  "x-docs-action-order": 1000,
  "x-codeSamples": [
    {
      "lang": "shell",
      "label": "curl",
      "source": "curl -X GET https://api.openmerchant.dev/v1/profiles/.../spending \\\n  -H 'Authorization: Bearer pr_sk_test_...'"
    },
    {
      "lang": "shell",
      "label": "MCP (Streamable HTTP)",
      "source": "curl -X POST https://api.openmerchant.dev/mcp/v1 \\\n  -H 'Authorization: Bearer pr_sk_test_...' \\\n  -H 'Content-Type: application/json' \\\n  -d '{\n  \"jsonrpc\": \"2.0\",\n  \"id\": 1,\n  \"method\": \"tools/call\",\n  \"params\": {\n    \"name\": \"v1_get_profile_spending\",\n    \"arguments\": {\n      \"profile_id\": \"...\"\n    }\n  }\n}'"
    },
    {
      "lang": "typescript",
      "label": "MCP SDK (TS)",
      "source": "// Reusing a Client connected to /mcp/v1 — see the \"MCP server\" tag for setup.\nconst result = await client.callTool({\n  name: \"v1_get_profile_spending\",\n  arguments: {\n  \"profile_id\": \"...\"\n},\n});"
    }
  ]
}