QR code inclusion in Mass-mailings
It sounds like you would want to create a custom token. See https://docs.civicrm.org/dev/en/latest/hooks/hook_civicrm_tokens/
So for the value of the token you would need to do the Swish api call and then use the result.