File tree Expand file tree Collapse file tree
docs/base-account/reference/prolink-utilities Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -161,6 +161,10 @@ async function extractCallbacks(prolink: string) {
161161 const callback = decoded .capabilities .dataCallback ;
162162 console .log (' Callback URL:' , callback .callbackURL );
163163 console .log (' Events:' , callback .events );
164+ // Events structure: [{ type: 'initiated', context: {...} }, ...]
165+ callback .events ?.forEach (event => {
166+ console .log (` Event: ${event .type } ` , event .context );
167+ });
164168 return callback ;
165169 }
166170
Original file line number Diff line number Diff line change @@ -107,7 +107,10 @@ const prolink = await encodeProlink({
107107 capabilities: {
108108 dataCallback: {
109109 callbackURL: ' https://api.yourapp.com/webhook' ,
110- events: [' initiated' , ' postSign' , ' confirmed' ]
110+ events: [
111+ { type: ' initiated' , context: { orderId: ' 123' } },
112+ { type: ' postSign' , context: { webhookTag: ' after' } }
113+ ]
111114 }
112115 }
113116});
You can’t perform that action at this time.
0 commit comments