I’m trying to integrate the accept hosted payment form.
But faced with the issue where I cannot get the id of just created payment profile for the customer.
The callback coming over IFrameCommunicator just gives the status “successfulSave”. There is no paymentProfileId sent back.
For a workaround, I configured webhook to catch the payment profile creation event. There I do receive customerProfileId and paymentProfileId, but now I’ve got the new issue.
Yet, I cannot guarantee that the paymentProfileId in the webhook is assigned exactly to the payment profile I’ve just created. What if several clients create the new payment profile for the same customerProfileId at the same time?
I thought I could solve this problem by sending the refId when requesting the token for the accept hosted page (API docs says that I can do that and will get this value as merchantReferenceId in the result).
But this value does not get back in the webhook payload.
Please advise on how can I get this working for me.