# Stripe Payment

**Summary:** Endpoints for Stripe Payment

- Role: [Developers](https://www.subrite.no/developers)
- Source: https://www.subrite.no/developers/stripe-payment
- Updated: 2026-10-13
- Markdown index: https://www.subrite.no/developers/llms.txt

<a id="get-api-v1-payments-stripe-publishable-key"></a>
## Get the publishable key for stripe

`GET /api/v1/payments/stripe/publishable-key`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `tenantId` (Required) | query | `number` |   |

### Responses

#### 200

Content type: `application/json` · `PublishableKeyResponse`

| Name | Type | Description |
| --- | --- | --- |
| `publishableKey` (Required) | `string` |   |

#### 401

Content type: `application/json` · `ErrorResponse`

unauthorized

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` |   |
| `message` | `string` |   |
| `errors` (Required) | `array of FieldError` |   |
| `errors[].field` (Required when parent is present) | `string` |   |
| `errors[].fieldValue` (Required when parent is present) | `string` |   |
| `errors[].identifier` (Required when parent is present) | `string` |   |
| `errors[].identifierValue` (Required when parent is present) | `string` |   |
| `errors[].messageCode` (Required when parent is present) | `string` |   |
| `errors[].message` | `string` |   |
| `errors[].errorType` (Required when parent is present) | `string` |   |

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

Same fields as [Get the publishable key for stripe (401)](https://www.subrite.no/developers/stripe-payment?md=true#get-api-v1-payments-stripe-publishable-key).

#### 404

Content type: `application/json` · `ErrorResponse`

stripeConfigurationMissing

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"stripeConfigurationMissing"` |
| `message` | `string` |   |
| `errors` (Required) | `array of FieldError` |   |
| `errors[].field` (Required when parent is present) | `string` |   |
| `errors[].fieldValue` (Required when parent is present) | `string` |   |
| `errors[].identifier` (Required when parent is present) | `string` |   |
| `errors[].identifierValue` (Required when parent is present) | `string` |   |
| `errors[].messageCode` (Required when parent is present) | `string` |   |
| `errors[].message` | `string` |   |
| `errors[].errorType` (Required when parent is present) | `string` |   |

**Example response**

`application/json`

```json
{
  "messageCode": "stripeConfigurationMissing",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 422

Content type: `application/json` · `ErrorResponse`

paymentProviderRequestInvalid

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"paymentProviderRequestInvalid"` |
| `message` | `string` |   |
| `errors` (Required) | `array of FieldError` |   |
| `errors[].field` (Required when parent is present) | `string` |   |
| `errors[].fieldValue` (Required when parent is present) | `string` |   |
| `errors[].identifier` (Required when parent is present) | `string` |   |
| `errors[].identifierValue` (Required when parent is present) | `string` |   |
| `errors[].messageCode` (Required when parent is present) | `string` |   |
| `errors[].message` | `string` |   |
| `errors[].errorType` (Required when parent is present) | `string` |   |

**Example response**

`application/json`

```json
{
  "messageCode": "paymentProviderRequestInvalid",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get the publishable key for stripe (401)](https://www.subrite.no/developers/stripe-payment?md=true#get-api-v1-payments-stripe-publishable-key).

#### 502

Content type: `application/json` · `ErrorResponse`

paymentProviderUnavailable

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"paymentProviderUnavailable"` |
| `message` | `string` |   |
| `errors` (Required) | `array of FieldError` |   |
| `errors[].field` (Required when parent is present) | `string` |   |
| `errors[].fieldValue` (Required when parent is present) | `string` |   |
| `errors[].identifier` (Required when parent is present) | `string` |   |
| `errors[].identifierValue` (Required when parent is present) | `string` |   |
| `errors[].messageCode` (Required when parent is present) | `string` |   |
| `errors[].message` | `string` |   |
| `errors[].errorType` (Required when parent is present) | `string` |   |

**Example response**

`application/json`

```json
{
  "messageCode": "paymentProviderUnavailable",
  "message": "string",
  "errors": [
    {}
  ]
}
```

### Example request

```bash
curl 'https://api.subrite.no/api/v1/payments/stripe/publishable-key?tenantId=%3CtenantId%3E' \
  --header 'Authorization: Bearer <token>'
```

### Example response

200 · `application/json`

```json
{
  "publishableKey": "<publishableKey>"
}
```

<a id="post-api-v1-payments-stripe-intent"></a>
## Create a new stripe payment intent

`POST /api/v1/payments/stripe/intent`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `user-agent` (Required) | header | `string` |   |

### Request body

Content type: `application/json` · Required · `CreateIntentDto`

| Name | Type | Description |
| --- | --- | --- |
| `packageId` (Required) | `number` | `minimum`: `1` |
| `isSaved` (Required) | `boolean` |   |
| `optionalProducts` | `array of OptionalProductWithQuantity` |   |
| `optionalProducts[].productId` (Required when parent is present) | `number` | `minimum`: `1` |
| `optionalProducts[].quantity` (Required when parent is present) | `number` | `minimum`: `1` |
| `optionalProducts[].shippingCountry` | `string` | `maxLength`: `64` |
| `optionalProducts[].manualPrice` | `number` |   |
| `userData` (Required) | `CheckoutUser` |   |
| `userData.memberId` | `string` |   |
| `userData.email` | `string (email)` |   |
| `userData.fullName` (Required) | `string` |   |
| `userData.phone` | `string` | `maxLength`: `20` |
| `userData.payerPhone` | `string` | `maxLength`: `20` |
| `userData.countryCode` | `string` | Allowed values: `"NO"`, `"SE"`, `"DK"`, `"FI"`, `"FO"`, `"GB"` |
| `userData.isCompany` | `boolean` |   |
| `userData.companyName` | `string` |   |
| `userData.organizationNo` | `string` |   |
| `userData.reference` | `string` |   |
| `userData.onCheckoutCompletedUrl` | `string` |   |
| `userData.userAgent` | `string` |   |
| `userData.channel` | `string` | Allowed values: `"mobile"`, `"desktop"` |
| `userData.sourceUrl` | `string` |   |
| `userData.referrerUrl` | `string` |   |
| `billingAddress` | `BillingAddress` |   |
| `billingAddress.address` (Required when parent is present) | `string` |   |
| `billingAddress.addressTwo` | `string` |   |
| `billingAddress.companyName` | `string` |   |
| `billingAddress.organizationNo` | `string` |   |
| `billingAddress.postCode` (Required when parent is present) | `string` |   |
| `billingAddress.city` | `string` |   |
| `billingAddress.country` (Required when parent is present) | `string` |   |
| `billingAddress.invoiceReference` | `string` |   |
| `billingAddress.email` | `string` |   |
| `billingAddress.fullName` | `string` |   |
| `billingAddress.phone` | `string` |   |

**Example request body**

`application/json`

```json
{
  "packageId": 1,
  "isSaved": true,
  "userData": {
    "memberId": "string",
    "email": "user@example.com",
    "fullName": "<fullName>",
    "phone": "<phone>",
    "payerPhone": "<payerPhone>",
    "countryCode": "NO",
    "isCompany": true,
    "companyName": "string",
    "organizationNo": "string",
    "reference": "string",
    "onCheckoutCompletedUrl": "string",
    "userAgent": "string",
    "channel": "mobile",
    "sourceUrl": "string",
    "referrerUrl": "string"
  },
  "billingAddress": {
    "address": "<address>",
    "addressTwo": "<addressTwo>",
    "companyName": "string",
    "organizationNo": "string",
    "postCode": "string",
    "city": "string",
    "country": "string",
    "invoiceReference": "string",
    "email": "string",
    "fullName": "<fullName>",
    "phone": "<phone>"
  }
}
```

### Responses

#### 201

Content type: `application/json` · `StripeCreateIntentResponse`

| Name | Type | Description |
| --- | --- | --- |
| `clientSecret` (Required) | `string` |   |
| `checkoutStateUuid` | `string` |   |

#### 401

Content type: `application/json` · `ErrorResponse`

unauthorized

Same fields as [Get the publishable key for stripe (401)](https://www.subrite.no/developers/stripe-payment?md=true#get-api-v1-payments-stripe-publishable-key).

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 403

Content type: `application/json` · `ErrorResponse`

forbidden

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"forbidden"` |
| `message` | `string` |   |
| `errors` (Required) | `array of FieldError` |   |
| `errors[].field` (Required when parent is present) | `string` |   |
| `errors[].fieldValue` (Required when parent is present) | `string` |   |
| `errors[].identifier` (Required when parent is present) | `string` |   |
| `errors[].identifierValue` (Required when parent is present) | `string` |   |
| `errors[].messageCode` (Required when parent is present) | `string` |   |
| `errors[].message` | `string` |   |
| `errors[].errorType` (Required when parent is present) | `string` |   |

**Example response**

`application/json`

```json
{
  "messageCode": "forbidden",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 404

Content type: `application/json` · `ErrorResponse`

stripeConfigurationMissing

Same fields as [Get the publishable key for stripe (404)](https://www.subrite.no/developers/stripe-payment?md=true#get-api-v1-payments-stripe-publishable-key).

**Example response**

`application/json`

```json
{
  "messageCode": "stripeConfigurationMissing",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 409

Content type: `application/json` · `ErrorResponse`

aSubscriptionForThisPackageAlreadyExistsForThisMember, aCheckoutForThisPackageIsAlreadyInProgressForThisMember, checkoutPhoneHasAccount

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"aSubscriptionForThisPackageAlreadyExistsForThisMember"`, `"aCheckoutForThisPackageIsAlreadyInProgressForThisMember"`, `"checkoutPhoneHasAccount"` |
| `message` | `string` |   |
| `errors` (Required) | `array of FieldError` |   |
| `errors[].field` (Required when parent is present) | `string` |   |
| `errors[].fieldValue` (Required when parent is present) | `string` |   |
| `errors[].identifier` (Required when parent is present) | `string` |   |
| `errors[].identifierValue` (Required when parent is present) | `string` |   |
| `errors[].messageCode` (Required when parent is present) | `string` |   |
| `errors[].message` | `string` |   |
| `errors[].errorType` (Required when parent is present) | `string` |   |

**Example response**

`application/json`

```json
{
  "messageCode": "aSubscriptionForThisPackageAlreadyExistsForThisMember",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 422

Content type: `application/json` · `ErrorResponse`

paymentProviderRequestInvalid

Same fields as [Get the publishable key for stripe (422)](https://www.subrite.no/developers/stripe-payment?md=true#get-api-v1-payments-stripe-publishable-key).

**Example response**

`application/json`

```json
{
  "messageCode": "paymentProviderRequestInvalid",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get the publishable key for stripe (401)](https://www.subrite.no/developers/stripe-payment?md=true#get-api-v1-payments-stripe-publishable-key).

#### 502

Content type: `application/json` · `ErrorResponse`

paymentProviderUnavailable

Same fields as [Get the publishable key for stripe (502)](https://www.subrite.no/developers/stripe-payment?md=true#get-api-v1-payments-stripe-publishable-key).

**Example response**

`application/json`

```json
{
  "messageCode": "paymentProviderUnavailable",
  "message": "string",
  "errors": [
    {}
  ]
}
```

### Example request

```bash
curl https://api.subrite.no/api/v1/payments/stripe/intent \
  --request POST \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --header 'user-agent: <user-agent>' \
  --data '{
  "packageId": 1,
  "isSaved": true,
  "optionalProducts": [
    {}
  ],
  "userData": {
    "memberId": "string",
    "email": "user@example.com",
    "fullName": "<fullName>",
    "phone": "<phone>",
    "payerPhone": "<payerPhone>",
    "countryCode": "NO",
    "isCompany": true,
    "companyName": "string",
    "organizationNo": "string",
    "reference": "string",
    "onCheckoutCompletedUrl": "string",
    "userAgent": "string",
    "channel": "mobile",
    "sourceUrl": "string",
    "referrerUrl": "string"
  },
  "billingAddress": {
    "address": "<address>",
    "addressTwo": "<addressTwo>",
    "companyName": "string",
    "organizationNo": "string",
    "postCode": "string",
    "city": "string",
    "country": "string",
    "invoiceReference": "string",
    "email": "string",
    "fullName": "<fullName>",
    "phone": "<phone>"
  }
}'
```

### Example response

201 · `application/json`

```json
{
  "clientSecret": "<clientSecret>",
  "checkoutStateUuid": "string"
}
```

<a id="post-api-v1-payments-stripe-order-intent"></a>
## StripeController\_createIntentFromOrder\_v1

`POST /api/v1/payments/stripe/order-intent`

**Authentication:** Bearer token (JWT)

### Request body

Content type: `application/json` · Required · `CreateIntentFromOrderDto`

| Name | Type | Description |
| --- | --- | --- |
| `orderId` (Required) | `number` | `minimum`: `1` |
| `phone` | `string` |   |
| `paymentToken` | `string (uuid)` |   |

**Example request body**

`application/json`

```json
{
  "orderId": 1,
  "phone": "<phone>",
  "paymentToken": "<paymentToken>"
}
```

### Responses

#### 201

Content type: `application/json` · `StripeCreateIntentResponse`

Same fields as [Create a new stripe payment intent (201)](https://www.subrite.no/developers/stripe-payment?md=true#post-api-v1-payments-stripe-intent).

#### 401

Content type: `application/json` · `ErrorResponse`

unauthorized

Same fields as [Get the publishable key for stripe (401)](https://www.subrite.no/developers/stripe-payment?md=true#get-api-v1-payments-stripe-publishable-key).

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

Same fields as [Get the publishable key for stripe (401)](https://www.subrite.no/developers/stripe-payment?md=true#get-api-v1-payments-stripe-publishable-key).

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get the publishable key for stripe (401)](https://www.subrite.no/developers/stripe-payment?md=true#get-api-v1-payments-stripe-publishable-key).

### Example request

```bash
curl https://api.subrite.no/api/v1/payments/stripe/order-intent \
  --request POST \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "orderId": 1,
  "phone": "<phone>",
  "paymentToken": "<paymentToken>"
}'
```

### Example response

201 · `application/json`

```json
{
  "clientSecret": "<clientSecret>",
  "checkoutStateUuid": "string"
}
```

<a id="post-api-v1-payments-stripe-setup-intent"></a>
## Create a new stripe setup intent

`POST /api/v1/payments/stripe/setup-intent`

**Authentication:** Bearer token (JWT)

### Request body

Content type: `application/json` · Required · `CreateSetupIntentDto`

| Name | Type | Description |
| --- | --- | --- |
| `subscriptionId` (Required) | `number` | `minimum`: `1` |

**Example request body**

`application/json`

```json
{
  "subscriptionId": 1
}
```

### Responses

#### 201

Content type: `application/json` · `StripeCreateIntentResponse`

Same fields as [Create a new stripe payment intent (201)](https://www.subrite.no/developers/stripe-payment?md=true#post-api-v1-payments-stripe-intent).

#### 401

Content type: `application/json` · `ErrorResponse`

unauthorized

Same fields as [Get the publishable key for stripe (401)](https://www.subrite.no/developers/stripe-payment?md=true#get-api-v1-payments-stripe-publishable-key).

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

Same fields as [Get the publishable key for stripe (401)](https://www.subrite.no/developers/stripe-payment?md=true#get-api-v1-payments-stripe-publishable-key).

#### 404

Content type: `application/json` · `ErrorResponse`

stripeConfigurationMissing

Same fields as [Get the publishable key for stripe (404)](https://www.subrite.no/developers/stripe-payment?md=true#get-api-v1-payments-stripe-publishable-key).

**Example response**

`application/json`

```json
{
  "messageCode": "stripeConfigurationMissing",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 422

Content type: `application/json` · `ErrorResponse`

paymentProviderRequestInvalid

Same fields as [Get the publishable key for stripe (422)](https://www.subrite.no/developers/stripe-payment?md=true#get-api-v1-payments-stripe-publishable-key).

**Example response**

`application/json`

```json
{
  "messageCode": "paymentProviderRequestInvalid",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get the publishable key for stripe (401)](https://www.subrite.no/developers/stripe-payment?md=true#get-api-v1-payments-stripe-publishable-key).

#### 502

Content type: `application/json` · `ErrorResponse`

paymentProviderUnavailable

Same fields as [Get the publishable key for stripe (502)](https://www.subrite.no/developers/stripe-payment?md=true#get-api-v1-payments-stripe-publishable-key).

**Example response**

`application/json`

```json
{
  "messageCode": "paymentProviderUnavailable",
  "message": "string",
  "errors": [
    {}
  ]
}
```

### Example request

```bash
curl https://api.subrite.no/api/v1/payments/stripe/setup-intent \
  --request POST \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "subscriptionId": 1
}'
```

### Example response

201 · `application/json`

```json
{
  "clientSecret": "<clientSecret>",
  "checkoutStateUuid": "string"
}
```

<a id="post-api-v1-payments-stripe-recurrent-payments"></a>
## Queue recurrent payments

`POST /api/v1/payments/stripe/recurrent-payments`

**Authentication:** Bearer token (JWT)

### Responses

#### 201

#### 401

unauthorized

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

Same fields as [Get the publishable key for stripe (401)](https://www.subrite.no/developers/stripe-payment?md=true#get-api-v1-payments-stripe-publishable-key).

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get the publishable key for stripe (401)](https://www.subrite.no/developers/stripe-payment?md=true#get-api-v1-payments-stripe-publishable-key).

### Example request

```bash
curl https://api.subrite.no/api/v1/payments/stripe/recurrent-payments \
  --request POST \
  --header 'Authorization: Bearer <token>'
```

<a id="post-api-v1-payments-stripe-webhook-tenantid"></a>
## Stripe webhook

`POST /api/v1/payments/stripe/webhook/{tenantId}`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `tenantId` (Required) | path | `number` |   |

### Responses

#### 201

Content type: `application/json` · `WebhookResponse`

| Name | Type | Description |
| --- | --- | --- |
| `checkoutStateUuid` (Required) | `string` |   |
| `status` (Required) | `string` | Allowed values: `"pending"`, `"succeeded"`, `"failed"` |

#### 401

Content type: `application/json` · `ErrorResponse`

unauthorized

Same fields as [Get the publishable key for stripe (401)](https://www.subrite.no/developers/stripe-payment?md=true#get-api-v1-payments-stripe-publishable-key).

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

Same fields as [Get the publishable key for stripe (401)](https://www.subrite.no/developers/stripe-payment?md=true#get-api-v1-payments-stripe-publishable-key).

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get the publishable key for stripe (401)](https://www.subrite.no/developers/stripe-payment?md=true#get-api-v1-payments-stripe-publishable-key).

### Example request

```bash
curl 'https://api.subrite.no/api/v1/payments/stripe/webhook/{tenantId}' \
  --request POST \
  --header 'Authorization: Bearer <token>'
```

### Example response

201 · `application/json`

```json
{
  "checkoutStateUuid": "string",
  "status": "pending"
}
```

<a id="patch-api-v1-payments-stripe-card-info"></a>
## Sync card info

`PATCH /api/v1/payments/stripe/card-info`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `id` (Required) | query | `number` |   |

### Responses

#### 200

#### 401

unauthorized

#### 403

Content type: `application/json` · `ErrorResponse`

forbiddenResource

Same fields as [Get the publishable key for stripe (401)](https://www.subrite.no/developers/stripe-payment?md=true#get-api-v1-payments-stripe-publishable-key).

**Example response**

`application/json`

```json
{
  "messageCode": "string",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 500

Content type: `application/json` · `ErrorResponse`

internalServerError

Same fields as [Get the publishable key for stripe (401)](https://www.subrite.no/developers/stripe-payment?md=true#get-api-v1-payments-stripe-publishable-key).

### Example request

```bash
curl 'https://api.subrite.no/api/v1/payments/stripe/card-info?id=%3Cid%3E' \
  --request PATCH \
  --header 'Authorization: Bearer <token>'
```
