Skip to content

Payment

Post a swish payment request

  • Use POST /v2/payment/swish to create a payment for a ledger note using a swish request. Information on errorcodes etc can be found at https://developer.swish.nu/.

Security

  • This API requires a signed in user

Request example

POST /v2/payment/swish
Create:
{
    "ledgerNoteId":"2324502342"
}

Parameters

Name Description
ledgerNoteId Required and must be a valid ledger note id.

Response example

{
  "id": "054407A5E19447A8B422F079C35DA76B",
  "error": "payeePaymentReference is invalid.",
  "token": "JAgv7zhBT4SfxsEwfjMrvkiAgeKnaWUZ",
  "qrCode": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAASwAAAEsCAYAAAB5fY51AACAAElEQVR4Xuy9CXQc1Zn37S/zzkxmMplMMpkQMglbWOMFg9Rde3VrsfbVsmxJtmVblm28YoeEfE4AM4BnCAkEMgbeAc5rhtcchuDwvRC2gzPEZjGStVlrq9VSq9VavBF7ZJxXY2xJ3/NUdXVX3brVXd1qGdnmf85zuqW+VS3pun++y/8+z6xZM0xtYtl17dyigg62/Ift3OL/2ckt2t/BlfWrsehTiEl4rkQnNRYaoosrJaPTw5fu7Jxd/hfke1+Kmiwv/7M+YUFen5Cx3S+k1/aJmVeRbS53DXLcN4YlpmJYdu4YlJiy427335Btjrtn/82IlFo2LKfuGJZSK/Aask3n7Nl/MSKllIzIKfcckVOrj7sd3ybbJEPq+8zfedQ1vxNiUo1biZgXjmPhmEuJOZ8ec83uxzgqz9l/"
}
Name Description
id The instructionUUID from swish. Unique identifier of the swish request.
error If something goes wrong when creating the swish request this containing the error. Otherwise empty.
token The request token from swish to use when opening the swish application on a mobile device. https://developer.swish.nu/documentation/guides/trigger-the-swish-app
qrCode The qr code as an image to present to the user for opening the swish application on the created request if not using the token.

Get a swish payment request

  • Use GET /v2/payment/swish/{id} to get status of an ongoing swish payment request. Information on error codes etc can be found at https://developer.swish.nu

Security

  • This API requires a signed in user

Request example

GET /v2/payment/swish/{id}
Create:
{
    "id":"054407A5E19447A8B422F079C35DA76B"
}

Parameters

Name Description
id Id from the create request api POST /v2/actor/payment/swish. Required

Response example

{
  "errorCode": "TM01",
  "errorMessage": "Swish timed out before the payment was started",
  "status": "ERROR",
}
Name Description
errorCode The instructionUUID from swish. Unique identifier of the swish request.
errorMessage If something goes wrong when creating the swish request this containing the error. Otherwise empty.
status The ongoing request status from swish. https://developer.swish.nu/documentation/guides/create-a-payment-request. Can be any of the following CREATED ,PAID, DECLINED, ERROR or CANCELLED