API Reference

Base URL's:

Test - https://test-pay-core.linkmobility.com/api/

Prod - https://pay-core.linkmobility.com/api/

Character set:

All requests and responses will use character set UTF-8

Formats:

The response from requests will by default be formatted as JSON. If you prefer to use XML, you can append the following to the URI: ?$format=xml 

Version information:

The API is currently in version 2.0 and all request url's must be appended with the query parameter api-version=2.0.



Pre-Transactions


Use pre-transactions to pre-register a transaction with an option to choose payment selections by the end user. Used when you want to request a payment from a customer. Creating a Pre-Transaction typically sends an SMS Notification to the user with a link to a mobile landingpage where the user can chose payment type, for example Card or Phone payment. After the user has entered the payment information, like credit card number etc., a payment transaction is automatically performed that will deduct funds from the users preferred payment method, and the user is re-directed to a receipt page.

MethodeDescription

POST api/pre-transactions


 PaymentOperation
  • Reserve - Amount will only be reserved and not captured. Capture later with a separate request. For physical products that should be charged when shipped.
  • Capture - Amount will be captured and drawn from account directly. For digital products and claims.

 HTTP Error codes


201Created. A new PreTransaction has been successfully created. Use the HTTP Header Location: to see the location of the newly created resource
400Bad Request. A validation error. See the returned message for more detailed information about the error.
401An authentication error. Could be something wrong with the HMAC header.
409Conflicts. For example duplicate ReferenceId.

 Response information

Returns the resulting URL of the newly created resource in the HTTP "Location:" header.

Example response:

HTTP/1.1 201 Created
Content-Length: 0
Location: https://pay-core.linkmobility.com/api/pre-transactions/1/3f27299f-f3a7-4466-a192-4883b3525246
Creates a new PreTransaction. 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}}'.

GET api/pre-transactions/{partnerId}/{preTransactionId}

 Property details


NameDescription
SmsNotificationDelivered

This can in theory take up to 3 days if the phone is turned off or is in an area without reception. However, 98% of all delivery reports are received within a minute.

Get a PreTransaction by PartnerId and TransactionId.

GET api/pre-transactions?partnerId={partnerId}&correlationId={correlationId}

Get PreTransactions by CorrelationId (Supports OData 4.0).

PUT api/pre-transactions/{partnerId}/{preTransactionId}/credit?api-version=2.0

Credit pre-transaction, if money is captured it will be refunded.

PUT api/pre-transactions/{partnerId}/{preTransactionId}/capture?api-version=2.0

Capture previously authorized pre-transaction, for example if PaymentOperation="Reserve" was used (will fail if no auhtorized transaction exists).

Click here to read more about Pre-Transactions


Transactions


Transactions are the actual payment transactions that have been set up and are ready to be processed.

MethodDescription

GET api/transactions?partnerId={partnerId}&referenceId={referenceId}

 Property details
NameDescription
Status

Examples: "Capture: OK" indicating successful Card payment, or 1001 for successful SMS billing.

StatusDescription

Examples: "Cancelled by customer", "Refused by issuer", "Authentication failed (merchant id)"

Get a transaction by PartnerId and ReferenceId

GET api/transactions/{partnerId}/{transactionId}

 Property details
NameDescription
Status

Examples: "Capture: OK" indicating successful Card payment, or 1001 for successful SMS billing.

StatusDescription

Examples: "Cancelled by customer", "Refused by issuer", "Authentication failed (merchant id)"

Get a transaction by PartnerId and TransactionId

POST api/transactions

 Property details

http://pay-core.linkmobility.com/Help/Api/POST-api-transactions

NameDescription
PaymentProvider

Possible payment providers: "nets", "netsVipps", "dibs", "mcash", "sweGiro".

Example: "paymentProvider": "nets"

 Response information

Use the 'Location:' HTP header to learn the resulting URL of the created resource.

 HTTP Error codes


CodeStatusDescription
201CreatedA new Transaction has been successfully created. The location of the created resource is in response Location: HTTP header
204No ContentIf request body is omitted
400Bad RequestThe request was invalid or cannot be otherwise served. An accompanying error message will explain further.
401Hmac timestamp clock-drift too high
The timestamp of your request differs from the time on the API-server by more than 10 minutes.
401Invalid HMACSomething is wrong with the Authorization: hmac header. Please see Authentication for more information.
403ForbiddenThe request is understood, but it has been refused or access is not allowed. An accompanying error message will explain why
409ConflictReference id <referenceId> already exists
500Internal Server ErrorSomething is broken. Please inform LINK Mobility so the developer team can investigate further.

Creates a new transaction to deduct funds by the chosen PaymentType.

PUT api/transactions/{partnerId}/{transactionId}/capture?api-version=2.0

Capture authorized transaction, if transaction is not authorized it will fail.

PUT api/transactions/{partnerId}/{transactionId}/refund?api-version=2.0

Refund transaction, if money is captured it will be refunded. Amount can be specified in body for a partial refund.

PUT api/transactions/{partnerId}/{transactionId}/cancel?api-version=2.0

Cancel transaction, will fail if money is captured.

Click here to read more about Transactions


Campaigns


Campaigns are default settings which can be used with pre-transactions for reuse and better ease-of-use.

MethodDescription
Gets all campaigns (Supports OData 4.0).

POST api/campaigns

 Response information

Use the 'Location:' HTP header to learn the resulting URL of the created resource.

Create a new Campaign
Get a specific Campaign by Id
Update a Campaign

Click here to read more about Campaigns


Imports


Use imports to batch-insert many PreTransaction in one operation.

MethodDescription

GET api/imports

Gets all imports (Supports OData 4.0).
Import pre-transactions from a MIME multipart file upload. Only one file is supported. Supported mime-types are 'text/csv', 'application/vnd.ms-excel' and 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'.
Checks a file for import and returns the result. Only one file is supported. Supported mime-types are 'text/csv', 'application/vnd.ms-excel' and 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'.
Gets import by partner id and correlation id.

Click here to read more about Imports