Safepay API V2 (v2)
Download OpenAPI specification:Download
Safepay API - API spec. is not final, changes may be introduced
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:
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Request Body schema: application/jsonrequired
| referenceId | null or string |
| bankAccountOnboarding | null or boolean |
| 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
- Payload
{- "referenceId": null,
- "bankAccountOnboarding": null,
- "returnUrl": null,
- "allowPrivate": null,
- "allowBusiness": null,
- "skipUI": null,
- "skipPhoneNumber": null,
- "skipEmail": null,
- "skipBankAccount": null,
- "skipKYC": null,
- "skipKYB": null
}Response samples
- 200
{- "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:
path Parameters
| referenceId required | string |
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Responses
Response samples
- 200
{- "id": null,
- "safepayAccountId": "string",
- "connections": [
- {
- "referenceId": "string",
- "connected": "2019-08-24T14:15:22Z"
}
]
}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:
path Parameters
| referenceId required | string |
query Parameters
| Name | string |
| PhoneNumber | string |
string | |
| Cvr | string |
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Responses
Response samples
- 200
{- "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:
path Parameters
| referenceId required | string |
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Responses
Create document for signing
Create document for signing
Authorizations:
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
- 200
{- "documentId": "string"
}Get document
Get document
Authorizations:
path Parameters
| documentId required | string |
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Responses
Response samples
- 200
{- "documentId": "string",
- "title": null,
- "signed": null,
- "signers": [
- {
- "safepayAccountId": "string",
- "referenceId": null,
- "name": null,
- "title": null,
- "signed": null
}
]
}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:
path Parameters
| documentId required | string |
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Request Body schema: application/jsonrequired
| 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
- Payload
{- "safepayAccountId": "string",
- "title": null,
- "referenceId": null,
- "returnUrl": null,
- "allowPrivate": null,
- "allowBusiness": null
}Response samples
- 200
{- "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:
path Parameters
| documentId required | string |
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Responses
Response samples
- 200
{- "url": "string"
}List users
List users
Authorizations:
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
- 200
{- "items": [
- {
- "safepayAccountId": "string",
- "name": "string",
- "phoneNumber": null,
- "phoneNumberVerified": true,
- "created": "2019-08-24T14:15:22Z",
- "type": "string"
}
]
}Get user
Get user
Authorizations:
path Parameters
| safepayAccountId required | string |
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Responses
Response samples
- 200
{- "id": "string",
- "safepayAccountId": "string",
- "connections": [
- {
- "referenceId": "string",
- "connected": "2019-08-24T14:15:22Z"
}
], - "name": "string",
- "kyc": {
- "level": null
}, - "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:
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Responses
Response samples
- 200
{- "banks": [
- {
- "bankId": "string",
- "name": "string",
- "bankCentral": "string"
}
]
}List bank accounts connected to user
List bank accounts connected to user
Authorizations:
path Parameters
| safepayAccountId required | string |
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Responses
Response samples
- 200
{- "items": [
- {
- "bank": "string",
- "bankId": "string",
- "bankAccountId": "string",
- "accountNumber": null,
- "bban": "string",
- "iban": "string",
- "accountName": "string",
- "isDefault": true
}
]
}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:
path Parameters
| safepayAccountId required | string |
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Request Body schema: application/jsonrequired
| bankId required | string |
| returnUrl required | string |
null or ValueType<Psd2Type> (any) |
Responses
Request samples
- Payload
{- "bankId": "string",
- "returnUrl": "string",
- "psd2Type": { }
}Response samples
- 200
{- "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:
path Parameters
| safepayAccountId required | string |
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Responses
Response samples
- 200
{- "bankId": "string",
- "bankName": "string",
- "bankCentral": "string",
- "bankAccounts": [
- {
- "bankAccountId": "string",
- "name": null,
- "ownerName": null,
- "bban": null,
- "iban": null,
- "currency": null
}
]
}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:
path Parameters
| safepayAccountId required | string |
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Request Body schema: application/jsonrequired
| bankId required | string |
| bankAccountId required | string |
Responses
Request samples
- Payload
{- "bankId": "string",
- "bankAccountId": "string"
}Set bank account as default
Set bank account as default.
Default bank account will be used for payout.
Authorizations:
path Parameters
| safepayAccountId required | string |
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Request Body schema: application/jsonrequired
| bankId required | string |
| bankAccountId required | string |
Responses
Request samples
- Payload
{- "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:
path Parameters
| safepayAccountId required | string |
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Request Body schema: application/jsonrequired
| bankId required | string |
| bankAccountId required | string |
Responses
Request samples
- Payload
{- "bankId": "string",
- "bankAccountId": "string"
}List transactions
List all transactions
Authorizations:
query Parameters
| Skip | integer or string <int32> ^-?(?:0|[1-9]\d*)$ |
| Take | integer or string <int32> ^-?(?:0|[1-9]\d*)$ |
| Search | string |
| ReferenceId | string |
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Responses
Response samples
- 200
{- "items": [
- {
- "transactionId": "string",
- "amount": 0,
- "currency": "DKK",
- "status": "string",
- "created": "2019-08-24T14:15:22Z",
- "referenceId": null,
- "payee": { },
- "payer": { },
- "title": null,
- "autoInformation": { },
- "payments": {
- "inbound": {
- "amount": 0
}
}, - "expectedCompletion": null
}
], - "count": 0
}Create transaction
Initialize a new checkout flow for 'Marketplace' transaction.
Authorizations:
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Request Body schema: application/jsonrequired
| payerId required | string |
| title required | string |
| payeeExtraFee | null or number or string <double> ^-?(?:0|[1-9]\d*)(?:\.\d+)?$ |
| payerExtraFee | null or number or string <double> ^-?(?:0|[1-9]\d*)(?:\.\d+)?$ |
| 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 |
| imageUrls | Array of strings or null |
| 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 |
| payerPhoneNumber | null or string |
Array of objects or null (CreateTransactionBase.Request.RequestSplitPayout) | |
| 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 |
| 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> |
Responses
Request samples
- Payload
{- "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
- 200
{- "connectUrl": null,
- "transactionId": "string",
- "id": null,
- "checkoutUrl": "string"
}Create transaction for Auto
Initialize a new checkout flow for a 'Auto' transaction.
Authorizations:
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Request Body schema: application/jsonrequired
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 |
| description | null or string |
| imageUrls | Array of strings or null |
| 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 |
| payerPhoneNumber | null or string |
Array of objects or null (CreateTransactionBase.Request.RequestSplitPayout) | |
| 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 |
| 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> |
Responses
Request samples
- Payload
{- "autoInformation": {
- "brand": null,
- "model": null,
- "year": null,
- "mileage": null,
- "registrationNumber": null,
- "vin": null,
- "retailAmount": null,
- "firstRegistration": null,
- "billOfSale": { },
- "debt": { }
}, - "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
- 200
{- "connectUrl": null,
- "transactionId": "string",
- "id": null,
- "checkoutUrl": "string"
}Get transaction
Get transaction details
Authorizations:
path Parameters
| transactionId required | string |
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Responses
Response samples
- 200
{- "transactionId": "string",
- "checkoutUrl": "string",
- "paymentGuideUrl": "string",
- "status": "string",
- "referenceId": null,
- "amount": null,
- "currency": { },
- "fees": {
- "payee": 0,
- "payer": 0,
- "tenant": 0,
- "safepay": 0
}, - "payee": { },
- "payer": { },
- "title": null,
- "payments": {
- "inbound": {
- "amount": 0,
- "payments": [
- {
- "paymentId": "string",
- "payer": {
- "safepayAccountId": null,
- "referenceId": null,
- "name": null,
- "phoneNumber": null
}, - "method": "string",
- "amount": {
- "value": 0,
- "currency": "string"
}, - "status": "string",
- "created": "2019-08-24T14:15:22Z",
- "authorized": null,
- "failed": null
}
]
}
}, - "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:
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:
path Parameters
| transactionId required | string |
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Request Body schema: application/jsonrequired
| safepayAccountId required | string |
| reason required | string |
Responses
Request samples
- Payload
{- "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:
path Parameters
| transactionId required | string |
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Request Body schema: application/jsonrequired
| safepayAccountId required | string |
Responses
Request samples
- Payload
{- "safepayAccountId": "string"
}Update transaction
Updates modifiable transaction properties
Authorizations:
path Parameters
| transactionId required | string |
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Request Body schema: application/jsonrequired
| expectedCompletion | null or string <date-time> |
| retailAmount | null or number or string <double> ^-?(?:0|[1-9]\d*)(?:\.\d+)?$ |
Responses
Request samples
- Payload
{- "expectedCompletion": null,
- "retailAmount": null
}Response samples
- 400
"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:
path Parameters
| transactionId required | string |
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Request Body schema: application/jsonrequired
| amount required | number or string <double> ^-?(?:0|[1-9]\d*)(?:\.\d+)?$ |
Responses
Request samples
- Payload
{- "amount": 0
}Response samples
- 400
"string"Add debt information to a transaction
Adds debt information to a transaction including documentation, amount, FIK code, and bank account details.
Maximum file size: 10 MB. Accepted file types: PDF, JPG, JPEG, PNG, GIF, BMP, WEBP.
Authorizations:
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+)?$ |
| fikCode | null or string FIK-number - +71 is the only supported type |
| bankAccount | null or string 14 digits BBAN number or 18 digits IBAN number (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:
path Parameters
| transactionId required | string |
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Responses
Response samples
- 200
{- "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:
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, auto-generate the bill of sale from transaction data. Takes precedence over Document and Url. |
null or IFormFile (string) | |
| url | null or string URL to download the bill of sale from. Used if Enable is false and no Document is provided. |
| additionalTerms | null or string Additional terms to include on the generated bill of sale. |
| 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" Which parties must sign. Defaults to both Payer and Payee. Empty array means document is pre-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:
path Parameters
| transactionId required | string |
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Request Body schema: application/jsonrequired
| amount required | number or string <double> ^-?(?:0|[1-9]\d*)(?:\.\d+)?$ |
| payerFixedFee | null or number or string <double> ^-?(?:0|[1-9]\d*)(?:\.\d+)?$ |
| payeeFixedFee | null or number or string <double> ^-?(?:0|[1-9]\d*)(?:\.\d+)?$ |
Array of objects or null (CreateTransactionBase.Request.RequestSplitPayout) |
Responses
Request samples
- Payload
{- "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:
path Parameters
| transactionId required | string |
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Request Body schema: application/jsonrequired
| safepayAccountId | null or string |
| referenceId | null or string |
| phoneNumber | null or string |
Responses
Request samples
- Payload
{- "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:
path Parameters
| transactionId required | string |
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Request Body schema: application/jsonrequired
| safepayAccountId | null or string |
| referenceId | null or string |
| phoneNumber | null or string |
Responses
Request samples
- Payload
{- "safepayAccountId": null,
- "referenceId": null,
- "phoneNumber": null
}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:
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Request Body schema: application/jsonrequired
| 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
- Payload
{- "safepayAccountId": "string",
- "transactionId": "string",
- "amount": null,
- "description": null,
- "returnUrl": null,
- "skipUI": null
}Response samples
- 200
{- "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:
path Parameters
| paymentId required | string |
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Request Body schema: application/jsonrequired
| 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
- Payload
{- "paymentMethod": null,
- "bankId": null,
- "bankAccountId": null,
- "returnUrl": null
}Response samples
- 200
{- "paymentUrl": "string"
}List webhook examples
List webhook examples
Examples of all possible webhooks including payloads.
Authorizations:
header Parameters
| X-Correlation-Id | string [ 20 .. 64 ] characters Correlation ID used for logging. |
Responses
Response samples
- 200
{- "user": [
- {
- "safepayAccountId": "string",
- "connections": [
- {
- "referenceId": "string",
- "connected": "2019-08-24T14:15:22Z"
}
], - "eventName": "string",
- "eventDate": "2019-08-24T14:15:22Z",
- "webhookId": "string"
}
], - "transaction": [
- {
- "transactionId": "string",
- "paymentId": null,
- "referenceId": null,
- "payee": {
- "safepayAccountId": "string",
- "referenceId": null
}, - "payer": {
- "safepayAccountId": "string",
- "referenceId": null
}, - "eventName": "string",
- "eventDate": "2019-08-24T14:15:22Z",
- "webhookId": "string"
}
]
}