To create a Vipps payment, you perform an HTTP POST against the
/psp/vipps/payments resource.
An example of a payment creation request is provided below.
Each individual field of the JSON document is described in the following
section.
Use the expand request parameter to get a
response that includes one or more expanded sub-resources inlined.
The transaction amount (including VAT, if any) entered in the lowest monetary unit of the selected currency. E.g.: 10000 = 100.00 NOK, 5000 = 50.00 NOK.
check︎
vatAmount
integer
The payment’s VAT (Value Added Tax) amount, entered in the lowest monetary unit of the selected currency. E.g.: 10000 = 100.00 NOK, 5000 = 50.00 NOK. The vatAmount entered will not affect the amount shown on the payment page, which only shows the total amount. This field is used to specify how much of the total amount the VAT will be. Set to 0 (zero) if there is no VAT amount charged.
check︎
description
string(40)
A 40 character length textual description of the purchase.
check︎
userAgent
string
The user agent of the payer. Should typically be set to the value of the User-Agent header sent by the payer’s web browser.
check︎
language
string
sv-SE, nb-NO or en-US.
check︎
urls
object
The object containing URLs relevant for the payment.
check︎
hostUrls
array
The array of valid host URLs.
check︎
completeUrl
string
The URL that Swedbank Pay will redirect back to when the payer has completed their interactions with the payment. This does not indicate a successful payment, only that it has reached a final (complete) state. A GET request needs to be performed on the payment to inspect it further. See completeUrl for details.
cancelUrl
string
The URL to redirect the payer to if the payment is cancelled, either by the payer or by the merchant trough an abort request of the payment.
paymentUrl
string
The paymentUrl represents the URL that Swedbank Pay will redirect back to when the view-operation needs to be loaded, to inspect and act on the current status of the payment, such as when the payer is redirected out of the Seamless View (the <iframe>) and sent back after completing the payment. paymentUrl is only used in Seamless Views and should point to the page of where the Payment Order Seamless View is hosted. If both cancelUrl and paymentUrl is sent, the paymentUrl will used.
callbackUrl
string
The URL that Swedbank Pay will perform an HTTP POST against every time a transaction is created on the payment. See callback for details.
logoUrl
string
The URL that will be used for showing the customer logo. Must be a picture with maximum 50px height and 400px width. Requires HTTPS.
termsOfServiceUrl
string
The URL to the terms of service document which the payer must accept in order to complete the payment. HTTPS is a requirement.
check︎
payeeInfo
object
The payeeInfo object, containing information about the payee (the recipient of the money). See payeeInfo for details.
check︎
payeeId
string
This is the unique id that identifies this payee (like merchant) set by Swedbank Pay.
check︎
payeeReference
string
A unique reference from the merchant system. Set per operation to ensure an exactly-once delivery of a transactional operation. Length and content validation depends on whether the transaction.number or the payeeReference is sent to the acquirer. If Swedbank Pay handles thesettlement, the transaction.number is sent and the payeeReference must be in the format of A-Za-z0-9 and string(30). If you handle the settlement, Swedbank Pay will send the payeeReference and it will be limited to the format of string(12). All characters must be digits.
payeeName
string
The payee name (like merchant name) that will be displayed when redirected to Swedbank Pay.
productCategory
string(50)
A product category or number sent in from the payee/merchant. This is not validated by Swedbank Pay, but will be passed through the payment process and may be used in the settlement process.
orderReference
string(50)
The order reference should reflect the order reference found in the merchant’s systems.
subsite
string(40)
The subsite field can be used to perform split settlement on the payment. The subsites must be resolved with Swedbank Pay reconciliation before being used.
payer
string
The payer object, containing information about the payer.
payerReference
string
The reference to the payer from the merchant system, like e-mail address, mobile number, customer number etc. Mandatory if generateRecurrenceToken, RecurrenceToken, generatePaymentToken or paymentToken is true.
prefillInfo
object
An object that holds prefill information that can be inserted on the payment page.
msisdn
string
Number will be prefilled on payment page, if valid. Only Norwegian phone numbers are supported. The country code prefix is +47
Posting a payment (operation Purchase) returns the options of aborting the
payment altogether or creating an authorization transaction through the
redirect-authorization hyperlink.
When a payment resource is created and during its lifetime,
it will have a set of operations that can be performed on it.
Which operations are available will vary depending on the state of the
payment resource, what the access token is authorized to do, etc.
Field
Description
href
The target URL to perform the operation against.
rel
The name of the relation the operation has to the current resource.
method
The HTTP method to use when performing the operation.
The operations should be performed as described in each response and not as
described here in the documentation.
Always use the href and method as specified in the response by finding
the appropriate operation based on its rel value.
The only thing that should be hard coded in the client is the value of the
rel and the request that will be sent in the HTTP body of the request for
the given operation.
Operation
Description
update-payment-abort
Aborts the payment before any financial transactions are performed.
redirect-authorization
Used to redirect the payer to Swedbank Pay Payments and the authorization UI.
{"paymentorder":"/psp/paymentorders/7e6cdfc3-1276-44e9-9992-7cf4419750e1","authorization":{"id":"/psp/paymentorders/7e6cdfc3-1276-44e9-9992-7cf4419750e1/currentpayment/ec2a9b09-601a-42ae-8e33-a5737e1cf177","itemDescriptions":{"id":"/psp/paymentorders/7e6cdfc3-1276-44e9-9992-7cf4419750e1/currentpayment/ec2a9b09-601a-42ae-8e33-a5737e1cf177/itemDescriptions"},"transaction":{"id":"/psp/paymentorders/7e6cdfc3-1276-44e9-9992-7cf4419750e1/currentpayment/ec2a9b09-601a-42ae-8e33-a5737e1cf177","created":"2016-09-14T01:01:01.01Z","updated":"2016-09-14T01:01:01.03Z","type":"Authorization","state":"Completed","number":1234567890,"amount":1000,"vatAmount":250,"description":"Test transaction","payeeReference":"ABC123","isOperational":false,"problem":{"type":"https://api.payex.com/psp/errordetail/vipps/3DSECUREERROR","title":"Error when complete authorization","status":400,"detail":"Unable to complete 3DSecure verification!","problems":[]"operations":[{"href":"/psp/paymentorders/7e6cdfc3-1276-44e9-9992-7cf4419750e1/currentpayment/ec2a9b09-601a-42ae-8e33-a5737e1cf177","rel":"edit-authorization","method":"PATCH"}]}}}
Field
Type
Description
paymentOrder
string
The relative URL and unique identifier of the payment resource . Please read about URL Usage to understand how this and other URLs should be used in your solution.
id
string
The relative URL and unique identifier of the authorization resource . Please read about URL Usage to understand how this and other URLs should be used in your solution.
itemDescriptions
object
The object representation of the itemDescriptions resource.
id
string
The relative URL and unique identifier of the itemDescriptions resource . Please read about URL Usage to understand how this and other URLs should be used in your solution.
transaction
object
The object representation of the generic transaction resource, containing information about the current transaction.
id
string
The relative URL and unique identifier of the transaction resource . Please read about URL Usage to understand how this and other URLs should be used in your solution.
created
string
The ISO-8601 date and time of when the transaction was created.
updated
string
The ISO-8601 date and time of when the transaction was updated.
type
string
Indicates the transaction type.
state
string
Indicates the state of the transaction, usually initialized, completed or failed. If a partial authorization has been done and further transactions are possible, the state will be awaitingActivity.
number
integer
The transaction number, useful when there’s need to reference the transaction in human communication. Not usable for programmatic identification of the transaction, where id should be used instead.
amount
integer
The transaction amount (including VAT, if any) entered in the lowest monetary unit of the selected currency. E.g.: 10000 = 100.00 SEK, 5000 = 50.00 SEK.
vatAmount
integer
The payment’s VAT (Value Added Tax) amount, entered in the lowest monetary unit of the selected currency. E.g.: 10000 = 100.00 SEK, 5000 = 50.00 SEK. The vatAmount entered will not affect the amount shown on the payment page, which only shows the total amount. This field is used to specify how much of the total amount the VAT will be. Set to 0 (zero) if there is no VAT amount charged.
description
string
A 40 character length textual description of the purchase.
payeeReference
string
A unique reference from the merchant system. Set per operation to ensure an exactly-once delivery of a transactional operation. Length and content validation depends on whether the transaction.number or the payeeReference is sent to the acquirer. If Swedbank Pay handles thesettlement, the transaction.number is sent and the payeeReference must be in the format of A-Za-z0-9 and string(30). If you handle the settlement, Swedbank Pay will send the payeeReference and it will be limited to the format of string(12). All characters must be digits. In Invoice Payments payeeReference is used as an invoice/receipt number, if the receiptReference is not defined.
receiptReference
string
A unique reference to the transaction, provided by the merchant. Can be used as an invoice or receipt number as a supplement to payeeReference.
failedReason
string
The human readable explanation of why the payment failed.
isOperational
bool
true if the transaction is operational; otherwise false.
operations
array
The array of operations that are possible to perform on the transaction in its current state.
Cancellations
The cancellations resource lists the cancellation transactions on a
specific payment.
The cancel resource contains information about the
cancel transaction made against a vipps payment. You can
return a specific cancel transaction by performing a GET request
towards the specific transaction’s id.
The relative URL and unique identifier of the payment resource . Please read about URL Usage to understand how this and other URLs should be used in your solution.
id
string
The relative URL and unique identifier of the cancellations resource . Please read about URL Usage to understand how this and other URLs should be used in your solution.
{{ transaction }}List
array
The array of cancel transaction objects.
{{ transaction }}List[]
object
The cancel transaction object described in the cancel resource below.
id
string
The relative URL and unique identifier of the transaction resource . Please read about URL Usage to understand how this and other URLs should be used in your solution.
created
string
The ISO-8601 date and time of when the transaction was created.
updated
string
The ISO-8601 date and time of when the transaction was updated.
type
string
Indicates the transaction type.
state
string
Indicates the state of the transaction, usually initialized, completed or failed. If a partial cancel has been done and further transactions are possible, the state will be awaitingActivity.
number
integer
The transaction number, useful when there’s need to reference the transaction in human communication. Not usable for programmatic identification of the transaction, where id should be used instead.
amount
integer
The transaction amount (including VAT, if any) entered in the lowest monetary unit of the selected currency. E.g.: 10000 = 100.00 SEK, 5000 = 50.00 SEK.
vatAmount
integer
The payment’s VAT (Value Added Tax) amount, entered in the lowest monetary unit of the selected currency. E.g.: 10000 = 100.00 SEK, 5000 = 50.00 SEK. The vatAmount entered will not affect the amount shown on the payment page, which only shows the total amount. This field is used to specify how much of the total amount the VAT will be. Set to 0 (zero) if there is no VAT amount charged.
description
string
A 40 character length textual description of the purchase.
payeeReference
string
A unique reference from the merchant system. Set per operation to ensure an exactly-once delivery of a transactional operation. Length and content validation depends on whether the transaction.number or the payeeReference is sent to the acquirer. If Swedbank Pay handles thesettlement, the transaction.number is sent and the payeeReference must be in the format of A-Za-z0-9 and string(30). If you handle the settlement, Swedbank Pay will send the payeeReference and it will be limited to the format of string(12). All characters must be digits. In Invoice Payments payeeReference is used as an invoice/receipt number, if the receiptReference is not defined.
isOperational
bool
true if the transaction is operational; otherwise false.
operations
array
The array of operations that are possible to perform on the transaction in its current state.
Create Cancellation Transaction
A payment may be cancelled if the relcreate-cancellation is available. You
can only cancel a payment, or part of it, if it has yet to be captured. To
revert a capture, or part of a capture, you must perform a reversal.
Performing a cancellation will cancel all the remaining authorized amount on a
payment.
{"paymentorder":"/psp/paymentorders/7e6cdfc3-1276-44e9-9992-7cf4419750e1","cancel":{"id":"/psp/paymentorders/7e6cdfc3-1276-44e9-9992-7cf4419750e1/currentpayment/ec2a9b09-601a-42ae-8e33-a5737e1cf177","itemDescriptions":{"id":"/psp/paymentorders/7e6cdfc3-1276-44e9-9992-7cf4419750e1/currentpayment/ec2a9b09-601a-42ae-8e33-a5737e1cf177/itemDescriptions"},"transaction":{"id":"/psp/paymentorders/7e6cdfc3-1276-44e9-9992-7cf4419750e1/currentpayment/ec2a9b09-601a-42ae-8e33-a5737e1cf177","created":"2016-09-14T01:01:01.01Z","updated":"2016-09-14T01:01:01.03Z","type":"Cancel","state":"Completed","number":1234567890,"amount":1000,"vatAmount":250,"description":"Test transaction","payeeReference":"ABC123","isOperational":false,"problem":{"type":"https://api.payex.com/psp/errordetail/vipps/3DSECUREERROR","title":"Error when complete authorization","status":400,"detail":"Unable to complete 3DSecure verification!","problems":[]"operations":[{"href":"/psp/paymentorders/7e6cdfc3-1276-44e9-9992-7cf4419750e1/currentpayment/ec2a9b09-601a-42ae-8e33-a5737e1cf177","rel":"edit-cancel","method":"PATCH"}]}}}
Field
Type
Description
paymentOrder
string
The relative URL and unique identifier of the payment resource . Please read about URL Usage to understand how this and other URLs should be used in your solution.
id
string
The relative URL and unique identifier of the cancel resource . Please read about URL Usage to understand how this and other URLs should be used in your solution.
itemDescriptions
object
The object representation of the itemDescriptions resource.
id
string
The relative URL and unique identifier of the itemDescriptions resource . Please read about URL Usage to understand how this and other URLs should be used in your solution.
transaction
object
The object representation of the generic transaction resource, containing information about the current transaction.
id
string
The relative URL and unique identifier of the transaction resource . Please read about URL Usage to understand how this and other URLs should be used in your solution.
created
string
The ISO-8601 date and time of when the transaction was created.
updated
string
The ISO-8601 date and time of when the transaction was updated.
type
string
Indicates the transaction type.
state
string
Indicates the state of the transaction, usually initialized, completed or failed. If a partial cancel has been done and further transactions are possible, the state will be awaitingActivity.
number
integer
The transaction number, useful when there’s need to reference the transaction in human communication. Not usable for programmatic identification of the transaction, where id should be used instead.
amount
integer
The transaction amount (including VAT, if any) entered in the lowest monetary unit of the selected currency. E.g.: 10000 = 100.00 SEK, 5000 = 50.00 SEK.
vatAmount
integer
The payment’s VAT (Value Added Tax) amount, entered in the lowest monetary unit of the selected currency. E.g.: 10000 = 100.00 SEK, 5000 = 50.00 SEK. The vatAmount entered will not affect the amount shown on the payment page, which only shows the total amount. This field is used to specify how much of the total amount the VAT will be. Set to 0 (zero) if there is no VAT amount charged.
description
string
A 40 character length textual description of the purchase.
payeeReference
string
A unique reference from the merchant system. Set per operation to ensure an exactly-once delivery of a transactional operation. Length and content validation depends on whether the transaction.number or the payeeReference is sent to the acquirer. If Swedbank Pay handles thesettlement, the transaction.number is sent and the payeeReference must be in the format of A-Za-z0-9 and string(30). If you handle the settlement, Swedbank Pay will send the payeeReference and it will be limited to the format of string(12). All characters must be digits. In Invoice Payments payeeReference is used as an invoice/receipt number, if the receiptReference is not defined.
receiptReference
string
A unique reference to the transaction, provided by the merchant. Can be used as an invoice or receipt number as a supplement to payeeReference.
failedReason
string
The human readable explanation of why the payment failed.
isOperational
bool
true if the transaction is operational; otherwise false.
operations
array
The array of operations that are possible to perform on the transaction in its current state.
Reversals
The reversals resource lists the reversal transactions (one or more)
on a specific payment.
{"transaction":{"payeeReference":"testabc","description":"description for transaction"}}
GET Response Reversal
The reversal resource contains information about the
reversal transaction made against a vipps payment. You can
return a specific reversal transaction by performing a GET request
towards the specific transaction’s id.
The relative URL and unique identifier of the payment resource . Please read about URL Usage to understand how this and other URLs should be used in your solution.
id
string
The relative URL and unique identifier of the reversals resource . Please read about URL Usage to understand how this and other URLs should be used in your solution.
{{ transaction }}List
array
The array of reversal transaction objects.
{{ transaction }}List[]
object
The reversal transaction object described in the reversal resource below.
id
string
The relative URL and unique identifier of the transaction resource . Please read about URL Usage to understand how this and other URLs should be used in your solution.
created
string
The ISO-8601 date and time of when the transaction was created.
updated
string
The ISO-8601 date and time of when the transaction was updated.
type
string
Indicates the transaction type.
state
string
Indicates the state of the transaction, usually initialized, completed or failed. If a partial reversal has been done and further transactions are possible, the state will be awaitingActivity.
number
integer
The transaction number, useful when there’s need to reference the transaction in human communication. Not usable for programmatic identification of the transaction, where id should be used instead.
amount
integer
The transaction amount (including VAT, if any) entered in the lowest monetary unit of the selected currency. E.g.: 10000 = 100.00 SEK, 5000 = 50.00 SEK.
vatAmount
integer
The payment’s VAT (Value Added Tax) amount, entered in the lowest monetary unit of the selected currency. E.g.: 10000 = 100.00 SEK, 5000 = 50.00 SEK. The vatAmount entered will not affect the amount shown on the payment page, which only shows the total amount. This field is used to specify how much of the total amount the VAT will be. Set to 0 (zero) if there is no VAT amount charged.
description
string
A 40 character length textual description of the purchase.
payeeReference
string
A unique reference from the merchant system. Set per operation to ensure an exactly-once delivery of a transactional operation. Length and content validation depends on whether the transaction.number or the payeeReference is sent to the acquirer. If Swedbank Pay handles thesettlement, the transaction.number is sent and the payeeReference must be in the format of A-Za-z0-9 and string(30). If you handle the settlement, Swedbank Pay will send the payeeReference and it will be limited to the format of string(12). All characters must be digits. In Invoice Payments payeeReference is used as an invoice/receipt number, if the receiptReference is not defined.
isOperational
bool
true if the transaction is operational; otherwise false.
operations
array
The array of operations that are possible to perform on the transaction in its current state.
Create Reversal Transaction
A reversal transaction can be created if the relcreate-reversal is
available.
{"transaction":{"payeeReference":"testabc","description":"description for transaction"}}
Required
Field
Type
Description
check
transaction
object
The transaction object.
check
amount
integer
The transaction amount (including VAT, if any) entered in the lowest monetary unit of the selected currency. E.g.: 10000 = 100.00 NOK, 5000 = 50.00 NOK.
check
vatAmount
integer
The payment’s VAT (Value Added Tax) amount, entered in the lowest monetary unit of the selected currency. E.g.: 10000 = 100.00 NOK, 5000 = 50.00 NOK. The vatAmount entered will not affect the amount shown on the payment page, which only shows the total amount. This field is used to specify how much of the total amount the VAT will be. Set to 0 (zero) if there is no VAT amount charged.
check
description
string
A textual description of the capture
check
payeeReference
string
A unique reference from the merchant system. Set per operation to ensure an exactly-once delivery of a transactional operation. Length and content validation depends on whether the transaction.number or the payeeReference is sent to the acquirer. If Swedbank Pay handles thesettlement, the transaction.number is sent and the payeeReference must be in the format of A-Za-z0-9 and string(30). If you handle the settlement, Swedbank Pay will send the payeeReference and it will be limited to the format of string(12). All characters must be digits.
Reversal Response
The created reversal resource contains information about the
reversal transaction made against a vipps payment.
{"paymentorder":"/psp/paymentorders/7e6cdfc3-1276-44e9-9992-7cf4419750e1","reversal":{"id":"/psp/paymentorders/7e6cdfc3-1276-44e9-9992-7cf4419750e1/currentpayment/ec2a9b09-601a-42ae-8e33-a5737e1cf177","itemDescriptions":{"id":"/psp/paymentorders/7e6cdfc3-1276-44e9-9992-7cf4419750e1/currentpayment/ec2a9b09-601a-42ae-8e33-a5737e1cf177/itemDescriptions"},"transaction":{"id":"/psp/paymentorders/7e6cdfc3-1276-44e9-9992-7cf4419750e1/currentpayment/ec2a9b09-601a-42ae-8e33-a5737e1cf177","created":"2016-09-14T01:01:01.01Z","updated":"2016-09-14T01:01:01.03Z","type":"Reversal","state":"Completed","number":1234567890,"amount":1000,"vatAmount":250,"description":"Test transaction","payeeReference":"ABC123","isOperational":false,"problem":{"type":"https://api.payex.com/psp/errordetail/vipps/3DSECUREERROR","title":"Error when complete authorization","status":400,"detail":"Unable to complete 3DSecure verification!","problems":[]"operations":[{"href":"/psp/paymentorders/7e6cdfc3-1276-44e9-9992-7cf4419750e1/currentpayment/ec2a9b09-601a-42ae-8e33-a5737e1cf177","rel":"edit-reversal","method":"PATCH"}]}}}
Field
Type
Description
paymentOrder
string
The relative URL and unique identifier of the payment resource . Please read about URL Usage to understand how this and other URLs should be used in your solution.
id
string
The relative URL and unique identifier of the reversal resource . Please read about URL Usage to understand how this and other URLs should be used in your solution.
itemDescriptions
object
The object representation of the itemDescriptions resource.
id
string
The relative URL and unique identifier of the itemDescriptions resource . Please read about URL Usage to understand how this and other URLs should be used in your solution.
transaction
object
The object representation of the generic transaction resource, containing information about the current transaction.
id
string
The relative URL and unique identifier of the transaction resource . Please read about URL Usage to understand how this and other URLs should be used in your solution.
created
string
The ISO-8601 date and time of when the transaction was created.
updated
string
The ISO-8601 date and time of when the transaction was updated.
type
string
Indicates the transaction type.
state
string
Indicates the state of the transaction, usually initialized, completed or failed. If a partial reversal has been done and further transactions are possible, the state will be awaitingActivity.
number
integer
The transaction number, useful when there’s need to reference the transaction in human communication. Not usable for programmatic identification of the transaction, where id should be used instead.
amount
integer
The transaction amount (including VAT, if any) entered in the lowest monetary unit of the selected currency. E.g.: 10000 = 100.00 SEK, 5000 = 50.00 SEK.
vatAmount
integer
The payment’s VAT (Value Added Tax) amount, entered in the lowest monetary unit of the selected currency. E.g.: 10000 = 100.00 SEK, 5000 = 50.00 SEK. The vatAmount entered will not affect the amount shown on the payment page, which only shows the total amount. This field is used to specify how much of the total amount the VAT will be. Set to 0 (zero) if there is no VAT amount charged.
description
string
A 40 character length textual description of the purchase.
payeeReference
string
A unique reference from the merchant system. Set per operation to ensure an exactly-once delivery of a transactional operation. Length and content validation depends on whether the transaction.number or the payeeReference is sent to the acquirer. If Swedbank Pay handles thesettlement, the transaction.number is sent and the payeeReference must be in the format of A-Za-z0-9 and string(30). If you handle the settlement, Swedbank Pay will send the payeeReference and it will be limited to the format of string(12). All characters must be digits. In Invoice Payments payeeReference is used as an invoice/receipt number, if the receiptReference is not defined.
receiptReference
string
A unique reference to the transaction, provided by the merchant. Can be used as an invoice or receipt number as a supplement to payeeReference.
failedReason
string
The human readable explanation of why the payment failed.
isOperational
bool
true if the transaction is operational; otherwise false.
operations
array
The array of operations that are possible to perform on the transaction in its current state.
Abort
To abort a payment, perform the update-payment-abort operation that is
returned in the payment request.