/** * Status of the agreement. */ export type AgreementStatus = "PENDING" | "ACTIVE" | "STOPPED" | "EXPIRED"; export type ChargeStatus = "PENDING" | "DUE" | "RESERVED" | "CHARGED" | "PARTIALLY_CAPTURED" | "FAILED" | "CANCELLED" | "PARTIALLY_REFUNDED" | "REFUNDED" | "PROCESSING"; /** * A summary of the amounts captured, refunded and cancelled */ export type ChargeSummary = { /** * The total amount which has been captured/charged, in case of status charged/partial capture. * Amounts are specified in minor units. * NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. */ captured: number; /** * The total amount which has been refunded, in case of status refund/partial refund. * Amounts are specified in minor units. * NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. */ refunded: number; /** * The total amount which has been cancelled. * * Amounts are specified in minor units. * NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. */ cancelled: number; }; /** * List of events related to the charge. */ export type ChargeHistory = Array; /** * Describes the operation that was performed on the charge */ export type ChargeEvent = { /** * Date and time of the event, as timestamp on the format `yyyy-MM-dd'T'HH:mm:ss'Z'`, * with or without milliseconds. */ occurred: string; event: "CREATE" | "RESERVE" | "CAPTURE" | "REFUND" | "CANCEL" | "FAIL"; /** * The amount related to the operation. * Amounts are specified in minor units. * NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. */ amount: number; /** * The idempotency key of the event */ idempotencyKey: string; /** * True if the operation was successful, false otherwise */ success: boolean; }; export type event = "CREATE" | "RESERVE" | "CAPTURE" | "REFUND" | "CANCEL" | "FAIL"; /** * ISO-4217: https://www.iso.org/iso-4217-currency-codes.html */ export type Currency = "NOK"; /** * Available types of currency are NOK, EUR and DKK */ export type CurrencyV3 = "NOK" | "EUR" | "DKK"; /** * 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. */ export type CountryCode = "NO" | "DK" | "FI"; /** * Type of transaction, either direct capture or reserve capture */ export type transactionType = "DIRECT_CAPTURE" | "RESERVE_CAPTURE"; export type ChargeTypeV2 = "INITIAL" | "RECURRING"; export type ChargeTypeV3 = "INITIAL" | "RECURRING" | "UNSCHEDULED"; export type ChargeCreationTypeV3 = "RECURRING" | "UNSCHEDULED"; /** * Interval for subscription */ export type Interval = "YEAR" | "MONTH" | "WEEK" | "DAY"; export type DraftAgreementV2 = { variableAmount?: variableAmountV2; campaign?: campaignV2; currency: Currency; /** * 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 `(+47) 91 23 45 67`, the MSISDN representation is `4712345678`. * See: https://en.wikipedia.org/wiki/MSISDN */ customerPhoneNumber?: string; initialCharge?: InitialChargeV2; interval: Interval; /** * 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. */ intervalCount: number; /** * 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 */ isApp?: boolean; /** * 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](/docs/APIs/login-api), * 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. */ merchantAgreementUrl: string; /** * 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) */ merchantRedirectUrl: string; /** * The price of the agreement. * * Amounts are specified in minor units. * NOK: 1 kr = 100 øre. */ price: number; /** * Product name (short) */ productName: string; /** * Product description (longer) */ productDescription?: string; /** * Space-separated list of the required user information (e.g., "name phoneNumber") * for the agreement. See the * [Userinfo user guide](/docs/APIs/userinfo-api/userinfo-api-guide#scope) * for details. * Possible values are: * - name * - address * - email * - phoneNumber * - birthDate * - nin */ scope?: string; /** * If the property is set to `true`, it will cause a push notification * to be sent to the given phone number immediately, without loading * the landing page. * This feature has to be specially enabled for eligible sales * units: The sales units must be whitelisted by Vipps MobilePay. If the sales unit is not whitelisted, * the request will fail and an error message will be returned (statusCode=403). * See: https://developer.vippsmobilepay.com/docs/knowledge-base/landing-page */ skipLandingPage?: boolean; }; export type DraftAgreementV3 = { campaign?: campaignV3; pricing: pricingRequest; /** * Customers phone number (if available). Used to simplify the * following interaction. MSISDN: https://en.wikipedia.org/wiki/MSISDN */ phoneNumber?: (string) | null; initialCharge?: InitialChargeV3; interval?: TimePeriod; /** * 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 */ isApp?: boolean; /** * 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](/docs/APIs/login-api), * 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. */ merchantAgreementUrl?: string; /** * 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) */ merchantRedirectUrl: string; /** * Product name (short) */ productName: string; /** * Product description (longer) */ productDescription?: string; /** * Space-separated list of the required user information (e.g., "name phoneNumber") * for the agreement. See the * [Userinfo user guide](/docs/APIs/userinfo-api/userinfo-api-guide#scope) * for details. * Possible values are: * - name * - address * - email * - phoneNumber * - birthDate * - nin */ scope?: string; /** * If the property is set to `true`, it will cause a push notification * to be sent to the given phone number immediately, without loading * the landing page. * This feature has to be specially enabled for eligible sales * units: The sales units must be whitelisted by Vipps MobilePay. If the sales unit is not whitelisted, * the request will fail and an error message will be returned (statusCode=403). * See: https://developer.vippsmobilepay.com/docs/knowledge-base/landing-page */ skipLandingPage?: boolean; /** * An optional external ID for the agreement. * The `externalId` can be used by the merchant to map the `agreementId` * to an ID in a subscription system or similar. */ externalId?: (string) | null; countryCode?: CountryCode; }; export type DraftAgreementResponseV2 = { /** * Reference 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. */ agreementResource: 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. */ agreementId: string; /** * The `vippsConfirmationUrl` should be used to redirect the * user to the Vipps MobilePay landing page in a desktop flow (with `https://`), * or to the Vipps or MobilePay app in a mobile flow (with `vipps://`), where the * user can then approve the agreement. */ vippsConfirmationUrl: string; /** * The Id of the initialCharge if given, otherwise `null`. * If an `orderId` is specified this is used as the `chargeId` otherwise it is auto generated. */ chargeId: string; }; export type DraftAgreementResponseV3 = { /** * 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. */ agreementId: string; /** * UUID (RFC 4122) representation of agreementId */ uuid: string; /** * The `vippsConfirmationUrl` should be used to redirect the * user to the Vipps MobilePay landing page in a desktop flow (with `https://`), * or to the Vipps or MobilePay app in a mobile flow (with `vipps://`), where the * user can then approve the agreement. */ vippsConfirmationUrl?: string; /** * The Id of the initialCharge if given, otherwise `null`. * If an `orderId` is specified this is used as the `chargeId` otherwise it is auto generated. */ chargeId?: (string) | null; }; export type AgreementResponseV2 = { campaign?: campaignV2; currency?: Currency; /** * Uniquely identifies this agreement */ id: string; interval: Interval; /** * 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. */ intervalCount: number; /** * The price of the agreement. * * Amounts are specified in minor units. * NOK: 1 kr = 100 øre. */ price: number; /** * Product name (short) */ productName: string; /** * Product description (longer) */ productDescription: string; /** * Date and time when agreement was started, in ISO 8601 format. * This is when the agreement was activated. */ start?: (string) | null; /** * Date and time when agreement was stopped, in ISO 8601 format. */ stop?: (string) | null; status?: AgreementStatus; /** * 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. */ merchantAgreementUrl?: string; /** * User identifier (subject). Will be null if profile data was not requested. */ sub?: (string) | null; /** * The full path of the URL for the userinfo endpoint where the user data can be retrieved: * [`GET:/vipps-userinfo-api/userinfo/{sub}`](/api/userinfo#operation/getUserinfo). * This will be null if profile data was not requested. */ userinfoUrl?: (string) | null; variableAmount?: variableAmountResponseV2; }; export type AgreementResponseV3 = { campaign?: (campaignResponseV3) | null; pricing: pricingResponse; /** * Uniquely identifies this agreement */ id: string; interval: TimePeriodResponse; /** * Product name (short) */ productName: string; /** * Product description (longer) */ productDescription?: string; /** * Date when agreement was created, in ISO 8601 format. * This is when the agreement was initiated with the API. */ created: string; /** * Date and time when agreement was started, in ISO 8601 format. * This is when the agreement was activated. */ start?: (string) | null; /** * Date and time when agreement was stopped, in ISO 8601 format. */ stop?: (string) | null; status?: AgreementStatus; /** * 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. */ merchantAgreementUrl: string; /** * 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) */ merchantRedirectUrl: string; /** * User identifier (subject). Will be null if profile data was not requested. */ sub?: (string) | null; /** * The full path of the URL for the userinfo endpoint where the user data can be retrieved.: * [`GET:/vipps-userinfo-api/userinfo/{sub}`](/api/userinfo#operation/getUserinfo). * This will be null if profile data was not requested. */ userinfoUrl?: (string) | null; /** * An optional external ID for the agreement. * The `externalId` can be used by the merchant to map the `agreementId` * to an ID in a subscription system or similar. */ externalId?: string; countryCode: CountryCode; /** * UUID (RFC 4122) representation of ID */ uuid: string; /** * The `vippsConfirmationUrl` should be used to redirect the * user to the Vipps MobilePay landing page in a desktop flow (with `https://`), * or to the Vipps or MobilePay app in a mobile flow (with `vipps://`), where the * user can then approve the agreement. */ vippsConfirmationUrl?: string; }; export type PatchAgreementV2 = { /** * The suggested max amount that the customer should choose. * * Amounts are specified in minor units. * NOK: 1 kr = 100 øre. */ suggestedMaxAmount?: number; campaign?: campaignV2; /** * The price of the agreement. * * Price is specified in minor units. * NOK: 1 kr = 100 øre. */ price?: number; /** * Product name (short) */ productName?: string; /** * Product description (longer) */ productDescription?: string; /** * 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. */ merchantAgreementUrl?: string; /** * Status of the agreement. */ status?: "STOPPED"; }; /** * Status of the agreement. */ export type status = "STOPPED"; export type PatchAgreementV3 = { /** * Name of the product being subscribed to. */ productName?: string; /** * Product description (longer) */ productDescription?: string; /** * 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. */ merchantAgreementUrl?: string; /** * An optional external ID for the agreement. * The `externalId` can be used by the merchant to map the `agreementId` * to an ID in a subscription system or similar. */ externalId?: string; /** * Status of the agreement. */ status?: "STOPPED"; pricing?: PricingUpdateRequest; /** * The interval of the agreement. * * The interval is specified by the `type` and `period` properties. * When the type is `RECURRING`, then the property `period` is required. * When the type is `FLEXIBLE`, then the property `period` is not allowed. */ interval?: { type?: "RECURRING" | "FLEXIBLE"; period?: TimePeriod; }; }; export type type = "RECURRING" | "FLEXIBLE"; export type AgreementReference = { /** * 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. */ agreementId: string; }; export type variableAmountV2 = { /** * The suggested max amount that the customer should choose. * * Amounts are specified in minor units. * NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. */ suggestedMaxAmount: number; }; export type variableAmountResponseV2 = { /** * The suggested max amount that the customer should choose. * * Amounts are specified in minor units. * NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. */ suggestedMaxAmount?: number; /** * The max amount chosen by the customer. * * Amounts are specified in minor units. * NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. */ maxAmount?: number; }; export type campaignV2 = { /** * The price of the agreement in the discount period. * The lowering of the price will be displayed in-app. * Price is specified in minor units. * NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. */ campaignPrice: number; /** * The date and time the campaign ends. */ end: string; } | null; export type campaignResponseV2 = { /** * The price of the agreement in the discount period. The lowering of the price will be displayed in-app. * Price is specified in minor units. * NOK: 1 kr = 100 øre. */ campaignPrice?: number; /** * The date and time the campaign starts. Must be UTC. */ start?: string; /** * The date and time the campaign ends. * This is a required field when using `EVENT_CAMPAIGN`. * Must be UTC. */ end?: string; }; export type campaignV3 = priceCampaignV3 | periodCampaignV3 | eventCampaignV3; export type priceCampaignV3 = { /** * The type of campaign. This decides which properties are required */ type: "PRICE_CAMPAIGN"; /** * The price of the agreement in the discount period. The lowering of the price will be displayed in-app. * * Price is specified in minor units. * NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. */ price: number; /** * The date and time the campaign ends. * Needs to be UTC. */ end: string; } | null; /** * The type of campaign. This decides which properties are required */ export type type2 = "PRICE_CAMPAIGN"; export type periodCampaignV3 = { /** * The type of campaign. This decides which properties are required */ type: "PERIOD_CAMPAIGN"; /** * The price of the agreement in the discount period. The lowering of the price will be displayed in-app. * * Price is specified in minor units. * NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. */ price: number; period: TimePeriod; } | null; /** * The type of campaign. This decides which properties are required */ export type type3 = "PERIOD_CAMPAIGN"; export type eventCampaignV3 = { /** * The type of campaign. This decides which properties are required */ type: "EVENT_CAMPAIGN"; /** * The price of the agreement in the discount period. The lowering of the price will be displayed in-app. * * Price is specified in minor units. * NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. */ price: number; /** * The date and time the campaign ends. Must be UTC. */ eventDate: string; /** * A short text that describes the event */ eventText: string; } | null; /** * The type of campaign. This decides which properties are required */ export type type4 = "EVENT_CAMPAIGN"; export type campaignResponseV3 = priceCampaignResponseV3 | periodCampaignResponseV3 | eventCampaignResponseV3 | legacyCampaignResponseV3; export type priceCampaignResponseV3 = { /** * The type of campaign. This decides which properties are required */ type: "PRICE_CAMPAIGN" | "PERIOD_CAMPAIGN" | "EVENT_CAMPAIGN"; /** * The price of the agreement in the discount period. The lowering of the price will be displayed in-app. * * Price is specified in minor units. * NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. */ price: number; /** * The date and time the campaign ends. Must be UTC. */ end: string; /** * The text displayed in the Vipps or MobilePay app to explain the campaign to the user */ explanation?: string; }; /** * The type of campaign. This decides which properties are required */ export type type5 = "PRICE_CAMPAIGN" | "PERIOD_CAMPAIGN" | "EVENT_CAMPAIGN"; export type periodCampaignResponseV3 = { /** * The type of campaign. This decides which properties are required */ type: "PRICE_CAMPAIGN" | "PERIOD_CAMPAIGN" | "EVENT_CAMPAIGN"; /** * The price of the agreement in the discount period. The lowering of the price will be displayed in-app. * * Price is specified in minor units. * NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. */ price: number; /** * The date and time the campaign ends. * Needs to be UTC. */ end: string; period: TimePeriod; /** * The text displayed in the Vipps or MobilePay app to explain the campaign to the user */ explanation?: string; }; export type eventCampaignResponseV3 = { /** * The type of campaign. This decides which properties are required */ type: "PRICE_CAMPAIGN" | "PERIOD_CAMPAIGN" | "EVENT_CAMPAIGN"; /** * The price of the agreement in the discount period. The lowering of the price will be displayed in-app. * * Price is specified in minor units. * NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. */ price: number; /** * The date and time the campaign ends. Must be UTC. */ eventDate: string; /** * A short text that describes the event */ eventText: string; /** * The text displayed in the Vipps or MobilePay app to explain the campaign to the user */ explanation?: string; }; export type legacyCampaignResponseV3 = { /** * The type of campaign. This decides which properties are required */ type: "PRICE_CAMPAIGN" | "PERIOD_CAMPAIGN" | "EVENT_CAMPAIGN" | "LEGACY_CAMPAIGN"; /** * The price of the agreement in the discount period. The lowering of the price will be displayed in-app. * * Price is specified in minor units. * NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. */ price: number; /** * The date and time the campaign ends. * Needs to be UTC. */ end: string; /** * The text displayed in the Vipps or MobilePay app to explain the campaign to the user */ explanation?: string; }; /** * The type of campaign. This decides which properties are required */ export type type6 = "PRICE_CAMPAIGN" | "PERIOD_CAMPAIGN" | "EVENT_CAMPAIGN" | "LEGACY_CAMPAIGN"; export type pricingRequest = { /** * The type of pricing. This decides which properties are required. */ type?: "LEGACY" | "VARIABLE" | "FLEXIBLE"; currency: CurrencyV3; /** * The price of the agreement, required if type is LEGACY or not present. * * Amounts are specified in minor units. * NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. */ amount?: number; /** * The suggested max amount that the customer should choose, required if type is VARIABLE. * There are limits for each currency: * - NOK: 20 000 kr (2000000 øre) * - DKK: 300 000 kr (30000000 øre) * - EUR: 2 000 Euro (200000 cent) * * Amounts are specified in minor units. * NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. */ suggestedMaxAmount?: number; }; /** * The type of pricing. This decides which properties are required. */ export type type7 = "LEGACY" | "VARIABLE" | "FLEXIBLE"; export type pricingResponse = LegacyPricingResponse | VariableAmountPricingResponse; export type LegacyPricingResponse = { /** * The type of pricing. This decides which properties are present. */ type: "LegacyPricingResponse"; currency: CurrencyV3; /** * The price of the agreement, present if type is LEGACY. * * Amounts are specified in minor units. * NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. */ amount: number; }; export type VariableAmountPricingResponse = { /** * The type of pricing. This decides which properties are present. */ type: "VariableAmountPricingResponse"; currency: CurrencyV3; /** * The suggested max amount that the customer should choose, present if type is VARIABLE. * * Amounts are specified in minor units. * NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. */ suggestedMaxAmount: number; /** * The max amount chosen by the customer. * * Amounts are specified in minor units. * NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. */ maxAmount?: number; }; export type PricingUpdateRequest = { /** * The price of the agreement, can only be updated if agreement type is LEGACY * * Amounts are specified in minor units. * NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. */ amount?: number; /** * The suggested max amount that the customer should choose, required if type is VARIABLE. * There are limits for each currency: * - NOK: 20 000 kr (2000000 øre) * - DKK: 300 000 kr (30000000 øre) * - EUR: 2 000 Euro (200000 cent) * * Amounts are specified in minor units. * NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. */ suggestedMaxAmount?: number; }; /** * An initial charge for a new agreement. * The charge will be processed immediately when the user approves the agreement. */ export type InitialChargeV2 = { /** * The amount that must be paid or approved before starting the agreement. * * Amounts are specified in minor units. * NOK: 1 kr = 100 øre. */ amount: number; currency: Currency; /** * This field is visible to the end user in-app */ description: string; /** * The type of payment to be made. */ transactionType: "RESERVE_CAPTURE" | "DIRECT_CAPTURE"; /** * An optional, but recommended `orderId` for the charge. * If provided, this will be the `chargeId` for this charge. * See: https://developer.vippsmobilepay.com/docs/knowledge-base/orderid/ * If no `orderId` is specified, the `chargeId` will be automatically generated. */ orderId?: string; }; /** * The type of payment to be made. */ export type transactionType2 = "RESERVE_CAPTURE" | "DIRECT_CAPTURE"; /** * An initial charge for a new agreement. * The charge will be processed immediately when the user approves the agreement. */ export type InitialChargeV3 = { /** * The amount that must be paid or approved before starting the agreement. * * Amounts are specified in minor units. * NOK and DKK: 1 kr = 100 øre. EUR: 1 Euro = 100 cent. */ amount: number; /** * This field is visible to the end user in-app */ description: string; /** * The type of payment to be made. */ transactionType: "RESERVE_CAPTURE" | "DIRECT_CAPTURE"; /** * An optional, but recommended `orderId` for the charge. * If provided, this will be the `chargeId` for this charge. * See: https://developer.vippsmobilepay.com/docs/knowledge-base/orderid/ * If no `orderId` is specified, the `chargeId` will be automatically generated. */ orderId?: string; /** * An optional external ID for the charge * The `externalId` can be used by the merchant to map the `chargeId` * to an ID in a subscription system or similar. */ externalId?: string; }; export type CreateChargeV2 = { /** * Amount to be paid by the customer. * * Amounts are specified in minor units. * NOK: 1 kr = 100 øre. */ amount: number; currency: Currency; /** * This field is visible to the end user in-app */ description: string; /** * The date when the charge is due to be processed. * Must be in the format `YYYY-MM-DD` and ISO 8601. */ due: string; /** * The service will attempt to charge the customer for the number of days * specified in `retryDays` after the `due` date. * We recommend at least two days retry. */ retryDays: number; /** * An optional, but recommended `orderId` for the charge. * If provided, this will be the `chargeId` for this charge. * See: https://developer.vippsmobilepay.com/docs/knowledge-base/orderid/ * If no `orderId` is specified, the `chargeId` will be automatically generated. */ orderId?: string; }; export type CreateChargeV3 = { /** * 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. */ amount: number; transactionType: transactionType; type?: ChargeCreationTypeV3; /** * This field is visible to the end user in-app */ description: 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 `DIRECT_CAPTURE`, the charge is processed and charged on the `due` date. * If the charge is `RESERVE_CAPTURE`, the charge is `RESERVED` on `due` date. * * Must be in the format `YYYY-MM-DD` and ISO 8601. * * Required only for `RECURRING` charges */ due?: string; /** * The service will attempt to charge the customer for the number of days * specified in `retryDays` after the `due` date. * We recommend at least two days retry. * * Required only for `RECURRING` charges */ retryDays?: number; /** * An optional, but recommended `orderId` for the charge. * If provided, this will be the `chargeId` for this charge. * This is the unique identifier of the payment, from the payment is initiated and all the way to the settlement data. * See: https://developer.vippsmobilepay.com/docs/knowledge-base/orderid/ * If no `orderId` is specified, the `chargeId` will be automatically generated. */ orderId?: string; /** * An optional external ID for the charge, that takes the place of the `orderId` in settlement reports without overriding the default `chargeId` * The `externalId` can be used by the merchant to map the `chargeId` to an ID in a subscription system or similar. * Note that while `orderId` must be unique per merchant, `externalId` does not have this limitation, * so you need to avoid assigning the same `externalId` to multiple charges if you want to keep them separate in settlement reports. */ externalId?: string; }; export type CreateChargeAsyncV3 = { /** * 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 */ agreementId: string; /** * 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. */ amount: number; transactionType: transactionType; /** * This field is visible to the end user in-app */ description: 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 `DIRECT_CAPTURE`, the charge is processed and charged on the `due` date. * If the charge is `RESERVE_CAPTURE`, the charge is `RESERVED` on `due` date. * * Must be in the format `YYYY-MM-DD` and ISO 8601. */ due: string; /** * The service will attempt to charge the customer for the number of days * specified in `retryDays` after the `due` date. * We recommend at least two days retry. */ retryDays: number; /** * This will be the `chargeId` for this charge. * This is the unique identifier of the payment, from the payment is initiated and all the way to the settlement data. * See: https://developer.vippsmobilepay.com/docs/knowledge-base/orderid/ */ orderId: string; /** * An optional external ID for the charge, that takes the place of the `orderId` in settlement reports without overriding the default `chargeId` * The `externalId` can be used by the merchant to map the `chargeId` to an ID in a subscription system or similar. * Note that while `orderId` must be unique per merchant, `externalId` does not have this limitation, * so you need to avoid assigning the same `externalId` to multiple charges if you want to keep them separate in settlement reports. */ externalId?: string; }; export type AsyncChargeResponse = { invalidCharges: Array; validCharges: Array<(string)>; }; export type InvalidChargeResponse = { chargeBatchItemDto: ChargeBatchItemDto; errors: Array<(string)>; }; export type ChargeBatchItemDto = { due: string; retryDays: number; amount: number; description: string; transactionType: "DIRECT_CAPTURE" | "RESERVE_CAPTURE"; orderId: string; agreementId?: string; externalId?: string; }; export type ChargeReference = { /** * Unique identifier for this charge, up to 15 characters. */ chargeId?: string; }; export type ChargeResponseV2 = { /** * Amount to be paid by the customer. * * Amounts are specified in minor units. * NOK: 1 kr = 100 øre. */ amount: number; /** * The total amount which has been refunded, in case of status refund/partial refund. * * Amounts are specified in minor units. * NOK: 1 kr = 100 øre. */ amountRefunded: number; /** * Description of the charge. */ description: string; /** * The due date for this charge. */ due: string; /** * Identifier for this charge (for this customer's subscription). */ id: string; status: ChargeStatus; /** * Contains null until the status has reached CHARGED. */ transactionId: string; type: ChargeTypeV2; /** * Identifies the reason why the charged has been marked as `FAILED`: * * `user_action_required` - The user's card can not fulfil the payment. The user needs to take action in the app. * Examples: Card is blocked for ecommerce, insufficient funds, expired card. * * * `charge_amount_too_high` - The user's max amount is too low. The user needs to update their max amount in the Vipps or MobilePay app. * * * `non_technical_error` - Something went wrong with charging the user. * Examples: User has deleted their Vipps MobilePay Profile. * * * `technical_error` - Something went wrong in Recurring while performing the payment. * Examples: Failure in Recurring, failure in downstream services. */ failureReason?: "user_action_required" | "charge_amount_too_high" | "non_technical_error" | "technical_error"; /** * Description for the failure reason. */ failureDescription?: string; }; /** * Identifies the reason why the charged has been marked as `FAILED`: * * `user_action_required` - The user's card can not fulfil the payment. The user needs to take action in the app. * Examples: Card is blocked for ecommerce, insufficient funds, expired card. * * * `charge_amount_too_high` - The user's max amount is too low. The user needs to update their max amount in the Vipps or MobilePay app. * * * `non_technical_error` - Something went wrong with charging the user. * Examples: User has deleted their Vipps MobilePay Profile. * * * `technical_error` - Something went wrong in Recurring while performing the payment. * Examples: Failure in Recurring, failure in downstream services. */ export type failureReason = "user_action_required" | "charge_amount_too_high" | "non_technical_error" | "technical_error"; export type ChargeResponseV3 = { /** * 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. */ amount: number; currency: CurrencyV3; /** * Description of the charge */ description: string; /** * The due date for this charge */ due: string; /** * Identifier for this charge (for this customer's subscription). */ id: string; /** * Id of the agreement the charge belongs to */ agreementId: string; /** * An optional external ID for the charge * The `externalId` can be used by the merchant to map the `chargeId` * to an ID in a subscription system or similar. */ externalId: string; /** * An optional external ID for the agreement * The `externalId` can be used by the merchant to map the `agreementId` * to an ID in a subscription system or similar. */ externalAgreementId?: string; /** * The service will attempt to charge the customer for the number of days * specified in `retryDays` after the `due` date. * We recommend at least two days retry. */ retryDays: number; status: ChargeStatus; /** * Contains null until the status has reached CHARGED */ transactionId: string; type: ChargeTypeV3; transactionType: transactionType; /** * Identifies the reason why the charged has been marked as `FAILED`: * * `user_action_required` - The user's card can not fulfil the payment, user needs to take action in the Vipps or MobilePay app. * Examples: Card is blocked for ecommerce, insufficient funds, expired card. * * * `charge_amount_too_high` - The user's max amount is too low, user needs to update their max amount in the Vipps or MobilePay app. * * * `non_technical_error` - Something went wrong with charging the user. * Examples: User has deleted their Vipps MobilePay Profile. * * * `technical_error` - Something went wrong in Recurring while performing the payment. * Examples: Failure in Recurring, failure in downstream services. */ failureReason?: ("user_action_required" | "charge_amount_too_high" | "non_technical_error" | "technical_error") | null; /** * Description for the failure reason */ failureDescription?: string; summary: ChargeSummary; history: ChargeHistory; }; export type RefundRequest = { /** * 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. */ amount: number; /** * A textual description of the operation, which will be displayed in the user's app. */ description: string; }; export type CaptureRequestV3 = { /** * 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. */ amount: number; /** * Deprecated. Description in CreateChargeV3 is used instead. * @deprecated */ description?: string; }; /** * A period of time, defined by a unit (DAY, WEEK, ...) and a count (number of said units) */ export type TimePeriod = { /** * Unit of time */ unit: "YEAR" | "MONTH" | "WEEK" | "DAY"; /** * Number of units in the time period. Example: unit=week, count=2 to define two weeks */ count: number; }; /** * Unit of time */ export type unit = "YEAR" | "MONTH" | "WEEK" | "DAY"; /** * A period of time, defined by a unit (DAY, WEEK, ...) and a count (number of said units) */ export type TimePeriodResponse = { /** * Unit of time */ unit?: "YEAR" | "MONTH" | "WEEK" | "DAY"; /** * Number of units in the time period. Example: unit=week, count=2 to define two weeks */ count?: number; /** * Textual representation used in Vipps MobilePay to describe the time period */ text?: string; }; export type ForceAcceptAgreement = { customerPhoneNumber: string; }; export type ForceAcceptAgreementV3 = { phoneNumber: string; }; /** * An error from Microsoft Azure. We have limited control of these errors, * and can not give as detailed information as with the errors from our own code. * The most important property is the HTTP status code. */ export type ErrorFromAzure = { responseInfo: { responseCode: number; responseMessage: string; }; result: { /** * When possible: A description of what went wrong. */ message: string; }; }; /** * An error from Vipps MobilePay. * The most important property is the HTTP status code. * The response body contains more details of the error. */ export type ErrorV2 = { /** * Field that caused the error */ field?: string; /** * The error message */ message?: string; /** * The code for the specific error */ code?: string; /** * A unique ID for this error, useful for searching in logs */ contextId?: string; }; export type ErrorArray = Array; /** * The standard error object, based on RFC 7807. See https://developer.vippsmobilepay.com/docs/APIs/recurring-api/recurring-api-problems/ */ export type ErrorV3 = { /** * Path to type of error */ type?: string; /** * Short description of the error */ title?: string; /** * HTTP status returned with the problem */ status?: number; /** * Details about the error */ detail?: string; /** * The path of the request */ instance?: string; /** * An unique ID for the request */ contextId?: string; extraDetails?: Array; }; /** * extra details about the error */ export type ExtraDetails = { /** * Name of the field related to the error */ name?: string; /** * Details about the error */ reason?: string; }; /** * The agreement identifier (ID) */ export type ParameterAgreementId = string; /** * The charge identifier (ID) */ export type ParameterChargeId = string; /** * The subscription key for your sales unit. See [API keys](/docs/knowledge-base/api-keys/). Keep it secret. */ export type ParameterOcp_Apim_Subscription_Key = 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 * [`POST:/accesstoken/get`](/api/access-token#tag/Authorization-Service/operation/fetchAuthorizationTokenUsingPost) * endpoint. * It is valid for 1 hour in the test environment and 24 hours in the production environment. */ export type ParameterAuthorization = 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 '\\' */ export type ParameterIdempotency_Key = string; /** * 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. */ export type ParameterContinuation_Token = string; /** * 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. */ export type ParameterMerchant_Serial_Number = string; /** * Filter by the `status` of the agreement. */ export type ParameterAgreementStatusQuery = AgreementStatus; /** * Filter by createdAfter timestamp (in milliseconds) for paginating. */ export type ParameterCreatedAfterQuery = number; /** * Filter by status of the charge. */ export type ParameterChargeStatusQuery = ChargeStatus; /** * Filter by status of the charge. */ export type ParameterChargeStatusQueryV3 = ChargeStatus; /** * Page number for paginating (should be used in combination with pageSize). */ export type ParameterPageNumberQuery = number; /** * Page size for paginating (must be used in combination with pageNumber). */ export type ParameterPageSizeQuery = number; /** * The name of the ecommerce solution. One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ export type ParameterVipps_System_Name = string; /** * The version number of the ecommerce solution. * See [HTTP headers](/docs/knowledge-base/http-headers). */ export type ParameterVipps_System_Version = string; /** * The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ export type ParameterVipps_System_Plugin_Name = string; /** * The version number of the ecommerce plugin (if applicable). * See [HTTP headers](/docs/knowledge-base/http-headers). */ export type ParameterVipps_System_Plugin_Version = string; /** * The content type must be `application/json` */ export type ParameterContent_Type = string; export type ListAgreementsData = { headers: { /** * 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 * [`POST:/accesstoken/get`](/api/access-token#tag/Authorization-Service/operation/fetchAuthorizationTokenUsingPost) * endpoint. * It is valid for 1 hour in the test environment and 24 hours in the production environment. */ Authorization: string; /** * The content type must be `application/json` */ "Content-Type"?: string; /** * 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. */ "Merchant-Serial-Number"?: string; /** * The subscription key for your sales unit. See [API keys](/docs/knowledge-base/api-keys/). Keep it secret. */ "Ocp-Apim-Subscription-Key": string; /** * The name of the ecommerce solution. One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Name"?: string; /** * The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Name"?: string; /** * The version number of the ecommerce plugin (if applicable). * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Version"?: string; /** * The version number of the ecommerce solution. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Version"?: string; }; query?: { /** * Filter by createdAfter timestamp (in milliseconds) for paginating. */ createdAfter?: number; /** * Filter by the `status` of the agreement. */ status?: AgreementStatus; }; }; export type ListAgreementsResponse = Array; export type ListAgreementsError = ErrorArray | ErrorFromAzure; export type DraftAgreementData = { body: DraftAgreementV2; headers: { /** * 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 * [`POST:/accesstoken/get`](/api/access-token#tag/Authorization-Service/operation/fetchAuthorizationTokenUsingPost) * endpoint. * It is valid for 1 hour in the test environment and 24 hours in the production environment. */ Authorization: string; /** * The content type must be `application/json` */ "Content-Type"?: string; /** * 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. */ "Merchant-Serial-Number"?: string; /** * The subscription key for your sales unit. See [API keys](/docs/knowledge-base/api-keys/). Keep it secret. */ "Ocp-Apim-Subscription-Key": string; /** * The name of the ecommerce solution. One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Name"?: string; /** * The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Name"?: string; /** * The version number of the ecommerce plugin (if applicable). * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Version"?: string; /** * The version number of the ecommerce solution. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Version"?: string; }; }; export type DraftAgreementResponse = DraftAgreementResponseV2; export type DraftAgreementError = ErrorArray | ErrorFromAzure; export type FetchAgreementData = { headers: { /** * 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 * [`POST:/accesstoken/get`](/api/access-token#tag/Authorization-Service/operation/fetchAuthorizationTokenUsingPost) * endpoint. * It is valid for 1 hour in the test environment and 24 hours in the production environment. */ Authorization: string; /** * The content type must be `application/json` */ "Content-Type"?: string; /** * 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. */ "Merchant-Serial-Number"?: string; /** * The subscription key for your sales unit. See [API keys](/docs/knowledge-base/api-keys/). Keep it secret. */ "Ocp-Apim-Subscription-Key": string; /** * The name of the ecommerce solution. One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Name"?: string; /** * The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Name"?: string; /** * The version number of the ecommerce plugin (if applicable). * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Version"?: string; /** * The version number of the ecommerce solution. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Version"?: string; }; path: { /** * The agreement identifier (ID) */ agreementId: string; }; }; export type FetchAgreementResponse = AgreementResponseV2; export type FetchAgreementError = ErrorArray | ErrorFromAzure; export type UpdateAgreementPutData = { /** * agreement */ body: PatchAgreementV2; headers: { /** * 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 * [`POST:/accesstoken/get`](/api/access-token#tag/Authorization-Service/operation/fetchAuthorizationTokenUsingPost) * endpoint. * It is valid for 1 hour in the test environment and 24 hours in the production environment. */ Authorization: string; /** * The content type must be `application/json` */ "Content-Type"?: string; /** * 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. */ "Merchant-Serial-Number"?: string; /** * The subscription key for your sales unit. See [API keys](/docs/knowledge-base/api-keys/). Keep it secret. */ "Ocp-Apim-Subscription-Key": string; /** * The name of the ecommerce solution. One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Name"?: string; /** * The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Name"?: string; /** * The version number of the ecommerce plugin (if applicable). * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Version"?: string; /** * The version number of the ecommerce solution. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Version"?: string; }; path: { /** * The agreement identifier (ID) */ agreementId: string; }; }; export type UpdateAgreementPutResponse = AgreementReference; export type UpdateAgreementPutError = ErrorArray | ErrorFromAzure; export type UpdateAgreementPatchData = { /** * agreement */ body: PatchAgreementV2; headers: { /** * 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 * [`POST:/accesstoken/get`](/api/access-token#tag/Authorization-Service/operation/fetchAuthorizationTokenUsingPost) * endpoint. * It is valid for 1 hour in the test environment and 24 hours in the production environment. */ Authorization: string; /** * The content type must be `application/json` */ "Content-Type"?: string; /** * 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. */ "Merchant-Serial-Number"?: string; /** * The subscription key for your sales unit. See [API keys](/docs/knowledge-base/api-keys/). Keep it secret. */ "Ocp-Apim-Subscription-Key": string; /** * The name of the ecommerce solution. One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Name"?: string; /** * The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Name"?: string; /** * The version number of the ecommerce plugin (if applicable). * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Version"?: string; /** * The version number of the ecommerce solution. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Version"?: string; }; path: { /** * The agreement identifier (ID) */ agreementId: string; }; }; export type UpdateAgreementPatchResponse = AgreementReference; export type UpdateAgreementPatchError = ErrorArray | ErrorFromAzure; export type AcceptUsingPatchData = { body: ForceAcceptAgreement; headers: { /** * 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 * [`POST:/accesstoken/get`](/api/access-token#tag/Authorization-Service/operation/fetchAuthorizationTokenUsingPost) * endpoint. * It is valid for 1 hour in the test environment and 24 hours in the production environment. */ Authorization: string; /** * The content type must be `application/json` */ "Content-Type"?: string; /** * 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. */ "Merchant-Serial-Number"?: string; /** * The subscription key for your sales unit. See [API keys](/docs/knowledge-base/api-keys/). Keep it secret. */ "Ocp-Apim-Subscription-Key": string; /** * The name of the ecommerce solution. One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Name"?: string; /** * The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Name"?: string; /** * The version number of the ecommerce plugin (if applicable). * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Version"?: string; /** * The version number of the ecommerce solution. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Version"?: string; }; path: { /** * The agreement identifier (ID) */ agreementId: string; }; }; export type AcceptUsingPatchResponse = { [key: string]: unknown; }; export type AcceptUsingPatchError = ErrorArray | ErrorFromAzure; export type ListAgreementsV3Data = { headers: { /** * 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 * [`POST:/accesstoken/get`](/api/access-token#tag/Authorization-Service/operation/fetchAuthorizationTokenUsingPost) * endpoint. * It is valid for 1 hour in the test environment and 24 hours in the production environment. */ Authorization: string; /** * The content type must be `application/json` */ "Content-Type"?: string; /** * 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. */ "Merchant-Serial-Number"?: string; /** * The subscription key for your sales unit. See [API keys](/docs/knowledge-base/api-keys/). Keep it secret. */ "Ocp-Apim-Subscription-Key": string; /** * The name of the ecommerce solution. One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Name"?: string; /** * The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Name"?: string; /** * The version number of the ecommerce plugin (if applicable). * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Version"?: string; /** * The version number of the ecommerce solution. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Version"?: string; }; query?: { /** * Filter by createdAfter timestamp (in milliseconds) for paginating. */ createdAfter?: number; /** * Page number for paginating (should be used in combination with pageSize). */ pageNumber?: number; /** * Page size for paginating (must be used in combination with pageNumber). */ pageSize?: number; /** * Filter by the `status` of the agreement. */ status?: AgreementStatus; }; }; export type ListAgreementsV3Response = Array; export type ListAgreementsV3Error = unknown; export type DraftAgreementV3Data = { body: DraftAgreementV3; headers: { /** * 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 * [`POST:/accesstoken/get`](/api/access-token#tag/Authorization-Service/operation/fetchAuthorizationTokenUsingPost) * endpoint. * It is valid for 1 hour in the test environment and 24 hours in the production environment. */ Authorization: string; /** * The content type must be `application/json` */ "Content-Type"?: 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 '\\' */ "Idempotency-Key": string; /** * 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. */ "Merchant-Serial-Number"?: string; /** * The subscription key for your sales unit. See [API keys](/docs/knowledge-base/api-keys/). Keep it secret. */ "Ocp-Apim-Subscription-Key": string; /** * The name of the ecommerce solution. One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Name"?: string; /** * The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Name"?: string; /** * The version number of the ecommerce plugin (if applicable). * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Version"?: string; /** * The version number of the ecommerce solution. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Version"?: string; }; }; export type DraftAgreementV3Response = DraftAgreementResponseV3; export type DraftAgreementV3Error = ErrorV3; export type FetchAgreementV3Data = { headers: { /** * 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 * [`POST:/accesstoken/get`](/api/access-token#tag/Authorization-Service/operation/fetchAuthorizationTokenUsingPost) * endpoint. * It is valid for 1 hour in the test environment and 24 hours in the production environment. */ Authorization: string; /** * The content type must be `application/json` */ "Content-Type"?: string; /** * 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. */ "Merchant-Serial-Number"?: string; /** * The subscription key for your sales unit. See [API keys](/docs/knowledge-base/api-keys/). Keep it secret. */ "Ocp-Apim-Subscription-Key": string; /** * The name of the ecommerce solution. One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Name"?: string; /** * The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Name"?: string; /** * The version number of the ecommerce plugin (if applicable). * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Version"?: string; /** * The version number of the ecommerce solution. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Version"?: string; }; path: { /** * The agreement identifier (ID) */ agreementId: string; }; }; export type FetchAgreementV3Response = AgreementResponseV3; export type FetchAgreementV3Error = ErrorV3; export type UpdateAgreementPatchV3Data = { /** * agreement */ body: PatchAgreementV3; headers: { /** * 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 * [`POST:/accesstoken/get`](/api/access-token#tag/Authorization-Service/operation/fetchAuthorizationTokenUsingPost) * endpoint. * It is valid for 1 hour in the test environment and 24 hours in the production environment. */ Authorization: string; /** * The content type must be `application/json` */ "Content-Type"?: 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 '\\' */ "Idempotency-Key": string; /** * 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. */ "Merchant-Serial-Number"?: string; /** * The subscription key for your sales unit. See [API keys](/docs/knowledge-base/api-keys/). Keep it secret. */ "Ocp-Apim-Subscription-Key": string; /** * The name of the ecommerce solution. One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Name"?: string; /** * The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Name"?: string; /** * The version number of the ecommerce plugin (if applicable). * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Version"?: string; /** * The version number of the ecommerce solution. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Version"?: string; }; path: { /** * The agreement identifier (ID) */ agreementId: string; }; }; export type UpdateAgreementPatchV3Response = unknown | void; export type UpdateAgreementPatchV3Error = ErrorV3; export type AcceptUsingPatchv3Data = { body: ForceAcceptAgreementV3; headers: { /** * 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 * [`POST:/accesstoken/get`](/api/access-token#tag/Authorization-Service/operation/fetchAuthorizationTokenUsingPost) * endpoint. * It is valid for 1 hour in the test environment and 24 hours in the production environment. */ Authorization: string; /** * The content type must be `application/json` */ "Content-Type"?: 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 '\\' */ "Idempotency-Key": string; /** * 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. */ "Merchant-Serial-Number"?: string; /** * The subscription key for your sales unit. See [API keys](/docs/knowledge-base/api-keys/). Keep it secret. */ "Ocp-Apim-Subscription-Key": string; /** * The name of the ecommerce solution. One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Name"?: string; /** * The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Name"?: string; /** * The version number of the ecommerce plugin (if applicable). * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Version"?: string; /** * The version number of the ecommerce solution. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Version"?: string; }; path: { /** * The agreement identifier (ID) */ agreementId: string; }; }; export type AcceptUsingPatchv3Response = { [key: string]: unknown; }; export type AcceptUsingPatchv3Error = ErrorV3; export type ListChargesData = { headers: { /** * 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 * [`POST:/accesstoken/get`](/api/access-token#tag/Authorization-Service/operation/fetchAuthorizationTokenUsingPost) * endpoint. * It is valid for 1 hour in the test environment and 24 hours in the production environment. */ Authorization: string; /** * The content type must be `application/json` */ "Content-Type"?: string; /** * 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. */ "Merchant-Serial-Number"?: string; /** * The subscription key for your sales unit. See [API keys](/docs/knowledge-base/api-keys/). Keep it secret. */ "Ocp-Apim-Subscription-Key": string; /** * The name of the ecommerce solution. One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Name"?: string; /** * The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Name"?: string; /** * The version number of the ecommerce plugin (if applicable). * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Version"?: string; /** * The version number of the ecommerce solution. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Version"?: string; }; path: { /** * The agreement identifier (ID) */ agreementId: string; }; query?: { /** * Filter by status of the charge. */ chargeStatus?: ChargeStatus; }; }; export type ListChargesResponse = Array; export type ListChargesError = ErrorArray | ErrorFromAzure; export type CreateChargeData = { body: CreateChargeV2; headers: { /** * 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 * [`POST:/accesstoken/get`](/api/access-token#tag/Authorization-Service/operation/fetchAuthorizationTokenUsingPost) * endpoint. * It is valid for 1 hour in the test environment and 24 hours in the production environment. */ Authorization: string; /** * The content type must be `application/json` */ "Content-Type"?: 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 '\\' */ "Idempotency-Key": string; /** * 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. */ "Merchant-Serial-Number"?: string; /** * The subscription key for your sales unit. See [API keys](/docs/knowledge-base/api-keys/). Keep it secret. */ "Ocp-Apim-Subscription-Key": string; /** * The name of the ecommerce solution. One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Name"?: string; /** * The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Name"?: string; /** * The version number of the ecommerce plugin (if applicable). * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Version"?: string; /** * The version number of the ecommerce solution. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Version"?: string; }; path: { /** * The agreement identifier (ID) */ agreementId: string; }; }; export type CreateChargeResponse = ChargeReference; export type CreateChargeError = ErrorArray | ErrorFromAzure; export type FetchChargeData = { headers: { /** * 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 * [`POST:/accesstoken/get`](/api/access-token#tag/Authorization-Service/operation/fetchAuthorizationTokenUsingPost) * endpoint. * It is valid for 1 hour in the test environment and 24 hours in the production environment. */ Authorization: string; /** * The content type must be `application/json` */ "Content-Type"?: string; /** * 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. */ "Merchant-Serial-Number"?: string; /** * The subscription key for your sales unit. See [API keys](/docs/knowledge-base/api-keys/). Keep it secret. */ "Ocp-Apim-Subscription-Key": string; /** * The name of the ecommerce solution. One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Name"?: string; /** * The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Name"?: string; /** * The version number of the ecommerce plugin (if applicable). * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Version"?: string; /** * The version number of the ecommerce solution. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Version"?: string; }; path: { /** * The agreement identifier (ID) */ agreementId: string; /** * The charge identifier (ID) */ chargeId: string; }; }; export type FetchChargeResponse = ChargeResponseV2; export type FetchChargeError = ErrorArray | ErrorFromAzure; export type CancelChargeData = { headers: { /** * 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 * [`POST:/accesstoken/get`](/api/access-token#tag/Authorization-Service/operation/fetchAuthorizationTokenUsingPost) * endpoint. * It is valid for 1 hour in the test environment and 24 hours in the production environment. */ Authorization: string; /** * The content type must be `application/json` */ "Content-Type"?: string; /** * 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. */ "Merchant-Serial-Number"?: string; /** * The subscription key for your sales unit. See [API keys](/docs/knowledge-base/api-keys/). Keep it secret. */ "Ocp-Apim-Subscription-Key": string; /** * The name of the ecommerce solution. One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Name"?: string; /** * The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Name"?: string; /** * The version number of the ecommerce plugin (if applicable). * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Version"?: string; /** * The version number of the ecommerce solution. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Version"?: string; }; path: { /** * The agreement identifier (ID) */ agreementId: string; /** * The charge identifier (ID) */ chargeId: string; }; }; export type CancelChargeResponse = ChargeResponseV2; export type CancelChargeError = ErrorArray | ErrorFromAzure; export type CaptureChargeData = { headers: { /** * 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 * [`POST:/accesstoken/get`](/api/access-token#tag/Authorization-Service/operation/fetchAuthorizationTokenUsingPost) * endpoint. * It is valid for 1 hour in the test environment and 24 hours in the production environment. */ Authorization: string; /** * The content type must be `application/json` */ "Content-Type"?: 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 '\\' */ "Idempotency-Key": string; /** * 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. */ "Merchant-Serial-Number"?: string; /** * The subscription key for your sales unit. See [API keys](/docs/knowledge-base/api-keys/). Keep it secret. */ "Ocp-Apim-Subscription-Key": string; /** * The name of the ecommerce solution. One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Name"?: string; /** * The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Name"?: string; /** * The version number of the ecommerce plugin (if applicable). * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Version"?: string; /** * The version number of the ecommerce solution. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Version"?: string; }; path: { /** * The agreement identifier (ID) */ agreementId: string; /** * The charge identifier (ID) */ chargeId: string; }; }; export type CaptureChargeResponse = { [key: string]: unknown; }; export type CaptureChargeError = ErrorArray | ErrorFromAzure; export type RefundChargeData = { body: RefundRequest; headers: { /** * 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 * [`POST:/accesstoken/get`](/api/access-token#tag/Authorization-Service/operation/fetchAuthorizationTokenUsingPost) * endpoint. * It is valid for 1 hour in the test environment and 24 hours in the production environment. */ Authorization: string; /** * The content type must be `application/json` */ "Content-Type"?: 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 '\\' */ "Idempotency-Key": string; /** * 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. */ "Merchant-Serial-Number"?: string; /** * The subscription key for your sales unit. See [API keys](/docs/knowledge-base/api-keys/). Keep it secret. */ "Ocp-Apim-Subscription-Key": string; /** * The name of the ecommerce solution. One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Name"?: string; /** * The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Name"?: string; /** * The version number of the ecommerce plugin (if applicable). * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Version"?: string; /** * The version number of the ecommerce solution. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Version"?: string; }; path: { /** * The agreement identifier (ID) */ agreementId: string; /** * The charge identifier (ID) */ chargeId: string; }; }; export type RefundChargeResponse = { [key: string]: unknown; }; export type RefundChargeError = ErrorArray | ErrorFromAzure; export type ListChargesV3Data = { headers: { /** * 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 * [`POST:/accesstoken/get`](/api/access-token#tag/Authorization-Service/operation/fetchAuthorizationTokenUsingPost) * endpoint. * It is valid for 1 hour in the test environment and 24 hours in the production environment. */ Authorization: string; /** * The content type must be `application/json` */ "Content-Type"?: string; /** * 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. */ "Continuation-Token"?: string; /** * 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. */ "Merchant-Serial-Number"?: string; /** * The subscription key for your sales unit. See [API keys](/docs/knowledge-base/api-keys/). Keep it secret. */ "Ocp-Apim-Subscription-Key": string; /** * The name of the ecommerce solution. One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Name"?: string; /** * The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Name"?: string; /** * The version number of the ecommerce plugin (if applicable). * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Version"?: string; /** * The version number of the ecommerce solution. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Version"?: string; }; path: { /** * The agreement identifier (ID) */ agreementId: string; }; query?: { /** * Filter by status of the charge. */ status?: ChargeStatus; }; }; export type ListChargesV3Response = Array; export type ListChargesV3Error = ErrorV3; export type CreateChargeV3Data = { body: CreateChargeV3; headers: { /** * 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 * [`POST:/accesstoken/get`](/api/access-token#tag/Authorization-Service/operation/fetchAuthorizationTokenUsingPost) * endpoint. * It is valid for 1 hour in the test environment and 24 hours in the production environment. */ Authorization: string; /** * The content type must be `application/json` */ "Content-Type"?: 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 '\\' */ "Idempotency-Key": string; /** * 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. */ "Merchant-Serial-Number"?: string; /** * The subscription key for your sales unit. See [API keys](/docs/knowledge-base/api-keys/). Keep it secret. */ "Ocp-Apim-Subscription-Key": string; /** * The name of the ecommerce solution. One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Name"?: string; /** * The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Name"?: string; /** * The version number of the ecommerce plugin (if applicable). * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Version"?: string; /** * The version number of the ecommerce solution. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Version"?: string; }; path: { /** * The agreement identifier (ID) */ agreementId: string; }; }; export type CreateChargeV3Response = ChargeReference; export type CreateChargeV3Error = ErrorV3; export type CreateChargeAsyncV3Data = { body: Array; headers: { /** * 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 * [`POST:/accesstoken/get`](/api/access-token#tag/Authorization-Service/operation/fetchAuthorizationTokenUsingPost) * endpoint. * It is valid for 1 hour in the test environment and 24 hours in the production environment. */ Authorization: string; /** * The content type must be `application/json` */ "Content-Type"?: 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 '\\' */ "Idempotency-Key": string; /** * 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. */ "Merchant-Serial-Number"?: string; /** * The subscription key for your sales unit. See [API keys](/docs/knowledge-base/api-keys/). Keep it secret. */ "Ocp-Apim-Subscription-Key": string; /** * The name of the ecommerce solution. One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Name"?: string; /** * The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Name"?: string; /** * The version number of the ecommerce plugin (if applicable). * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Version"?: string; /** * The version number of the ecommerce solution. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Version"?: string; }; }; export type CreateChargeAsyncV3Response = AsyncChargeResponse; export type CreateChargeAsyncV3Error = unknown; export type FetchChargeV3Data = { headers: { /** * 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 * [`POST:/accesstoken/get`](/api/access-token#tag/Authorization-Service/operation/fetchAuthorizationTokenUsingPost) * endpoint. * It is valid for 1 hour in the test environment and 24 hours in the production environment. */ Authorization: string; /** * The content type must be `application/json` */ "Content-Type"?: string; /** * 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. */ "Merchant-Serial-Number"?: string; /** * The subscription key for your sales unit. See [API keys](/docs/knowledge-base/api-keys/). Keep it secret. */ "Ocp-Apim-Subscription-Key": string; /** * The name of the ecommerce solution. One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Name"?: string; /** * The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Name"?: string; /** * The version number of the ecommerce plugin (if applicable). * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Version"?: string; /** * The version number of the ecommerce solution. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Version"?: string; }; path: { /** * The agreement identifier (ID) */ agreementId: string; /** * The charge identifier (ID) */ chargeId: string; }; }; export type FetchChargeV3Response = ChargeResponseV3; export type FetchChargeV3Error = ErrorV3; export type CancelChargeV3Data = { headers: { /** * 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 * [`POST:/accesstoken/get`](/api/access-token#tag/Authorization-Service/operation/fetchAuthorizationTokenUsingPost) * endpoint. * It is valid for 1 hour in the test environment and 24 hours in the production environment. */ Authorization: string; /** * The content type must be `application/json` */ "Content-Type"?: 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 '\\' */ "Idempotency-Key": string; /** * 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. */ "Merchant-Serial-Number"?: string; /** * The subscription key for your sales unit. See [API keys](/docs/knowledge-base/api-keys/). Keep it secret. */ "Ocp-Apim-Subscription-Key": string; /** * The name of the ecommerce solution. One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Name"?: string; /** * The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Name"?: string; /** * The version number of the ecommerce plugin (if applicable). * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Version"?: string; /** * The version number of the ecommerce solution. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Version"?: string; }; path: { /** * The agreement identifier (ID) */ agreementId: string; /** * The charge identifier (ID) */ chargeId: string; }; }; export type CancelChargeV3Response = unknown | void; export type CancelChargeV3Error = ErrorV3; export type FetchChargeByIdV3Data = { headers: { /** * 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 * [`POST:/accesstoken/get`](/api/access-token#tag/Authorization-Service/operation/fetchAuthorizationTokenUsingPost) * endpoint. * It is valid for 1 hour in the test environment and 24 hours in the production environment. */ Authorization: string; /** * The content type must be `application/json` */ "Content-Type"?: string; /** * 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. */ "Merchant-Serial-Number"?: string; /** * The subscription key for your sales unit. See [API keys](/docs/knowledge-base/api-keys/). Keep it secret. */ "Ocp-Apim-Subscription-Key": string; /** * The name of the ecommerce solution. One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Name"?: string; /** * The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Name"?: string; /** * The version number of the ecommerce plugin (if applicable). * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Version"?: string; /** * The version number of the ecommerce solution. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Version"?: string; }; path: { /** * The charge identifier (ID) */ chargeId: string; }; }; export type FetchChargeByIdV3Response = ChargeResponseV3; export type FetchChargeByIdV3Error = ErrorV3; export type CaptureChargeV3Data = { body: CaptureRequestV3; headers: { /** * 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 * [`POST:/accesstoken/get`](/api/access-token#tag/Authorization-Service/operation/fetchAuthorizationTokenUsingPost) * endpoint. * It is valid for 1 hour in the test environment and 24 hours in the production environment. */ Authorization: string; /** * The content type must be `application/json` */ "Content-Type"?: 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 '\\' */ "Idempotency-Key": string; /** * 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. */ "Merchant-Serial-Number"?: string; /** * The subscription key for your sales unit. See [API keys](/docs/knowledge-base/api-keys/). Keep it secret. */ "Ocp-Apim-Subscription-Key": string; /** * The name of the ecommerce solution. One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Name"?: string; /** * The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Name"?: string; /** * The version number of the ecommerce plugin (if applicable). * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Version"?: string; /** * The version number of the ecommerce solution. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Version"?: string; }; path: { /** * The agreement identifier (ID) */ agreementId: string; /** * The charge identifier (ID) */ chargeId: string; }; }; export type CaptureChargeV3Response = unknown | void; export type CaptureChargeV3Error = ErrorV3; export type RefundChargeV3Data = { body: RefundRequest; headers: { /** * 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 * [`POST:/accesstoken/get`](/api/access-token#tag/Authorization-Service/operation/fetchAuthorizationTokenUsingPost) * endpoint. * It is valid for 1 hour in the test environment and 24 hours in the production environment. */ Authorization: string; /** * The content type must be `application/json` */ "Content-Type"?: 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 '\\' */ "Idempotency-Key": string; /** * 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. */ "Merchant-Serial-Number"?: string; /** * The subscription key for your sales unit. See [API keys](/docs/knowledge-base/api-keys/). Keep it secret. */ "Ocp-Apim-Subscription-Key": string; /** * The name of the ecommerce solution. One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Name"?: string; /** * The name of the ecommerce plugin (if applicable). One word in lowercase letters is good. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Name"?: string; /** * The version number of the ecommerce plugin (if applicable). * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Plugin-Version"?: string; /** * The version number of the ecommerce solution. * See [HTTP headers](/docs/knowledge-base/http-headers). */ "Vipps-System-Version"?: string; }; path: { /** * The agreement identifier (ID) */ agreementId: string; /** * The charge identifier (ID) */ chargeId: string; }; }; export type RefundChargeV3Response = void; export type RefundChargeV3Error = unknown | ErrorV3; export type $OpenApiTs = { "/recurring/v2/agreements": { get: { req: ListAgreementsData; res: { /** * OK' */ "200": Array; /** * Possible error responses. * Errors can be from both our own code (where we have full control) and * from Microsoft Azure (where we rely on standard functionality). */ default: ErrorArray | ErrorFromAzure; }; }; post: { req: DraftAgreementData; res: { /** * Created */ "201": DraftAgreementResponseV2; /** * Possible error responses. * Errors can be from both our own code (where we have full control) and * from Microsoft Azure (where we rely on standard functionality). */ default: ErrorArray | ErrorFromAzure; }; }; }; "/recurring/v2/agreements/{agreementId}": { get: { req: FetchAgreementData; res: { /** * OK */ "200": AgreementResponseV2; /** * Possible error responses. * Errors can be from both our own code (where we have full control) and * from Microsoft Azure (where we rely on standard functionality). */ default: ErrorArray | ErrorFromAzure; }; }; put: { req: UpdateAgreementPutData; res: { /** * OK */ "200": AgreementReference; /** * Possible error responses. * Errors can be from both our own code (where we have full control) and * from Microsoft Azure (where we rely on standard functionality). */ default: ErrorArray | ErrorFromAzure; }; }; patch: { req: UpdateAgreementPatchData; res: { /** * OK */ "200": AgreementReference; /** * Possible error responses. * Errors can be from both our own code (where we have full control) and * from Microsoft Azure (where we rely on standard functionality). */ default: ErrorArray | ErrorFromAzure; }; }; }; "/recurring/v2/agreements/{agreementId}/accept": { patch: { req: AcceptUsingPatchData; res: { /** * OK */ "200": { [key: string]: unknown; }; /** * Possible error responses. * Errors can be from both our own code (where we have full control) and * from Microsoft Azure (where we rely on standard functionality). */ default: ErrorArray | ErrorFromAzure; }; }; }; "/recurring/v3/agreements": { get: { req: ListAgreementsV3Data; res: { /** * OK */ "200": Array; }; }; post: { req: DraftAgreementV3Data; res: { /** * Created */ "201": DraftAgreementResponseV3; /** * Standard problem response. */ "400": ErrorV3; /** * Standard problem response. */ "403": ErrorV3; /** * Standard problem response. */ "409": ErrorV3; }; }; }; "/recurring/v3/agreements/{agreementId}": { get: { req: FetchAgreementV3Data; res: { /** * OK */ "200": AgreementResponseV3; /** * Standard problem response. */ "404": ErrorV3; }; }; patch: { req: UpdateAgreementPatchV3Data; res: { /** * Accepted. Request accepted, the action will likely succeed but has not yet been enacted. */ "202": unknown; /** * No content */ "204": void; /** * Standard problem response. */ "400": ErrorV3; /** * Standard problem response. */ "404": ErrorV3; }; }; }; "/recurring/v3/agreements/{agreementId}/accept": { patch: { req: AcceptUsingPatchv3Data; res: { /** * OK */ "204": { [key: string]: unknown; }; /** * Standard problem response. */ "400": ErrorV3; /** * Standard problem response. */ "404": ErrorV3; }; }; }; "/recurring/v2/agreements/{agreementId}/charges": { get: { req: ListChargesData; res: { /** * Success */ "200": Array; /** * Possible error responses. * Errors can be from both our own code (where we have full control) and * from Microsoft Azure (where we rely on standard functionality). */ default: ErrorArray | ErrorFromAzure; }; }; post: { req: CreateChargeData; res: { /** * OK */ "201": ChargeReference; /** * Possible error responses. * Errors can be from both our own code (where we have full control) and * from Microsoft Azure (where we rely on standard functionality). */ default: ErrorArray | ErrorFromAzure; }; }; }; "/recurring/v2/agreements/{agreementId}/charges/{chargeId}": { get: { req: FetchChargeData; res: { /** * Success */ "200": ChargeResponseV2; /** * Possible error responses. * Errors can be from both our own code (where we have full control) and * from Microsoft Azure (where we rely on standard functionality). */ default: ErrorArray | ErrorFromAzure; }; }; delete: { req: CancelChargeData; res: { /** * Success */ "200": ChargeResponseV2; /** * Possible error responses. * Errors can be from both our own code (where we have full control) and * from Microsoft Azure (where we rely on standard functionality). */ default: ErrorArray | ErrorFromAzure; }; }; }; "/recurring/v2/agreements/{agreementId}/charges/{chargeId}/capture": { post: { req: CaptureChargeData; res: { /** * Success */ "200": { [key: string]: unknown; }; /** * Possible error responses. * Errors can be from both our own code (where we have full control) and * from Microsoft Azure (where we rely on standard functionality). */ default: ErrorArray | ErrorFromAzure; }; }; }; "/recurring/v2/agreements/{agreementId}/charges/{chargeId}/refund": { post: { req: RefundChargeData; res: { /** * Success */ "200": { [key: string]: unknown; }; /** * Possible error responses. * Errors can be from both our own code (where we have full control) and * from Microsoft Azure (where we rely on standard functionality). */ default: ErrorArray | ErrorFromAzure; }; }; }; "/recurring/v3/agreements/{agreementId}/charges": { get: { req: ListChargesV3Data; res: { /** * Success */ "200": Array; /** * Standard problem response. */ "404": ErrorV3; }; }; post: { req: CreateChargeV3Data; res: { /** * Created */ "201": ChargeReference; /** * Standard problem response. */ "400": ErrorV3; /** * Standard problem response. */ "404": ErrorV3; /** * Standard problem response. */ "409": ErrorV3; }; }; }; "/recurring/v3/agreements/charges": { post: { req: CreateChargeAsyncV3Data; res: { /** * None, some or all charges passed API level validation. */ "202": AsyncChargeResponse; }; }; }; "/recurring/v3/agreements/{agreementId}/charges/{chargeId}": { get: { req: FetchChargeV3Data; res: { /** * Success */ "200": ChargeResponseV3; /** * Standard problem response. */ "404": ErrorV3; }; }; delete: { req: CancelChargeV3Data; res: { /** * Accepted. Request accepted, the action will likely succeed but has not yet been enacted. */ "202": unknown; /** * No content */ "204": void; /** * Standard problem response. */ "400": ErrorV3; /** * Standard problem response. */ "404": ErrorV3; /** * Standard problem response. */ "409": ErrorV3; }; }; }; "/recurring/v3/charges/{chargeId}": { get: { req: FetchChargeByIdV3Data; res: { /** * Success */ "200": ChargeResponseV3; /** * Standard problem response. */ "404": ErrorV3; }; }; }; "/recurring/v3/agreements/{agreementId}/charges/{chargeId}/capture": { post: { req: CaptureChargeV3Data; res: { /** * Accepted. Request accepted, the action will likely succeed but has not yet been enacted. */ "202": unknown; /** * No content */ "204": void; /** * Standard problem response. */ "400": ErrorV3; /** * Standard problem response. */ "404": ErrorV3; /** * Standard problem response. */ "409": ErrorV3; }; }; }; "/recurring/v3/agreements/{agreementId}/charges/{chargeId}/refund": { post: { req: RefundChargeV3Data; res: { /** * No content */ "204": void; /** * The standard error object, based on RFC 7807. See https://developer.vippsmobilepay.com/docs/APIs/recurring-api/recurring-api-problems/ */ "400": unknown; /** * Standard problem response. */ "404": ErrorV3; /** * Standard problem response. */ "409": ErrorV3; }; }; }; }; //# sourceMappingURL=types.gen.d.ts.map