Skip to main content

Safepay API V2 (v2)

Download OpenAPI specification:Download

Safepay API - API spec. is not final, changes may be introduced

Connect

Connect flow

Connect flow.

Generates a ConnectUrl where the user can be validated and connected to Safepay.

Missing user information, such as phone number or KYC/KYB this will trigger addtional steps in the flow, based on 'Skip' properties.

After the flow the user will be redirected to the ReturnUrl if supplied, otherwise the flow will end on a exit page.

The user should be redirected to the ConnectUrl to start the flow.

Authorizations:
API Key
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Request Body schema: application/json
required
referenceId
null or string
bankAccountOnboarding
null or boolean

Obsolete - Use 'SkipBankAccount' instead

returnUrl
null or string
allowPrivate
null or boolean
allowBusiness
null or boolean
skipUI
null or boolean

Skips Safepay UI - if set to true, then all UI/UX must be handled by the caller. All other Skip properties is ignored

skipPhoneNumber
null or boolean
skipEmail
null or boolean
skipBankAccount
null or boolean
skipKYC
null or boolean
skipKYB
null or boolean

Responses

Request samples

Content type
application/json
{
  • "referenceId": null,
  • "bankAccountOnboarding": null,
  • "returnUrl": null,
  • "allowPrivate": null,
  • "allowBusiness": null,
  • "skipUI": null,
  • "skipPhoneNumber": null,
  • "skipEmail": null,
  • "skipBankAccount": null,
  • "skipKYC": null,
  • "skipKYB": null
}

Response samples

Content type
application/json
{
  • "connectUrl": "string"
}

Get connect

Gets information from the connect flow based on 'ReferenceId'.

This should be used to translate a 'ReferenceId' into a 'SafepayAccountId'.

Authorizations:
API Key
path Parameters
referenceId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Responses

Response samples

Content type
application/json
{
  • "id": null,
  • "safepayAccountId": "string",
  • "connections": [
    ]
}

Create a guest user connection

Creates a new guest user and a connection to Safepay.

NOTICE: This feature is not available for all customers.

Authorizations:
API Key
path Parameters
referenceId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Request Body schema: application/json
required
name
null or string
phoneNumber
null or string
email
null or string
cvr
null or string
null or CreateGuestUser.Request.RequestAddress (object)

Responses

Request samples

Content type
application/json
{
  • "name": null,
  • "phoneNumber": null,
  • "email": null,
  • "cvr": null,
  • "address": { }
}

Response samples

Content type
application/json
{
  • "safepayAccountId": "string"
}

Delete a connection for a user

Deletes the connection to Safepay.

NOTICE: If there is no connection to Safepay, then the user won't be able to part of a transaction.

This endpoint should not be used unless there is a very specifc purpose.

Authorizations:
API Key
path Parameters
referenceId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Responses

Documents

Create document for signing

Create document for signing

Authorizations:
API Key
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Request Body schema:
required
title
required
string
document
required
string <binary> (IFormFile)
transactionId
null or string

Responses

Response samples

Content type
application/json
{
  • "documentId": "string"
}

List documents

List documents

Authorizations:
API Key
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Responses

Response samples

Content type
application/json
{
  • "documents": [
    ]
}

Get document

Get document

Authorizations:
API Key
path Parameters
documentId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Responses

Response samples

Content type
application/json
{
  • "documentId": "string",
  • "title": null,
  • "signed": null,
  • "signers": [
    ]
}

Sign document

Sign document.

Generates a unique URL where the user can sign the document. If supplied the user will be redirect to ReturnUrl after signature flow.

Authorizations:
API Key
path Parameters
documentId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Request Body schema: application/json
required
safepayAccountId
required
string
title
null or string
referenceId
null or string
returnUrl
null or string
allowPrivate
null or boolean
allowBusiness
null or boolean

Responses

Request samples

Content type
application/json
{
  • "safepayAccountId": "string",
  • "title": null,
  • "referenceId": null,
  • "returnUrl": null,
  • "allowPrivate": null,
  • "allowBusiness": null
}

Response samples

Content type
application/json
{
  • "url": "string"
}

Download document

Download document.

Returns a URL where the document can be downloaded.

If the document is signed, the URL links to the signed document, otherwise it links to the original uploaded document.

Authorizations:
API Key
path Parameters
documentId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Responses

Response samples

Content type
application/json
{
  • "url": "string"
}

Delete document

Delete document.

Notice: This will also delete uploaded documents including signed versions.

Authorizations:
API Key
path Parameters
documentId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Responses

Users

List users

List users

Authorizations:
API Key
query Parameters
Skip
integer or string <int32> ^-?(?:0|[1-9]\d*)$
Take
integer or string <int32> ^-?(?:0|[1-9]\d*)$
Public
boolean
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Get user

Get user

Authorizations:
API Key
path Parameters
safepayAccountId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "safepayAccountId": "string",
  • "connections": [
    ],
  • "name": "string",
  • "kyc": {
    },
  • "email": null,
  • "phoneNumber": null,
  • "phoneNumberVerified": true,
  • "dateOfBirth": null,
  • "cpr": null,
  • "cvr": null,
  • "address": null,
  • "type": "string"
}

List banks

List banks.

Lists the banks available for bank account onboarding

Authorizations:
API Key
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Responses

Response samples

Content type
application/json
{
  • "banks": [
    ]
}

List bank accounts connected to user

List bank accounts connected to user

Authorizations:
API Key
path Parameters
safepayAccountId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ]
}

Initialize bank account onboarding

Initialize bank account onboarding.

This will generate a URL where the user will be validated and able to select bank accounts for the supplied BankId. If ReturnUrl is supplied, the user will be returned after bank account validation.

The user should be redirected to the returned URL.

Authorizations:
API Key
path Parameters
safepayAccountId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Request Body schema: application/json
required
bankId
required
string
returnUrl
required
string
null or ValueType<Psd2Type> (any)

Responses

Request samples

Content type
application/json
{
  • "bankId": "string",
  • "returnUrl": "string",
  • "psd2Type": { }
}

Response samples

Content type
application/json
{
  • "url": "string"
}

Results for bank account onboarding

Results for bank account onboarding.

This should be called this after the user has returned from bank account initialize. The result will include the bank accounts selected by the user.

Use the BankAccountId to add given bank account to the user via /add endpoint.

Notice: This is tempoary data, the results will only be available for a short time period.

Authorizations:
API Key
path Parameters
safepayAccountId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Responses

Response samples

Content type
application/json
{
  • "bankId": "string",
  • "bankName": "string",
  • "bankCentral": "string",
  • "bankAccounts": [
    ]
}

Add bank account

Add bank account.

Use the 'BankAccountId' from GET /users/{safepayAccountId}/bank-accounts/initialize to add the specific bank account.

Notice: First bank account added to Safepay Account will be marked as default.

Authorizations:
API Key
path Parameters
safepayAccountId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Request Body schema: application/json
required
bankId
required
string
bankAccountId
required
string

Responses

Request samples

Content type
application/json
{
  • "bankId": "string",
  • "bankAccountId": "string"
}

Set bank account as default

Set bank account as default.

Default bank account will be used for payout.

Authorizations:
API Key
path Parameters
safepayAccountId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Request Body schema: application/json
required
bankId
required
string
bankAccountId
required
string

Responses

Request samples

Content type
application/json
{
  • "bankId": "string",
  • "bankAccountId": "string"
}

Delete bank account

Delete bank account.

This will remove the bank account from the user.

Notice: There must be at least one bank account connected.

Authorizations:
API Key
path Parameters
safepayAccountId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Request Body schema: application/json
required
bankId
required
string
bankAccountId
required
string

Responses

Request samples

Content type
application/json
{
  • "bankId": "string",
  • "bankAccountId": "string"
}

Transactions

List transactions

Returns a paginated list of the authenticated tenant's transactions, ordered by creation date (newest first).

Use 'skip' and 'take' to page through results and 'search'/'referenceId' to filter. The 'count' field reports the total number of matches, ignoring pagination.

Authorizations:
API Key
query Parameters
Skip
integer or string <int32> ^-?(?:0|[1-9]\d*)$

Number of transactions to skip, used for pagination. Defaults to 0.

Take
integer or string <int32> ^-?(?:0|[1-9]\d*)$

Maximum number of transactions to return. Defaults to 20 and is capped at 100.

Search
string

Free-text search. Matches (case-insensitive, partial) against transaction id, reference id, title, description, payee/payer name, email and phone number, and vehicle details (registration, brand, model, VIN) for Auto transactions.

ReferenceId
string

Filter by the tenant-supplied reference id (case-insensitive, partial match).

header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "count": 0
}

Create transaction

Creates a 'Marketplace' transaction and initializes a new checkout flow.

At least one of 'payeeId' or 'payeeReferenceId' must be supplied to identify the payee. The 'amount' must cover the sum of the fees and any split payouts. Supply a 'uniquenessKey' to make creation idempotent.

Authorizations:
API Key
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Request Body schema: application/json
required
payerId
required
string

Safepay Account Id for the payer. Required for marketplace transactions.

title
required
string

Title of the transaction, shown to the parties during checkout. Required for marketplace transactions.

payeeExtraFee
null or number or string <double> ^-?(?:0|[1-9]\d*)(?:\.\d+)?$

Optional additional administration fee charged to the payee. Only applied for eligible tenants.

payerExtraFee
null or number or string <double> ^-?(?:0|[1-9]\d*)(?:\.\d+)?$

Optional additional administration fee charged to the payer. Only applied for eligible tenants.

amount
required
number or string <double> ^-?(?:0|[1-9]\d*)(?:\.\d+)?$

The amount of money the transaction should be based upon. The amount will be rounded to 2 decimals if more than two decimals are send.

currency
any (Currencies)
Enum: "DKK" "EUR"

The currency to use for the transaction and all related payments. If not specified the default is DKK.

Supported: DKK, EUR

description
null or string

Free-text description of the transaction.

imageUrls
Array of strings or null

URLs to images describing the item being traded.

payeeId
null or string

Safepay Account Id for payee

payeeReferenceId
null or string

Your payee reference. This is most likely your unique user id for the payee

payerReferenceId
null or string

Your payer reference. This is most likely your unique user id for the payer

payeePhoneNumber
null or string

Phone number of the payee. Used to invite the payee when no Safepay Account Id or reference is supplied.

payerPhoneNumber
null or string

Phone number of the payer. Used to invite the payer when no Safepay Account Id or reference is supplied.

Array of objects or null (CreateTransactionBase.Request.RequestSplitPayout)

Optional split payouts. Part of the transaction amount is paid out to other (business) Safepay Accounts when the transaction succeeds.

payerFixedFee
null or number or string <double> ^-?(?:0|[1-9]\d*)(?:\.\d+)?$

The fixed fee used to calculate the payees fee taken before payouts. This fee is the fixed fee and the agreed Safepay Nordic fixed fee will be taken from this value.

payeeFixedFee
null or number or string <double> ^-?(?:0|[1-9]\d*)(?:\.\d+)?$

The fixed fee used to calculate the payers fee taken before payouts. This fee is the fixed fee and the agreed Safepay Nordic fixed fee will be taken from this value.

referenceId
null or string

Your own reference for the transaction. Returned on the transaction and usable for filtering in 'List transactions'.

uniquenessKey
null or string

The unique idempotency key for this transaction. There will only be at most one successful created transaction for this key

expectedCompletion
null or string <date-time>

The date the transaction is expected to complete, if known. Must be in the future.

Responses

Request samples

Content type
application/json
{
  • "payerId": "string",
  • "title": "string",
  • "payeeExtraFee": null,
  • "payerExtraFee": null,
  • "amount": 0,
  • "currency": "DKK",
  • "description": null,
  • "imageUrls": null,
  • "payeeId": null,
  • "payeeReferenceId": null,
  • "payerReferenceId": null,
  • "payeePhoneNumber": null,
  • "payerPhoneNumber": null,
  • "splitPayouts": null,
  • "payerFixedFee": null,
  • "payeeFixedFee": null,
  • "referenceId": null,
  • "uniquenessKey": null,
  • "expectedCompletion": null
}

Response samples

Content type
application/json
{
  • "connectUrl": null,
  • "transactionId": "string",
  • "id": null,
  • "checkoutUrl": "string"
}

Create transaction for Auto

Creates an 'Auto' (vehicle) transaction and initializes a new checkout flow.

Supply vehicle details via 'autoInformation'. Enabling 'autoInformation.billOfSale' or 'autoInformation.debt' requires the corresponding module to be enabled for the tenant. The 'amount' must cover the sum of the fees and any split payouts. Supply a 'uniquenessKey' to make creation idempotent.

Authorizations:
API Key
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Request Body schema: application/json
required
object (CreateTransactionAuto.Request.RequestAutoInformation)

Specific information for "Auto" transactions

amount
required
number or string <double> ^-?(?:0|[1-9]\d*)(?:\.\d+)?$

The amount of money the transaction should be based upon. The amount will be rounded to 2 decimals if more than two decimals are send.

currency
any (Currencies)
Enum: "DKK" "EUR"

The currency to use for the transaction and all related payments. If not specified the default is DKK.

Supported: DKK, EUR

title
null or string

Title of the transaction, shown to the parties during checkout.

description
null or string

Free-text description of the transaction.

imageUrls
Array of strings or null

URLs to images describing the item being traded.

payeeId
null or string

Safepay Account Id for payee

payerId
null or string

Safepay Account Id for payer

payeeReferenceId
null or string

Your payee reference. This is most likely your unique user id for the payee

payerReferenceId
null or string

Your payer reference. This is most likely your unique user id for the payer

payeePhoneNumber
null or string

Phone number of the payee. Used to invite the payee when no Safepay Account Id or reference is supplied.

payerPhoneNumber
null or string

Phone number of the payer. Used to invite the payer when no Safepay Account Id or reference is supplied.

Array of objects or null (CreateTransactionBase.Request.RequestSplitPayout)

Optional split payouts. Part of the transaction amount is paid out to other (business) Safepay Accounts when the transaction succeeds.

payerFixedFee
null or number or string <double> ^-?(?:0|[1-9]\d*)(?:\.\d+)?$

The fixed fee used to calculate the payees fee taken before payouts. This fee is the fixed fee and the agreed Safepay Nordic fixed fee will be taken from this value.

payeeFixedFee
null or number or string <double> ^-?(?:0|[1-9]\d*)(?:\.\d+)?$

The fixed fee used to calculate the payers fee taken before payouts. This fee is the fixed fee and the agreed Safepay Nordic fixed fee will be taken from this value.

referenceId
null or string

Your own reference for the transaction. Returned on the transaction and usable for filtering in 'List transactions'.

uniquenessKey
null or string

The unique idempotency key for this transaction. There will only be at most one successful created transaction for this key

expectedCompletion
null or string <date-time>

The date the transaction is expected to complete, if known. Must be in the future.

Responses

Request samples

Content type
application/json
{
  • "autoInformation": {
    },
  • "amount": 0,
  • "currency": "DKK",
  • "title": null,
  • "description": null,
  • "imageUrls": null,
  • "payeeId": null,
  • "payerId": null,
  • "payeeReferenceId": null,
  • "payerReferenceId": null,
  • "payeePhoneNumber": null,
  • "payerPhoneNumber": null,
  • "splitPayouts": null,
  • "payerFixedFee": null,
  • "payeeFixedFee": null,
  • "referenceId": null,
  • "uniquenessKey": null,
  • "expectedCompletion": null
}

Response samples

Content type
application/json
{
  • "connectUrl": null,
  • "transactionId": "string",
  • "id": null,
  • "checkoutUrl": "string"
}

Get transaction

Returns the full details of a single transaction owned by the authenticated tenant, including parties, fees, payments and (for Auto transactions) vehicle, bill of sale and debt information.

Authorizations:
API Key
path Parameters
transactionId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Responses

Response samples

Content type
application/json
{
  • "transactionId": "string",
  • "checkoutUrl": "string",
  • "paymentGuideUrl": "string",
  • "status": "CREATED",
  • "referenceId": null,
  • "amount": null,
  • "currency": { },
  • "fees": {
    },
  • "payee": { },
  • "payer": { },
  • "title": null,
  • "payments": {
    },
  • "autoInformation": { },
  • "expectedCompletion": null
}

Delete a transaction by 'transactionId'

Delete a transaction by 'transactionId'.

This is only allowed for transactions without payments. Look at 'Cancel transaction' to cancel transaction with payments.

Authorizations:
API Key
path Parameters
transactionId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Responses

Cancel a transaction

Cancel a transaction on behalf of Safepay Account.

You must supply a reason for the cancel request.

Payments will be returned/refunded to Payer.

Succeeded transactions can't be cancelled.

Authorizations:
API Key
path Parameters
transactionId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Request Body schema: application/json
required
safepayAccountId
required
string

Safepay Account Id on whose behalf the transaction is cancelled. Must belong to the authenticated tenant.

reason
required
string

Reason for cancelling the transaction.

Responses

Request samples

Content type
application/json
{
  • "safepayAccountId": "string",
  • "reason": "string"
}

Succeed a transaction by 'transactionId'

Succeed a transaction by 'transactionId'.

The transaction will be marked as succeeded and payouts defined in transaction will be scheduled for payout.

Cancelled transactions can't be processed for payout.

Authorizations:
API Key
path Parameters
transactionId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Request Body schema: application/json
required
safepayAccountId
required
string

Safepay Account Id on whose behalf the transaction is succeeded. Must belong to the authenticated tenant.

Responses

Request samples

Content type
application/json
{
  • "safepayAccountId": "string"
}

Update transaction

Updates modifiable transaction properties: the expected completion date and (for Auto transactions) the vehicle retail amount.

Authorizations:
API Key
path Parameters
transactionId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Request Body schema: application/json
required
expectedCompletion
null or string <date-time>

New expected completion date for the transaction. Must be in the future. Set to null to clear it.

retailAmount
null or number or string <double> ^-?(?:0|[1-9]\d*)(?:\.\d+)?$

New retail/market value of the vehicle. Only applies to Auto transactions.

Responses

Request samples

Content type
application/json
{
  • "expectedCompletion": null,
  • "retailAmount": null
}

Response samples

Content type
application/json
"string"

Reimburse a payer for a transaction

Reimburses the payer of a transaction by the specified amount.

The payer will be identified from the transaction and reimbursed for the given amount.

Authorizations:
API Key
path Parameters
transactionId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Request Body schema: application/json
required
amount
required
number or string <double> ^-?(?:0|[1-9]\d*)(?:\.\d+)?$

The amount to reimburse the payer.

Responses

Request samples

Content type
application/json
{
  • "amount": 0
}

Response samples

Content type
application/json
"string"

Add debt information to a transaction

Adds debt information to a transaction including documentation, amount, FIK code, and bank account details.

Only available for Auto transactions. Maximum file size: 10 MB. Accepted file types: PDF, JPG, JPEG, PNG, GIF, BMP, WEBP.

Authorizations:
API Key
path Parameters
transactionId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Request Body schema:
required
documentation
required
string <binary> (IFormFile)

Documentation for debt information

Supported file types: PDF, JPG, JPEG, PNG, GIF, BMP, WEBP (max 10 MB)

amount
required
number or string <double> ^-?(?:0|[1-9]\d*)(?:\.\d+)?$

The debt amount to register for the transaction.

fikCode
null or string

FIK-number - +71 is the only supported type

bankAccount
null or string

14 digits BBAN or 18 digits IBAN (without dashes or whitespaces)

bankAccountText
null or string

Bank reference text that should be attached to the bank transfer

Responses

Download debt document

Returns a temporary URL to download the debt document associated with a transaction. The URL is valid for 5 minutes.

Authorizations:
API Key
path Parameters
transactionId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Responses

Response samples

Content type
application/json
{
  • "url": "string"
}

Add or update bill of sale for a transaction

Add or update the bill of sale for an auto transaction.

Two modes are supported (checked in order):

  • Document: Upload a PDF file directly (max 10 MB)
  • Auto-generate bill of sale from transaction data if 'Document' is null

Only available for Auto transactions.

Authorizations:
API Key
path Parameters
transactionId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Request Body schema:
required
enable
boolean

If true, Bill Of Sale will be enabled, if IFormFile? Request.Document is null a Bill Of Sale PDF will automatically be generated

null or IFormFile (string)
additionalTerms
null or string

Additional terms to be displayed on the generated Bill of Sale PDF

amount
null or number or string <double> ^-?(?:0|[1-9]\d*)(?:\.\d+)?$

Amount to show on the Bill of Sale. If not provided, uses the transaction amount.

requiredSigners
Array of any or null (AutoInformation.AutoBillOfSale.Signers)
Enum: "Payer" "Payee" "None"

Specifies which parties are required to sign the Bill of Sale document. Accepted values: 'Payee', 'Payer', 'None' Defaults to both Payee (seller) and Payer (buyer). If an empty array is supplied or the value 'None', the document will be marked as signed.

Responses

Change amount

Allows changes to the transaction amount.

The amount must be equal or higher than the sum of costs for payee and/or split-payouts.

Changes are not allowed after an payment has been authorized.

For Auto transactions: Changes to amount will generate a new bill of sale.

Authorizations:
API Key
path Parameters
transactionId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Request Body schema: application/json
required
amount
required
number or string <double> ^-?(?:0|[1-9]\d*)(?:\.\d+)?$

The new transaction amount. Must be equal to or higher than the sum of costs for the payee and/or split payouts.

payerFixedFee
null or number or string <double> ^-?(?:0|[1-9]\d*)(?:\.\d+)?$

The fixed fee used to calculate the payer's fee. Replaces the existing payer fixed fee.

payeeFixedFee
null or number or string <double> ^-?(?:0|[1-9]\d*)(?:\.\d+)?$

The fixed fee used to calculate the payee's fee. Replaces the existing payee fixed fee.

Array of objects or null (CreateTransactionBase.Request.RequestSplitPayout)

Replacement split payouts. When supplied, the transaction's existing split payouts are replaced with these.

Responses

Request samples

Content type
application/json
{
  • "amount": 0,
  • "payerFixedFee": null,
  • "payeeFixedFee": null,
  • "splitPayouts": null
}

Add payee

Add a Payee to the transaction. This is not allowed if a Payee is already added.

Authorizations:
API Key
path Parameters
transactionId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Request Body schema: application/json
required
safepayAccountId
null or string

Safepay Account Id of the payee to add. Takes precedence over 'referenceId'.

referenceId
null or string

Your reference id for the payee. Used to resolve the payee when 'safepayAccountId' is not supplied.

phoneNumber
null or string

Phone number used to invite the payee.

Responses

Request samples

Content type
application/json
{
  • "safepayAccountId": null,
  • "referenceId": null,
  • "phoneNumber": null
}

Add payer

Add a Payer to the transaction. This is not allowed if a Payer is already added.

Authorizations:
API Key
path Parameters
transactionId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Request Body schema: application/json
required
safepayAccountId
null or string

Safepay Account Id of the payer to add. Takes precedence over 'referenceId'.

referenceId
null or string

Your reference id for the payer. Used to resolve the payer when 'safepayAccountId' is not supplied.

phoneNumber
null or string

Phone number used to invite the payer.

Responses

Request samples

Content type
application/json
{
  • "safepayAccountId": null,
  • "referenceId": null,
  • "phoneNumber": null
}

Payments

Creates a payment for transaction

Creates a new payment and attaches it to a transaction by 'transactionId'

The user should be redirected to the PaymentUrl to start a payment flow

Authorizations:
API Key
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Request Body schema: application/json
required
safepayAccountId
required
string
transactionId
required
string
amount
null or number or string <double> ^-?(?:0|[1-9]\d*)(?:\.\d+)?$
description
null or string
returnUrl
null or string
skipUI
null or boolean

Responses

Request samples

Content type
application/json
{
  • "safepayAccountId": "string",
  • "transactionId": "string",
  • "amount": null,
  • "description": null,
  • "returnUrl": null,
  • "skipUI": null
}

Response samples

Content type
application/json
{
  • "paymentId": "string",
  • "paymentUrl": "string"
}

Initializes a payment link

Generates a new payment link for 'paymentId'

This endpoint can generate direct links to PSD2 and VippsMobilepay payment methods.

If no payment method is supplied, the user will be presented with UI for payment selection.

The user should be redirected to the PaymentUrl to start a payment flow

Authorizations:
API Key
path Parameters
paymentId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Request Body schema: application/json
required
paymentMethod
null or string

Available methods: psd2, bank, vippsmobilepay

bankId
null or string

Only for use with payment method: bank

bankAccountId
null or string

Only for use with payment method: psd2

returnUrl
null or string

Responses

Request samples

Content type
application/json
{
  • "paymentMethod": null,
  • "bankId": null,
  • "bankAccountId": null,
  • "returnUrl": null
}

Response samples

Content type
application/json
{
  • "paymentUrl": "string"
}

Webhooks

List webhook examples

List webhook examples

Examples of all possible webhooks including payloads.

Authorizations:
API Key
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Responses

Response samples

Content type
application/json
{
  • "user": [
    ],
  • "transaction": [
    ]
}