Payment

List payment methods

The user needs to be logged in to use this endpoint, click here to read more.

Payment API for get existing pay method, see possible pay method and changing pay method.

SecurityAuthorization_Code
Request
path Parameters
product
required
string <= 12 characters

product code

Responses
200

OK

Response Schema: application/json
Array of objects
400

Bad Request

429

Too Many Requests

500

Internal Server Error

get/v1/product/payment/{product}
Request samples
Response samples
application/json
{
  • "paymentMethodResponseItems": [
    ]
}

Pay invoice

The user needs to be logged in to use this endpoint, click here to read more.

Use the id from the response to complete the payment by redirecting the customer to loginServer/payment/invoice/pay?clientId=…&returnUrl=…&errorUrl=…&transactionId=12378954. The system will redirect the customer to the proper third-party system for the payment, and upon success will then redirect to the given returnUrl. If an system error occurs, the given errorUrl will be used instead.

In addition to return url will be returned the result of operation:

  • finished - if payment was registered correctly
  • cancelled - user cancelled the payment
  • failed - it was not possible to create a payment
  • unknown - unknown status of operation
  • initiated - creation of payment was initiated
  • error - never shall happen, instead shall go to errorUrl.
SecurityAuthorization_Code
Request
Request Body schema: application/json
invoiceNumber
required
string <= 10 characters

Specific invoice for payment.

productCode
required
string <= 12 characters

Specific product for payment.

companyCode
required
string <= 12 characters

Specific company for payment.

paymentMethod
required
string

Specific payment method type for payment. Following types may be used:

  • creditcardPayex: Payment card
  • swishPayex: Swish payex payment
  • vippsEcommerce: Vipps eCommerce payment
  • nexi: Nexi payment
Enum: "creditcardPayex" "swishPayex" "vippsEcommerce" "nexi"
Responses
200

OK

Response Schema: application/json
success
boolean

It informs if the payment was added.

  • true: The payment was added.
  • false: The payment was not added.
transactionId
integer

The transactionId

400

Bad Request

429

Too Many Requests

500

Internal Server Error

post/v1/api/payment/invoice
Request samples
application/json
{
  • "invoiceNumber": "7435367",
  • "productCode": "CO27409",
  • "companyCode": "68979834",
  • "paymentMethod": "creditcardPayex"
}
Response samples
application/json
{
  • "success": true,
  • "transactionId": 12378954
}

Change payment method

The user needs to be logged in to use this endpoint, click here to read more.

Use the id from the response to complete the change by redirecting the customer to /paymentChange?clientId=…&returnUrl=….&errorUrl=…..&paymentChangeId=12378954. The system will redirect the customer to the proper third-party system for the change, and upon success will then redirect to the given returnUrl. If an error occurs, the given errorUrl will be used instead.

In addition to return url will be returned the result of operation:

  • finished - if ticket was registered correctly.
  • cancelled - user cancelled the adding the ticket, ticket is not added.
  • failed - it was not possible to create a ticket, adding of ticket fails.
  • unknown - unknown status of operation.
  • initiated - creation of ticket was initiated.
  • error - never shall happen, instead shall go to errorUrl.
SecurityAuthorization_Code
Request
path Parameters
productCode
required
string [ 1 .. 12 ] characters
Request Body schema: application/json
paymentMethod
required
string

Specific pay method. Following methods may be used:

  • invoice: Common invoice
  • autoGiro: Automatic withdraw, in Norwegian "Avtalegiro"
  • recurringVippsPayment: Recurring Vipps payment
  • recurringPayExCardPayment: Recurring PayEx payment
  • recurringKlarnaPayment: Recurring Klarna payment
  • recurringNexiPayment: Recurring Klarna payment
Enum: "invoice" "autoGiro" "recurringVippsPayment" "recurringPayExCardPayment" "recurringKlarnaPayment" "recurringNexiPayment"
Responses
200

OK

Response Schema: application/json
paymentChangeId
integer
400

Bad Request

429

Too Many Requests

500

Internal Server Error

post/v1/product/payment/{productCode}
Request samples
application/json
{
  • "paymentMethod": "recurringPayExCardPayment"
}
Response samples
application/json
{
  • "paymentChangeId": 12378954
}