sinazza

Define callback functions

0 votes
Hello, I've searched the forum for web hooks/call backs and couldn't find anything special. Is it possible to get notified when a user signs a document? Like using web hooks or generally defining a custom function for this event? Thank you, Sina

Approved Answer

Reply to: Define callback functions

0 votes
Hi Sina, Yes, with OneSpan Sign, you can use listeners to monitor the events like a signer has signed, a package has been completed, etc. This guidance gives you an idea about how to set up your callback url and what events you can choose to listen. Since your application is PHP based, Haris already created a sample code for you guys. :) I would also build this code on my side in case you have any further questions. To give you a more direct understanding about what messages OneSpan Sign would send to your callback url, I have prepared some payloads for you:
Create a new Package:
{"@class":"com.silanis.esl.packages.event.ESLProcessEvent","name":"PACKAGE_CREATE","sessionUser":"18EZDL44xgsX","packageId":"wVdZEaPD2igwUnFGJBjDD0dpO7k=","message":null,"documentId":null,"createdDate":"2018-06-30T20:04:55.384Z"}

Send a package
{"@class":"com.silanis.esl.packages.event.ESLProcessEvent","name":"PACKAGE_ACTIVATE","sessionUser":"18EZDL44xgsX","packageId":"5n4obeO8jYoPp126Cm-Y3fxdfbo=","message":null,"documentId":null,"createdDate":"2018-06-30T20:09:50.425Z"}

Signer 1 accept consent document
{"@class":"com.silanis.esl.packages.event.ESLProcessEvent","name":"DOCUMENT_SIGNED","sessionUser":"44aafb7c-97b9-40e1-bb59-eb76c7d2a484","packageId":"5n4obeO8jYoPp126Cm-Y3fxdfbo=","message":null,"documentId":"default-consent","createdDate":"2018-06-30T20:10:51.002Z"}

Signer 1 sign a signature block
{"@class":"com.silanis.esl.packages.event.ESLProcessEvent","name":"DOCUMENT_SIGNED","sessionUser":"44aafb7c-97b9-40e1-bb59-eb76c7d2a484","packageId":"5n4obeO8jYoPp126Cm-Y3fxdfbo=","message":null,"documentId":"7caf46cdd75f7a411bf8c22793b84fa79d8d180becc40691","createdDate":"2018-06-30T20:12:12.256Z"}

Signer 1 finish his part
{"@class":"com.silanis.esl.packages.event.ESLProcessEvent","name":"SIGNER_COMPLETE","sessionUser":"44aafb7c-97b9-40e1-bb59-eb76c7d2a484","packageId":"5n4obeO8jYoPp126Cm-Y3fxdfbo=","message":null,"documentId":null,"createdDate":"2018-06-30T20:12:12.272Z"}

Package Complete:
{"@class":"com.silanis.esl.packages.event.ESLProcessEvent","name":"PACKAGE_COMPLETE","sessionUser":"e00696ec-d6f5-4feb-89c5-a5ce002a6c66","packageId":"5n4obeO8jYoPp126Cm-Y3fxdfbo=","message":null,"documentId":null,"createdDate":"2018-06-30T20:15:01.038Z"}

Signer 1 opt out:
{"@class":"com.silanis.esl.packages.event.ESLProcessEvent","name":"PACKAGE_OPT_OUT","sessionUser":"b5381b13-991e-4179-9f9b-d4e1ec9d06bb","packageId":"J5tyJalzG49hmDho5b9JdG61T7M=","message":"the personal info is not correct","documentId":null,"createdDate":"2018-06-30T20:16:29.763Z"}
Besides these, we provide a lot more events for you to listen. Along with OneSpan Sign, we wish to build a better application with you! Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Define callback functions

0 votes
Hi Duo, The PHP sample works perfectly, thank you very much. Based on the guidance you provided, callback functions can be defined using the UI which I found in the production environment but not the sandbox. Is defining callback functions possible in sandbox environment as well? Regards, Sina

Reply to: Define callback functions

1 votes
Hi Sina, Yes, account under every environment has this feature. If your account role is not "Manager", let say If you are logging with a sender under an account owner. In Web UI interface, you cannot see the "Admin" selection when click on the drop down list beside your name. Or if that's not the case, could you take a screen shot of your Admin page to see how many sections you have in your account? I took a screenshot as attachment to show what I meant. PS: The screen shot is in a Sandbox environment by default configuration of the account. Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Reply to: Define callback functions

0 votes
Hi Duo, Found it. Thank you. Sina

Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off