Payments
The payment endpoints let you manage subscriptions: list plans, create checkout sessions, process subscriptions, update or cancel plans, and access the customer portal.
Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /payment/subscription-plans | List available subscription plans |
| POST | /payment/subscription-checkout | Create checkout session |
| POST | /payment/subscription-process | Process subscription after checkout |
| POST | /payment/subscription-update | Update subscription |
| POST | /payment/subscription-cancel | Cancel subscription |
| GET | /payment/customer-info | Get customer billing info |
| POST | /payment/customer-portal | Create customer portal session |
List Subscription Plans
Returns available subscription plans for an organization.
Method: GET
Path: /payment/subscription-plans
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organizationId | string | Yes | Organization ID |
Response Body
Returns an array of subscription plan objects with pricing, features, and product details.
Example
curl -X GET "https://api.app.bullseye.so/api/v1/payment/subscription-plans?organizationId=org_abc123"
-H "X-API-Key: bsk_live_your_api_key_here"
-H "Content-Type: application/json"Create Checkout Session
Creates a hosted checkout session for subscribing to a plan. Returns a URL to redirect the user to complete payment.
Method: POST
Path: /payment/subscription-checkout
Request Body
JSON object with organizationId, priceId, productId, and optionally successUrl, cancelUrl.
Response Body
Returns an object with a url field for the checkout session.
Example
curl -X POST "https://api.app.bullseye.so/api/v1/payment/subscription-checkout"
-H "X-API-Key: bsk_live_your_api_key_here"
-H "Content-Type: application/json"
-d '{"organizationId": "org_abc123", "priceId": "price_xxx", "productId": "prod_xxx"}'Process Subscription
Processes a subscription after the user completes checkout. Typically called by a webhook or redirect handler.
Method: POST
Path: /payment/subscription-process
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
secret | string | Yes | Secret or session identifier from checkout |
Response Body
Returns confirmation of the processed subscription.
Example
curl -X POST "https://api.app.bullseye.so/api/v1/payment/subscription-process?secret=session_xxx"
-H "X-API-Key: bsk_live_your_api_key_here"
-H "Content-Type: application/json"Update Subscription
Updates the subscription plan for an organization (e.g., upgrade or downgrade).
Method: POST
Path: /payment/subscription-update
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
organizationId | string | Yes | Organization ID |
priceId | string | Yes | New plan price ID |
productId | string | Yes | New plan product ID |
Response Body
Returns confirmation of the update.
Example
curl -X POST "https://api.app.bullseye.so/api/v1/payment/subscription-update"
-H "X-API-Key: bsk_live_your_api_key_here"
-H "Content-Type: application/json"
-d '{"organizationId": "org_abc123", "priceId": "price_xxx", "productId": "prod_xxx"}'Cancel Subscription
Cancels the subscription for an organization.
Method: POST
Path: /payment/subscription-cancel
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
organizationId | string | Yes | Organization ID |
Response Body
Returns an empty object on success.
Example
curl -X POST "https://api.app.bullseye.so/api/v1/payment/subscription-cancel"
-H "X-API-Key: bsk_live_your_api_key_here"
-H "Content-Type: application/json"
-d '{"organizationId": "org_abc123"}'Get Customer Info
Retrieves customer billing information for an organization, including subscription status, payment method, and billing details.
Method: GET
Path: /payment/customer-info
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
organizationId | string | Yes | Organization ID |
Response Body
Returns customer details such as customerId, email, address, defaultCardLast4, activeProductId, and subscription status.
Example
curl -X GET "https://api.app.bullseye.so/api/v1/payment/customer-info?organizationId=org_abc123"
-H "X-API-Key: bsk_live_your_api_key_here"
-H "Content-Type: application/json"Create Customer Portal Session
Creates a customer billing portal session. Returns a URL where the user can manage their subscription, payment methods, and invoices.
Method: POST
Path: /payment/customer-portal
Request Body
| Field | Type | Required | Description |
|---|---|---|---|
organizationId | string | Yes | Organization ID |
Response Body
Returns an object with a url field for the portal session.
Example
curl -X POST "https://api.app.bullseye.so/api/v1/payment/customer-portal"
-H "X-API-Key: bsk_live_your_api_key_here"
-H "Content-Type: application/json"
-d '{"organizationId": "org_abc123"}'