Recurring Payments Merchant API (2.6.19)
Download OpenAPI specification:Download
Recurring payments is used for subscription payments, such as weekly dues for newspaper access, monthly dues for public transportation, etc. For details, see the Recurring API Guide.
List Agreements
The API endpoint allows merchant to fetch all agreements.
If no query status is supplied it will default to only retrieving active agreements.
There is no way to list all Agreements with all statuses, this is due to performance.
It is recommended to use the pageNumber
and pageSize
query to paginate the response.
query Parameters
status | string (AgreementStatus) Default: "ACTIVE" Enum: "PENDING" "ACTIVE" "STOPPED" "EXPIRED" Example: status=ACTIVE Filter by the |
createdAfter | integer <int64> Example: createdAfter=1644572442944 Filter by createdAfter timestamp (in milliseconds) for paginating. |
pageNumber | integer <int32> >= 1 Example: pageNumber=1 Page number for paginating (should be used in combination with pageSize). |
pageSize | integer <int32> [ 1 .. 2000 ] Default: 500 Example: pageSize=500 Page size for paginating (must be used in combination with pageNumber). |
header Parameters
Authorization required | string The access token is a base64-encoded string that is required for all API requests. It is a JWT (JSON Web Token). The access token is fetched from the
|
Ocp-Apim-Subscription-Key required | string Example: 0f14ebcab0ec4b29ae0cb90d91b4a84a The subscription key for your sales unit. See API keys. Keep it secret. |
Content-Type | string Example: application/json The content type must be |
Merchant-Serial-Number | string Example: 123456 The Merchant Serial Number (MSN) is a unique ID for the sales unit for which this payment is made. This is a required parameter if you are a Recurring partner making payments on behalf of a merchant. The partner must use the merchant's MSN (not the partner's MSN). This parameter is optional, and recommended, for regular Vipps MobilePay merchants making payments for themselves. |
Vipps-System-Name | string <= 30 characters Example: woocommerce The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Version | |
Vipps-System-Plugin-Name | string <= 30 characters Example: vipps-woocommerce The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Plugin-Version | string <= 30 characters Example: 1.2.1 The version number of the ecommerce plugin (if applicable). See HTTP headers. |
Responses
Response samples
- 200
[- {
- "campaign": {
- "type": "PRICE_CAMPAIGN",
- "price": 1500,
- "end": "2022-12-31T00:00:00Z",
- "explanation": "Ordinary price 399 kr starts 6/12/2022"
}, - "pricing": {
- "type": "LEGACY",
- "currency": "NOK",
- "amount": 1500
}, - "id": "agr_DdLnJAF",
- "interval": {
- "unit": "WEEK",
- "count": 2,
- "text": "every 2 weeks"
}, - "productName": "Premier League subscription",
- "productDescription": "string",
- "created": "2019-01-01T00:00:00Z",
- "start": "2019-01-01T00:00:00Z",
- "stop": null,
- "status": "ACTIVE",
- "sub": "8d7de74e-0243-11eb-adc1-0242ac120002",
- "externalId": "external-id-2468",
- "countryCode": "NO",
- "uuid": "9c2ca95c-245f-4a2e-aab2-4a08eb78e6fb",
}
]
Create a new Agreement, to be confirmed in the Vipps or MobilePay app
The API endpoint allows merchants to create agreements for a user to accept. Once the agreement is drafted, you will receive a vippsConfirmationUrl
.
This is used to redirect the user to the Vipps MobilePay landing page, or to the Vipps or MobilePay app when "isApp":true
is used.
If the user accepts or rejects the agreement, the user will be redirected back to whichever URL has been passed in merchantRedirectUrl
.
You must implement polling on the agreement to check when the status changes to active, instead of relying on the redirect back to the merchantRedirectUrl
.
We have no control over if a user is actually redirected back or not, this depends on what browser the user came from.
Please note the different use cases for initialCharge
and campaign
. And when to use RESERVE_CAPTURE
instead of DIRECT_CAPTURE
as transactionType.
More information about this can be found in the API documentation.
header Parameters
Authorization required | string The access token is a base64-encoded string that is required for all API requests. It is a JWT (JSON Web Token). The access token is fetched from the
|
Ocp-Apim-Subscription-Key required | string Example: 0f14ebcab0ec4b29ae0cb90d91b4a84a The subscription key for your sales unit. See API keys. Keep it secret. |
Idempotency-Key required | string An Idempotency key must be provided to ensure idempotent requests. Key size can be between 1 to 40 characters. Key must not contain '#', '?', '/' or '\' |
Content-Type | string Example: application/json The content type must be |
Merchant-Serial-Number | string Example: 123456 The Merchant Serial Number (MSN) is a unique ID for the sales unit for which this payment is made. This is a required parameter if you are a Recurring partner making payments on behalf of a merchant. The partner must use the merchant's MSN (not the partner's MSN). This parameter is optional, and recommended, for regular Vipps MobilePay merchants making payments for themselves. |
Vipps-System-Name | string <= 30 characters Example: woocommerce The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Version | |
Vipps-System-Plugin-Name | string <= 30 characters Example: vipps-woocommerce The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Plugin-Version | string <= 30 characters Example: 1.2.1 The version number of the ecommerce plugin (if applicable). See HTTP headers. |
Request Body schema: application/jsonrequired
(Price campaign (object or null)) or (Period campaign (object or null)) or (Event campaign (object or null)) (campaignV3) | |
required | object (DraftAgreementPricingRequest) |
phoneNumber | string or null <= 15 characters Customers phone number (if available). Used to simplify the following interaction. MSISDN: https://en.wikipedia.org/wiki/MSISDN |
object (InitialCharge) An initial charge for a new agreement. The charge will be processed immediately when the user approves the agreement. | |
object (Time Period request) A period of time, defined by a unit (DAY, WEEK, ...) and a count (number of said units) | |
isApp | boolean Default: false This optional parameter indicates whether payment request is triggered from Mobile App or Web browser. Based on this value, response will be redirect URL for Vipps MobilePay landing page or deeplink URL to connect vipps App. When isApp is set to true, URLs passed to us will not be validated as regular URLs. See: https://developer.vippsmobilepay.com/docs/knowledge-base/app-flow |
merchantAgreementUrl | string <= 1024 characters URL where we can send the customer to view/manage their subscription. Typically a "My page" where the user can change, pause, cancel, etc. The page must offer actual management, not just information about how to contact customer service, etc. We recommend letting users log in, not with username and password. We do not have any specific requirements for the security of the page other than requiring HTTPS. Only HTTPS scheme is allowed. This URL is required for Norwegian Merchants. |
merchantRedirectUrl required | string <= 2048 characters URL where customer should be redirected after the agreement has been approved/rejected in the Vipps mobile application. HTTPS and deeplinks are allowed (example: myApp://home) |
productName required | string <= 45 characters Product name (short) |
productDescription | string <= 100 characters Product description (longer) |
scope | string Space-separated list of the required user information (e.g., "name phoneNumber") for the agreement. See the Userinfo user guide for details. Possible values are:
|
skipLandingPage | boolean Default: false If the property is set to |
externalId | string or null [ 1 .. 64 ] characters ^.{1,64}$ An optional external ID for the agreement.
The |
countryCode | string (CountryCode) ^[A-Z]{2}$ Enum: "NO" "DK" "FI" Country code for the agreement according to ISO 3166-2 (two capital letters). Needs to be set based on the merchant's market/country. Cross border agreements are not supported, e.g., Norwegian merchants can only create agreements for Norwegian customers and countryCode should be NO. |
Responses
Request samples
- Payload
Agreement with a set price and interval.
{- "pricing": {
- "type": "LEGACY",
- "amount": 2500,
- "currency": "NOK"
}, - "interval": {
- "unit": "MONTH",
- "count": 1
}, - "phoneNumber": "4712345678",
- "productName": "MyNews Digital"
}
Response samples
- 201
- 400
- 403
- 409
{- "agreementId": "agr_5kSeqz",
- "uuid": "9c2ca95c-245f-4a2e-aab2-4a08eb78e6fb",
- "chargeId": "chr_5kSeqz"
}
Fetch an Agreement
Fetch a single agreement for a user. Recommended to use when polling for status changes after sending an agreement to a user.
path Parameters
agreementId required | string Example: agr_5kSeqz The agreement identifier (ID) |
header Parameters
Authorization required | string The access token is a base64-encoded string that is required for all API requests. It is a JWT (JSON Web Token). The access token is fetched from the
|
Ocp-Apim-Subscription-Key required | string Example: 0f14ebcab0ec4b29ae0cb90d91b4a84a The subscription key for your sales unit. See API keys. Keep it secret. |
Content-Type | string Example: application/json The content type must be |
Merchant-Serial-Number | string Example: 123456 The Merchant Serial Number (MSN) is a unique ID for the sales unit for which this payment is made. This is a required parameter if you are a Recurring partner making payments on behalf of a merchant. The partner must use the merchant's MSN (not the partner's MSN). This parameter is optional, and recommended, for regular Vipps MobilePay merchants making payments for themselves. |
Vipps-System-Name | string <= 30 characters Example: woocommerce The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Version | |
Vipps-System-Plugin-Name | string <= 30 characters Example: vipps-woocommerce The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Plugin-Version | string <= 30 characters Example: 1.2.1 The version number of the ecommerce plugin (if applicable). See HTTP headers. |
Responses
Response samples
- 200
- 404
{- "campaign": {
- "type": "PRICE_CAMPAIGN",
- "price": 1500,
- "end": "2022-12-31T00:00:00Z",
- "explanation": "Ordinary price 399 kr starts 6/12/2022"
}, - "pricing": {
- "type": "LEGACY",
- "currency": "NOK",
- "amount": 1500
}, - "id": "agr_DdLnJAF",
- "interval": {
- "unit": "WEEK",
- "count": 2,
- "text": "every 2 weeks"
}, - "productName": "Premier League subscription",
- "productDescription": "string",
- "created": "2019-01-01T00:00:00Z",
- "start": "2019-01-01T00:00:00Z",
- "stop": null,
- "status": "ACTIVE",
- "sub": "8d7de74e-0243-11eb-adc1-0242ac120002",
- "externalId": "external-id-2468",
- "countryCode": "NO",
- "uuid": "9c2ca95c-245f-4a2e-aab2-4a08eb78e6fb",
}
Update an Agreement
Updates the agreement.
Note that when updating the status to STOPPED
,
you can not re-activate it. If you want to pause an agreement,
we suggest leaving the agreement active and skipping the creation of charges as long as the agreement is paused in your systems.
path Parameters
agreementId required | string Example: agr_5kSeqz The agreement identifier (ID) |
header Parameters
Authorization required | string The access token is a base64-encoded string that is required for all API requests. It is a JWT (JSON Web Token). The access token is fetched from the
|
Ocp-Apim-Subscription-Key required | string Example: 0f14ebcab0ec4b29ae0cb90d91b4a84a The subscription key for your sales unit. See API keys. Keep it secret. |
Idempotency-Key required | string An Idempotency key must be provided to ensure idempotent requests. Key size can be between 1 to 40 characters. Key must not contain '#', '?', '/' or '\' |
Content-Type | string Example: application/json The content type must be |
Merchant-Serial-Number | string Example: 123456 The Merchant Serial Number (MSN) is a unique ID for the sales unit for which this payment is made. This is a required parameter if you are a Recurring partner making payments on behalf of a merchant. The partner must use the merchant's MSN (not the partner's MSN). This parameter is optional, and recommended, for regular Vipps MobilePay merchants making payments for themselves. |
Vipps-System-Name | string <= 30 characters Example: woocommerce The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Version | |
Vipps-System-Plugin-Name | string <= 30 characters Example: vipps-woocommerce The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Plugin-Version | string <= 30 characters Example: 1.2.1 The version number of the ecommerce plugin (if applicable). See HTTP headers. |
Request Body schema: application/jsonrequired
agreement
productName | string <= 45 characters Name of the product being subscribed to. |
productDescription | string <= 100 characters Product description (longer) |
merchantAgreementUrl | string <= 1024 characters URL where we can send the customer to view/manage their subscription. Typically a "My page" where the user can change, pause, cancel, etc. The page must offer actual management, not just information about how to contact customer service, etc. We recommend letting users log in with Vipps MobilePay, not with username and password: https://developer.vippsmobilepay.com/docs/APIs/login-api We do not have any specific requirements for the security of the page other than requiring HTTPS. |
externalId | string [ 1 .. 64 ] characters ^.{1,64}$ An optional external ID for the agreement.
The |
status | string Value: "STOPPED" Status of the agreement. |
object (UpdateAgreementPricingRequest) | |
object The interval of the agreement. The interval is specified by the |
Responses
Request samples
- Payload
{- "productName": "Pluss-abonnement",
- "productDescription": "string",
- "externalId": "external-id-2468",
- "status": "STOPPED",
- "pricing": {
- "amount": 1500,
- "suggestedMaxAmount": 3000
}, - "interval": {
- "type": "RECURRING",
- "period": {
- "unit": "WEEK",
- "count": 2
}
}
}
Response samples
- 400
- 404
{- "type": "string",
- "title": "string",
- "status": 0,
- "detail": "string",
- "instance": "string",
- "contextId": "string",
- "extraDetails": [
- {
- "name": "string",
- "reason": "string"
}
]
}
Force accept an Agreement (Only available in test environment)
Forces an agreement to be accepted by the given customer phone number. This endpoint can only be used in the test environment.
path Parameters
agreementId required | string Example: agr_5kSeqz The agreement identifier (ID) |
header Parameters
Authorization required | string The access token is a base64-encoded string that is required for all API requests. It is a JWT (JSON Web Token). The access token is fetched from the
|
Ocp-Apim-Subscription-Key required | string Example: 0f14ebcab0ec4b29ae0cb90d91b4a84a The subscription key for your sales unit. See API keys. Keep it secret. |
Idempotency-Key required | string An Idempotency key must be provided to ensure idempotent requests. Key size can be between 1 to 40 characters. Key must not contain '#', '?', '/' or '\' |
Content-Type | string Example: application/json The content type must be |
Merchant-Serial-Number | string Example: 123456 The Merchant Serial Number (MSN) is a unique ID for the sales unit for which this payment is made. This is a required parameter if you are a Recurring partner making payments on behalf of a merchant. The partner must use the merchant's MSN (not the partner's MSN). This parameter is optional, and recommended, for regular Vipps MobilePay merchants making payments for themselves. |
Vipps-System-Name | string <= 30 characters Example: woocommerce The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Version | |
Vipps-System-Plugin-Name | string <= 30 characters Example: vipps-woocommerce The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Plugin-Version | string <= 30 characters Example: 1.2.1 The version number of the ecommerce plugin (if applicable). See HTTP headers. |
Request Body schema: application/jsonrequired
phoneNumber required | string |
Responses
Request samples
- Payload
{- "phoneNumber": "4712345678"
}
Response samples
- 204
- 400
- 404
{ }
List Charges
Fetches all charges for a single agreement, including the optional initial charge. Supports filtering on status using query parameter.
path Parameters
agreementId required | string Example: agr_5kSeqz The agreement identifier (ID) |
query Parameters
status | string (ChargeStatus) Enum: "PENDING" "DUE" "RESERVED" "CHARGED" "PARTIALLY_CAPTURED" "FAILED" "CANCELLED" "PARTIALLY_REFUNDED" "REFUNDED" "PROCESSING" Example: status=PENDING Filter by status of the charge. |
header Parameters
Authorization required | string The access token is a base64-encoded string that is required for all API requests. It is a JWT (JSON Web Token). The access token is fetched from the
|
Ocp-Apim-Subscription-Key required | string Example: 0f14ebcab0ec4b29ae0cb90d91b4a84a The subscription key for your sales unit. See API keys. Keep it secret. |
Continuation-Token | string <uuid> When returned from an endpoint, this indicates that there is more data than can be returned in one response. Repeating the request with the received token in the Continuation-Token header will return the next page of data. When not returned, the end of the data has been reached. Continuation-Tokens are short-lived, so they cannot be used several minutes/hours after received. |
Content-Type | string Example: application/json The content type must be |
Merchant-Serial-Number | string Example: 123456 The Merchant Serial Number (MSN) is a unique ID for the sales unit for which this payment is made. This is a required parameter if you are a Recurring partner making payments on behalf of a merchant. The partner must use the merchant's MSN (not the partner's MSN). This parameter is optional, and recommended, for regular Vipps MobilePay merchants making payments for themselves. |
Vipps-System-Name | string <= 30 characters Example: woocommerce The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Version | |
Vipps-System-Plugin-Name | string <= 30 characters Example: vipps-woocommerce The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Plugin-Version | string <= 30 characters Example: 1.2.1 The version number of the ecommerce plugin (if applicable). See HTTP headers. |
Responses
Response samples
- 200
- 404
[- {
- "amount": 19900,
- "currency": "NOK",
- "description": "Premier League subscription: September",
- "due": "2019-06-01T00:00:00Z",
- "id": "chr_WCVbcA",
- "agreementId": "agr_5kSeqz",
- "externalId": "external-id-2468",
- "externalAgreementId": "external-id-2468",
- "retryDays": 5,
- "status": "PENDING",
- "transactionId": "5001419121",
- "type": "RECURRING",
- "transactionType": "DIRECT_CAPTURE",
- "failureReason": "user_action_required",
- "failureDescription": "User action required",
- "summary": {
- "captured": 19900,
- "refunded": 0,
- "cancelled": 19900
}, - "history": [
- {
- "occurred": "2022-09-05T14:25:55Z",
- "event": "RESERVE",
- "amount": 19900,
- "idempotencyKey": "string",
- "success": true
}
]
}
]
Create a new charge
Creates a new recurring charge (payment) that will charge the user on the date specified.
If the payment fails, the charge will be retried based on retryDays
.
path Parameters
agreementId required | string Example: agr_5kSeqz The agreement identifier (ID) |
header Parameters
Authorization required | string The access token is a base64-encoded string that is required for all API requests. It is a JWT (JSON Web Token). The access token is fetched from the
|
Ocp-Apim-Subscription-Key required | string Example: 0f14ebcab0ec4b29ae0cb90d91b4a84a The subscription key for your sales unit. See API keys. Keep it secret. |
Idempotency-Key required | string An Idempotency key must be provided to ensure idempotent requests. Key size can be between 1 to 40 characters. Key must not contain '#', '?', '/' or '\' |
Content-Type | string Example: application/json The content type must be |
Merchant-Serial-Number | string Example: 123456 The Merchant Serial Number (MSN) is a unique ID for the sales unit for which this payment is made. This is a required parameter if you are a Recurring partner making payments on behalf of a merchant. The partner must use the merchant's MSN (not the partner's MSN). This parameter is optional, and recommended, for regular Vipps MobilePay merchants making payments for themselves. |
Vipps-System-Name | string <= 30 characters Example: woocommerce The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Version | |
Vipps-System-Plugin-Name | string <= 30 characters Example: vipps-woocommerce The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Plugin-Version | string <= 30 characters Example: 1.2.1 The version number of the ecommerce plugin (if applicable). See HTTP headers. |
Request Body schema: application/jsonrequired
amount required | integer <int32> >= 100 Amount to be paid by the customer. Amounts are specified in minor units. NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. |
transactionType required | string (transactionType) Enum: "DIRECT_CAPTURE" "RESERVE_CAPTURE" Type of transaction, either direct capture or reserve capture |
type | string (ChargeCreationTypeV3) Default: "RECURRING" Enum: "RECURRING" "UNSCHEDULED" |
description required | string [ 1 .. 100 ] characters This field is visible to the end user in-app |
due | string The date when the charge is due to be processed. Must be at least two days in advance in the production environment, and at least one day in the test environment. If the charge is Must be in the format Required only for |
retryDays | integer <int32> [ 0 .. 14 ] The service will attempt to charge the customer for the number of days
specified in Required only for |
orderId | string [ 1 .. 50 ] characters ^[a-zA-Z\d-]+ An optional, but recommended |
externalId | string [ 1 .. 64 ] characters ^.{1,64}$ An optional external ID for the charge, that takes the place of the |
Responses
Request samples
- Payload
{- "amount": 49900,
- "transactionType": "DIRECT_CAPTURE",
- "description": "October",
- "due": "2018-10-01",
- "retryDays": 5,
- "type": "RECURRING"
}
Response samples
- 201
- 400
- 404
- 409
{- "chargeId": "chg_WCVbcAbRCmu2zk"
}
Create multiple charges
Asynchronously creates multiple new recurring charges (payments) that will be automatically processed on the due date.
If the payment fails, the charge will be retried based on retryDays
. Maximum 2000 charges per request.
header Parameters
Authorization required | string The access token is a base64-encoded string that is required for all API requests. It is a JWT (JSON Web Token). The access token is fetched from the
|
Ocp-Apim-Subscription-Key required | string Example: 0f14ebcab0ec4b29ae0cb90d91b4a84a The subscription key for your sales unit. See API keys. Keep it secret. |
Idempotency-Key required | string An Idempotency key must be provided to ensure idempotent requests. Key size can be between 1 to 40 characters. Key must not contain '#', '?', '/' or '\' |
Content-Type | string Example: application/json The content type must be |
Merchant-Serial-Number | string Example: 123456 The Merchant Serial Number (MSN) is a unique ID for the sales unit for which this payment is made. This is a required parameter if you are a Recurring partner making payments on behalf of a merchant. The partner must use the merchant's MSN (not the partner's MSN). This parameter is optional, and recommended, for regular Vipps MobilePay merchants making payments for themselves. |
Vipps-System-Name | string <= 30 characters Example: woocommerce The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Version | |
Vipps-System-Plugin-Name | string <= 30 characters Example: vipps-woocommerce The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Plugin-Version | string <= 30 characters Example: 1.2.1 The version number of the ecommerce plugin (if applicable). See HTTP headers. |
Request Body schema: application/jsonrequired
agreementId required | string Id of a an agreement which user may agree to. Initially the agreement is in a pending state waiting for user approval. It enters active state once the user has approved it in the Vipps or MobilePay app |
amount required | integer <int32> >= 100 Amount to be paid by the customer. Amounts are specified in minor units. NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. |
transactionType required | string (transactionType) Enum: "DIRECT_CAPTURE" "RESERVE_CAPTURE" Type of transaction, either direct capture or reserve capture |
description required | string [ 1 .. 100 ] characters This field is visible to the end user in-app |
due required | string The date when the charge is due to be processed. Must be at least two days in advance in the production environment, and at least one day in the test environment. If the charge is Must be in the format |
retryDays required | integer <int32> [ 0 .. 14 ] The service will attempt to charge the customer for the number of days
specified in |
orderId required | string [ 1 .. 50 ] characters ^[a-zA-Z\d-]+ This will be the |
externalId | string [ 1 .. 64 ] characters ^.{1,64}$ An optional external ID for the charge, that takes the place of the |
Responses
Request samples
- Payload
[- {
- "agreementId": "agr_asdf123",
- "amount": 19900,
- "transactionType": "DIRECT_CAPTURE",
- "description": "Månedsabonnement",
- "due": "2030-12-31",
- "retryDays": 5,
- "orderId": "acme-shop-123-order123abc",
- "externalId": "external-id-2468"
}
]
Response samples
- 202
{- "invalidCharges": [
- {
- "chargeBatchItemDto": {
- "due": "2024-02-09",
- "retryDays": 3,
- "amount": 300,
- "description": "charge description",
- "transactionType": "DIRECT_CAPTURE",
- "orderId": "ea929435-d761-4a80-9271-c896d131b796",
- "agreementId": "string",
- "externalId": "string"
}, - "errors": [
- "string"
]
}
], - "validCharges": [
- "chr_1111",
- "chr_2222"
]
}
Fetch a charge
Fetch a single charge for a user.
path Parameters
agreementId required | string Example: agr_5kSeqz The agreement identifier (ID) |
chargeId required | string Example: chr-123ab The charge identifier (ID) |
header Parameters
Authorization required | string The access token is a base64-encoded string that is required for all API requests. It is a JWT (JSON Web Token). The access token is fetched from the
|
Ocp-Apim-Subscription-Key required | string Example: 0f14ebcab0ec4b29ae0cb90d91b4a84a The subscription key for your sales unit. See API keys. Keep it secret. |
Content-Type | string Example: application/json The content type must be |
Merchant-Serial-Number | string Example: 123456 The Merchant Serial Number (MSN) is a unique ID for the sales unit for which this payment is made. This is a required parameter if you are a Recurring partner making payments on behalf of a merchant. The partner must use the merchant's MSN (not the partner's MSN). This parameter is optional, and recommended, for regular Vipps MobilePay merchants making payments for themselves. |
Vipps-System-Name | string <= 30 characters Example: woocommerce The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Version | |
Vipps-System-Plugin-Name | string <= 30 characters Example: vipps-woocommerce The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Plugin-Version | string <= 30 characters Example: 1.2.1 The version number of the ecommerce plugin (if applicable). See HTTP headers. |
Responses
Response samples
- 200
- 404
{- "amount": 19900,
- "currency": "NOK",
- "description": "Premier League subscription: September",
- "due": "2019-06-01T00:00:00Z",
- "id": "chr_WCVbcA",
- "agreementId": "agr_5kSeqz",
- "externalId": "external-id-2468",
- "externalAgreementId": "external-id-2468",
- "retryDays": 5,
- "status": "PENDING",
- "transactionId": "5001419121",
- "type": "RECURRING",
- "transactionType": "DIRECT_CAPTURE",
- "failureReason": "user_action_required",
- "failureDescription": "User action required",
- "summary": {
- "captured": 19900,
- "refunded": 0,
- "cancelled": 19900
}, - "history": [
- {
- "occurred": "2022-09-05T14:25:55Z",
- "event": "RESERVE",
- "amount": 19900,
- "idempotencyKey": "string",
- "success": true
}
]
}
Cancel a charge
Cancels a pending, due or reserved charge.
When cancelling a charge that is PARTIALLY_CAPTURED
, the remaining funds on the charge
will be released back to the customer.
Note if you cancel an agreement, there is no need to cancel the charges that belongs to the agreement. This will be done automatically.
path Parameters
agreementId required | string Example: agr_5kSeqz The agreement identifier (ID) |
chargeId required | string Example: chr-123ab The charge identifier (ID) |
header Parameters
Authorization required | string The access token is a base64-encoded string that is required for all API requests. It is a JWT (JSON Web Token). The access token is fetched from the
|
Ocp-Apim-Subscription-Key required | string Example: 0f14ebcab0ec4b29ae0cb90d91b4a84a The subscription key for your sales unit. See API keys. Keep it secret. |
Idempotency-Key required | string An Idempotency key must be provided to ensure idempotent requests. Key size can be between 1 to 40 characters. Key must not contain '#', '?', '/' or '\' |
Content-Type | string Example: application/json The content type must be |
Merchant-Serial-Number | string Example: 123456 The Merchant Serial Number (MSN) is a unique ID for the sales unit for which this payment is made. This is a required parameter if you are a Recurring partner making payments on behalf of a merchant. The partner must use the merchant's MSN (not the partner's MSN). This parameter is optional, and recommended, for regular Vipps MobilePay merchants making payments for themselves. |
Vipps-System-Name | string <= 30 characters Example: woocommerce The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Version | |
Vipps-System-Plugin-Name | string <= 30 characters Example: vipps-woocommerce The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Plugin-Version | string <= 30 characters Example: 1.2.1 The version number of the ecommerce plugin (if applicable). See HTTP headers. |
Responses
Response samples
- 400
- 404
- 409
{- "type": "string",
- "title": "string",
- "status": 0,
- "detail": "string",
- "instance": "string",
- "contextId": "string",
- "extraDetails": [
- {
- "name": "string",
- "reason": "string"
}
]
}
Fetch a charge by ID
A "special case" endpoint to fetch a single charge just by chargeId
, when the agreementId
is unknown.
This is useful for investigating claims from customers, but not intended for automation.
Please note: This is not a replacement for the normal endpoint for fetching charges:
GET:/recurring/v3/agreements/{agreementId}/charges/{chargeId}
.
path Parameters
chargeId required | string Example: chr-123ab The charge identifier (ID) |
header Parameters
Authorization required | string The access token is a base64-encoded string that is required for all API requests. It is a JWT (JSON Web Token). The access token is fetched from the
|
Ocp-Apim-Subscription-Key required | string Example: 0f14ebcab0ec4b29ae0cb90d91b4a84a The subscription key for your sales unit. See API keys. Keep it secret. |
Content-Type | string Example: application/json The content type must be |
Merchant-Serial-Number | string Example: 123456 The Merchant Serial Number (MSN) is a unique ID for the sales unit for which this payment is made. This is a required parameter if you are a Recurring partner making payments on behalf of a merchant. The partner must use the merchant's MSN (not the partner's MSN). This parameter is optional, and recommended, for regular Vipps MobilePay merchants making payments for themselves. |
Vipps-System-Name | string <= 30 characters Example: woocommerce The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Version | |
Vipps-System-Plugin-Name | string <= 30 characters Example: vipps-woocommerce The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Plugin-Version | string <= 30 characters Example: 1.2.1 The version number of the ecommerce plugin (if applicable). See HTTP headers. |
Responses
Response samples
- 200
- 404
{- "amount": 19900,
- "currency": "NOK",
- "description": "Premier League subscription: September",
- "due": "2019-06-01T00:00:00Z",
- "id": "chr_WCVbcA",
- "agreementId": "agr_5kSeqz",
- "externalId": "external-id-2468",
- "externalAgreementId": "external-id-2468",
- "retryDays": 5,
- "status": "PENDING",
- "transactionId": "5001419121",
- "type": "RECURRING",
- "transactionType": "DIRECT_CAPTURE",
- "failureReason": "user_action_required",
- "failureDescription": "User action required",
- "summary": {
- "captured": 19900,
- "refunded": 0,
- "cancelled": 19900
}, - "history": [
- {
- "occurred": "2022-09-05T14:25:55Z",
- "event": "RESERVE",
- "amount": 19900,
- "idempotencyKey": "string",
- "success": true
}
]
}
Capture a reserved charge
Captures a reserved charge.
Only charges with transactionType RESERVE_CAPTURE
can be captured.
Can also do partial captures (captures a smaller part of the payment).
path Parameters
agreementId required | string Example: agr_5kSeqz The agreement identifier (ID) |
chargeId required | string Example: chr-123ab The charge identifier (ID) |
header Parameters
Authorization required | string The access token is a base64-encoded string that is required for all API requests. It is a JWT (JSON Web Token). The access token is fetched from the
|
Ocp-Apim-Subscription-Key required | string Example: 0f14ebcab0ec4b29ae0cb90d91b4a84a The subscription key for your sales unit. See API keys. Keep it secret. |
Idempotency-Key required | string An Idempotency key must be provided to ensure idempotent requests. Key size can be between 1 to 40 characters. Key must not contain '#', '?', '/' or '\' |
Content-Type | string Example: application/json The content type must be |
Merchant-Serial-Number | string Example: 123456 The Merchant Serial Number (MSN) is a unique ID for the sales unit for which this payment is made. This is a required parameter if you are a Recurring partner making payments on behalf of a merchant. The partner must use the merchant's MSN (not the partner's MSN). This parameter is optional, and recommended, for regular Vipps MobilePay merchants making payments for themselves. |
Vipps-System-Name | string <= 30 characters Example: woocommerce The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Version | |
Vipps-System-Plugin-Name | string <= 30 characters Example: vipps-woocommerce The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Plugin-Version | string <= 30 characters Example: 1.2.1 The version number of the ecommerce plugin (if applicable). See HTTP headers. |
Request Body schema: application/jsonrequired
amount required | integer <int32> >= 100 The amount to capture on a reserved charge. Amounts are specified in minor units. NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. |
description | string [ 1 .. 100 ] characters Deprecated Deprecated. Description in CreateChargeV3 is used instead. |
Responses
Request samples
- Payload
{- "amount": 5000,
- "description": "TV subscription for May"
}
Response samples
- 400
- 404
- 409
{- "type": "string",
- "title": "string",
- "status": 0,
- "detail": "string",
- "instance": "string",
- "contextId": "string",
- "extraDetails": [
- {
- "name": "string",
- "reason": "string"
}
]
}
Refund a charge
Refunds a charge, can also do a partial refund (refunding a smaller part of the payment).
path Parameters
agreementId required | string Example: agr_5kSeqz The agreement identifier (ID) |
chargeId required | string Example: chr-123ab The charge identifier (ID) |
header Parameters
Authorization required | string The access token is a base64-encoded string that is required for all API requests. It is a JWT (JSON Web Token). The access token is fetched from the
|
Ocp-Apim-Subscription-Key required | string Example: 0f14ebcab0ec4b29ae0cb90d91b4a84a The subscription key for your sales unit. See API keys. Keep it secret. |
Idempotency-Key required | string An Idempotency key must be provided to ensure idempotent requests. Key size can be between 1 to 40 characters. Key must not contain '#', '?', '/' or '\' |
Content-Type | string Example: application/json The content type must be |
Merchant-Serial-Number | string Example: 123456 The Merchant Serial Number (MSN) is a unique ID for the sales unit for which this payment is made. This is a required parameter if you are a Recurring partner making payments on behalf of a merchant. The partner must use the merchant's MSN (not the partner's MSN). This parameter is optional, and recommended, for regular Vipps MobilePay merchants making payments for themselves. |
Vipps-System-Name | string <= 30 characters Example: woocommerce The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Version | |
Vipps-System-Plugin-Name | string <= 30 characters Example: vipps-woocommerce The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Plugin-Version | string <= 30 characters Example: 1.2.1 The version number of the ecommerce plugin (if applicable). See HTTP headers. |
Request Body schema: application/jsonrequired
amount required | integer <int32> >= 100 The amount to refund on a captured/charged charge. Amounts are specified in minor units. NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. |
description required | string non-empty A textual description of the operation, which will be displayed in the user's app. |
Responses
Request samples
- Payload
{- "amount": 5000,
- "description": "Forgot to apply discount, refunding 50%"
}
Response samples
- 404
- 409
{- "type": "string",
- "title": "string",
- "status": 0,
- "detail": "string",
- "instance": "string",
- "contextId": "string",
- "extraDetails": [
- {
- "name": "string",
- "reason": "string"
}
]
}
List Agreements Deprecated
The API endpoint allows merchant to fetch all agreements.
If no query status is supplied, it will default to only retrieving active agreements.
There is no way to list all agreements with all statuses; this is due to performance.
Please note: Use the query parameters status
and createdAfter
specify the
agreements you want to retrieve, in order to speed up the query. Try to avoid
requests without query parameters. Set createdAfter
to the most recent value as possible.
For instance, if you fetch ACTIVE agreements every 24 hours, use createdAfter=now-25h
or similar.
Not that, in the future, it may be possible to encounter errors when the number of agreements in the response is too high
(e.g., 413 Content Too Large
or similar).
query Parameters
status | string (AgreementStatus) Default: "ACTIVE" Enum: "PENDING" "ACTIVE" "STOPPED" "EXPIRED" Example: status=ACTIVE Filter by the |
createdAfter | integer <int64> Example: createdAfter=1644572442944 Filter by createdAfter timestamp (in milliseconds) for paginating. |
header Parameters
Authorization required | string The access token is a base64-encoded string that is required for all API requests. It is a JWT (JSON Web Token). The access token is fetched from the
|
Ocp-Apim-Subscription-Key required | string Example: 0f14ebcab0ec4b29ae0cb90d91b4a84a The subscription key for your sales unit. See API keys. Keep it secret. |
Content-Type | string Example: application/json The content type must be |
Merchant-Serial-Number | string Example: 123456 The Merchant Serial Number (MSN) is a unique ID for the sales unit for which this payment is made. This is a required parameter if you are a Recurring partner making payments on behalf of a merchant. The partner must use the merchant's MSN (not the partner's MSN). This parameter is optional, and recommended, for regular Vipps MobilePay merchants making payments for themselves. |
Vipps-System-Name | string <= 30 characters Example: woocommerce The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Version | |
Vipps-System-Plugin-Name | string <= 30 characters Example: vipps-woocommerce The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Plugin-Version | string <= 30 characters Example: 1.2.1 The version number of the ecommerce plugin (if applicable). See HTTP headers. |
Responses
Response samples
- 200
- default
[- {
- "campaign": {
- "campaignPrice": 1500,
- "end": "2022-12-31T00:00:00Z"
}, - "currency": "NOK",
- "id": "agr_DdLnJAF",
- "interval": "MONTH",
- "intervalCount": 2,
- "price": 49900,
- "productName": "Premier League subscription",
- "productDescription": "Access to all games of English top football",
- "start": "2019-01-01T00:00:00Z",
- "stop": null,
- "status": "ACTIVE",
- "sub": "8d7de74e-0243-11eb-adc1-0242ac120002",
- "variableAmount": {
- "suggestedMaxAmount": 3000,
- "maxAmount": 3000
}
}
]
Create a new Agreement, to be confirmed in the app Deprecated
The API endpoint allows merchants to create agreements for a user to accept. Once the agreement is drafted,you will receive a vippsConfirmationUrl
.
This is used to redirect the user to the landing page, or automatically app-switched to the app if "isApp":true
is used.
If the user accepts or rejects the agreement, the user will be redirected back to the URL specified in merchantRedirectUrl
.
You have to implement polling on the agreement to check when the status changes to active instead of relying on the redirect back to the merchantRedirectUrl
.
We have no control over if a user is actually redirected back or not, this depends on what browser the user came from.
Please note the different use cases for initialCharge
and campaign
. And when to use RESERVE_CAPTURE
instead of DIRECT_CAPTURE
as transactionType
.
More information about this can be found in the API documentation.
header Parameters
Authorization required | string The access token is a base64-encoded string that is required for all API requests. It is a JWT (JSON Web Token). The access token is fetched from the
|
Ocp-Apim-Subscription-Key required | string Example: 0f14ebcab0ec4b29ae0cb90d91b4a84a The subscription key for your sales unit. See API keys. Keep it secret. |
Content-Type | string Example: application/json The content type must be |
Merchant-Serial-Number | string Example: 123456 The Merchant Serial Number (MSN) is a unique ID for the sales unit for which this payment is made. This is a required parameter if you are a Recurring partner making payments on behalf of a merchant. The partner must use the merchant's MSN (not the partner's MSN). This parameter is optional, and recommended, for regular Vipps MobilePay merchants making payments for themselves. |
Vipps-System-Name | string <= 30 characters Example: woocommerce The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Version | |
Vipps-System-Plugin-Name | string <= 30 characters Example: vipps-woocommerce The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Plugin-Version | string <= 30 characters Example: 1.2.1 The version number of the ecommerce plugin (if applicable). See HTTP headers. |
Request Body schema: application/jsonrequired
object (Variable Amount request V2) | |
object or null (Campaign request) | |
currency required | string (Currency) = 3 characters ^[A-Z]{3}$ Default: "NOK" Value: "NOK" |
customerPhoneNumber | string [ 10 .. 15 ] characters ^\d{10,15}$ Customers phone number (if available). Used to simplify the
following Vipps MobilePay interaction.
The format is MSISDN: Digits only: Country code and subscriber
number, but no prefix.
If the phone number is a Norwegian phone number |
object (InitialCharge) An initial charge for a new agreement. The charge will be processed immediately when the user approves the agreement. | |
interval required | string (Interval) ^(YEAR|MONTH|WEEK|DAY)$ Default: "MONTH" Enum: "YEAR" "MONTH" "WEEK" "DAY" Interval for subscription |
intervalCount required | integer <int32> [ 1 .. 31 ] Number of intervals between charges. Example: interval=week, intervalCount=2 to be able to charge every two weeks. Charges should occur at least once a year. |
isApp | boolean Default: false This optional parameter indicates whether payment request is triggered from Mobile App or Web browser. Based on this value, response will be redirect URL for Vipps MobilePay landing page or deeplink URL to connect vipps App. When isApp is set to true, URLs passed to us will not be validated as regular URLs. See: https://developer.vippsmobilepay.com/docs/knowledge-base/app-flow |
merchantAgreementUrl required | string <= 1024 characters URL where you can send the customer to view/manage their subscription. Typically a "My page" where the user can change, pause, cancel, etc. The page must offer management tools, not just information about how to contact customer service, etc. We recommend letting users log in, not with username and password. We do not have any specific requirements for the security of the page other than requiring HTTPS. Only HTTP or HTTPS scheme is allowed. |
merchantRedirectUrl required | string <= 1024 characters URL where customer should be redirected after the agreement has been approved/rejected in the Vipps or MobilePay app. HTTPS and deeplinks are allowed (example: myApp://home) |
price required | integer <int32> The price of the agreement. Amounts are specified in minor units. NOK: 1 kr = 100 øre. |
productName required | string <= 45 characters Product name (short) |
productDescription | string <= 100 characters Product description (longer) |
scope | string Space-separated list of the required user information (e.g., "name phoneNumber") for the agreement. See the Userinfo user guide for details. Possible values are:
|
skipLandingPage | boolean Default: false If the property is set to |
Responses
Request samples
- Payload
{- "currency": "NOK",
- "interval": "MONTH",
- "intervalCount": 1,
- "customerPhoneNumber": "12345678",
- "price": 2500,
- "productDescription": "MyNews on web",
- "productName": "MyNews Digital",
- "skipLandingPage": false
}
Response samples
- 201
- default
{- "agreementId": "agr_5kSeqz",
- "chargeId": "chr_5kSeqz"
}
Fetch an Agreement Deprecated
Fetch a single agreement for a user. Recommended to use when polling for status changes after sending an agreement to a user.
path Parameters
agreementId required | string Example: agr_5kSeqz The agreement identifier (ID) |
header Parameters
Authorization required | string The access token is a base64-encoded string that is required for all API requests. It is a JWT (JSON Web Token). The access token is fetched from the
|
Ocp-Apim-Subscription-Key required | string Example: 0f14ebcab0ec4b29ae0cb90d91b4a84a The subscription key for your sales unit. See API keys. Keep it secret. |
Content-Type | string Example: application/json The content type must be |
Merchant-Serial-Number | string Example: 123456 The Merchant Serial Number (MSN) is a unique ID for the sales unit for which this payment is made. This is a required parameter if you are a Recurring partner making payments on behalf of a merchant. The partner must use the merchant's MSN (not the partner's MSN). This parameter is optional, and recommended, for regular Vipps MobilePay merchants making payments for themselves. |
Vipps-System-Name | string <= 30 characters Example: woocommerce The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Version | |
Vipps-System-Plugin-Name | string <= 30 characters Example: vipps-woocommerce The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Plugin-Version | string <= 30 characters Example: 1.2.1 The version number of the ecommerce plugin (if applicable). See HTTP headers. |
Responses
Response samples
- 200
- default
{- "campaign": {
- "campaignPrice": 1500,
- "end": "2022-12-31T00:00:00Z"
}, - "currency": "NOK",
- "id": "agr_DdLnJAF",
- "interval": "MONTH",
- "intervalCount": 2,
- "price": 49900,
- "productName": "Premier League subscription",
- "productDescription": "Access to all games of English top football",
- "start": "2019-01-01T00:00:00Z",
- "stop": null,
- "status": "ACTIVE",
- "sub": "8d7de74e-0243-11eb-adc1-0242ac120002",
- "variableAmount": {
- "suggestedMaxAmount": 3000,
- "maxAmount": 3000
}
}
Update an Agreement Deprecated
Updates the agreement.
Note that when updating the status to STOPPED
,
you can not re-activate it. If you want to pause an agreement,
we suggest leaving the agreement active and skipping the creation of charges as long as the agreement is paused in your systems.
path Parameters
agreementId required | string Example: agr_5kSeqz The agreement identifier (ID) |
header Parameters
Authorization required | string The access token is a base64-encoded string that is required for all API requests. It is a JWT (JSON Web Token). The access token is fetched from the
|
Ocp-Apim-Subscription-Key required | string Example: 0f14ebcab0ec4b29ae0cb90d91b4a84a The subscription key for your sales unit. See API keys. Keep it secret. |
Content-Type | string Example: application/json The content type must be |
Merchant-Serial-Number | string Example: 123456 The Merchant Serial Number (MSN) is a unique ID for the sales unit for which this payment is made. This is a required parameter if you are a Recurring partner making payments on behalf of a merchant. The partner must use the merchant's MSN (not the partner's MSN). This parameter is optional, and recommended, for regular Vipps MobilePay merchants making payments for themselves. |
Vipps-System-Name | string <= 30 characters Example: woocommerce The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Version | |
Vipps-System-Plugin-Name | string <= 30 characters Example: vipps-woocommerce The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Plugin-Version | string <= 30 characters Example: 1.2.1 The version number of the ecommerce plugin (if applicable). See HTTP headers. |
Request Body schema: application/jsonrequired
agreement
suggestedMaxAmount | integer <int32> [ 100 .. 2000000 ] The suggested max amount that the customer should choose. Amounts are specified in minor units. NOK: 1 kr = 100 øre. |
object or null (Campaign request) | |
price | integer <int32> >= 0 The price of the agreement. Price is specified in minor units. NOK: 1 kr = 100 øre. |
productName | string <= 45 characters Product name (short) |
productDescription | string <= 100 characters Product description (longer) |
merchantAgreementUrl | string <= 1024 characters URL where we can send the customer to view/manage their subscription. Typically a "My page" where the user can change, pause, cancel, etc. The page must offer actual management, not just information about how to contact customer service, etc. We recommend letting users log in with Vipps MobilePay, not with username and password: https://developer.vippsmobilepay.com/docs/APIs/login-api We do not have any specific requirements for the security of the page other than requiring HTTPS. |
status | string Value: "STOPPED" Status of the agreement. |
Responses
Request samples
- Payload
{- "suggestedMaxAmount": 3000,
- "campaign": {
- "campaignPrice": 1500,
- "end": "2022-12-31T00:00:00Z"
}, - "price": 7900,
- "productName": "Premier League subscription",
- "productDescription": "Access to all games of English top football",
- "status": "STOPPED"
}
Response samples
- 200
- default
{- "agreementId": "agr_asdf123"
}
Update an Agreement Deprecated
Updates the agreement.
Note that when updating the status to STOPPED
,
you can not re-activate it. If you want to pause an agreement,
we suggest leaving the agreement active and skipping the creation of charges as long as the agreement is paused in your systems.
path Parameters
agreementId required | string Example: agr_5kSeqz The agreement identifier (ID) |
header Parameters
Authorization required | string The access token is a base64-encoded string that is required for all API requests. It is a JWT (JSON Web Token). The access token is fetched from the
|
Ocp-Apim-Subscription-Key required | string Example: 0f14ebcab0ec4b29ae0cb90d91b4a84a The subscription key for your sales unit. See API keys. Keep it secret. |
Content-Type | string Example: application/json The content type must be |
Merchant-Serial-Number | string Example: 123456 The Merchant Serial Number (MSN) is a unique ID for the sales unit for which this payment is made. This is a required parameter if you are a Recurring partner making payments on behalf of a merchant. The partner must use the merchant's MSN (not the partner's MSN). This parameter is optional, and recommended, for regular Vipps MobilePay merchants making payments for themselves. |
Vipps-System-Name | string <= 30 characters Example: woocommerce The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Version | |
Vipps-System-Plugin-Name | string <= 30 characters Example: vipps-woocommerce The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Plugin-Version | string <= 30 characters Example: 1.2.1 The version number of the ecommerce plugin (if applicable). See HTTP headers. |
Request Body schema: application/jsonrequired
agreement
suggestedMaxAmount | integer <int32> [ 100 .. 2000000 ] The suggested max amount that the customer should choose. Amounts are specified in minor units. NOK: 1 kr = 100 øre. |
object or null (Campaign request) | |
price | integer <int32> >= 0 The price of the agreement. Price is specified in minor units. NOK: 1 kr = 100 øre. |
productName | string <= 45 characters Product name (short) |
productDescription | string <= 100 characters Product description (longer) |
merchantAgreementUrl | string <= 1024 characters URL where we can send the customer to view/manage their subscription. Typically a "My page" where the user can change, pause, cancel, etc. The page must offer actual management, not just information about how to contact customer service, etc. We recommend letting users log in with Vipps MobilePay, not with username and password: https://developer.vippsmobilepay.com/docs/APIs/login-api We do not have any specific requirements for the security of the page other than requiring HTTPS. |
status | string Value: "STOPPED" Status of the agreement. |
Responses
Request samples
- Payload
{- "suggestedMaxAmount": 3000,
- "campaign": {
- "campaignPrice": 1500,
- "end": "2022-12-31T00:00:00Z"
}, - "price": 7900,
- "productName": "Premier League subscription",
- "productDescription": "Access to all games of English top football",
- "status": "STOPPED"
}
Response samples
- 200
- default
{- "agreementId": "agr_asdf123"
}
Force accept an Agreement (Only available in test environment) Deprecated
Forces an agreement to be accepted by the given customer phone number. This endpoint can only be used in the test environment.
path Parameters
agreementId required | string Example: agr_5kSeqz The agreement identifier (ID) |
header Parameters
Authorization required | string The access token is a base64-encoded string that is required for all API requests. It is a JWT (JSON Web Token). The access token is fetched from the
|
Ocp-Apim-Subscription-Key required | string Example: 0f14ebcab0ec4b29ae0cb90d91b4a84a The subscription key for your sales unit. See API keys. Keep it secret. |
Content-Type | string Example: application/json The content type must be |
Merchant-Serial-Number | string Example: 123456 The Merchant Serial Number (MSN) is a unique ID for the sales unit for which this payment is made. This is a required parameter if you are a Recurring partner making payments on behalf of a merchant. The partner must use the merchant's MSN (not the partner's MSN). This parameter is optional, and recommended, for regular Vipps MobilePay merchants making payments for themselves. |
Vipps-System-Name | string <= 30 characters Example: woocommerce The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Version | |
Vipps-System-Plugin-Name | string <= 30 characters Example: vipps-woocommerce The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Plugin-Version | string <= 30 characters Example: 1.2.1 The version number of the ecommerce plugin (if applicable). See HTTP headers. |
Request Body schema: application/jsonrequired
customerPhoneNumber required | string |
Responses
Request samples
- Payload
{- "customerPhoneNumber": "12345678"
}
Response samples
- 200
- default
{ }
List Charges Deprecated
Fetches all charges for a single agreement, including the optional initial charge.
Supports filtering on status
using it as a query parameter.
path Parameters
agreementId required | string Example: agr_5kSeqz The agreement identifier (ID) |
query Parameters
chargeStatus | string (ChargeStatus) Enum: "PENDING" "DUE" "RESERVED" "CHARGED" "PARTIALLY_CAPTURED" "FAILED" "CANCELLED" "PARTIALLY_REFUNDED" "REFUNDED" "PROCESSING" Example: chargeStatus=PENDING Filter by status of the charge. |
header Parameters
Authorization required | string The access token is a base64-encoded string that is required for all API requests. It is a JWT (JSON Web Token). The access token is fetched from the
|
Ocp-Apim-Subscription-Key required | string Example: 0f14ebcab0ec4b29ae0cb90d91b4a84a The subscription key for your sales unit. See API keys. Keep it secret. |
Content-Type | string Example: application/json The content type must be |
Merchant-Serial-Number | string Example: 123456 The Merchant Serial Number (MSN) is a unique ID for the sales unit for which this payment is made. This is a required parameter if you are a Recurring partner making payments on behalf of a merchant. The partner must use the merchant's MSN (not the partner's MSN). This parameter is optional, and recommended, for regular Vipps MobilePay merchants making payments for themselves. |
Vipps-System-Name | string <= 30 characters Example: woocommerce The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Version | |
Vipps-System-Plugin-Name | string <= 30 characters Example: vipps-woocommerce The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Plugin-Version | string <= 30 characters Example: 1.2.1 The version number of the ecommerce plugin (if applicable). See HTTP headers. |
Responses
Response samples
- 200
- default
[- {
- "amount": 19900,
- "amountRefunded": 0,
- "description": "Premier League subscription: September",
- "due": "2019-06-01T00:00:00Z",
- "id": "chr_WCVbcA",
- "status": "PENDING",
- "transactionId": "5001419121",
- "type": "RECURRING",
- "failureReason": "user_action_required",
- "failureDescription": "User action required"
}
]
Create a new charge Deprecated
Creates a new recurring charge (payment) that will charge the user on the date specified.
If the payment fails, the charge will be retried based on retryDays
.
We recommend at least two days retry.
path Parameters
agreementId required | string Example: agr_5kSeqz The agreement identifier (ID) |
header Parameters
Authorization required | string The access token is a base64-encoded string that is required for all API requests. It is a JWT (JSON Web Token). The access token is fetched from the
|
Ocp-Apim-Subscription-Key required | string Example: 0f14ebcab0ec4b29ae0cb90d91b4a84a The subscription key for your sales unit. See API keys. Keep it secret. |
Idempotency-Key required | string An Idempotency key must be provided to ensure idempotent requests. Key size can be between 1 to 40 characters. Key must not contain '#', '?', '/' or '\' |
Content-Type | string Example: application/json The content type must be |
Merchant-Serial-Number | string Example: 123456 The Merchant Serial Number (MSN) is a unique ID for the sales unit for which this payment is made. This is a required parameter if you are a Recurring partner making payments on behalf of a merchant. The partner must use the merchant's MSN (not the partner's MSN). This parameter is optional, and recommended, for regular Vipps MobilePay merchants making payments for themselves. |
Vipps-System-Name | string <= 30 characters Example: woocommerce The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Version | |
Vipps-System-Plugin-Name | string <= 30 characters Example: vipps-woocommerce The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Plugin-Version | string <= 30 characters Example: 1.2.1 The version number of the ecommerce plugin (if applicable). See HTTP headers. |
Request Body schema: application/jsonrequired
amount required | integer <int32> >= 100 Amount to be paid by the customer. Amounts are specified in minor units. NOK: 1 kr = 100 øre. |
currency required | string (Currency) = 3 characters ^[A-Z]{3}$ Default: "NOK" Value: "NOK" |
description required | string [ 1 .. 45 ] characters This field is visible to the end user in-app |
due required | string The date when the charge is due to be processed.
Must be in the format |
retryDays required | integer <int32> [ 0 .. 14 ] The service will attempt to charge the customer for the number of days
specified in |
orderId | string <= 50 characters ^[a-zA-Z\d-]+ An optional, but recommended |
Responses
Request samples
- Payload
{- "amount": 19900,
- "currency": "NOK",
- "description": "Månedsabonnement",
- "due": "2030-12-31",
- "retryDays": 5,
- "orderId": "acme-shop-123-order123abc"
}
Response samples
- 201
- default
{- "chargeId": "chg_WCVbcAbRCmu2zk"
}
Fetch a Charge Deprecated
Fetch a single charge for a user.
path Parameters
agreementId required | string Example: agr_5kSeqz The agreement identifier (ID) |
chargeId required | string Example: chr-123ab The charge identifier (ID) |
header Parameters
Authorization required | string The access token is a base64-encoded string that is required for all API requests. It is a JWT (JSON Web Token). The access token is fetched from the
|
Ocp-Apim-Subscription-Key required | string Example: 0f14ebcab0ec4b29ae0cb90d91b4a84a The subscription key for your sales unit. See API keys. Keep it secret. |
Content-Type | string Example: application/json The content type must be |
Merchant-Serial-Number | string Example: 123456 The Merchant Serial Number (MSN) is a unique ID for the sales unit for which this payment is made. This is a required parameter if you are a Recurring partner making payments on behalf of a merchant. The partner must use the merchant's MSN (not the partner's MSN). This parameter is optional, and recommended, for regular Vipps MobilePay merchants making payments for themselves. |
Vipps-System-Name | string <= 30 characters Example: woocommerce The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Version | |
Vipps-System-Plugin-Name | string <= 30 characters Example: vipps-woocommerce The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Plugin-Version | string <= 30 characters Example: 1.2.1 The version number of the ecommerce plugin (if applicable). See HTTP headers. |
Responses
Response samples
- 200
- default
{- "amount": 19900,
- "amountRefunded": 0,
- "description": "Premier League subscription: September",
- "due": "2019-06-01T00:00:00Z",
- "id": "chr_WCVbcA",
- "status": "PENDING",
- "transactionId": "5001419121",
- "type": "RECURRING",
- "failureReason": "user_action_required",
- "failureDescription": "User action required"
}
Cancel a Charge Deprecated
Cancels a pending, due, or reserved charge.
When cancelling a charge that is PARTIALLY_CAPTURED
, the remaining funds on the charge
will be released back to the customer.
Please note: If you cancel an agreement, all the charges for that agreement are automatically cancelled.
path Parameters
agreementId required | string Example: agr_5kSeqz The agreement identifier (ID) |
chargeId required | string Example: chr-123ab The charge identifier (ID) |
header Parameters
Authorization required | string The access token is a base64-encoded string that is required for all API requests. It is a JWT (JSON Web Token). The access token is fetched from the
|
Ocp-Apim-Subscription-Key required | string Example: 0f14ebcab0ec4b29ae0cb90d91b4a84a The subscription key for your sales unit. See API keys. Keep it secret. |
Content-Type | string Example: application/json The content type must be |
Merchant-Serial-Number | string Example: 123456 The Merchant Serial Number (MSN) is a unique ID for the sales unit for which this payment is made. This is a required parameter if you are a Recurring partner making payments on behalf of a merchant. The partner must use the merchant's MSN (not the partner's MSN). This parameter is optional, and recommended, for regular Vipps MobilePay merchants making payments for themselves. |
Vipps-System-Name | string <= 30 characters Example: woocommerce The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Version | |
Vipps-System-Plugin-Name | string <= 30 characters Example: vipps-woocommerce The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Plugin-Version | string <= 30 characters Example: 1.2.1 The version number of the ecommerce plugin (if applicable). See HTTP headers. |
Responses
Response samples
- 200
- default
{- "amount": 19900,
- "amountRefunded": 0,
- "description": "Premier League subscription: September",
- "due": "2019-06-01T00:00:00Z",
- "id": "chr_WCVbcA",
- "status": "PENDING",
- "transactionId": "5001419121",
- "type": "RECURRING",
- "failureReason": "user_action_required",
- "failureDescription": "User action required"
}
Capture a reserved charge Deprecated
Captures a reserved charge.
Only charges with transactionType RESERVE_CAPTURE
can be captured.
path Parameters
agreementId required | string Example: agr_5kSeqz The agreement identifier (ID) |
chargeId required | string Example: chr-123ab The charge identifier (ID) |
header Parameters
Authorization required | string The access token is a base64-encoded string that is required for all API requests. It is a JWT (JSON Web Token). The access token is fetched from the
|
Ocp-Apim-Subscription-Key required | string Example: 0f14ebcab0ec4b29ae0cb90d91b4a84a The subscription key for your sales unit. See API keys. Keep it secret. |
Idempotency-Key required | string An Idempotency key must be provided to ensure idempotent requests. Key size can be between 1 to 40 characters. Key must not contain '#', '?', '/' or '\' |
Content-Type | string Example: application/json The content type must be |
Merchant-Serial-Number | string Example: 123456 The Merchant Serial Number (MSN) is a unique ID for the sales unit for which this payment is made. This is a required parameter if you are a Recurring partner making payments on behalf of a merchant. The partner must use the merchant's MSN (not the partner's MSN). This parameter is optional, and recommended, for regular Vipps MobilePay merchants making payments for themselves. |
Vipps-System-Name | string <= 30 characters Example: woocommerce The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Version | |
Vipps-System-Plugin-Name | string <= 30 characters Example: vipps-woocommerce The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Plugin-Version | string <= 30 characters Example: 1.2.1 The version number of the ecommerce plugin (if applicable). See HTTP headers. |
Responses
Response samples
- 200
- default
{ }
Refund a charge Deprecated
Refunds a charge, and can also do a partial refund (refunding a smaller part of the payment).
path Parameters
agreementId required | string Example: agr_5kSeqz The agreement identifier (ID) |
chargeId required | string Example: chr-123ab The charge identifier (ID) |
header Parameters
Authorization required | string The access token is a base64-encoded string that is required for all API requests. It is a JWT (JSON Web Token). The access token is fetched from the
|
Ocp-Apim-Subscription-Key required | string Example: 0f14ebcab0ec4b29ae0cb90d91b4a84a The subscription key for your sales unit. See API keys. Keep it secret. |
Idempotency-Key required | string An Idempotency key must be provided to ensure idempotent requests. Key size can be between 1 to 40 characters. Key must not contain '#', '?', '/' or '\' |
Content-Type | string Example: application/json The content type must be |
Merchant-Serial-Number | string Example: 123456 The Merchant Serial Number (MSN) is a unique ID for the sales unit for which this payment is made. This is a required parameter if you are a Recurring partner making payments on behalf of a merchant. The partner must use the merchant's MSN (not the partner's MSN). This parameter is optional, and recommended, for regular Vipps MobilePay merchants making payments for themselves. |
Vipps-System-Name | string <= 30 characters Example: woocommerce The name of the ecommerce solution. One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Version | |
Vipps-System-Plugin-Name | string <= 30 characters Example: vipps-woocommerce The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. See HTTP headers. |
Vipps-System-Plugin-Version | string <= 30 characters Example: 1.2.1 The version number of the ecommerce plugin (if applicable). See HTTP headers. |
Request Body schema: application/jsonrequired
amount required | integer <int32> >= 100 The amount to refund on a captured/charged charge. Amounts are specified in minor units. NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. |
description required | string non-empty A textual description of the operation, which will be displayed in the user's app. |
Responses
Request samples
- Payload
{- "amount": 5000,
- "description": "Forgot to apply discount, refunding 50%"
}
Response samples
- 200
- default
{ }