Skip to main content

V2 (Beta) (v2)

Download OpenAPI specification:Download

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

Checkout

Safepay API (Beta - API specification is not final

Safepay API (Beta - API specification is not final, changes may be introduced)

Authorizations:
Admin ApiKey
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Request Body schema: application/json
required
amount
required
number <double>
title
string or null
description
string or null
imageUrls
Array of strings or null
payeeId
string or null

Safepay Account Id for payee

payerId
string or null

Safepay Account Id for payer

payeeReferenceId
string or null
payerReferenceId
string or null
payeePhoneNumber
string or null
payerPhoneNumber
string or null
Array of objects or null (CheckoutBase.Request.RequestSplitPayout)
payerFixedFee
number or null <double>
payeeFixedFee
number or null <double>
referenceId
string or null
uniquenessKey
string or null
expectedCompletion
string or null <date-time>
object (Auto.Request.RequestAutoInformation)

Responses

Request samples

Content type
application/json
{
  • "amount": 0.1,
  • "title": "string",
  • "description": "string",
  • "imageUrls": [
    ],
  • "payeeId": "string",
  • "payerId": "string",
  • "payeeReferenceId": "string",
  • "payerReferenceId": "string",
  • "payeePhoneNumber": "string",
  • "payerPhoneNumber": "string",
  • "splitPayouts": [
    ],
  • "payerFixedFee": 0.1,
  • "payeeFixedFee": 0.1,
  • "referenceId": "string",
  • "uniquenessKey": "string",
  • "expectedCompletion": "2019-08-24T14:15:22Z",
  • "autoInformation": {
    }
}

Response samples

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

Safepay API (Beta - API specification is not final

Safepay API (Beta - API specification is not final, changes may be introduced)

Authorizations:
Admin ApiKey
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Request Body schema: application/json
required
amount
required
number <double>
description
string or null
imageUrls
Array of strings or null
payeeReferenceId
string or null
payerReferenceId
string or null
payeePhoneNumber
string or null
payerPhoneNumber
string or null
Array of objects or null (CheckoutBase.Request.RequestSplitPayout)
payerFixedFee
number or null <double>
payeeFixedFee
number or null <double>
referenceId
string or null
uniquenessKey
string or null
expectedCompletion
string or null <date-time>
payeeId
required
string or null
payerId
required
string or null
title
required
string or null

Responses

Request samples

Content type
application/json
{
  • "amount": 0.1,
  • "description": "string",
  • "imageUrls": [
    ],
  • "payeeReferenceId": "string",
  • "payerReferenceId": "string",
  • "payeePhoneNumber": "string",
  • "payerPhoneNumber": "string",
  • "splitPayouts": [
    ],
  • "payerFixedFee": 0.1,
  • "payeeFixedFee": 0.1,
  • "referenceId": "string",
  • "uniquenessKey": "string",
  • "expectedCompletion": "2019-08-24T14:15:22Z",
  • "payeeId": "string",
  • "payerId": "string",
  • "title": "string"
}

Response samples

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

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.

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:
Admin ApiKey
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

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

Responses

Request samples

Content type
application/json
{
  • "referenceId": "string",
  • "bankAccountOnboarding": true,
  • "returnUrl": "string"
}

Response samples

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

Get connect

Get connect.

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

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

Authorizations:
Admin ApiKey
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": "string",
  • "safepayAccountId": "string",
  • "connections": [
    ]
}

Delete a connection for a user

Deletes the connection for the user to tenant

Authorizations:
Admin ApiKey
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:
Admin ApiKey
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

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

Responses

Response samples

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

List documents

List documents

Authorizations:
Admin ApiKey
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:
Admin ApiKey
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": "string",
  • "signed": "2019-08-24T14:15:22Z",
  • "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:
Admin ApiKey
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 or null
title
string or null
referenceId
string or null
returnUrl
string or null

Responses

Request samples

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

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:
Admin ApiKey
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:
Admin ApiKey
path Parameters
documentId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Responses

Payments

Creates a payment for transaction

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

The user can be redirected to the Url to start a payment flow

Authorizations:
Admin ApiKey
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Request Body schema: application/json
required
safepayAccountId
required
string or null
transactionId
required
string or null
amount
number or null <double>
description
string or null
returnUrl
string or null

Responses

Request samples

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

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 til PSD2 and VippsMobilepay payment methods. If no payment method is supplied, the user will be presented with UI for payment selection.

The user can be redirected to the Url to start a payment flow

Authorizations:
Admin ApiKey
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
string or null

Available methods: psd2, bank, vippsmobilepay

bankId
string or null

Only for use with payment method: bank

bankAccountId
string or null

Only for use with payment method: psd2

returnUrl
string or null

Responses

Request samples

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

Response samples

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

Transactions

List transactions

List transactions

Authorizations:
Admin ApiKey
query Parameters
Skip
integer <int32>
Take
integer <int32>
Search
string
ReferenceId
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Responses

Response samples

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

Get transaction

Get transaction

Authorizations:
Admin ApiKey
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",
  • "connectUrl": "string",
  • "checkoutUrl": "string",
  • "paymentGuideUrl": "string",
  • "status": "string",
  • "referenceId": "string",
  • "amount": 0.1,
  • "fees": {
    },
  • "payee": {
    },
  • "payer": {
    },
  • "title": "string",
  • "payments": {
    },
  • "autoInformation": {
    },
  • "expectedCompletion": "2019-08-24T14:15:22Z"
}

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:
Admin ApiKey
path Parameters
transactionId
required
string
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Responses

Cancel a transaction by 'transactionId'

Cancel a transaction by 'transactionId'.

Succesful payments will be returned/refunded to Payer.

Authorizations:
Admin ApiKey
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 or null
reason
required
string or null

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 Success and payouts defined in transaction will be scheduled for payout.

Authorizations:
Admin ApiKey
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 or null

Responses

Request samples

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

Update transaction

Updates modifiable transaction properties

Authorizations:
Admin ApiKey
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
string or null <date-time>
retailAmount
number or null <double>

Responses

Request samples

Content type
application/json
{
  • "expectedCompletion": "2019-08-24T14:15:22Z",
  • "retailAmount": 0.1
}

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:
Admin ApiKey
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 <double>

Responses

Request samples

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

Response samples

Content type
application/json
"string"

Add debt information to a transaction

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

Maximum file size: 10 MB. Only PDF files are accepted.

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

Correlation ID used for logging.

Request Body schema:
documentation
required
string or null <binary>
amount
required
number <double>
fikCode
string or null
bankAccount
string or null
bankAccountText
string or null

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:
Admin ApiKey
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.

Three modes are supported (checked in order):

  • Enable=true: Auto-generate bill of sale from transaction data
  • Document: Upload a PDF file directly (max 10 MB)
  • Url: Provide URL to external PDF to download

Only available for Auto transactions.

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

Correlation ID used for logging.

Request Body schema:
enable
boolean

If true, auto-generate the bill of sale from transaction data. Takes precedence over Document and Url.

document
string or null <binary>

PDF file to upload. Used if Enable is false and no Document is provided.

url
string or null

URL to download the bill of sale from. Used if Enable is false and no Document is provided.

additionalTerms
string or null

Additional terms to include on the generated bill of sale.

amount
number or null <double>

Amount to show on the bill of sale. If not provided, uses the transaction amount.

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

Which parties must sign. Defaults to both Payer and Payee. Empty array means document is pre-signed.

Responses

Safepay API (Beta - API specification is not final

Safepay API (Beta - API specification is not final, changes may be introduced)

Authorizations:
Admin ApiKey
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 <double>
payerFixedFee
number or null <double>
payeeFixedFee
number or null <double>
Array of objects or null (CheckoutBase.Request.RequestSplitPayout)

Responses

Request samples

Content type
application/json
{
  • "amount": 0.1,
  • "payerFixedFee": 0.1,
  • "payeeFixedFee": 0.1,
  • "splitPayouts": [
    ]
}

Safepay API (Beta - API specification is not final

Safepay API (Beta - API specification is not final, changes may be introduced)

Authorizations:
Admin ApiKey
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
string or null
referenceId
string or null
phoneNumber
string or null

Responses

Request samples

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

Safepay API (Beta - API specification is not final

Safepay API (Beta - API specification is not final, changes may be introduced)

Authorizations:
Admin ApiKey
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
string or null
referenceId
string or null
phoneNumber
string or null

Responses

Request samples

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

Users

List users

List users

Authorizations:
Admin ApiKey
query Parameters
Skip
integer <int32>
Take
integer <int32>
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:
Admin ApiKey
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": "string",
  • "phoneNumber": "string",
  • "phoneNumberVerified": true,
  • "dateOfBirth": "2019-08-24",
  • "cpr": "string",
  • "cvr": "string",
  • "address": "string",
  • "type": "string"
}

List banks

List banks.

Lists the banks available for bank account onboarding

Authorizations:
Admin ApiKey
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:
Admin ApiKey
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:
Admin ApiKey
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 or null
returnUrl
required
string or null
psd2Type
string (Psd2Type)
Enum: "Private" "Business"

Responses

Request samples

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

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:
Admin ApiKey
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 /initialize to add the specific bank account.

Notice: Only the first bank account added will be marked as default.

Authorizations:
Admin ApiKey
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 or null
bankAccountId
required
string or null

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:
Admin ApiKey
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 or null
bankAccountId
required
string or null

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:
Admin ApiKey
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 or null
bankAccountId
required
string or null

Responses

Request samples

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

Webhooks

List webhook examples

List webhook examples

Examples of all possible webhooks including payloads.

Authorizations:
Admin ApiKey
header Parameters
X-Correlation-Id
string [ 20 .. 64 ] characters

Correlation ID used for logging.

Responses

Response samples

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