POST {Type}/pre-transactions?api-version=2.0

Creates a new pre-transaction. Use the 'Location' http header to learn the resulting url of the created resource. SmsNotificationText, SmsReceiptText, ReturnUrl, StatusCallbackUrl and SmsStatusCallbackUrl are template-based and can reference values from the pre-transaction by using this expression form: '{{propertyName}}'. Pre-transaction properties have precedence over custom property names. Pre-transaction payment selection page url can be included by using '{{paymentSelectionPageUrl}}'.

Request Information

URI Parameters

NameDescriptionTypeRequiredAdditional information
Type

string

None.

Body Parameters

Pre-transaction preTransactionRequest.

PreTransactionRequestV2
NameDescriptionTypeRequiredAdditional information
PartnerId

PartnerId. Provided to you by LINK Mobility.

integer

Required

Range: inclusive between 1 and 2147483647

ExpiryUtc

The UTC (Coordinated Universal Time) date and time that the Transaction will expire an no longer be accessible to the user.

date

None.

CorrelationId

Correlation id - can be anything the consumer of the API needs. Note: Not to be used for personal information.

string

String length: inclusive between 0 and 50

ViewTemplateName

View template id for custom html rendering - supplied by Link Mobility.

string

String length: inclusive between 0 and 50

ReturnUrl

Return url/landing page after transaction is completed.

string

Matching regular expression pattern: ^(?:(?:https?|ftp):\/\/)?(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]+-?)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]+-?)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$

String length: inclusive between 0 and 2000

StatusCallbackUrl

Transaction status callback url that will be called for each step of the transaction and provide information about the current status. Supports callback parameters with values from transactionResponse by using this expressions form '{{propertyName}}'.

string

Matching regular expression pattern: ^(?:(?:https?|ftp):\/\/)?(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]+-?)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]+-?)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$

String length: inclusive between 0 and 2000

SmsStatusCallbackUrl

Sms notification status callback that will be called when the SmsNotification message has been delivered to the user. Or if message delivery failed. For example because the phone is turned off or outside of cell reception.. Supports callback parameters with values from preTransactionResponse by using this expressions form '{{propertyName}}'.

string

Matching regular expression pattern: ^(?:(?:https?|ftp):\/\/)?(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]+-?)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]+-?)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$

String length: inclusive between 0 and 2000

ExpiredUrl

Expired url where the user will be redirected when accessing a expired invoice.

string

Matching regular expression pattern: ^(?:(?:https?|ftp):\/\/)?(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]+-?)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]+-?)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$

String length: inclusive between 0 and 2000

CancelUrl

Where the user will be redirected when a payment is cancelled.

string

Matching regular expression pattern: ^(?:(?:https?|ftp):\/\/)?(?:\S+(?::\S*)?@)?(?:(?!10(?:\.\d{1,3}){3})(?!127(?:\.\d{1,3}){3})(?!169\.254(?:\.\d{1,3}){2})(?!192\.168(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]+-?)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]+-?)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$

String length: inclusive between 0 and 2000

SkipLandingPage

Flag for skipping a landing page and register the transaction at paymen provider API directly It will be ignored (set to false) if more than one payment provider is provided in the array of PaymentProviders property should be used with Vipps and Swish payment providers for now

boolean

None.

ReferenceId

Client reference id (must be unique for per client transaction if used). Note: Not to be used for personal information.

string

String length: inclusive between 0 and 50

Ocr

Ocr(NETS TransactionReconRef). Note: Not to be used for personal information.

string

String length: inclusive between 0 and 32

Msisdn

Phone number used by phone payment and for sending sms notification (if SmsNotificationOriginator and SmsNotificationText is set).

string

String length: inclusive between 1 and 20

SmsNotificationOriginator

This is the name or number that will be displayed as the sender of the pretransaction SMS notification. Names can be up to 11 characters, Numbers can be longer, but have special requirements.

string

String length: inclusive between 2 and 20

SmsNotificationText

The text in the SMS notification message sent to the user. To include the link to the payment selection page in the text, set '{{paymentSelectionPageUrl}}'. You can also reference other fields from the Pre-Transaction by using this expression form: '{{propertyName}}'.

string

String length: inclusive between 0 and 918

SmsNotificationSendTimeUtc

Specifies (in UTC) what date and time you want the SMS notification to be sent. If not specified, the message will be sent at once (with a small delay).

date

None.

Description

A description of the Product or Transaction.

string

String length: inclusive between 0 and 500

Currency

Currency code (ISO-4217) in UPPER case. For example 'NOK' for Norwegian Kroner.

string

Required

String length: inclusive between 0 and 3

Amount

Amount to charge customer. With or without 2 decimals. Example: 1 or 1.00

decimal number

Required

Matching regular expression pattern: ^\d+(.\d{1,2})?$

Range: inclusive between 0 and 999999.99

PaymentProviders

Possible PaymentProviders that you support. The user will be able to choose from these on the payment landing page. Currently support payment by Nets, NetsVipps, NetsMobilePay, NetsPaytrail, Swish, Vipps, NetsEasy, Neonomics See each provider for settings.

Collection of string

Required

PaymentOperation

Last operation performed on the transaction when user performs payment. Possible values: - Reserve = Register transaction and reserve amount. - Capture = Register transaction and capture amount. If not provided default value will be Capture. When it is set to Reserve api/transactions{partnerId}/{transactionId}/capture should be called If the amount in the provided body is less than original,it will be used captured. For full capture it should be set to the same amount as the registered transaction.

string

Matching regular expression pattern: Reserve|Capture

CampaignId

Uses default settings if CampaginId is not set

integer

None.

Authentication

Optional authentication method to authenticate user before displaying mobile invoice

AuthenticationV2

None.

CustomProperties

Custom properties of your choice associated with the pre-transaction. These properties can be displayed on the payment landingpage.

Dictionary of string [key] and string [value]

None.

AccessedURLDateUtc

The UTC (Coordinated Universal Time) date and time that the payment page has first been accessed.

date

None.

EnableRecurring

Enables recurring and displays checkbox and ToS on payment selection page, all selected payment providers must support recurring payment.

boolean

None.

CustomAmountEnabled

Custom amounts enabled. User will be able to input an amount that will pay

boolean

None.

SubscriberId

CBR SubscriberId

string

None.

RecurringOptional

If recurring is optional. Recurring agreement will only be created if users selects a payment provider that supports it.

boolean

None.

RecurringId

Add a transactions to a already setup agreement

globally unique identifier

None.

SendSms

Specifies if sms with mobile invoice should be sent. Set to 'true' by default

boolean

None.

OrderNumber

string

String length: inclusive between 0 and 50

Language

Language on ISO 639-1 format. Available values are defind in

string

String length: inclusive between 0 and 20

Segment

Segment is used for analytics, aggregating statistics based on this segment-information. Ask LinkMobility for further details about usage for using mobile intelligence.

string

String length: inclusive between 0 and 50

CustomLandingPageUrl

This field is for adding an extra step in the payment flow. Specifically it adds an extra step before the PaymentSelection step. Note: This is not in any way related to CustomDomain.

string

String length: inclusive between 0 and 2000

MinAmount

This field is for adding a way for customer to pay custom amount. Note: If this is greater than zero means that customer will have a functionality to set the amount that he wants to pay story LP-2221.

decimal number

None.

CustomAmounts

This field is for adding a way for customer to choose from amounts. Note: If this has some values it means the customer will have a functionality to choose to pay from one of them. Story LP-2220.

Collection of integer

None.

SourceId

SourceId is to be ommitted when using the api. This is just for identifying the calling application.

integer

None.

Request Formats

application/json, text/json

Sample:
{
  "sourceId": 1,
  "partnerId": 1,
  "expiryUtc": "2024-11-21T21:33:31.8117662Z",
  "correlationId": "sample string 2",
  "viewTemplateName": "sample string 3",
  "returnUrl": "sample string 4",
  "statusCallbackUrl": "sample string 5",
  "smsStatusCallbackUrl": "sample string 6",
  "expiredUrl": "sample string 7",
  "cancelUrl": "sample string 8",
  "skipLandingPage": true,
  "referenceId": "sample string 10",
  "ocr": "sample string 11",
  "msisdn": "sample string 12",
  "smsNotificationOriginator": "sample string 13",
  "smsNotificationText": "sample string 14",
  "smsNotificationSendTimeUtc": "2024-11-21T21:33:31.8117662Z",
  "description": "sample string 15",
  "currency": "sample string 16",
  "amount": 17.0,
  "paymentProviders": [
    "sample string 1",
    "sample string 2"
  ],
  "paymentOperation": "sample string 18",
  "campaignId": 1,
  "authentication": {
    "authenticationMethods": [
      "sample string 1",
      "sample string 2"
    ],
    "socialSecurityNumber": "sample string 1"
  },
  "customProperties": {
    "sample string 1": "sample string 2",
    "sample string 3": "sample string 4"
  },
  "accessedURLDateUtc": "2024-11-21T21:33:31.8117662Z",
  "enableRecurring": true,
  "customAmountEnabled": true,
  "subscriberId": "sample string 21",
  "recurringOptional": true,
  "recurringId": "4793d53c-ff4f-4af5-9b4c-d94f7a4bdcc8",
  "sendSms": true,
  "orderNumber": "sample string 23",
  "language": "sample string 24",
  "segment": "sample string 25",
  "customLandingPageUrl": "sample string 26",
  "minAmount": 27.0,
  "customAmounts": [
    1,
    2
  ]
}

Response Information

Resource Description

None.