Payment may be attached to the invoke script transaction to transfer tokens to the account of the called dApp.
Starting from the fourth version of Ride language, up to two payments can be applied to invoke script transaction. This functionality becomes available after activation of "Ride V4 and multiple attached payments for Invoke Script Transaction" (No. 16) feature on the node. Ride 4.0 is currently available on stagenet
See the page Invoke script transaction binary format.