Callback

You can register a callback URL to receive asynchronous updates for a payment.

The URL needs to be https and support a PUT method

Callback request body

Request Body schema: application/json
object (PaymentCallbackDto)

Payment callback DTO, same as the regular payment DTO but the dates are expressed as milliseconds since epoch

id
string
merchantId
string
type
string
Enum: "PAYMENT" "REFUND"
status
string
Enum: "CREATED" "CONFIRMED" "PROCESSING" "AUTHORIZED" "COMPLETE" "CANCELED" "USER_CANCELED" "PAYMENT_FAILED" "TIMEOUT" "SYSTEM_ERROR"
created
number <int64>

Created timestamp

cardAlias
string
cardType
string
Enum: "CARD" "SWISH" "WEBPAY_INVOICE" "RECURRING_CARD"
cardSubType
string

Currently only card brands when applicable, more types might be added later

Enum: "VISA" "MASTERCARD" "AMEX" "UNKNOWN"
amount
number
currency
string
purchaseReference
string
paymentPlanCampaignCode
number <int64>

WebPay payment plan campaign code

processorReference
object <string>

Reference used by the processor

processorCompleted
number <int64>

Completed time according to the processor. Currently only used for Swish payments

callback
boolean
application/json
{
  • "payment": {
    }
}

Response

Should return an HTTP 200 response code.