# Swedbankpay Payment

**Summary:** Endpoints for Swedbankpay Payment

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

<a id="post-api-v1-payments-swedbankpay-intent"></a>
## SwedbankpayController\_createIntent\_v1

`POST /api/v1/payments/swedbankpay/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` · `SwedbankpayCreateIntentResponse`

| Name | Type | Description |
| --- | --- | --- |
| `hostedPaymentPageUrl` (Required) | `string` |   |
| `checkoutStateUuid` | `string` |   |
| `id` (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`

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": [
    {}
  ]
}
```

#### 409

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

checkoutPhoneHasAccount

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"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": "checkoutPhoneHasAccount",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 500

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

internalServerError

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

### Example request

```bash
curl https://api.subrite.no/api/v1/payments/swedbankpay/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
{
  "hostedPaymentPageUrl": "string",
  "checkoutStateUuid": "string",
  "id": "string"
}
```

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

`POST /api/v1/payments/swedbankpay/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` · `SwedbankpayCreateIntentResponse`

Same fields as [SwedbankpayController\_createIntent\_v1 (201)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

#### 401

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

unauthorized

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

**Example response**

`application/json`

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

#### 403

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

forbiddenResource

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

#### 500

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

internalServerError

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

### Example request

```bash
curl https://api.subrite.no/api/v1/payments/swedbankpay/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
{
  "hostedPaymentPageUrl": "string",
  "checkoutStateUuid": "string",
  "id": "string"
}
```

<a id="get-api-v1-payments-swedbankpay-card-change-url"></a>
## SwedbankpayController\_getCardChangeUrl\_v1

`GET /api/v1/payments/swedbankpay/card-change-url`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `memberPackageId` (Required) | query | `number` |   |
| `redirectUrl` (Required) | query | `string` | `pattern`: `/^\//` |

### Responses

#### 200

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

| Name | Type | Description |
| --- | --- | --- |
| `paymentOrder` (Required) | `object` |   |
| `paymentOrder.id` (Required) | `string` |   |
| `operations` (Required) | `array of SwedbankpayOperationDto` |   |
| `operations[].rel` (Required when parent is present) | `string` |   |
| `operations[].href` (Required when parent is present) | `string` |   |
| `operations[].method` (Required when parent is present) | `string` |   |
| `operations[].contentType` | `string` |   |

#### 401

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

unauthorized

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

**Example response**

`application/json`

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

#### 403

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

forbiddenResource

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

#### 404

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

paymentInfoNotFound

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"paymentInfoNotFound"` |
| `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": "paymentInfoNotFound",
  "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 [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

#### 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/swedbankpay/card-change-url?memberPackageId=%3CmemberPackageId%3E&redirectUrl=%3CredirectUrl%3E' \
  --header 'Authorization: Bearer <token>'
```

### Example response

200 · `application/json`

```json
{
  "paymentOrder": {
    "id": "string"
  },
  "operations": [
    {}
  ]
}
```

<a id="get-api-v1-payments-swedbankpay-card-change"></a>
## SwedbankpayController\_updateCard\_v1

`GET /api/v1/payments/swedbankpay/card-change`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `memberPackageId` (Required) | query | `number` |   |
| `redirectUrl` (Required) | query | `string` | `pattern`: `/^\//` |

### Responses

#### 200

#### 401

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

unauthorized

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

**Example response**

`application/json`

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

#### 403

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

forbiddenResource

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

#### 500

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

internalServerError

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

### Example request

```bash
curl 'https://api.subrite.no/api/v1/payments/swedbankpay/card-change?memberPackageId=%3CmemberPackageId%3E&redirectUrl=%3CredirectUrl%3E' \
  --header 'Authorization: Bearer <token>'
```

<a id="get-api-v1-payments-swedbankpay-subscription-url"></a>
## Get checkout url to subscribe Swedbankpay as a provider without initial charge

`GET /api/v1/payments/swedbankpay/subscription-url`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `memberPackageId` (Required) | query | `number` |   |
| `redirectUrl` (Required) | query | `string` | `pattern`: `/^\//` |

### Responses

#### 200

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

Same fields as [SwedbankpayController\_getCardChangeUrl\_v1 (200)](https://www.subrite.no/developers/swedbankpay-payment?md=true#get-api-v1-payments-swedbankpay-card-change-url).

#### 400

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

subscriptionAlreadyExists

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"subscriptionAlreadyExists"` |
| `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": "subscriptionAlreadyExists",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 401

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

unauthorized

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

**Example response**

`application/json`

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

#### 403

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

forbiddenResource

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

#### 404

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

subscriptionNotFound

| Name | Type | Description |
| --- | --- | --- |
| `messageCode` (Required) | `string` | Allowed values: `"subscriptionNotFound"` |
| `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": "subscriptionNotFound",
  "message": "string",
  "errors": [
    {}
  ]
}
```

#### 422

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

paymentProviderRequestInvalid

Same fields as [SwedbankpayController\_getCardChangeUrl\_v1 (422)](https://www.subrite.no/developers/swedbankpay-payment?md=true#get-api-v1-payments-swedbankpay-card-change-url).

**Example response**

`application/json`

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

#### 500

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

internalServerError

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

#### 502

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

paymentProviderUnavailable

Same fields as [SwedbankpayController\_getCardChangeUrl\_v1 (502)](https://www.subrite.no/developers/swedbankpay-payment?md=true#get-api-v1-payments-swedbankpay-card-change-url).

**Example response**

`application/json`

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

### Example request

```bash
curl 'https://api.subrite.no/api/v1/payments/swedbankpay/subscription-url?memberPackageId=%3CmemberPackageId%3E&redirectUrl=%3CredirectUrl%3E' \
  --header 'Authorization: Bearer <token>'
```

### Example response

200 · `application/json`

```json
{
  "paymentOrder": {
    "id": "string"
  },
  "operations": [
    {}
  ]
}
```

<a id="get-api-v1-payments-swedbankpay-subscription-url-memberid"></a>
## Get checkout url to subscribe Swedbankpay as a provider without initial charge on behalf of a member

`GET /api/v1/payments/swedbankpay/subscription-url/{memberId}`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `memberId` (Required) | path | `string` |   |
| `memberPackageId` (Required) | query | `number` |   |
| `redirectUrl` (Required) | query | `string` | `pattern`: `/^\//` |

### Responses

#### 200

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

Same fields as [SwedbankpayController\_getCardChangeUrl\_v1 (200)](https://www.subrite.no/developers/swedbankpay-payment?md=true#get-api-v1-payments-swedbankpay-card-change-url).

#### 400

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

subscriptionAlreadyExists

Same fields as [Get checkout url to subscribe Swedbankpay as a provider without initial charge (400)](https://www.subrite.no/developers/swedbankpay-payment?md=true#get-api-v1-payments-swedbankpay-subscription-url).

**Example response**

`application/json`

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

#### 401

unauthorized

#### 403

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

forbiddenResource

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

**Example response**

`application/json`

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

#### 404

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

subscriptionNotFound

Same fields as [Get checkout url to subscribe Swedbankpay as a provider without initial charge (404)](https://www.subrite.no/developers/swedbankpay-payment?md=true#get-api-v1-payments-swedbankpay-subscription-url).

**Example response**

`application/json`

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

#### 422

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

paymentProviderRequestInvalid

Same fields as [SwedbankpayController\_getCardChangeUrl\_v1 (422)](https://www.subrite.no/developers/swedbankpay-payment?md=true#get-api-v1-payments-swedbankpay-card-change-url).

**Example response**

`application/json`

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

#### 500

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

internalServerError

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

#### 502

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

paymentProviderUnavailable

Same fields as [SwedbankpayController\_getCardChangeUrl\_v1 (502)](https://www.subrite.no/developers/swedbankpay-payment?md=true#get-api-v1-payments-swedbankpay-card-change-url).

**Example response**

`application/json`

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

### Example request

```bash
curl 'https://api.subrite.no/api/v1/payments/swedbankpay/subscription-url/{memberId}?memberPackageId=%3CmemberPackageId%3E&redirectUrl=%3CredirectUrl%3E' \
  --header 'Authorization: Bearer <token>'
```

### Example response

200 · `application/json`

```json
{
  "paymentOrder": {
    "id": "string"
  },
  "operations": [
    {}
  ]
}
```

<a id="get-api-v1-payments-swedbankpay-callback"></a>
## SwedbankpayController\_callBack\_v1

`GET /api/v1/payments/swedbankpay/callback`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `reference` (Required) | query | `string` |   |
| `tenantId` (Required) | query | `number` |   |
| `packageId` | query | `number` |   |
| `orderId` | query | `number` |   |

### Responses

#### 200

#### 401

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

unauthorized

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

**Example response**

`application/json`

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

#### 403

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

forbiddenResource

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

#### 500

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

internalServerError

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

### Example request

```bash
curl 'https://api.subrite.no/api/v1/payments/swedbankpay/callback?reference=%3Creference%3E&tenantId=%3CtenantId%3E' \
  --header 'Authorization: Bearer <token>'
```

<a id="post-api-v1-payments-swedbankpay-webhook-card-change-tenantid-memberpackageid"></a>
## SwedbankpayController\_webhookForCardChange\_v1

`POST /api/v1/payments/swedbankpay/webhook/card-change/{tenantId}/{memberPackageId}`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `tenantId` (Required) | path | `number` |   |
| `memberPackageId` (Required) | path | `number` |   |
| `auth` (Required) | query | `string` |   |

### Responses

#### 201

#### 401

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

unauthorized

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

**Example response**

`application/json`

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

#### 403

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

forbiddenResource

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

#### 500

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

internalServerError

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

### Example request

```bash
curl 'https://api.subrite.no/api/v1/payments/swedbankpay/webhook/card-change/{tenantId}/{memberPackageId}?auth=%3Cauth%3E' \
  --request POST \
  --header 'Authorization: Bearer <token>'
```

<a id="post-api-v1-payments-swedbankpay-webhook-change-payment-provider-tenantid-memberpackageid"></a>
## Webhook to add Swedbankpay as a payment provider to a subscription

`POST /api/v1/payments/swedbankpay/webhook/change-payment-provider/{tenantId}/{memberPackageId}`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `tenantId` (Required) | path | `number` |   |
| `memberPackageId` (Required) | path | `number` |   |
| `auth` (Required) | query | `string` |   |

### Request body

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

| Name | Type | Description |
| --- | --- | --- |
| `paymentOrder` (Required) | `SwedbankpayPaymentOrderDto` |   |
| `paymentOrder.id` (Required) | `string` |   |
| `orderReference` | `string` |   |
| `reference` | `string` |   |

**Example request body**

`application/json`

```json
{
  "paymentOrder": {
    "id": "string"
  },
  "orderReference": "string",
  "reference": "string"
}
```

### Responses

#### 201

#### 401

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

unauthorized

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

**Example response**

`application/json`

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

#### 403

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

forbiddenResource

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

#### 500

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

internalServerError

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

### Example request

```bash
curl 'https://api.subrite.no/api/v1/payments/swedbankpay/webhook/change-payment-provider/{tenantId}/{memberPackageId}?auth=%3Cauth%3E' \
  --request POST \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "paymentOrder": {
    "id": "string"
  },
  "orderReference": "string",
  "reference": "string"
}'
```

<a id="post-api-v1-payments-swedbankpay-webhook-tenantid-reference"></a>
## SwedbankpayController\_webhook\_v1

`POST /api/v1/payments/swedbankpay/webhook/{tenantId}/{reference}`

**Authentication:** Bearer token (JWT)

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `tenantId` (Required) | path | `number` |   |
| `reference` (Required) | path | `string` |   |
| `auth` (Required) | query | `string` |   |

### Request body

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

Same fields as [Webhook to add Swedbankpay as a payment provider to a subscription (Request body)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-webhook-change-payment-provider-tenantid-memberpackageid).

**Example request body**

`application/json`

```json
{
  "paymentOrder": {
    "id": "string"
  },
  "orderReference": "string",
  "reference": "string"
}
```

### Responses

#### 201

#### 401

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

unauthorized

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

**Example response**

`application/json`

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

#### 403

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

forbiddenResource

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

#### 500

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

internalServerError

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

### Example request

```bash
curl 'https://api.subrite.no/api/v1/payments/swedbankpay/webhook/{tenantId}/{reference}?auth=%3Cauth%3E' \
  --request POST \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "paymentOrder": {
    "id": "string"
  },
  "orderReference": "string",
  "reference": "string"
}'
```

<a id="post-api-v1-payments-swedbankpay-recurrent-payments"></a>
## SwedbankpayController\_queueRecurringPayments\_v1

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

**Authentication:** Bearer token (JWT)

### Responses

#### 201

#### 401

unauthorized

#### 403

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

forbiddenResource

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

**Example response**

`application/json`

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

#### 500

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

internalServerError

Same fields as [SwedbankpayController\_createIntent\_v1 (401)](https://www.subrite.no/developers/swedbankpay-payment?md=true#post-api-v1-payments-swedbankpay-intent).

### Example request

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